From d8e797dd9bd032ee83a0dc21456e14da337e4ef0 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Tue, 15 Sep 2020 10:25:09 +0200 Subject: [PATCH] Upgrade to 3.4.3 --- kirby/composer.json | 2 +- kirby/composer.lock | 34 ++-- kirby/config/aliases.php | 2 + kirby/config/api/routes/pages.php | 25 ++- kirby/config/api/routes/site.php | 25 ++- kirby/config/api/routes/users.php | 33 ++-- kirby/config/helpers.php | 60 +++---- .../parsedown-extra/ParsedownExtra.php | 3 + kirby/i18n/translations/cs.json | 4 +- kirby/i18n/translations/de.json | 64 ++++---- kirby/i18n/translations/en.json | 1 + kirby/i18n/translations/id.json | 4 +- kirby/panel/dist/css/app.css | 2 +- kirby/panel/dist/js/app.js | 2 +- kirby/src/Api/Api.php | 65 ++++---- kirby/src/Api/Collection.php | 46 ++++++ kirby/src/Api/Model.php | 54 ++++++- kirby/src/Cms/Api.php | 28 +++- kirby/src/Cms/App.php | 48 +++--- kirby/src/Cms/AppPlugins.php | 17 +- kirby/src/Cms/AppTranslations.php | 31 ++-- kirby/src/Cms/AppUsers.php | 3 +- kirby/src/Cms/Auth.php | 3 + kirby/src/Cms/Blueprint.php | 17 +- kirby/src/Cms/Collection.php | 13 +- kirby/src/Cms/Collections.php | 1 + kirby/src/Cms/Content.php | 4 +- kirby/src/Cms/ContentLock.php | 3 + kirby/src/Cms/ContentLocks.php | 3 + kirby/src/Cms/ContentTranslation.php | 6 +- kirby/src/Cms/Dir.php | 2 +- kirby/src/Cms/Email.php | 7 + kirby/src/Cms/Event.php | 1 + kirby/src/Cms/Field.php | 8 +- kirby/src/Cms/File.php | 48 +++--- kirby/src/Cms/FileActions.php | 5 + kirby/src/Cms/FileFoundation.php | 3 +- kirby/src/Cms/FileModifications.php | 12 +- kirby/src/Cms/FilePicker.php | 1 + kirby/src/Cms/FileRules.php | 78 +++++++++- kirby/src/Cms/FileVersion.php | 43 ++++- kirby/src/Cms/Filename.php | 2 +- kirby/src/Cms/Files.php | 1 - kirby/src/Cms/Form.php | 5 + kirby/src/Cms/HasChildren.php | 2 + kirby/src/Cms/HasFiles.php | 4 +- kirby/src/Cms/HasMethods.php | 5 +- kirby/src/Cms/Html.php | 2 +- kirby/src/Cms/Ingredients.php | 2 +- kirby/src/Cms/KirbyTags.php | 4 +- kirby/src/Cms/Language.php | 1 + kirby/src/Cms/LanguageRouter.php | 1 + kirby/src/Cms/LanguageRules.php | 26 ++++ kirby/src/Cms/Languages.php | 4 +- kirby/src/Cms/Media.php | 4 +- kirby/src/Cms/ModelPermissions.php | 21 +++ kirby/src/Cms/ModelWithContent.php | 147 +++++++++++++----- kirby/src/Cms/Nest.php | 5 + kirby/src/Cms/NestCollection.php | 2 +- kirby/src/Cms/Page.php | 49 +++--- kirby/src/Cms/PageActions.php | 48 ++++-- kirby/src/Cms/PageBlueprint.php | 2 +- kirby/src/Cms/PagePermissions.php | 18 +++ kirby/src/Cms/PagePicker.php | 1 + kirby/src/Cms/PageRules.php | 130 ++++++++++++++++ kirby/src/Cms/PageSiblings.php | 8 + kirby/src/Cms/Pages.php | 5 +- kirby/src/Cms/Panel.php | 15 +- kirby/src/Cms/Permissions.php | 49 ++++++ kirby/src/Cms/Picker.php | 4 +- kirby/src/Cms/Plugin.php | 43 +++++ kirby/src/Cms/Responder.php | 10 +- kirby/src/Cms/Response.php | 4 +- kirby/src/Cms/Role.php | 28 ++++ kirby/src/Cms/Roles.php | 4 +- kirby/src/Cms/Search.php | 8 +- kirby/src/Cms/Section.php | 13 ++ kirby/src/Cms/Site.php | 49 ++---- kirby/src/Cms/SiteBlueprint.php | 2 +- kirby/src/Cms/SiteRules.php | 17 ++ kirby/src/Cms/Structure.php | 3 +- kirby/src/Cms/StructureObject.php | 2 +- kirby/src/Cms/System.php | 9 +- kirby/src/Cms/Translation.php | 4 +- kirby/src/Cms/Translations.php | 8 + kirby/src/Cms/Url.php | 2 +- kirby/src/Cms/User.php | 30 ++-- kirby/src/Cms/UserActions.php | 12 +- kirby/src/Cms/UserBlueprint.php | 6 + kirby/src/Cms/UserPermissions.php | 17 ++ kirby/src/Cms/UserPicker.php | 1 + kirby/src/Cms/UserRules.php | 114 +++++++++++++- kirby/src/Database/Database.php | 52 +++---- kirby/src/Database/Db.php | 7 +- kirby/src/Database/Query.php | 33 ++-- kirby/src/Database/Sql.php | 10 +- kirby/src/Form/Field.php | 82 ++++++++-- kirby/src/Form/Form.php | 2 +- kirby/src/Image/Darkroom.php | 42 +++++ kirby/src/Image/Darkroom/GdLib.php | 36 +++++ kirby/src/Image/Darkroom/ImageMagick.php | 88 +++++++++++ kirby/src/Image/Dimensions.php | 16 +- kirby/src/Image/Image.php | 10 +- kirby/src/Toolkit/Collection.php | 93 ++++++++--- kirby/src/Toolkit/Pagination.php | 3 + kirby/src/Toolkit/Str.php | 14 +- kirby/src/Toolkit/V.php | 17 +- .../src/Autoloader.php | 4 + 108 files changed, 1750 insertions(+), 523 deletions(-) diff --git a/kirby/composer.json b/kirby/composer.json index 57ae129..c8b8cce 100755 --- a/kirby/composer.json +++ b/kirby/composer.json @@ -1,7 +1,7 @@ { "name": "getkirby/cms", "description": "The Kirby 3 core", - "version": "3.4.2", + "version": "3.4.3", "license": "proprietary", "keywords": ["kirby", "cms", "core"], "homepage": "https://getkirby.com", diff --git a/kirby/composer.lock b/kirby/composer.lock index 36f8e91..3c73f96 100755 --- a/kirby/composer.lock +++ b/kirby/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eb962e577ae2a9c4e6c5f19bb605e459", + "content-hash": "3c8b128ea6de49c70f9ec3056bcb18a2", "packages": [ { "name": "claviska/simpleimage", @@ -108,23 +108,23 @@ }, { "name": "getkirby/composer-installer", - "version": "1.1.4", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/getkirby/composer-installer.git", - "reference": "2d6b8f5601a31caeeea45623e1643fbb437eb94e" + "reference": "240a8b2c275d61b66601feb58222b7d34bc6cf1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getkirby/composer-installer/zipball/2d6b8f5601a31caeeea45623e1643fbb437eb94e", - "reference": "2d6b8f5601a31caeeea45623e1643fbb437eb94e", + "url": "https://api.github.com/repos/getkirby/composer-installer/zipball/240a8b2c275d61b66601feb58222b7d34bc6cf1e", + "reference": "240a8b2c275d61b66601feb58222b7d34bc6cf1e", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0" + "composer-plugin-api": "^1.0 || ^2.0" }, "require-dev": { - "composer/composer": "^1.8", + "composer/composer": "^1.8 || 2.0.*@dev", "phpunit/phpunit": "^7.0" }, "type": "composer-plugin", @@ -142,7 +142,7 @@ ], "description": "Kirby's custom Composer installer for the Kirby CMS and for Kirby plugins", "homepage": "https://getkirby.com", - "time": "2019-02-11T20:27:36+00:00" + "time": "2020-09-13T14:43:34+00:00" }, { "name": "laminas/laminas-escaper", @@ -195,31 +195,27 @@ }, { "name": "laminas/laminas-zendframework-bridge", - "version": "1.0.4", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "fcd87520e4943d968557803919523772475e8ea3" + "reference": "6ede70583e101030bcace4dcddd648f760ddf642" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/fcd87520e4943d968557803919523772475e8ea3", - "reference": "fcd87520e4943d968557803919523772475e8ea3", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642", + "reference": "6ede70583e101030bcace4dcddd648f760ddf642", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^5.6 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1", + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev", - "dev-develop": "1.1.x-dev" - }, "laminas": { "module": "Laminas\\ZendFrameworkBridge" } @@ -243,7 +239,7 @@ "laminas", "zf" ], - "time": "2020-05-20T16:45:56+00:00" + "time": "2020-09-14T14:23:00+00:00" }, { "name": "league/color-extractor", diff --git a/kirby/config/aliases.php b/kirby/config/aliases.php index fc354a5..8c7016f 100755 --- a/kirby/config/aliases.php +++ b/kirby/config/aliases.php @@ -1,5 +1,6 @@ 'Kirby\Cms\Asset', @@ -58,3 +59,4 @@ return [ 'v' => 'Kirby\Toolkit\V', 'xml' => 'Kirby\Toolkit\Xml' ]; +// @codeCoverageIgnoreEnd diff --git a/kirby/config/api/routes/pages.php b/kirby/config/api/routes/pages.php index 5ecfacc..7dd97f7 100755 --- a/kirby/config/api/routes/pages.php +++ b/kirby/config/api/routes/pages.php @@ -26,6 +26,24 @@ return [ return $this->page($id)->delete($this->requestBody('force', false)); } ], + [ + 'pattern' => 'pages/(:any)/blueprint', + 'method' => 'GET', + 'action' => function (string $id) { + return $this->page($id)->blueprint(); + } + ], + [ + 'pattern' => [ + 'pages/(:any)/blueprints', + // Deprecated: remove in 3.6.0 + 'pages/(:any)/children/blueprints', + ], + 'method' => 'GET', + 'action' => function (string $id) { + return $this->page($id)->blueprints($this->requestQuery('section')); + } + ], [ 'pattern' => 'pages/(:any)/children', 'method' => 'GET', @@ -40,13 +58,6 @@ return [ return $this->page($id)->createChild($this->requestBody()); } ], - [ - 'pattern' => 'pages/(:any)/children/blueprints', - 'method' => 'GET', - 'action' => function (string $id) { - return $this->page($id)->blueprints($this->requestQuery('section')); - } - ], [ 'pattern' => 'pages/(:any)/children/search', 'method' => 'GET|POST', diff --git a/kirby/config/api/routes/site.php b/kirby/config/api/routes/site.php index 1f64bb5..6c07612 100755 --- a/kirby/config/api/routes/site.php +++ b/kirby/config/api/routes/site.php @@ -32,13 +32,6 @@ return [ return $this->site()->createChild($this->requestBody()); } ], - [ - 'pattern' => 'site/children/blueprints', - 'method' => 'GET', - 'action' => function () { - return $this->site()->blueprints($this->requestQuery('section')); - } - ], [ 'pattern' => 'site/children/search', 'method' => 'POST', @@ -46,6 +39,24 @@ return [ return $this->site()->children()->query($this->requestBody()); } ], + [ + 'pattern' => 'site/blueprint', + 'method' => 'GET', + 'action' => function () { + return $this->site()->blueprint(); + } + ], + [ + 'pattern' => [ + 'site/blueprints', + // Deprecated: remove in 3.6.0 + 'site/children/blueprints', + ], + 'method' => 'GET', + 'action' => function () { + return $this->site()->blueprints($this->requestQuery('section')); + } + ], [ 'pattern' => 'site/find', 'method' => 'POST', diff --git a/kirby/config/api/routes/users.php b/kirby/config/api/routes/users.php index 97572ea..a5c41d4 100755 --- a/kirby/config/api/routes/users.php +++ b/kirby/config/api/routes/users.php @@ -84,6 +84,20 @@ return [ return $this->user($id)->avatar()->delete(); } ], + [ + 'pattern' => 'users/(:any)/blueprint', + 'method' => 'GET', + 'action' => function (string $id) { + return $this->user($id)->blueprint(); + } + ], + [ + 'pattern' => 'users/(:any)/blueprints', + 'method' => 'GET', + 'action' => function (string $id) { + return $this->user($id)->blueprints($this->requestQuery('section')); + } + ], [ 'pattern' => 'users/(:any)/email', 'method' => 'PATCH', @@ -91,6 +105,15 @@ return [ return $this->user($id)->changeEmail($this->requestBody('email')); } ], + [ + 'pattern' => 'users/(:any)/fields/(:any)/(:all?)', + 'method' => 'ALL', + 'action' => function (string $id, string $fieldName, string $path = null) { + if ($user = $this->user($id)) { + return $this->fieldApi($user, $fieldName, $path); + } + } + ], [ 'pattern' => 'users/(:any)/language', 'method' => 'PATCH', @@ -134,14 +157,4 @@ return [ } } ], - [ - 'pattern' => 'users/(:any)/fields/(:any)/(:all?)', - 'method' => 'ALL', - 'action' => function (string $id, string $fieldName, string $path = null) { - if ($user = $this->user($id)) { - return $this->fieldApi($user, $fieldName, $path); - } - } - ] - ]; diff --git a/kirby/config/helpers.php b/kirby/config/helpers.php index b3ca562..28c396b 100755 --- a/kirby/config/helpers.php +++ b/kirby/config/helpers.php @@ -601,36 +601,7 @@ function r($condition, $value, $alternative = null) } /** - * Rounds the minutes of the given date - * by the defined step - * - * @param string $date - * @param int $step - * @return string|null - */ -function timestamp(string $date = null, int $step = null): ?string -{ - if (V::date($date) === false) { - return null; - } - - $date = strtotime($date); - - if ($step === null) { - return $date; - } - - $hours = date('H', $date); - $minutes = date('i', $date); - $minutes = floor($minutes / $step) * $step; - $minutes = str_pad($minutes, 2, 0, STR_PAD_LEFT); - $date = date('Y-m-d', $date) . ' ' . $hours . ':' . $minutes; - - return strtotime($date); -} - -/** - * Returns the currrent site object + * Returns the current site object * * @return \Kirby\Cms\Site */ @@ -767,6 +738,35 @@ function tc($key, int $count) return I18n::translateCount($key, $count); } +/** + * Rounds the minutes of the given date + * by the defined step + * + * @param string $date + * @param int $step + * @return string|null + */ +function timestamp(string $date = null, int $step = null): ?string +{ + if (V::date($date) === false) { + return null; + } + + $date = strtotime($date); + + if ($step === null) { + return $date; + } + + $hours = date('H', $date); + $minutes = date('i', $date); + $minutes = floor($minutes / $step) * $step; + $minutes = str_pad($minutes, 2, 0, STR_PAD_LEFT); + $date = date('Y-m-d', $date) . ' ' . $hours . ':' . $minutes; + + return strtotime($date); +} + /** * Translate by key and then replace * placeholders in the text diff --git a/kirby/dependencies/parsedown-extra/ParsedownExtra.php b/kirby/dependencies/parsedown-extra/ParsedownExtra.php index 9e1a748..c3db03a 100755 --- a/kirby/dependencies/parsedown-extra/ParsedownExtra.php +++ b/kirby/dependencies/parsedown-extra/ParsedownExtra.php @@ -572,6 +572,9 @@ class ParsedownExtra extends Parsedown # http://stackoverflow.com/q/11309194/200145 $elementMarkup = mb_convert_encoding($elementMarkup, 'HTML-ENTITIES', 'UTF-8'); + + # Ensure that saveHTML() is not remove new line characters. New lines will be split by this character. + $DOMDocument->formatOutput = true; # http://stackoverflow.com/q/4879946/200145 $DOMDocument->loadHTML($elementMarkup); diff --git a/kirby/i18n/translations/cs.json b/kirby/i18n/translations/cs.json index 0973103..07e6ba9 100755 --- a/kirby/i18n/translations/cs.json +++ b/kirby/i18n/translations/cs.json @@ -309,7 +309,7 @@ "page.duplicate.pages": "Kopírovat stránky", "page.status": "Stav", "page.status.draft": "Koncept", - "page.status.draft.description": "The page is in draft mode and only visible for logged in editors or via secret link", + "page.status.draft.description": "Stránka je ve stavu konceptu a je viditelná pouze pro přihlášené editory, nebo přes tajný odkaz", "page.status.listed": "Veřejná", "page.status.listed.description": "Stránka je zveřejněná pro všechny", "page.status.unlisted": "Neveřejná", @@ -331,7 +331,7 @@ "replace": "Nahradit", "retry": "Zkusit znovu", "revert": "Zahodit", - "revert.confirm": "Do you really want to delete all unsaved changes?", + "revert.confirm": "Opravdu chcete smazat všechny provedené změny?", "role": "Role", "role.admin.description": "Administrátor má všechna práva", diff --git a/kirby/i18n/translations/de.json b/kirby/i18n/translations/de.json index 63f0129..4a6f823 100755 --- a/kirby/i18n/translations/de.json +++ b/kirby/i18n/translations/de.json @@ -31,7 +31,7 @@ "dialog.files.empty": "Keine verfügbaren Dateien", "dialog.pages.empty": "Keine verfügbaren Seiten", - "dialog.users.empty": "Keine verfügbaren Benutzer*innen", + "dialog.users.empty": "Keine verfügbaren Accounts", "email": "E-Mail", "email.placeholder": "mail@beispiel.de", @@ -122,31 +122,31 @@ "error.site.changeTitle.empty": "Bitte gib einen Titel an", "error.site.changeTitle.permission": "Du kannst den Titel der Seite nicht ändern", - "error.site.update.permission": "Du darfst die Seite nicht editieren", + "error.site.update.permission": "Du darfst die Seite nicht bearbeiten", "error.template.default.notFound": "Die \"Default\"-Vorlage existiert nicht", - "error.user.changeEmail.permission": "Du kannst die E-Mailadresse für den Benutzer \"{name}\" nicht ändern", - "error.user.changeLanguage.permission": "Du kannst die Sprache für den Benutzer \"{name}\" nicht ändern", - "error.user.changeName.permission": "Du kannst den Namen für den Benutzer \"{name}\" nicht ändern", - "error.user.changePassword.permission": "Du kannst das Passwort für den Benutzer \"{name}\" nicht ändern", - "error.user.changeRole.lastAdmin": "Die Rolle des letzten Administrators kann nicht geändert werden", + "error.user.changeEmail.permission": "Du kannst die E-Mailadresse für den Account \"{name}\" nicht ändern", + "error.user.changeLanguage.permission": "Du kannst die Sprache für den Account \"{name}\" nicht ändern", + "error.user.changeName.permission": "Du kannst den Namen für den Account \"{name}\" nicht ändern", + "error.user.changePassword.permission": "Du kannst das Passwort für den Account \"{name}\" nicht ändern", + "error.user.changeRole.lastAdmin": "Die Rolle des letzten Accounts mit Administrationsrechten kann nicht geändert werden", "error.user.changeRole.permission": "Du kannst die Rolle für den Benutzer \"{name}\" nicht ändern", - "error.user.changeRole.toAdmin": "Du darfst die Admin Rolle nicht an andere Benutzer*innen vergeben", - "error.user.create.permission": "Du kannst diesen Benutzer nicht anlegen", - "error.user.delete": "Der Benutzer \"{name}\" konnte nicht gelöscht werden", - "error.user.delete.lastAdmin": "Du kannst den letzten Admin nicht l\u00f6schen", - "error.user.delete.lastUser": "Der letzte Benutzer kann nicht gelöscht werden", - "error.user.delete.permission": "Du darfst den Benutzer \"{name}\" nicht löschen", - "error.user.duplicate": "Ein Benutzer mit der E-Mailadresse \"{email}\" besteht bereits", + "error.user.changeRole.toAdmin": "Du darfst die Admin Rolle nicht an andere Accounts vergeben", + "error.user.create.permission": "Du darfst diesen Account nicht anlegen", + "error.user.delete": "Der Account \"{name}\" konnte nicht gelöscht werden", + "error.user.delete.lastAdmin": "Du kannst den letzten Account mit Administrationsrechten nicht löschen", + "error.user.delete.lastUser": "Der letzte Account kann nicht gelöscht werden", + "error.user.delete.permission": "Du darfst den Account \"{name}\" nicht löschen", + "error.user.duplicate": "Ein Account mit der E-Mailadresse \"{email}\" besteht bereits", "error.user.email.invalid": "Bitte gib eine gültige E-Mailadresse an", "error.user.language.invalid": "Bitte gib eine gültige Sprache an", - "error.user.notFound": "Der Benutzer \"{name}\" wurde nicht gefunden", + "error.user.notFound": "Der Account \"{name}\" wurde nicht gefunden", "error.user.password.invalid": "Bitte gib ein gültiges Passwort ein. Passwörter müssen mindestens 8 Zeichen lang sein.", "error.user.password.notSame": "Die Passwörter stimmen nicht überein", - "error.user.password.undefined": "Der Benutzer hat kein Passwort", + "error.user.password.undefined": "Der Account hat kein Passwort", "error.user.role.invalid": "Bitte gib eine gültige Rolle an", - "error.user.update.permission": "Du darfst den den Benutzer \"{name}\" nicht editieren", + "error.user.update.permission": "Du darfst den den Account \"{name}\" nicht bearbeiten", "error.validation.accepted": "Bitte bestätige", "error.validation.alpha": "Bitte gib nur Zeichen zwischen A und Z ein", @@ -191,7 +191,7 @@ "field.pages.empty": "Keine Seiten ausgewählt", "field.structure.delete.confirm": "Willst du diesen Eintrag wirklich l\u00f6schen?", "field.structure.empty": "Es bestehen keine Eintr\u00e4ge.", - "field.users.empty": "Keine Benutzer ausgewählt", + "field.users.empty": "Keine Accounts ausgewählt", "file.delete.confirm": "Willst du die Datei {filename}
wirklich löschen?", @@ -255,7 +255,7 @@ "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. ", + "lock.isUnlocked": "Deine ungespeicherten Änderungen wurden von einem anderen Account überschrieben. Du kannst sie herunterladen, um sie manuell einzufügen. ", "login": "Anmelden", "login.remember": "Angemeldet bleiben", @@ -309,9 +309,9 @@ "page.duplicate.pages": "Seiten kopieren", "page.status": "Status", "page.status.draft": "Entwurf", - "page.status.draft.description": "Die Seite ist im Entwurfsmodus und ist nur für angemeldete Benutzer*innen oder über den geheimen Link sichtbar", + "page.status.draft.description": "Die Seite ist im Entwurfsmodus und ist nur nach Anmeldung oder über den geheimen Link sichtbar", "page.status.listed": "Öffentlich", - "page.status.listed.description": "Die Seite ist öffentlich für alle Besucher", + "page.status.listed.description": "Die Seite ist öffentlich für alle", "page.status.unlisted": "Ungelistet", "page.status.unlisted.description": "Die Seite kann nur über die URL aufgerufen werden", @@ -334,10 +334,10 @@ "revert.confirm": "Willst du wirklich alle ungespeicherten Änderungen verwerfen? ", "role": "Rolle", - "role.admin.description": "Administrator*innen haben alle Rechte", - "role.admin.title": "Administrator*in", + "role.admin.description": "Admins haben alle Rechte", + "role.admin.title": "Admin", "role.all": "Alle", - "role.empty": "Keine Benutzer mit dieser Rolle", + "role.empty": "Keine Accounts mit dieser Rolle", "role.description.placeholder": "Keine Beschreibung", "role.nobody.description": "Dies ist die Platzhalterrolle ohne Rechte", "role.nobody.title": "Niemand", @@ -394,21 +394,21 @@ "url": "Url", "url.placeholder": "https://beispiel.de", - "user": "Benutzer", - "user.blueprint": "Du kannst zusätzliche Felder und Bereiche für diese Benutzerrolle in /site/blueprints/users/{role}.yml anlegen", + "user": "Account", + "user.blueprint": "Du kannst zusätzliche Felder und Bereiche für diese Rolle in /site/blueprints/users/{role}.yml anlegen", "user.changeEmail": "E-Mail ändern", "user.changeLanguage": "Sprache ändern", - "user.changeName": "Benutzer umbenennen", + "user.changeName": "Account umbenennen", "user.changePassword": "Passwort ändern", "user.changePassword.new": "Neues Passwort", "user.changePassword.new.confirm": "Wiederhole das Passwort …", "user.changeRole": "Rolle ändern", "user.changeRole.select": "Neue Rolle auswählen", - "user.create": "Neuen Benutzer anlegen", - "user.delete": "Benutzer löschen", - "user.delete.confirm": "Willst du den Benutzer
{email} wirklich löschen?", + "user.create": "Neuen Account anlegen", + "user.delete": "Account löschen", + "user.delete.confirm": "Willst du den Account
{email} wirklich löschen?", - "users": "Benutzer", + "users": "Accounts", "version": "Version", @@ -416,7 +416,7 @@ "view.installation": "Installation", "view.settings": "Einstellungen", "view.site": "Seite", - "view.users": "Benutzer", + "view.users": "Accounts", "welcome": "Willkommen", "year": "Jahr" diff --git a/kirby/i18n/translations/en.json b/kirby/i18n/translations/en.json index b594305..19f6473 100755 --- a/kirby/i18n/translations/en.json +++ b/kirby/i18n/translations/en.json @@ -102,6 +102,7 @@ "error.page.notFound": "The page \"{slug}\" cannot be found", "error.page.num.invalid": "Please enter a valid sorting number. Numbers must not be negative.", "error.page.slug.invalid": "Please enter a valid URL prefix", + "error.page.slug.maxlength": "Slug length must be less than \"{length}\" characters", "error.page.sort.permission": "The page \"{slug}\" cannot be sorted", "error.page.status.invalid": "Please set a valid page status", "error.page.undefined": "The page cannot be found", diff --git a/kirby/i18n/translations/id.json b/kirby/i18n/translations/id.json index cf0c20d..dc3cb8f 100755 --- a/kirby/i18n/translations/id.json +++ b/kirby/i18n/translations/id.json @@ -309,7 +309,7 @@ "page.duplicate.pages": "Salin halaman", "page.status": "Status", "page.status.draft": "Draf", - "page.status.draft.description": "The page is in draft mode and only visible for logged in editors or via secret link", + "page.status.draft.description": "Halaman ini ada pada mode draf dan hanya dapat dilihat oleh penyunting atau via tautan rahasia", "page.status.listed": "Publik", "page.status.listed.description": "Halaman publik untuk siapapun", "page.status.unlisted": "Tidak tercantum", @@ -331,7 +331,7 @@ "replace": "Ganti", "retry": "Coba lagi", "revert": "Kembalikan", - "revert.confirm": "Do you really want to delete all unsaved changes?", + "revert.confirm": "Anda yakin menghapus semua perubahan yang belum tersimpan?", "role": "Peran", "role.admin.description": "Admin memiliki semua izin", diff --git a/kirby/panel/dist/css/app.css b/kirby/panel/dist/css/app.css index 5121c85..207327b 100755 --- a/kirby/panel/dist/css/app.css +++ b/kirby/panel/dist/css/app.css @@ -1 +1 @@ -*,:after,:before{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}:root{--color-backdrop:rgba(22,23,26,0.6);--color-background:#efefef;--color-border:#ccc;--color-focus:#4271ae;--color-focus-light:#81a2be;--color-focus-outline:rgba(66,113,174,0.25);--color-negative:#c82829;--color-negative-light:#d16464;--color-negative-outline:rgba(200,40,41,0.25);--color-notice:#f5871f;--color-notice-light:#de935f;--color-positive:#5d800d;--color-positive-light:#a7bd68;--color-positive-outline:rgba(93,128,13,0.25);--color-text:#16171a;--color-text-light:#777;--font-family-mono:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;--font-family-sans:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;--font-size-tiny:.75rem;--font-size-small:.875rem;--font-size-medium:1rem;--font-size-large:1.25rem;--font-size-huge:1.5rem;--font-size-monster:1.75rem;--box-shadow-dropdown:rgba(22,23,26,0.2) 0 2px 10px;--box-shadow-item:rgba(22,23,26,0.05) 0 2px 5px;--box-shadow-focus:#4271ae 0 0 0 2px,rgba(66,113,174,0.2) 0 0 0 2px}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}[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)}[data-invalid]:focus-within{border:1px solid #c82829!important;-webkit-box-shadow:rgba(200,40,41,.25) 0 0 0 2px!important;box-shadow:0 0 0 2px rgba(200,40,41,.25)!important}.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;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;width:100%}.k-dialog-box{position:relative;background:#efefef;-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}@media screen and (min-width:20rem){.k-dialog-box[data-size=small]{width:20rem}}@media screen and (min-width:22rem){.k-dialog-box[data-size=default]{width:22rem}}@media screen and (min-width:30rem){.k-dialog-box[data-size=medium]{width:30rem}}@media screen and (min-width:40rem){.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-dialog-pagination{margin-bottom:-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}.k-dialog-search{margin-bottom:.75rem}.k-dialog-search.k-input{background:rgba(0,0,0,.075);padding:0 1rem;height:36px;border-radius:1px}.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-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]{-webkit-box-shadow:none;box-shadow:none;border:0;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-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.k-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-lock-loader{-webkit-animation:Spin 4s linear infinite;animation:Spin 4s linear infinite}.k-form-lock-loader .k-icon-loader{display:-webkit-box;display:-ms-flexbox;display:flex}.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;opacity:.4}.k-field[data-disabled] *{pointer-events:none}.k-field[data-disabled] .k-text[data-theme=help] *{pointer-events:auto}.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] .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;opacity:1!important}.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:275px;overflow-y:auto;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-multiselect-more{width:100%;padding:.75rem;color:hsla(0,0%,100%,.8);text-align:center;border-top:1px dashed hsla(0,0%,100%,.2)}.k-multiselect-more:hover{color:#fff}.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-select-input-native{font-weight:400}.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[disabled]:checked{-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}.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{position:relative;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 td:last-child{overflow:visible}.k-structure-table th{position:-webkit-sticky;position:sticky;top:0;right:0;left:0;width:100%;background:#fff;font-weight:400;z-index:1;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-align=right]>.k-input{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.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-options{position:relative;width:38px;text-align:center;height:38px}.k-structure-table .k-structure-table-options-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:grabbing;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-files-field-preview li .k-icon{height:100%}.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-toggle-field-preview label{padding:0 .25rem 0 .75rem;display:-webkit-box;display:-ms-flexbox;display:flex;height:38px;cursor:pointer;overflow:hidden;white-space:nowrap}[dir=ltr] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input-label,[dir=rtl] .k-toggle-field-preview .k-toggle-input-label{padding-right:.5rem}[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] .k-toggle-field-preview .k-toggle-input{padding:0 .25rem 0 .75rem}[dir=rtl] .k-toggle-field-preview .k-toggle-input{padding:0 .75rem 0 .25rem}[data-align=right] .k-toggle-field-preview .k-toggle-input{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input{padding:0 .75rem 0 .25rem}.k-users-field-preview,[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input{padding:0 .25rem 0 .75rem}.k-users-field-preview{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{word-wrap:break-word;font-size:.875rem}.k-box:not([data-theme=none]){background:#d9d9d9;border-radius:1px;padding:.375rem .75rem;line-height:1.25rem;border-left:2px solid #999;padding:.5rem 1.5rem}.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));grid-template-columns:repeat(auto-fill,minmax(min(12rem,100%),1fr))}@media screen and (min-width:30em){.k-cards[data-size=tiny]{grid-template-columns:repeat(auto-fill,minmax(10rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(10rem,100%),1fr))}.k-cards[data-size=small]{grid-template-columns:repeat(auto-fill,minmax(16rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(16rem,100%),1fr))}.k-cards[data-size=medium]{grid-template-columns:repeat(auto-fill,minmax(24rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(24rem,100%),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));grid-template-columns:repeat(auto-fill,minmax(min(32rem,100%),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}.k-column[data-sticky]>div{position:-webkit-sticky;position:sticky;top:4vh;z-index:2}@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:stretch;-ms-flex-align:stretch;align-items:stretch;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]{min-height:38px}.k-empty[data-layout=list]>.k-icon{width:36px;min-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.k-link[data-tabbed]{-webkit-box-shadow:none;box-shadow:none;outline:2px solid #4271ae;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;word-wrap:break-word}.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 .75rem;font-size:.75rem;text-transform:uppercase;text-align:center;font-weight:500;border-left:1px solid transparent;border-right:1px solid #ccc;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:15rem}@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: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;max-width:10rem;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-status{height:auto!important}.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:move;cursor:grab;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:grabbing;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}.k-dialog-body .k-text{word-wrap:break-word}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{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[data-disabled]{opacity:.5;cursor:default}.k-card-options>.k-button[data-disabled]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.k-button[data-disabled]:focus .k-button-text,.k-button[data-disabled]:hover .k-button-text{opacity:.75}.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;margin-bottom:6rem}[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-link{outline:none}.k-link[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-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%;-webkit-transform:translateX(-50%);transform:translateX(-50%);background:#000}[dir=ltr] .k-dropdown-content.k-pagination-selector{direction:ltr}[dir=rtl] .k-dropdown-content.k-pagination-selector{direction:rtl}.k-pagination-settings{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}.k-pagination-settings .k-button{line-height:1}.k-pagination-settings label{display:-webkit-box;display:-ms-flexbox;display:flex;border-right:1px solid hsla(0,0%,100%,.35);-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:.625rem 1rem;font-size:.75rem}.k-pagination-settings label span{margin-right:.5rem}.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}[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 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}.k-login-alert{padding:.5rem .75rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:38px;margin-bottom:2rem;background:#c82829;color:#fff;font-size:.875rem;border-radius:1px;-webkit-box-shadow:rgba(22,23,26,.2) 0 2px 10px;box-shadow:0 2px 10px rgba(22,23,26,.2);cursor:pointer}.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 +*,:after,:before{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}:root{--color-backdrop:rgba(22,23,26,0.6);--color-background:#efefef;--color-border:#ccc;--color-focus:#4271ae;--color-focus-light:#81a2be;--color-focus-outline:rgba(66,113,174,0.25);--color-negative:#c82829;--color-negative-light:#d16464;--color-negative-outline:rgba(200,40,41,0.25);--color-notice:#f5871f;--color-notice-light:#de935f;--color-positive:#5d800d;--color-positive-light:#a7bd68;--color-positive-outline:rgba(93,128,13,0.25);--color-text:#16171a;--color-text-light:#777;--font-family-mono:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;--font-family-sans:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;--font-size-tiny:.75rem;--font-size-small:.875rem;--font-size-medium:1rem;--font-size-large:1.25rem;--font-size-huge:1.5rem;--font-size-monster:1.75rem;--box-shadow-dropdown:rgba(22,23,26,0.2) 0 2px 10px;--box-shadow-item:rgba(22,23,26,0.05) 0 2px 5px;--box-shadow-focus:#4271ae 0 0 0 2px,rgba(66,113,174,0.2) 0 0 0 2px}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}[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)}[data-invalid]:focus-within{border:1px solid #c82829!important;-webkit-box-shadow:rgba(200,40,41,.25) 0 0 0 2px!important;box-shadow:0 0 0 2px rgba(200,40,41,.25)!important}.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;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;width:100%}.k-dialog-box{position:relative;background:#efefef;-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}@media screen and (min-width:20rem){.k-dialog-box[data-size=small]{width:20rem}}@media screen and (min-width:22rem){.k-dialog-box[data-size=default]{width:22rem}}@media screen and (min-width:30rem){.k-dialog-box[data-size=medium]{width:30rem}}@media screen and (min-width:40rem){.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-dialog-pagination{margin-bottom:-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}.k-dialog-search{margin-bottom:.75rem}.k-dialog-search.k-input{background:rgba(0,0,0,.075);padding:0 1rem;height:36px;border-radius:1px}.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-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]{-webkit-box-shadow:none;box-shadow:none;border:0;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-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.k-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-lock-loader{-webkit-animation:Spin 4s linear infinite;animation:Spin 4s linear infinite}.k-form-lock-loader .k-icon-loader{display:-webkit-box;display:-ms-flexbox;display:flex}.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;opacity:.4}.k-field[data-disabled] *{pointer-events:none}.k-field[data-disabled] .k-text[data-theme=help] *{pointer-events:auto}.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] .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;opacity:1!important}.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:275px;overflow-y:auto;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-multiselect-more{width:100%;padding:.75rem;color:hsla(0,0%,100%,.8);text-align:center;border-top:1px dashed hsla(0,0%,100%,.2)}.k-multiselect-more:hover{color:#fff}.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-select-input-native{font-weight:400}.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[disabled]:checked{-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}.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{position:relative;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 td:last-child{overflow:visible}.k-structure-table th{position:-webkit-sticky;position:sticky;top:0;right:0;left:0;width:100%;background:#fff;font-weight:400;z-index:1;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-align=right]>.k-input{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.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-options{position:relative;width:38px;text-align:center;height:38px}.k-structure-table .k-structure-table-options-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:grabbing;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-files-field-preview li .k-icon{height:100%}.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-toggle-field-preview label{padding:0 .25rem 0 .75rem;display:-webkit-box;display:-ms-flexbox;display:flex;height:38px;cursor:pointer;overflow:hidden;white-space:nowrap}[dir=ltr] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input-label,[dir=rtl] .k-toggle-field-preview .k-toggle-input-label{padding-right:.5rem}[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] .k-toggle-field-preview .k-toggle-input{padding:0 .25rem 0 .75rem}[dir=rtl] .k-toggle-field-preview .k-toggle-input{padding:0 .75rem 0 .25rem}[data-align=right] .k-toggle-field-preview .k-toggle-input{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input{padding:0 .75rem 0 .25rem}.k-users-field-preview,[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input{padding:0 .25rem 0 .75rem}.k-users-field-preview{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{word-wrap:break-word;font-size:.875rem}.k-box:not([data-theme=none]){background:#d9d9d9;border-radius:1px;padding:.375rem .75rem;line-height:1.25rem;border-left:2px solid #999;padding:.5rem 1.5rem}.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));grid-template-columns:repeat(auto-fill,minmax(min(12rem,100%),1fr))}@media screen and (min-width:30em){.k-cards[data-size=tiny]{grid-template-columns:repeat(auto-fill,minmax(10rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(10rem,100%),1fr))}.k-cards[data-size=small]{grid-template-columns:repeat(auto-fill,minmax(16rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(16rem,100%),1fr))}.k-cards[data-size=medium]{grid-template-columns:repeat(auto-fill,minmax(24rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(24rem,100%),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));grid-template-columns:repeat(auto-fill,minmax(min(32rem,100%),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}.k-column[data-sticky]>div{position:-webkit-sticky;position:sticky;top:4vh;z-index:2}@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:stretch;-ms-flex-align:stretch;align-items:stretch;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]{min-height:38px}.k-empty[data-layout=list]>.k-icon{width:36px;min-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.k-link[data-tabbed]{-webkit-box-shadow:none;box-shadow:none;outline:2px solid #4271ae;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;word-wrap:break-word}.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 .75rem;font-size:.75rem;text-transform:uppercase;text-align:center;font-weight:500;border-left:1px solid transparent;border-right:1px solid #ccc;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:15rem}@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: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;max-width:10rem;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-status{height:auto!important}.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;margin-left:-.3rem}@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:-.15rem}}.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;background:#ccc;overflow:hidden;border:none}.k-progress::-webkit-progress-bar{border:none;background:#ccc;height:.5rem;border-radius:20px}.k-progress::-webkit-progress-value{border-radius:inherit;background:#4271ae;-webkit-transition:width .3s;transition:width .3s}.k-progress::-moz-progress-bar{border-radius:inherit;background:#4271ae;-moz-transition:width .3s;transition:width .3s}.k-sort-handle{cursor:move;cursor:grab;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:grabbing;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}.k-dialog-body .k-text{word-wrap:break-word}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{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[data-disabled]{opacity:.5;cursor:default}.k-card-options>.k-button[data-disabled]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.k-button[data-disabled]:focus .k-button-text,.k-button[data-disabled]:hover .k-button-text{opacity:.75}.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;margin-bottom:6rem}[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-link{outline:none}.k-link[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-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%;-webkit-transform:translateX(-50%);transform:translateX(-50%);background:#000}[dir=ltr] .k-dropdown-content.k-pagination-selector{direction:ltr}[dir=rtl] .k-dropdown-content.k-pagination-selector{direction:rtl}.k-pagination-settings{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}.k-pagination-settings .k-button{line-height:1}.k-pagination-settings label{display:-webkit-box;display:-ms-flexbox;display:flex;border-right:1px solid hsla(0,0%,100%,.35);-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:.625rem 1rem;font-size:.75rem}.k-pagination-settings label span{margin-right:.5rem}.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}[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;overflow-y:hidden}.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 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}.k-login-alert{padding:.5rem .75rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:38px;margin-bottom:2rem;background:#c82829;color:#fff;font-size:.875rem;border-radius:1px;-webkit-box-shadow:rgba(22,23,26,.2) 0 2px 10px;box-shadow:0 2px 10px rgba(22,23,26,.2);cursor:pointer}.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/js/app.js b/kirby/panel/dist/js/app.js index 09224da..8312853 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,a,o=e[0],u=e[1],l=e[2],p=0,d=[];p1&&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},changeSlug:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.patch("pages/"+i.id(e)+"/slug",{slug:n}));case 1:case"end":return s.stop()}}),s)})))()},changeStatus:function(e,n,i){var s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",t.patch("pages/"+s.id(e)+"/status",{status:n,position:i}));case 1:case"end":return r.stop()}}),r)})))()},changeTemplate:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.patch("pages/"+i.id(e)+"/template",{template:n}));case 1:case"end":return s.stop()}}),s)})))()},changeTitle:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.patch("pages/"+i.id(e)+"/title",{title:n}));case 1:case"end":return s.stop()}}),s)})))()},children:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.post("pages/"+i.id(e)+"/children/search",n));case 1:case"end":return s.stop()}}),s)})))()},create:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(null!==e&&"/"!==e){s.next=2;break}return s.abrupt("return",t.post("site/children",n));case 2:return s.abrupt("return",t.post("pages/"+i.id(e)+"/children",n));case 3:case"end":return s.stop()}}),s)})))()},delete:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.delete("pages/"+i.id(e),n));case 1:case"end":return s.stop()}}),s)})))()},duplicate:function(e,n,i){var s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",t.post("pages/"+s.id(e)+"/duplicate",{slug:n,children:i.children||!1,files:i.files||!1}));case 1:case"end":return r.stop()}}),r)})))()},get:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){var r;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.next=2,t.get("pages/"+i.id(e),n);case 2:return r=s.sent,!0===Array.isArray(r.content)&&(r.content={}),s.abrupt("return",r);case 5:case"end":return s.stop()}}),s)})))()},id:function(t){return t.replace(/\//g,"+")},files:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.post("pages/"+i.id(e)+"/files/search",n));case 1:case"end":return s.stop()}}),s)})))()},link:function(t){return"/"+this.url(t)},options:function(e){var n=arguments,i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){var r,a,o,u;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:"view",s.next=3,t.get(i.url(e),{select:"options"});case 3:return a=s.sent,o=a.options,u=[],"list"===r&&(u.push({click:"preview",icon:"open",text:F["a"].i18n.translate("open"),disabled:!1===o.preview}),u.push("-")),u.push({click:"rename",icon:"title",text:F["a"].i18n.translate("rename"),disabled:!o.changeTitle}),u.push({click:"duplicate",icon:"copy",text:F["a"].i18n.translate("duplicate"),disabled:!o.duplicate}),u.push("-"),u.push({click:"url",icon:"url",text:F["a"].i18n.translate("page.changeSlug"),disabled:!o.changeSlug}),u.push({click:"status",icon:"preview",text:F["a"].i18n.translate("page.changeStatus"),disabled:!o.changeStatus}),u.push({click:"template",icon:"template",text:F["a"].i18n.translate("page.changeTemplate"),disabled:!o.changeTemplate}),u.push("-"),u.push({click:"remove",icon:"trash",text:F["a"].i18n.translate("delete"),disabled:!o.delete}),s.abrupt("return",u);case 16:case"end":return s.stop()}}),s)})))()},preview:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.get(e.id(t),{select:"previewUrl"});case 2:return i=n.sent,n.abrupt("return",i.previewUrl);case 4:case"end":return n.stop()}}),n)})))()},search:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(!e){s.next=2;break}return s.abrupt("return",t.post("pages/"+i.id(e)+"/children/search?select=id,title,hasChildren",n));case 2:return s.abrupt("return",t.post("site/children/search?select=id,title,hasChildren",n));case 3:case"end":return s.stop()}}),s)})))()},update:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.patch("pages/"+i.id(e),n));case 1:case"end":return s.stop()}}),s)})))()},url:function(t,e){var n=null===t?"pages":"pages/"+t.replace(/\//g,"+");return e&&(n+="/"+e),n}}},K=(n("a15b"),n("b64b"),n("d3b7"),function(t){return{running:0,request:function(e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a,o,u,l,c,p;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>2&&void 0!==i[2]&&i[2],n=Object.assign(n||{},{credentials:"same-origin",cache:"no-store",headers:Object(I["a"])({"x-requested-with":"xmlhttprequest","content-type":"application/json"},n.headers)}),t.methodOverwrite&&"GET"!==n.method&&"POST"!==n.method&&(n.headers["x-http-method-override"]=n.method,n.method="POST"),n=t.onPrepare(n),o=e+"/"+JSON.stringify(n),t.onStart(o,a),s.running++,r.next=9,fetch(t.endpoint+"/"+e,n);case 9:return u=r.sent,r.next=12,u.text();case 12:l=r.sent,r.prev=13,r.prev=14,c=JSON.parse(l),r.next=21;break;case 18:throw r.prev=18,r.t0=r["catch"](14),new Error("The JSON response from the API could not be parsed. Please check your API connection.");case 21:if(!(u.status<200||u.status>299)){r.next=23;break}throw c;case 23:if(!c.status||"error"!==c.status){r.next=25;break}throw c;case 25:return p=c,c.data&&c.type&&"model"===c.type&&(p=c.data),s.running--,t.onComplete(o),t.onSuccess(c),r.abrupt("return",p);case 33:throw r.prev=33,r.t1=r["catch"](13),s.running--,t.onComplete(o),t.onError(r.t1),r.t1;case 39:case"end":return r.stop()}}),r,null,[[13,33],[14,18]])})))()},get:function(t,e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>3&&void 0!==i[3]&&i[3],e&&(t+="?"+Object.keys(e).filter((function(t){return void 0!==e[t]&&null!==e[t]})).map((function(t){return t+"="+e[t]})).join("&")),r.abrupt("return",s.request(t,Object.assign(n||{},{method:"GET"}),a));case 3:case"end":return r.stop()}}),r)})))()},post:function(t,e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a,o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>3&&void 0!==i[3]?i[3]:"POST",o=i.length>4&&void 0!==i[4]&&i[4],r.abrupt("return",s.request(t,Object.assign(n||{},{method:a,body:JSON.stringify(e)}),o));case 3:case"end":return r.stop()}}),r)})))()},patch:function(t,e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>3&&void 0!==i[3]&&i[3],r.abrupt("return",s.post(t,e,n,"PATCH",a));case 2:case"end":return r.stop()}}),r)})))()},delete:function(t,e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>3&&void 0!==i[3]&&i[3],r.abrupt("return",s.post(t,e,n,"DELETE",a));case 2:case"end":return r.stop()}}),r)})))()}}}),V=(n("a4d3"),n("e01a"),function(t){return{list:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.get("roles",e));case 1:case"end":return n.stop()}}),n)})))()},get:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.get("roles/"+e));case 1:case"end":return n.stop()}}),n)})))()},options:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.list(t);case 2:return i=n.sent,n.abrupt("return",i.data.map((function(t){return{info:t.description||"(".concat(F["a"].i18n.translate("role.description.placeholder"),")"),text:t.title,value:t.name}})));case 4:case"end":return n.stop()}}),n)})))()}}}),Y=function(t){return{get:function(){var e=arguments;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]?e[0]:{view:"panel"},n.abrupt("return",t.get("system",i));case 2:case"end":return n.stop()}}),n)})))()},install:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.post("system/install",e);case 2:return i=n.sent,n.abrupt("return",i.user);case 4:case"end":return n.stop()}}),n)})))()},register:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("system/register",e));case 1:case"end":return n.stop()}}),n)})))()}}},W=function(t){return{blueprint:function(){return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",t.get("site/blueprint"));case 1:case"end":return e.stop()}}),e)})))()},blueprints:function(){return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",t.get("site/blueprints"));case 1:case"end":return e.stop()}}),e)})))()},changeTitle:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.patch("site/title",{title:e}));case 1:case"end":return n.stop()}}),n)})))()},children:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("site/children/search",e));case 1:case"end":return n.stop()}}),n)})))()},get:function(){var e=arguments;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]?e[0]:{view:"panel"},n.abrupt("return",t.get("site",i));case 2:case"end":return n.stop()}}),n)})))()},options:function(){return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.get("site",{select:"options"});case 2:return n=e.sent,i=n.options,s=[],s.push({click:"rename",icon:"title",text:F["a"].i18n.translate("rename"),disabled:!i.changeTitle}),e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})))()},update:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("site",e));case 1:case"end":return n.stop()}}),n)})))()}}},J=function(t){return{list:function(){return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",t.get("translations"));case 1:case"end":return e.stop()}}),e)})))()},get:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.get("translations/"+e));case 1:case"end":return n.stop()}}),n)})))()},options:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.list();case 2:return n=e.sent,i=n.data.map((function(t){return{value:t.id,text:t.name}})),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})))()}}},G=function(t){return{blueprint:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.get("users/"+e+"/blueprint"));case 1:case"end":return n.stop()}}),n)})))()},breadcrumb:function(t){return[{link:"/users/"+t.id,label:t.username}]},changeEmail:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/email",{email:n}));case 1:case"end":return i.stop()}}),i)})))()},changeLanguage:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/language",{language:n}));case 1:case"end":return i.stop()}}),i)})))()},changeName:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/name",{name:n}));case 1:case"end":return i.stop()}}),i)})))()},changePassword:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/password",{password:n}));case 1:case"end":return i.stop()}}),i)})))()},changeRole:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/role",{role:n}));case 1:case"end":return i.stop()}}),i)})))()},create:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("users",e));case 1:case"end":return n.stop()}}),n)})))()},delete:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.delete("users/"+e));case 1:case"end":return n.stop()}}),n)})))()},deleteAvatar:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.delete("users/"+e+"/avatar"));case 1:case"end":return n.stop()}}),n)})))()},link:function(t,e){return"/"+this.url(t,e)},list:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.get("users",e));case 1:case"end":return n.stop()}}),n)})))()},get:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.get("users/"+e,n));case 1:case"end":return i.stop()}}),i)})))()},options:function(e){var n=this;return Object(j["a"])(regeneratorRuntime.mark((function i(){var s,r,a;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,t.get(n.url(e),{select:"options"});case 2:return s=i.sent,r=s.options,a=[],a.push({click:"rename",icon:"title",text:F["a"].i18n.translate("user.changeName"),disabled:!r.changeName}),a.push({click:"email",icon:"email",text:F["a"].i18n.translate("user.changeEmail"),disabled:!r.changeEmail}),a.push({click:"role",icon:"bolt",text:F["a"].i18n.translate("user.changeRole"),disabled:!r.changeRole}),a.push({click:"password",icon:"key",text:F["a"].i18n.translate("user.changePassword"),disabled:!r.changePassword}),a.push({click:"language",icon:"globe",text:F["a"].i18n.translate("user.changeLanguage"),disabled:!r.changeLanguage}),a.push({click:"remove",icon:"trash",text:F["a"].i18n.translate("user.delete"),disabled:!r.delete}),i.abrupt("return",a);case 12:case"end":return i.stop()}}),i)})))()},roles:function(e){var n=this;return Object(j["a"])(regeneratorRuntime.mark((function i(){var s;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,t.get(n.url(e,"roles"));case 2:return s=i.sent,i.abrupt("return",s.data.map((function(t){return{info:t.description||"(".concat(F["a"].i18n.translate("role.description.placeholder"),")"),text:t.title,value:t.name}})));case 4:case"end":return i.stop()}}),i)})))()},search:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("users/search",e));case 1:case"end":return n.stop()}}),n)})))()},update:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e,n));case 1:case"end":return i.stop()}}),i)})))()},url:function(t,e){var n=t?"users/"+t:"users";return e&&(n+="/"+e),n}}},Z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={endpoint:"/api",methodOverwrite:!0,onPrepare:function(t){return t},onStart:function(){},onComplete:function(){},onSuccess:function(){},onError:function(t){throw window.console.log(t.message),t}},n=Object(I["a"])(Object(I["a"])({},e),t.config||{}),i=Object(I["a"])(Object(I["a"])(Object(I["a"])({},n),K(n)),t);return i.auth=M(i),i.files=U(i),i.languages=z(i),i.pages=H(i),i.roles=V(i),i.system=Y(i),i.site=W(i),i.translations=J(i),i.users=G(i),i.files.rename=i.files.changeName,i.pages.slug=i.pages.changeSlug,i.pages.status=i.pages.changeStatus,i.pages.template=i.pages.changeTemplate,i.pages.title=i.pages.changeTitle,i.site.title=i.site.changeTitle,i.system.info=i.system.get,i},X={install:function(t,e){t.prototype.$api=t.$api=Z({config:{endpoint:B.api,onComplete:function(n){t.$api.requests=t.$api.requests.filter((function(t){return t!==n})),0===t.$api.requests.length&&e.dispatch("isLoading",!1)},onError:function(t){B.debug&&window.console.error(t),403!==t.code||"Unauthenticated"!==t.message&&"access.panel"!==t.key||e.dispatch("user/logout",!0)},onPrepare:function(t){return e.state.languages.current&&(t.headers["x-language"]=e.state.languages.current.code),t.headers["x-csrf"]=window.panel.csrf,t},onStart:function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!1===i&&e.dispatch("isLoading",!0),t.$api.requests.push(n)},onSuccess:function(){clearInterval(t.$api.ping),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},ping:null,requests:[]}),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},Q={install:function(t){t.filter("t",(function(t){return t}))}},tt=(n("caad"),{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=this.$helper.string.lcfirst(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()}}})}}),et=n("1dce"),nt=n.n(et),it=(n("4d63"),n("25f0"),n("1276"),function(t){if(void 0!==t)return JSON.parse(JSON.stringify(t))}),st=function(t,e){var n=null;return function(){var i=this,s=arguments;clearTimeout(n),n=setTimeout((function(){t.apply(i,s)}),e)}},rt=function(t){return void 0!==F["a"].options.components[t]},at=(n("2532"),function(t){return!!t.dataTransfer&&(!!t.dataTransfer.types&&(!0===t.dataTransfer.types.includes("Files")&&!1===t.dataTransfer.types.includes("text/plain")))}),ot=function(t,e){t=String(t);var n="";e=(e||2)-t.length;while(n.length0&&void 0!==arguments[0]?arguments[0]:"3/2",e=String(t).split("/");if(2!==e.length)return"100%";var n=Number(e[0]),i=Number(e[1]),s=100;return 0!==n&&0!==i&&(s=100/n*i),s+"%"}),lt=(n("498a"),function(t){var e=arguments.length>1&&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&&Object.keys(e).forEach((function(n){var i="/"!==n.substr(0,1),s=n.substring(1,n.length-1),r=i?n:s;t=t.replace(new RegExp(RegExp.escape(r),"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}),ct=(n("466d"),function(t){t=t||{};var e=t.desc?-1:1,n=-e,i=/^0/,s=/\s+/g,r=/^\s+|\s+$/g,a=/[^\x00-\x80]/,o=/^0x[0-9a-f]+$/i,u=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,l=/(^([\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 p(""+t).replace(r,"")}:function(t){return(""+t).replace(r,"")};function p(t){return t.toLocaleLowerCase?t.toLocaleLowerCase():t.toLowerCase()}function d(t){return t.replace(u,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function f(t,e){return(!t.match(i)||1===e)&&parseFloat(t)||t.replace(s," ").replace(r,"")||0}return function(t,i){var s=c(t),r=c(i);if(!s&&!r)return 0;if(!s&&r)return n;if(s&&!r)return e;var u=d(s),p=d(r),h=parseInt(s.match(o),16)||1!==u.length&&Date.parse(s),m=parseInt(r.match(o),16)||h&&r.match(l)&&Date.parse(r)||null;if(m){if(hm)return e}for(var g=u.length,b=p.length,v=0,k=Math.max(g,b);v0)return e;if(y<0)return n;if(v===k-1)return 0}else{if($<_)return n;if($>_)return e}}return 0}}),pt={camelToKebab:function(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()},lcfirst:function(t){var e=String(t);return e.charAt(0).toLowerCase()+e.substr(1)},ucfirst:function(t){var e=String(t);return e.charAt(0).toUpperCase()+e.substr(1)}},dt=function(t,e){var n={url:"/",field:"file",method:"POST",accept:"text",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},i=Object.assign(n,e),s=new FormData;s.append(i.field,t,t.name),i.attributes&&Object.keys(i.attributes).forEach((function(t){s.append(t,i.attributes[t])}));var r=new XMLHttpRequest,a=function(e){if(e.lengthComputable&&i.progress){var n=Math.max(0,Math.min(100,e.loaded/e.total*100));i.progress(r,t,Math.ceil(n))}};r.upload.addEventListener("loadstart",a),r.upload.addEventListener("progress",a),r.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(r,t,n):(i.success(r,t,n),i.progress(r,t,100))})),r.addEventListener("error",(function(e){var n=JSON.parse(e.target.response);i.error(r,t,n),i.progress(r,t,100)})),r.open("POST",i.url,!0),i.headers&&Object.keys(i.headers).forEach((function(t){var e=i.headers[t];r.setRequestHeader(t,e)})),r.send(s)},ft={install:function(t){Array.prototype.sortBy=function(e){var n=t.prototype.$helper.sort(),i=e.split(" "),s=i[0],r=i[1]||"asc";return this.sort((function(t,e){var i=String(t[s]).toLowerCase(),a=String(e[s]).toLowerCase();return"desc"===r?n(a,i):n(i,a)}))},RegExp.escape=function(t){return t.replace(new RegExp("[-/\\\\^$*+?.()[\\]{}]","gu"),"\\$&")},t.prototype.$helper={clone:it,isComponent:rt,isUploadEvent:at,debounce:st,pad:ot,ratio:ut,slug:lt,sort:ct,string:pt,upload:dt}}},ht=(n("64e4"),{}),mt=Object(_["a"])(ht,i,s,!1,null,null,null),gt=(mt.exports,function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("div",{staticClass:"k-dialog",on:{mousedown:t.cancel}},[n("div",{staticClass:"k-dialog-box",attrs:{"data-size":t.size},on:{mousedown:function(t){t.stopPropagation()}}},[t.notification?n("div",{staticClass:"k-dialog-notification",attrs:{"data-theme":t.notification.type}},[n("p",[t._v(t._s(t.notification.message))]),n("k-button",{attrs:{icon:"cancel"},on:{click:function(e){t.notification=null}}})],1):t._e(),n("div",{staticClass:"k-dialog-body"},[t._t("default")],2),t.$slots["footer"]||t.cancelButton||t.submitButton?n("footer",{staticClass:"k-dialog-footer"},[t._t("footer",[n("k-button-group",[n("span",[t.cancelButton?n("k-button",{staticClass:"k-dialog-button-cancel",attrs:{icon:"cancel"},on:{click:t.cancel}},[t._v("\n "+t._s(t.cancelButtonLabel)+"\n ")]):t._e()],1),n("span",[t.submitButtonConfig?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.submitButtonLabel)+"\n ")]):t._e()],1)])])],2):t._e()])]):t._e()}),bt=[],vt={props:{cancelButton:{type:[String,Boolean],default:!0},icon:{type:String,default:"check"},size:{type:String,default:"default"},submitButton:{type:[String,Boolean],default:!0},theme:String,visible:Boolean},data:function(){return{notification:null,isOpen:this.visible,scrollTop:0}},computed:{cancelButtonLabel:function(){return!1!==this.cancelButton&&(!0===this.cancelButton||0===this.cancelButton.length?this.$t("cancel"):this.cancelButton)},submitButtonConfig:function(){return void 0!==this.$attrs["button"]?this.$attrs["button"]:void 0===this.submitButton||this.submitButton},submitButtonLabel:function(){return!0===this.submitButton||0===this.submitButton.length?this.$t("confirm"):this.submitButton}},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"}}}},kt=vt,$t=(n("a5f3"),Object(_["a"])(kt,gt,bt,!1,null,null,null)),_t=$t.exports,yt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.notification?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.notification.message))]),t.notification.details&&Object.keys(t.notification.details).length?n("dl",{staticClass:"k-error-details"},[t._l(t.notification.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()},wt=[],xt={mixins:[S],computed:{notification: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")}}},Ot=xt,jt=(n("7737"),Object(_["a"])(Ot,yt,wt,!1,null,null,null)),St=jt.exports,Ct=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-remove-dialog",{ref:"dialog",attrs:{text:t.$t("file.delete.confirm",{filename:t.filename})},on:{submit:t.submit}})},Et=[],Rt={mixins:[S],data:function(){return{id:null,parent:null,filename:null}},methods:{open:function(t,e){var n=this;return Object(j["a"])(regeneratorRuntime.mark((function i(){var s;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,n.$api.files.get(t,e);case 3:s=i.sent,n.id=s.id,n.filename=s.filename,n.parent=t,n.$refs.dialog.open(),i.next=13;break;case 10:i.prev=10,i.t0=i["catch"](0),n.$store.dispatch("notification/error",i.t0);case 13:case"end":return i.stop()}}),i,null,[[0,10]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.files.delete(t.parent,t.filename);case 3:t.$store.dispatch("content/remove","files/"+t.id),t.$store.dispatch("notification/success",":)"),t.$events.$emit("file.delete",t.id),t.$emit("success"),t.$refs.dialog.close(),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))()}}},Tt=Rt,It=Object(_["a"])(Tt,Ct,Et,!1,null,null,null),Lt=It.exports,At=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("rename")},on:{input:function(e){t.file.name=t.sluggify(t.file.name)},submit:t.submit},model:{value:t.file,callback:function(e){t.file=e},expression:"file"}})},Bt=[],qt={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,n.$api.files.get(t,e,{select:["id","filename","name","extension"]});case 3:n.file=i.sent,n.parent=t,n.$refs.dialog.open(),i.next=11;break;case 8:i.prev=8,i.t0=i["catch"](0),n.$store.dispatch("notification/error",i.t0);case 11:case"end":return i.stop()}}),i,null,[[0,8]])})))()},sluggify:function(t){return this.$helper.slug(t,[this.slugs,this.system.ascii],"@._-")},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.file.name=t.file.name.trim(),0!==t.file.name.length){e.next=4;break}return t.$refs.dialog.error(t.$t("error.file.changeName.empty")),e.abrupt("return");case 4:return e.prev=4,e.next=7,t.$api.files.changeName(t.parent,t.file.filename,t.file.name);case 7:n=e.sent,t.$store.dispatch("content/move",["files/"+t.file.id,"files/"+n.id]),t.$store.dispatch("notification/success",":)"),t.$emit("success",n),t.$events.$emit("file.changeName",n),t.$refs.dialog.close(),e.next=18;break;case 15:e.prev=15,e.t0=e["catch"](4),t.$refs.dialog.error(e.t0.message);case 18:case"end":return e.stop()}}),e,null,[[4,15]])})))()}}},Nt=qt,Pt=Object(_["a"])(Nt,At,Bt,!1,null,null,null),Dt=Pt.exports,Mt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-files-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.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)}}},[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-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:n("k-empty",{attrs:{icon:"image"}},[t._v("\n "+t._s(t.$t("dialog.files.empty"))+"\n ")])]],2)},Ft=[],Ut=(n("07ac"),{data:function(){return{models:[],issue:null,selected:{},options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[],search:!0},search:null,pagination:{limit:20,page:1,total:0}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},watch:{search:st((function(){this.pagination.page=0,this.fetch()}),200)},methods:{fetch:function(){var t=this,e=Object(I["a"])({page:this.pagination.page,search:this.search},this.fetchData||{});return this.$api.get(this.options.endpoint,e).then((function(e){t.models=e.data,t.pagination=e.pagination,t.onFetched&&t.onFetched(e)})).catch((function(e){t.models=[],t.issue=e.message}))},open:function(t,e){var n=this;this.pagination.page=0,this.search=null;var i=!0;Array.isArray(t)?(this.models=t,i=!1):(this.models=[],e=t),this.options=Object(I["a"])(Object(I["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()},paginate:function(t){this.pagination.page=t.page,this.pagination.limit=t.limit,this.fetch()},submit:function(){this.$emit("submit",Object.values(this.selected)),this.$refs.dialog.close()},isSelected:function(t){return void 0!==this.selected[t.id]},toggle:function(t){!1!==this.options.multiple&&1!==this.options.max||(this.selected={}),!0!==this.isSelected(t)?this.options.max&&this.options.max<=Object.keys(this.selected).length||this.$set(this.selected,t.id,t):this.$delete(this.selected,t.id)}}}),zt={mixins:[Ut]},Ht=zt,Kt=(n("bf53"),Object(_["a"])(Ht,Mt,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",t._g(t._b({ref:"dialog"},"k-dialog",t.$props,!1),t.$listeners),[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:t.novalidate},on:{input:function(e){return t.$emit("input",e)},submit:function(e){return t.$emit("submit",e)}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},Wt=[],Jt={mixins:[S],props:{fields:{type:[Array,Object],default:function(){return[]}},novalidate:{type:Boolean,default:!0},size:{type:String,default:"medium"},submitButton:{type:[String,Boolean],default:function(){return this.$t("save")}},theme:{type:String,default:"positive"},value:{type:Object,default:function(){return{}}}}},Gt=Jt,Zt=Object(_["a"])(Gt,Yt,Wt,!1,null,null,null),Xt=Zt.exports,Qt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("language.create")},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})},te=[],ee={mixins:[S],data:function(){return{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=this.$helper.slug(t,[this.system.ascii])}},methods:{onNameChanges:function(t){this.language.code=this.$helper.slug(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;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.language.locale&&(t.language.locale=t.language.locale.trim()||null),e.prev=1,e.next=4,t.$api.languages.create({name:t.language.name,code:t.language.code,direction:t.language.direction,locale:t.language.locale});case 4:t.$store.dispatch("languages/load"),t.success({message:":)",event:"language.create"}),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),t.$refs.dialog.error(e.t0.message);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))()}}},ne=ee,ie=Object(_["a"])(ne,Qt,te,!1,null,null,null),se=ie.exports,re=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-remove-dialog",{ref:"dialog",attrs:{text:t.$t("language.delete.confirm",{name:t.language.name})},on:{submit:t.submit}})},ae=[],oe={mixins:[S],data:function(){return{language:{name:null}}},methods:{open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.languages.get(t);case 3:e.language=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.languages.delete(t.language.code);case 3:t.$store.dispatch("languages/load"),t.success({message:t.$t("language.deleted"),event:"language.delete"}),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()}}},ue=oe,le=Object(_["a"])(ue,re,ae,!1,null,null,null),ce=le.exports,pe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,size:"medium"},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})},de=[],fe=n("53ca"),he={mixins:[se],computed:{fields:function(){var t=se.computed.fields.apply(this);return t.code.disabled=!0,"object"===Object(fe["a"])(this.language.locale)&&(t.locale={label:t.locale.label,type:"info",text:this.$t("language.locale.warning")}),t}},methods:{onNameChanges:function(){return!1},open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.languages.get(t);case 3:e.language=n.sent,i=Object.keys(e.language.locale),1===i.length&&(e.language.locale=e.language.locale[i[0]]),e.$refs.dialog.open(),n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 12:case"end":return n.stop()}}),n,null,[[0,9]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(0!==t.language.name.length){e.next=2;break}return e.abrupt("return",t.$refs.dialog.error(t.$t("error.language.name")));case 2:return"string"===typeof t.language.locale&&(t.language.locale=t.language.locale.trim()||null),e.prev=3,e.next=6,t.$api.languages.update(t.language.code,{name:t.language.name,direction:t.language.direction,locale:t.language.locale});case 6:t.$store.dispatch("languages/load"),t.success({message:t.$t("language.updated"),event:"language.update"}),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](3),t.$refs.dialog.error(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[3,10]])})))()}}},me=he,ge=Object(_["a"])(me,pe,de,!1,null,null,null),be=ge.exports,ve=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("page.draft.create")},on:{submit:t.submit,close:t.reset},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},ke=[],$e={mixins:[S],data:function(){return{parent:null,section:null,templates:[],page:this.emptyForm()}},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=this.$helper.slug(t,[this.slugs,this.system.ascii])}},methods:{emptyForm:function(){return{title:"",slug:"",template:null}},open:function(t,e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){var r;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return i.parent=t,i.section=n,s.prev=2,s.next=5,i.$api.get(e,{section:n});case 5:r=s.sent,i.templates=r.map((function(t){return{value:t.name,text:t.title}})),i.templates[0]&&(i.page.template=i.templates[0].value),i.$refs.dialog.open(),s.next=14;break;case 11:s.prev=11,s.t0=s["catch"](2),i.$store.dispatch("notification/error",s.t0);case 14:case"end":return s.stop()}}),s,null,[[2,11]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.page.title=t.page.title.trim(),0!==t.page.title.length){e.next=4;break}return t.$refs.dialog.error(t.$t("error.page.changeTitle.empty")),e.abrupt("return");case 4:return n={template:t.page.template,slug:t.page.slug,content:{title:t.page.title}},e.prev=5,e.next=8,t.$api.post(t.parent+"/children",n);case 8:i=e.sent,t.success({route:t.$api.pages.link(i.id),message:":)",event:"page.create"}),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](5),t.$refs.dialog.error(e.t0.message);case 15:case"end":return e.stop()}}),e,null,[[5,12]])})))()},reset:function(){this.page=this.emptyForm()}}},_e=$e,ye=Object(_["a"])(_e,ve,ke,!1,null,null,null),we=ye.exports,xe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("duplicate")},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},Oe=[],je={mixins:[S],data:function(){return{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=this.$helper.slug(t,[this.slugs,this.system.ascii])}},methods:{open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{language:"@default",select:"id,slug,hasChildren,hasDrafts,hasFiles,title"});case 3:i=n.sent,e.page.id=i.id,e.page.slug=i.slug+"-"+e.$helper.slug(e.$t("page.duplicate.appendix")),e.page.hasChildren=i.hasChildren,e.page.hasDrafts=i.hasDrafts,e.page.hasFiles=i.hasFiles,e.$refs.dialog.open(),n.next=15;break;case 12:n.prev=12,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 15:case"end":return n.stop()}}),n,null,[[0,12]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.pages.duplicate(t.page.id,t.page.slug,{children:t.page.children,files:t.page.files});case 3:n=e.sent,t.success({route:t.$api.pages.link(n.id),message:":)",event:"page.duplicate"}),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()}}},Se=je,Ce=Object(_["a"])(Se,xe,Oe,!1,null,null,null),Ee=Ce.exports,Re=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-remove-dialog",{ref:"dialog",attrs:{size:t.hasSubpages?"medium":"small"},on:{submit:t.submit,close:t.reset}},[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)},Te=[],Ie={mixins:[S],data:function(){return{page:{title:null,hasChildren:!1,hasDrafts:!1},model:this.emptyForm()}},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:{emptyForm:function(){return{check:null}},open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{select:"id, title, hasChildren, hasDrafts, parent"});case 3:e.page=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.hasSubpages||t.model.check===t.page.title){e.next=2;break}return e.abrupt("return",t.$refs.dialog.error(t.$t("error.page.delete.confirm")));case 2:return e.prev=2,e.next=5,t.$api.pages.delete(t.page.id,{force:!0});case 5:t.$store.dispatch("content/remove","pages/"+t.page.id),n={message:":)",event:"page.delete"},t.$route.params.path&&t.page.id===t.$route.params.path.replace(/\+/g,"/")&&(t.page.parent?n.route=t.$api.pages.link(t.page.parent.id):n.route="/pages"),t.success(n),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](2),t.$refs.dialog.error(e.t0.message);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})))()},reset:function(){this.model=this.emptyForm()}}},Le=Ie,Ae=(n("12fb"),Object(_["a"])(Le,Re,Te,!1,null,null,null)),Be=Ae.exports,qe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("rename")},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},Ne=[],Pe={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{select:["id","title"]});case 3:e.page=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.page.title=t.page.title.trim(),0!==t.page.title.length){e.next=3;break}return e.abrupt("return",t.$refs.dialog.error(t.$t("error.page.changeTitle.empty")));case 3:return e.prev=3,e.next=6,t.$api.pages.changeTitle(t.page.id,t.page.title);case 6:t.success({message:":)",event:"page.changeTitle"}),e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](3),t.$refs.dialog.error(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[3,9]])})))()}}},De=Pe,Me=Object(_["a"])(De,qe,Ne,!1,null,null,null),Fe=Me.exports,Ue=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.form,callback:function(e){t.form=e},expression:"form"}})},ze=[],He={mixins:[S],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:Object.keys(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;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{select:["id","status","num","errors","blueprint"]});case 3:if(i=n.sent,!1!==i.blueprint.options.changeStatus){n.next=6;break}return n.abrupt("return",e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.permission")}));case 6:if(!("draft"===i.status&&Object.keys(i.errors).length>0)){n.next=8;break}return n.abrupt("return",e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.incomplete"),details:i.errors}));case 8:if("default"!==i.blueprint.num){n.next=21;break}return n.prev=9,n.next=12,e.$api.pages.get(t,{select:["siblings"]});case 12:s=n.sent,e.setup(Object(I["a"])(Object(I["a"])({},i),{},{siblings:s.siblings})),n.next=19;break;case 16:n.prev=16,n.t0=n["catch"](9),e.$store.dispatch("notification/error",n.t0);case 19:n.next=22;break;case 21:e.setup(Object(I["a"])(Object(I["a"])({},i),{},{siblings:[]}));case 22:n.next=27;break;case 24:n.prev=24,n.t1=n["catch"](0),e.$store.dispatch("notification/error",n.t1);case 27:case"end":return n.stop()}}),n,null,[[0,24],[9,16]])})))()},setup:function(t){this.page=t,this.form.position=t.num||t.siblings.length+1,this.form.status=t.status,this.states=t.blueprint.status,this.$refs.dialog.open()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.pages.changeStatus(t.page.id,t.form.status,t.form.position||1);case 3:t.success({message:":)",event:"page.changeStatus"}),e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))()}}},Ke=He,Ve=Object(_["a"])(Ke,Ue,ze,!1,null,null,null),Ye=Ve.exports,We=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},Je=[],Ge={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{select:["id","template","blueprints"]});case 3:if(i=n.sent,!(i.blueprints.length<=1)){n.next=6;break}return n.abrupt("return",e.$store.dispatch("notification/error",{message:e.$t("error.page.changeTemplate.invalid",{slug:i.id})}));case 6:e.page=i,e.page.blueprints=e.page.blueprints.map((function(t){return{text:t.title,value:t.name}})),e.$refs.dialog.open(),n.next=14;break;case 11:n.prev=11,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 14:case"end":return n.stop()}}),n,null,[[0,11]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$events.$emit("keydown.cmd.s"),e.prev=1,e.next=4,t.$api.pages.changeTemplate(t.page.id,t.page.template);case 4:t.success({message:":)",event:"page.changeTemplate"}),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),t.$refs.dialog.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))()}}},Ze=Ge,Xe=Object(_["a"])(Ze,We,Je,!1,null,null,null),Qe=Xe.exports,tn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-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)},en=[],nn=(n("99af"),{mixins:[S],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=this.$helper.slug(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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{view:"panel"});case 3:e.page=n.sent,e.sluggify(e.page.slug),e.$refs.dialog.open(),n.next=11;break;case 8:n.prev=8,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 11:case"end":return n.stop()}}),n,null,[[0,8]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.slug!==t.page.slug){e.next=4;break}return t.$refs.dialog.close(),t.$store.dispatch("notification/success",":)"),e.abrupt("return");case 4:if(0!==t.slug.length){e.next=6;break}return e.abrupt("return",t.$refs.dialog.error(t.$t("error.page.slug.invalid")));case 6:return e.prev=6,e.next=9,t.$api.pages.changeSlug(t.page.id,t.slug);case 9:n=e.sent,t.$store.dispatch("content/move",["pages/"+t.page.id,"pages/"+n.id]),i={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||(i.route=t.$api.pages.link(n.id),delete i.event),t.success(i),e.next=19;break;case 16:e.prev=16,e.t0=e["catch"](6),t.$refs.dialog.error(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[6,16]])})))()}}}),sn=nn,rn=Object(_["a"])(sn,tn,en,!1,null,null,null),an=rn.exports,on=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-pages-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.model?n("header",{staticClass:"k-pages-dialog-navbar"},[n("k-button",{attrs:{disabled:!t.model.id,tooltip:t.$t("back"),icon:"angle-left"},on:{click:t.back}}),n("k-headline",[t._v(t._s(t.model.title))])],1):t._e(),t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.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-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:n("k-empty",{attrs:{icon:"page"}},[t._v("\n "+t._s(t.$t("dialog.pages.empty"))+"\n ")])]],2)},un=[],ln={mixins:[Ut],data:function(){var t=Ut.data();return Object(I["a"])(Object(I["a"])({},t),{},{model:{title:null,parent:null},options:Object(I["a"])(Object(I["a"])({},t.options),{},{parent:null})})},computed:{fetchData:function(){return{parent:this.options.parent}}},methods:{back:function(){this.options.parent=this.model.parent,this.pagination.page=1,this.fetch()},go:function(t){this.options.parent=t.id,this.pagination.page=1,this.fetch()},onFetched:function(t){this.model=t.model}}},cn=ln,pn=(n("ac27"),Object(_["a"])(cn,on,un,!1,null,null,null)),dn=pn.exports,fn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-text-dialog",t._g(t._b({ref:"dialog"},"k-text-dialog",t.$props,!1),t.$listeners),[t._t("default")],2)},hn=[],mn={mixins:[S],props:{icon:{type:String,default:"trash"},submitButton:{type:[String,Boolean],default:function(){return this.$t("delete")}},text:String,theme:{type:String,default:"negative"}}},gn=mn,bn=Object(_["a"])(gn,fn,hn,!1,null,null,null),vn=bn.exports,kn={extends:Fe,methods:{open:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.site.get({select:["title"]});case 3:t.page=e.sent,t.$refs.dialog.open(),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$store.dispatch("notification/error",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.page.title=t.page.title.trim(),0!==t.page.title.length){e.next=4;break}return t.$refs.dialog.error(t.$t("error.site.changeTitle.empty")),e.abrupt("return");case 4:return e.prev=4,e.next=7,t.$api.site.changeTitle(t.page.title);case 7:t.$store.dispatch("system/title",t.page.title),t.success({message:":)",event:"site.changeTitle"}),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](4),t.$refs.dialog.error(e.t0.message);case 14:case"end":return e.stop()}}),e,null,[[4,11]])})))()}}},$n=kn,_n=Object(_["a"])($n,r,a,!1,null,null,null),yn=_n.exports,wn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",t._g(t._b({ref:"dialog"},"k-dialog",t.$props,!1),t.$listeners),[t._t("default",[n("k-text",{domProps:{innerHTML:t._s(t.text)}})])],2)},xn=[],On={mixins:[S],props:{text:String}},jn=On,Sn=Object(_["a"])(jn,wn,xn,!1,null,null,null),Cn=Sn.exports,En=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("create")},on:{submit:t.create,close:t.reset},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},Rn=[],Tn={mixins:[S],data:function(){return{user:this.emptyForm(),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;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.create(t.user);case 3:t.success({message:":)",event:"user.create"}),e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))()},emptyForm:function(){return{name:"",email:"",password:"",language:this.$store.state.system.info.defaultLanguage||"en",role:this.$user.role.name}},open:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.roles.options({canBe:"created"});case 3:t.roles=e.sent,"admin"!==t.$user.role.name&&(t.roles=t.roles.filter((function(t){return"admin"!==t.value}))),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$store.dispatch("notification/error",e.t0);case 10:return e.prev=10,e.next=13,t.$api.translations.options();case 13:t.languages=e.sent,e.next=19;break;case 16:e.prev=16,e.t1=e["catch"](10),t.$store.dispatch("notification/error",e.t1);case 19:t.$refs.dialog.open();case 20:case"end":return e.stop()}}),e,null,[[0,7],[10,16]])})))()},reset:function(){this.user=this.emptyForm()}}},In=Tn,Ln=Object(_["a"])(In,En,Rn,!1,null,null,null),An=Ln.exports,Bn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},qn=[],Nn={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t,{select:["id","email"]});case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.changeEmail(t.user.id,t.user.email);case 3:n=e.sent,t.$store.dispatch("content/revert","users/"+t.user.id),t.$user.id===t.user.id&&t.$store.dispatch("user/email",t.user.email),i={message:":)",event:"user.changeEmail"},"User"===t.$route.name&&(i.route=t.$api.users.link(n.id)),t.success(i),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))()}}},Pn=Nn,Dn=Object(_["a"])(Pn,Bn,qn,!1,null,null,null),Mn=Dn.exports,Fn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},Un=[],zn={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.translations.options();case 2:t.languages=e.sent;case 3:case"end":return e.stop()}}),e)})))()},methods:{open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t,{view:"compact"});case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.changeLanguage(t.user.id,t.user.language);case 3:t.user=e.sent,t.$user.id===t.user.id&&t.$store.dispatch("user/language",t.user.language),t.success({message:":)",event:"user.changeLanguage"}),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))()}}},Hn=zn,Kn=Object(_["a"])(Hn,Fn,Un,!1,null,null,null),Vn=Kn.exports,Yn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})},Wn=[],Jn=(n("ddb0"),{mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t);case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.values.password&&!(t.values.password.length<8)){e.next=3;break}return t.$refs.dialog.error(t.$t("error.user.password.invalid")),e.abrupt("return",!1);case 3:if(t.values.password===t.values.passwordConfirmation){e.next=6;break}return t.$refs.dialog.error(t.$t("error.user.password.notSame")),e.abrupt("return",!1);case 6:return e.prev=6,e.next=9,t.$api.users.changePassword(t.user.id,t.values.password);case 9:t.success({message:":)",event:"user.changePassword"}),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](6),t.$refs.dialog.error(e.t0.message);case 15:case"end":return e.stop()}}),e,null,[[6,12]])})))()}}}),Gn=Jn,Zn=Object(_["a"])(Gn,Yn,Wn,!1,null,null,null),Xn=Zn.exports,Qn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-remove-dialog",{ref:"dialog",attrs:{text:t.$t("user.delete.confirm",{email:t.user.email})},on:{submit:t.submit}})},ti=[],ei={mixins:[S],data:function(){return{user:{email:null}}},methods:{open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t);case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.delete(t.user.id);case 3:t.$store.dispatch("content/remove","users/"+t.user.id),t.success({message:":)",event:"user.delete"}),"User"===t.$route.name&&t.$go("/users"),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))()}}},ni=ei,ii=Object(_["a"])(ni,Qn,ti,!1,null,null,null),si=ii.exports,ri=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("rename")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},ai=[],oi={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t,{select:["id","name"]});case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.user.name=t.user.name.trim(),e.prev=1,e.next=4,t.$api.users.changeName(t.user.id,t.user.name);case 4:t.$user.id===t.user.id&&t.$store.dispatch("user/name",t.user.name),t.success({message:":)",event:"user.changeName"}),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),t.$refs.dialog.error(e.t0.message);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))()}}},ui=oi,li=Object(_["a"])(ui,ri,ai,!1,null,null,null),ci=li.exports,pi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("user.changeRole")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},di=[],fi={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.id=t,n.prev=1,n.next=4,e.$api.users.get(t);case 4:return e.user=n.sent,e.user.role=e.user.role.name,n.next=8,e.$api.users.roles(t);case 8:e.roles=n.sent,"admin"!==e.$user.role.name&&(e.roles=e.roles.filter((function(t){return"admin"!==t.value}))),e.$refs.dialog.open(),n.next=16;break;case 13:n.prev=13,n.t0=n["catch"](1),e.$store.dispatch("notification/error",n.t0);case 16:case"end":return n.stop()}}),n,null,[[1,13]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.changeRole(t.user.id,t.user.role);case 3:t.$user.id===t.user.id&&t.$store.dispatch("user/load"),t.success({message:":)",event:"user.changeRole"}),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()}}},hi=fi,mi=Object(_["a"])(hi,pi,di,!1,null,null,null),gi=mi.exports,bi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-users-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.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-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:n("k-empty",{attrs:{icon:"users"}},[t._v("\n "+t._s(t.$t("dialog.users.empty"))+"\n ")])]],2)},vi=[],ki={mixins:[Ut]},$i=ki,_i=(n("7568"),Object(_["a"])($i,bi,vi,!1,null,null,null)),yi=_i.exports,wi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dropdown",{staticClass:"k-autocomplete"},[t._t("default"),n("k-dropdown-content",t._g({ref:"dropdown",attrs:{autofocus:!0}},t.$listeners),t._l(t.matches,(function(e,i){return n("k-dropdown-item",t._b({key:i,on:{mousedown:function(n){return t.onSelect(e)},keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"tab",9,n.key,"Tab")?null:(n.preventDefault(),t.onSelect(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.onSelect(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?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)},xi=[],Oi=(n("c975"),n("fb6a"),{props:{limit:{type:Number,default: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()}}}}),ji=Oi,Si=Object(_["a"])(ji,wi,xi,!1,null,null,null),Ci=Si.exports,Ei=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:t.selectToday}},[t._v(t._s(t.$t("today")))])],1)])])])])},Ri=[],Ti={props:{value:String,disabled:Boolean},data:function(){var t=this.value?this.$library.dayjs(this.value):this.$library.dayjs();return{day:t.date(),month:t.month(),year:t.year(),today:this.$library.dayjs(),current:t}},computed:{date:function(){return this.$library.dayjs("".concat(this.year,"-").concat(this.month+1,"-").concat(this.day))},numberOfDays:function(){return this.date.daysInMonth()},numberOfWeeks:function(){return Math.ceil((this.numberOfDays+this.firstWeekday-1)/7)},firstWeekday:function(){var t=this.date.clone().startOf("month").day();return t>0?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:this.$helper.pad(e)});return t}},watch:{value:function(t){var e=this.$library.dayjs(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()},selectToday:function(){this.set(this.$library.dayjs()),this.select(this.day)},select:function(t){t&&(this.day=t);var e=this.$library.dayjs(new Date(this.year,this.month,this.day,this.current.hour(),this.current.minute()));this.$emit("input",e.toISOString())}}},Ii=Ti,Li=(n("ee15"),Object(_["a"])(Ii,Ei,Ri,!1,null,null,null)),Ai=Li.exports,Bi=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()])},qi=[],Ni={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))}}},Pi=Ni,Di=(n("fc0f"),Object(_["a"])(Pi,Bi,qi,!1,null,null,null)),Mi=Di.exports,Fi=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)},Ui=[],zi={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(I["a"])(Object(I["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()}}},Hi=zi,Ki=(n("5d33"),Object(_["a"])(Hi,Fi,Ui,!1,null,null,null)),Vi=Ki.exports,Yi=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),t.form.lock.unlockable?n("k-button",{staticClass:"k-form-button",attrs:{icon:"unlock"},on:{click:t.setUnlock}},[t._v("\n "+t._s(t.$t("lock.unlock"))+"\n ")]):n("k-icon",{staticClass:"k-form-lock-loader",attrs:{type:"loader"}})],1):"changes"===t.mode?n("k-view",[n("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,icon:"undo"},on:{click:function(e){return t.$refs.revert.open()}}},[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(),n("k-dialog",{ref:"revert",attrs:{"submit-button":t.$t("revert"),icon:"undo",theme:"negative"},on:{submit:t.onRevert}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("revert.confirm"))}})],1)],1)},Wi=[],Ji=n("2909"),Gi={data:function(){return{supportsLocking:!0}},computed:{api:function(){return{lock:[this.$route.path+"/lock",null,null,!0],unlock:[this.$route.path+"/unlock",null,null,!0]}},hasChanges:function(){return this.$store.getters["content/hasChanges"]()},form:function(){return{lock:this.$store.state.content.status.lock,unlock:this.$store.state.content.status.unlock}},id:function(){return this.$store.state.content.current},isDisabled:function(){return!1===this.$store.state.content.status.enabled},isLocked:function(){return null!==this.form.lock},isUnlocked:function(){return null!==this.form.unlock},mode:function(){return!0===this.isUnlocked?"unlock":!0===this.isLocked?"lock":!0===this.hasChanges?"changes":void 0}},watch:{hasChanges:function(t,e){if(!1===e&&!0===t)return this.$store.dispatch("heartbeat/remove",this.getLock),void this.$store.dispatch("heartbeat/add",[this.setLock,30]);this.id&&!0===e&&!1===t&&this.removeLock()},id:function(){this.id&&!1===this.hasChanges&&this.$store.dispatch("heartbeat/add",[this.getLock,10])}},created:function(){this.$events.$on("keydown.cmd.s",this.onSave)},destroyed:function(){this.$events.$off("keydown.cmd.s",this.onSave)},methods:{getLock:function(){var t,e=this;return(t=this.$api).get.apply(t,Object(Ji["a"])(this.api.lock)).then((function(t){if(!1===t.supported)return e.supportsLocking=!1,void e.$store.dispatch("heartbeat/remove",e.getLock);!1===t.locked?(e.isLocked&&e.form.lock.user!==e.$store.state.user.current.id&&e.$events.$emit("model.reload"),e.$store.dispatch("content/lock",null)):e.$store.dispatch("content/lock",t.locked)})).catch((function(){}))},setLock:function(){var t,e=this;!0===this.supportsLocking&&(t=this.$api).patch.apply(t,Object(Ji["a"])(this.api.lock)).catch((function(t){if("error.lock.notImplemented"===t.key)return e.supportsLocking=!1,e.$store.dispatch("heartbeat/remove",e.setLock),!1;e.$store.dispatch("content/revert",e.id),e.$store.dispatch("heartbeat/remove",e.setLock),e.$store.dispatch("heartbeat/add",[e.getLock,10])}))},removeLock:function(){var t,e=this;!0===this.supportsLocking&&(this.$store.dispatch("heartbeat/remove",this.setLock),(t=this.$api).delete.apply(t,Object(Ji["a"])(this.api.lock)).then((function(){e.$store.dispatch("content/lock",null),e.$store.dispatch("heartbeat/add",[e.getLock,10])})).catch((function(){})))},setUnlock:function(){var t,e=this;!0===this.supportsLocking&&(this.$store.dispatch("heartbeat/remove",this.setLock),(t=this.$api).patch.apply(t,Object(Ji["a"])(this.api.unlock)).then((function(){e.$store.dispatch("content/lock",null),e.$store.dispatch("heartbeat/add",[e.getLock,10])})).catch((function(){})))},removeUnlock:function(){var t,e=this;!0===this.supportsLocking&&(this.$store.dispatch("heartbeat/remove",this.setLock),(t=this.$api).delete.apply(t,Object(Ji["a"])(this.api.unlock)).then((function(){e.$store.dispatch("content/unlock",null),e.$store.dispatch("heartbeat/add",[e.getLock,10])})).catch((function(){})))},onDownload:function(){var t=this,e="";Object.keys(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("content/revert"),this.removeUnlock()},onRevert:function(){this.$store.dispatch("content/revert"),this.$refs.revert.close()},onSave:function(t){var e=this;return!!t&&(t.preventDefault&&t.preventDefault(),!1===this.hasChanges||void this.$store.dispatch("content/save").then((function(){e.$events.$emit("model.update"),e.$store.dispatch("notification/success",":)")})).catch((function(t){403!==t.code&&(t.details&&Object.keys(t.details).length>0?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}]}))})))}}},Zi=Gi,Xi=(n("18dd"),Object(_["a"])(Zi,Yi,Wi,!1,null,null,null)),Qi=Xi.exports,ts=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hasChanges?n("k-dropdown",{staticClass:"k-form-indicator"},[n("k-button",{staticClass:"k-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.id,attrs:{icon:e.icon},nativeOn:{click:function(n){return n.stopPropagation(),t.go(e.target)}}},[t._v("\n "+t._s(e.label)+"\n ")])}))],2)],1):t._e()},es=[],ns=(n("3ca3"),n("2ca0"),{data:function(){return{isOpen:!1,entries:[]}},computed:{store:function(){return this.$store.state.content.models},models:function(){var t=this,e=Object.keys(this.store).filter((function(e){return!!t.store[e]})),n=e.map((function(e){return Object(I["a"])({id:e},t.store[e])}));return n.filter((function(t){return Object.keys(t.changes).length>0}))},hasChanges:function(){return this.models.length>0}},methods:{go:function(t){if(t.language&&this.$store.state.languages.current.code!==t.language){var e=this.$store.state.languages.all.filter((function(e){return e.code===t.language}))[0];this.$store.dispatch("languages/current",e)}this.$go(t.link)},load:function(){var t=this,e=this.models.map((function(e){return t.$api.get(e.api,{view:"compact"},null,!0).then((function(n){var i;if(i=!0===e.id.startsWith("pages/")?{icon:"page",label:n.title,target:{link:t.$api.pages.link(n.id)}}:!0===e.id.startsWith("files/")?{icon:"image",label:n.filename,target:{link:n.link}}:!0===e.id.startsWith("users/")?{icon:"user",label:n.email,target:{link:t.$api.users.link(n.id)}}:{icon:"home",label:n.title,target:{link:"/site"}},t.$store.state.languages.current){var s=e.id.split("/").pop();i.label=i.label+" ("+s+")",i.target.language=s}return i})).catch((function(){return t.$store.dispatch("content/remove",e.id),null}))}));return Promise.all(e).then((function(e){t.entries=e.filter((function(t){return null!==t})),0===t.entries.length&&t.$store.dispatch("notification/success",t.$t("lock.unsaved.empty"))}))},toggle:function(){var t=this;!1===this.$refs.list.isOpen?this.load().then((function(){t.$refs.list&&t.$refs.list.toggle()})):this.$refs.list.toggle()}}}),is=ns,ss=(n("9e26"),Object(_["a"])(is,ts,es,!1,null,null,null)),rs=ss.exports,as=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"k-field k-field-name-"+t.name,attrs:{"data-disabled":t.disabled,"data-translate":t.translate},on:{focusin:function(e){return t.$emit("focus",e)},focusout:function(e){return t.$emit("blur",e)}}},[t._t("header",[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:t.$t("field.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)},os=[],us={inheritAttrs:!1,props:{counter:[Boolean,Object],disabled:Boolean,endpoints:Object,help:String,input:[String,Number],label:String,name:[String,Number],required:Boolean,translate:Boolean,type:String},computed:{labelText:function(){return this.label||" "}}},ls=us,cs=(n("a134"),Object(_["a"])(ls,as,os,!1,null,null,null)),ps=cs.exports,ds=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()]}))],2)],1)},fs=[],hs={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=Object.keys(this.$refs)[0];this.focus(e)}},hasFieldType:function(t){return this.$helper.isComponent("k-".concat(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 Object.keys(t.when).forEach((function(i){var s=e.value[i.toLowerCase()],r=t.when[i];s!==r&&(n=!1)})),n},onInvalid:function(t,e,n,i){this.errors[i]=e,this.$emit("invalid",this.errors)},hasErrors:function(){return Object.keys(this.errors).length}}},ms=hs,gs=(n("862b"),Object(_["a"])(ms,ds,fs,!1,null,null,null)),bs=gs.exports,vs=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()])},ks=[],$s={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(I["a"])(Object(I["a"])({},this.$listeners),{},{invalid:function(e,n){t.isInvalid=e,t.$emit("invalid",e,n)}})}},computed:{inputProps:function(){return Object(I["a"])(Object(I["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()}}}},_s=$s,ys=(n("c7c8"),Object(_["a"])(_s,vs,ks,!1,null,null,null)),ws=ys.exports,xs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-upload"},[n("input",{ref:"input",attrs:{accept:t.options.accept,multiple:t.options.multiple,"aria-hidden":"true",type:"file",tabindex:"-1"},on:{change:t.select,click:function(t){t.stopPropagation()}}}),n("k-dialog",{ref:"dialog",attrs:{"cancel-button":!1,"submit-button":!1,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)},Os=[],js={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=Object.assign({},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(Ji["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){e.$helper.upload(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,Object.keys(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout((function(){n.$refs.dialog.close(),n.$emit("success",n.files,Object.values(n.completed))}),250)}}}},Ss=js,Cs=(n("5aee"),Object(_["a"])(Ss,xs,Os,!1,null,null,null)),Es=Cs.exports,Rs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-checkbox-input",on:{click:function(t){t.stopPropagation()}}},[n("input",{ref:"input",staticClass:"k-checkbox-input-native",attrs:{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)}})])},Ts=[],Is=n("b5ae"),Ls={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.focus()}},validations:function(){return{value:{required:!this.required||Is["required"]}}}},As=Ls,Bs=(n("42e4"),Object(_["a"])(As,Rs,Ts,!1,null,null,null)),qs=Bs.exports,Ns=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)},Ps=[],Ds=(n("a434"),{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,Object],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!0===Array.isArray(t)?t:"string"===typeof t?String(t).split(","):"object"===Object(fe["a"])(t)?Object.values(t):void 0}},validations:function(){return{selected:{required:!this.required||Is["required"],min:!this.min||Object(Is["minLength"])(this.min),max:!this.max||Object(Is["maxLength"])(this.max)}}}}),Ms=Ds,Fs=Object(_["a"])(Ms,Ns,Ps,!1,null,null,null),Us=Fs.exports,zs=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)},Hs=[],Ks={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:String,min:String,required:Boolean,value:String},data:function(){return{date:this.$library.dayjs(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=this.$library.dayjs(t)}},methods:{calculate:function(t,e){var n={min:{run:"subtract",take:"startOf"},max:{run:"add",take:"endOf"}}[e],i=t?this.$library.dayjs(t):null;return i&&!1!==i.isValid()||(i=this.$library.dayjs()[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:this.$helper.pad(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,parseInt(e)),"month"===t&&this.date.date()!==i&&(this.date=n.set("date",1).set("month",e).endOf("month")),this.onInput()},setInvalid:function(){this.date=this.$library.dayjs("invalid")},setInitialDate:function(t,e){var n=this.$library.dayjs();return this.date=this.$library.dayjs().set(t,parseInt(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)}}},Vs=Ks,Ys=(n("6ab3"),Object(_["a"])(Vs,zs,Hs,!1,null,null,null)),Ws=Ys.exports,Js=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,min:t.min,max:t.max,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=[],Zs={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])({},Ws.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=this.$library.dayjs(t);return e.isValid()?e.format("YYYY-MM-DD"):null},parseTime:function(t){var e=this.$library.dayjs(t);return e.isValid()?e.format("HH:mm"):null},setDate:function(t){t&&!this.timeValue&&(this.timeValue=this.$library.dayjs().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=this.$library.dayjs().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||Is["required"]}}}},Xs=Zs,Qs=(n("4433"),Object(_["a"])(Xs,Js,Gs,!1,null,null,null)),tr=Qs.exports,er=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))},nr=[],ir={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(I["a"])(Object(I["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(){var t=this,e=function(e){return!t.required&&!e||!t.$refs.input.validity.patternMismatch};return{value:{required:!this.required||Is["required"],minLength:!this.minlength||Object(Is["minLength"])(this.minlength),maxLength:!this.maxlength||Object(Is["maxLength"])(this.maxlength),email:"email"!==this.type||Is["email"],url:"url"!==this.type||Is["url"],pattern:!this.pattern||e}}}},sr=ir,rr=(n("cb8f"),Object(_["a"])(sr,er,nr,!1,null,null,null)),ar=rr.exports,or={extends:ar,props:Object(I["a"])(Object(I["a"])({},ar.props),{},{autocomplete:{type:String,default:"email"},placeholder:{type:String,default:function(){return this.$t("email.placeholder")}},type:{type:String,default:"email"}})},ur=or,lr=Object(_["a"])(ur,o,u,!1,null,null,null),cr=lr.exports,pr=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:t.onClose},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.close(e))}},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",attrs:{placeholder:t.search.min?t.$t("search.min",{min:t.search.min}):t.$t("search")+" …"},domProps:{value:t.q},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.escape(e))},input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),n("div",{staticClass:"k-multiselect-options"},[t._l(t.visible,(function(e){return n("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.more},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(n){return n.preventDefault(),t.select(e)}},nativeOn:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),n.stopPropagation(),t.select(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:(n.preventDefault(),n.stopPropagation(),t.select(e))}]}},[n("span",{domProps:{innerHTML:t._s(e.display)}}),n("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])})),0===t.filtered.length?n("k-dropdown-item",{staticClass:"k-multiselect-option",attrs:{disabled:!0}},[t._v("\n "+t._s(t.emptyLabel)+"\n ")]):t._e()],2),t.visible.length1&&!this.sort},dragOptions:function(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},emptyLabel:function(){return this.q?this.$t("search.results.none"):this.$t("options.none")},visible:function(){return this.limit?this.filtered.slice(0,this.search.display||this.filtered.length):this.filtered},filtered:function(){if(this.q&&this.q.length>=(this.search.min||0)){var t=new RegExp("(".concat(RegExp.escape(this.q),")"),"ig");return this.options.filter((function(e){return String(e.text).match(t)||String(e.value).match(t)})).map((function(e){return Object(I["a"])(Object(I["a"])({},e),{},{display:String(e.text).replace(t,"$1"),info:String(e.value).replace(t,"$1")})}))}return this.options.map((function(t){return Object(I["a"])(Object(I["a"])({},t),{},{display:t.text,info:t.value})}))},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)}))},more:function(){return!this.max||this.state.length1?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{position:{required:!this.required||Is["required"],min:!this.min||Object(Is["minValue"])(this.min),max:!this.max||Object(Is["maxValue"])(this.max)}}}},qr=Br,Nr=(n("b5d2"),Object(_["a"])(qr,Lr,Ar,!1,null,null,null)),Pr=Nr.exports,Dr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-select-input",attrs:{"data-disabled":t.disabled,"data-empty":""===t.selected}},[n("select",t._g({ref:"input",staticClass:"k-select-input-native",attrs:{autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,id:t.id,name:t.name,required:t.required},domProps:{value:t.selected}},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")])},Mr=[],Fr={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(I["a"])(Object(I["a"])({},this.$listeners),{},{click:function(e){return t.onClick(e)},change:function(e){return t.onInput(e.target.value)},input:function(){}})}},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||Is["required"]}}}},Ur=Fr,zr=(n("6a18"),Object(_["a"])(Ur,Dr,Mr,!1,null,null,null)),Hr=zr.exports,Kr=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)},Vr=[],Yr={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(){var t=this;return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map((function(e){return t.icon&&t.icon.length>0&&(e.icon=t.icon),e}),this)}},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.length=this.tags.length)return;break;case"first":e=0;break;case"last":e=this.tags.length-1;break;default:e=t;break}var i=this.tags[e];if(i){var s=this.$refs[i.value];if(s&&s[0])return{ref:s[0],tag:i,index:e}}return!1},index:function(t){return this.tags.findIndex((function(e){return e.value===t.value}))},onInput:function(){this.$emit("input",this.tags)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},leaveInput:function(t){0===t.target.selectionStart&&t.target.selectionStart===t.target.selectionEnd&&0!==this.tags.length&&(this.$refs.autocomplete.close(),this.navigate("last"),t.preventDefault())},navigate:function(t){var e=this.get(t);e?(e.ref.focus(),this.selectTag(e.tag)):"next"===t&&(this.$refs.input.focus(),this.selectTag(null))},prepareTags:function(t){return!1===Array.isArray(t)?[]:t.map((function(t){return"string"===typeof t?{text:t,value:t}:t}))},remove:function(t){var e=this.get("prev"),n=this.get("next");this.tags.splice(this.index(t),1),this.onInput(),e?(this.selectTag(e.tag),e.ref.focus()):n?this.selectTag(n.tag):(this.selectTag(null),this.$refs.input.focus())},select:function(){this.focus()},selectTag:function(t){this.selected=t},tab:function(t){this.newTag&&this.newTag.length>0&&(t.preventDefault(),this.addString(this.newTag))},type:function(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations:function(){return{tags:{required:!this.required||Is["required"],minLength:!this.min||Object(Is["minLength"])(this.min),maxLength:!this.max||Object(Is["maxLength"])(this.max)}}}},Wr=Yr,Jr=(n("27c1"),Object(_["a"])(Wr,Kr,Vr,!1,null,null,null)),Gr=Jr.exports,Zr={extends:ar,props:Object(I["a"])(Object(I["a"])({},ar.props),{},{autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}})},Xr=Zr,Qr=Object(_["a"])(Xr,p,d,!1,null,null,null),ta=Qr.exports,ea=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.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey?t.onSubmit(e):null},function(e){return e.metaKey?t.onShortcut(e):null},function(e){return e.ctrlKey?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)},na=[],ia={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(){t.$library.autosize(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.map((function(t){return t.dragText})).join("\n\n"))},insertUpload:function(t,e){this.insert(e.map((function(t){return t.dragText})).join("\n\n")),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(this.uploads&&this.$helper.isUploadEvent(t))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:B.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&&this.$helper.isUploadEvent(t))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&&"Control"!==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(){this.$library.autosize.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:B.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap:function(t){this.insert(t+this.selection()+t)}},validations:function(){return{value:{required:!this.required||Is["required"],minLength:!this.minlength||Object(Is["minLength"])(this.minlength),maxLength:!this.maxlength||Object(Is["maxLength"])(this.maxlength)}}}},sa=ia,ra=(n("cca8"),Object(_["a"])(sa,ea,na,!1,null,null,null)),aa=ra.exports,oa=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)},ua=[],la={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=this.$helper.pad(this.hour||0),e=this.$helper.pad(this.minute||0),n=String(this.meridiem||"AM").toUpperCase(),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",r=this.$library.dayjs("2000-01-01 "+i,"YYYY-MM-DD "+s);this.$emit("input",r.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:this.$helper.pad(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=this.$library.dayjs("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}}}},ca=la,pa=(n("50da"),Object(_["a"])(ca,oa,ua,!1,null,null,null)),da=pa.exports,fa=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)}})])},ha=[],ma={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 Array.isArray(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||Is["required"]}}}},ga=ma,ba=(n("bb41"),Object(_["a"])(ga,fa,ha,!1,null,null,null)),va=ba.exports,ka={extends:ar,props:Object(I["a"])(Object(I["a"])({},ar.props),{},{autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}})},$a=ka,_a=Object(_["a"])($a,f,h,!1,null,null,null),ya=_a.exports,wa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-checkboxes-field",attrs:{counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"checkboxes"}},"k-input",t.$props,!1),t.$listeners))],1)},xa=[],Oa={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Us.props),{},{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Array.isArray(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},ja=Oa,Sa=Object(_["a"])(ja,wa,xa,!1,null,null,null),Ca=Sa.exports,Ea=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)},Ra=[],Ta={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),tr.props),{},{icon:{type:String,default:"calendar"}}),data:function(){return{date:this.value,listeners:Object(I["a"])(Object(I["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)}}},Ia=Ta,La=Object(_["a"])(Ia,Ea,Ra,!1,null,null,null),Aa=La.exports,Ba=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-email-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"email"}},"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.mailto,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},qa=[],Na={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),cr.props),{},{link:{type:Boolean,default:!0},icon:{type:String,default:"email"}}),computed:{mailto:function(){return this.value&&this.value.length>0?"mailto:"+this.value:null}},methods:{focus:function(){this.$refs.input.focus()}}},Pa=Na,Da=Object(_["a"])(Pa,Ba,qa,!1,null,null,null),Ma=Da.exports,Fa=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:t.btnIcon},on:{click:function(e){return t.$refs.picker.toggle()}}},[t._v("\n "+t._s(t.btnLabel)+"\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,"data-invalid":t.isInvalid},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,link:t.link?e.link:null,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,"data-invalid":t.isInvalid,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)},Ua=[],za={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])({},ps.props),{},{empty:String,info:String,link:Boolean,layout:String,max:Number,multiple:Boolean,parent:String,search:Boolean,size:String,text:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{selected:this.value}},computed:{btnIcon:function(){return!this.multiple&&this.selected.length>0?"refresh":"add"},btnLabel:function(){return!this.multiple&&this.selected.length>0?this.$t("change"):this.$t("add")},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"]},isInvalid:function(){return!(!this.required||0!==this.selected.length)||(!!(this.min&&this.selected.lengththis.max))},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=[]}}},Ha={mixins:[za],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,search:this.search,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:B.api+"/"+this.endpoints.field+"/upload",multiple:this.multiple,accept:this.uploads.accept})}}},Ka=Ha,Va=(n("4a4b"),Object(_["a"])(Ka,Fa,Ua,!1,null,null,null)),Ya=Va.exports,Wa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-field k-gap-field"})},Ja=[],Ga={},Za=Object(_["a"])(Ga,Wa,Ja,!1,null,null,null),Xa=Za.exports,Qa=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")])},to=[],eo={props:{label:String,numbered:Boolean}},no=eo,io=(n("19d7"),Object(_["a"])(no,Qa,to,!1,null,null,null)),so=io.exports,ro=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)},ao=[],oo={props:{label:String,text:String,theme:{type:String,default:"info"}}},uo=oo,lo=(n("ddfd"),Object(_["a"])(uo,ro,ao,!1,null,null,null)),co=lo.exports,po=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("hr",{staticClass:"k-line-field"})},fo=[],ho=(n("718c"),{}),mo=Object(_["a"])(ho,po,fo,!1,null,null,null),go=mo.exports,bo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-multiselect-field",attrs:{input:t._uid,counter:t.counterOptions},on:{blur:t.blur},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.focus(e))}}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"multiselect"}},"k-input",t.$props,!1),t.$listeners))],1)},vo=[],ko={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),gr.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&&Array.isArray(this.value)?this.value.length:0,min:this.min,max:this.max}}},mounted:function(){this.$refs.input.$el.setAttribute("tabindex",0)},methods:{blur:function(t){this.$refs.input.blur(t)},focus:function(){this.$refs.input.focus()}}},$o=ko,_o=Object(_["a"])($o,bo,vo,!1,null,null,null),yo=_o.exports,wo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-number-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"number"}},"k-input",t.$props,!1),t.$listeners))],1)},xo=[],Oo={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),yr.props),methods:{focus:function(){this.$refs.input.focus()}}},jo=Oo,So=Object(_["a"])(jo,wo,xo,!1,null,null,null),Co=So.exports,Eo=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:t.btnIcon},on:{click:t.open}},[t._v("\n "+t._s(t.btnLabel)+"\n ")]):t._e()],1),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,handle:!0,list:t.selected,"data-size":t.size,"data-invalid":t.isInvalid},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:t.link?e.link:null,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,"data-invalid":t.isInvalid,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)},Ro=[],To={mixins:[za],methods:{open:function(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map((function(t){return t.id}))})}}},Io=To,Lo=(n("7e85"),Object(_["a"])(Io,Eo,Ro,!1,null,null,null)),Ao=Lo.exports,Bo=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",type:"password"}},"k-input",t.$props,!1),t.$listeners))],1)},qo=[],No={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),jr.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()}}},Po=No,Do=Object(_["a"])(Po,Bo,qo,!1,null,null,null),Mo=Do.exports,Fo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-radio-field"},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"radio"}},"k-input",t.$props,!1),t.$listeners))],1)},Uo=[],zo={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Ir.props),methods:{focus:function(){this.$refs.input.focus()}}},Ho=zo,Ko=Object(_["a"])(Ho,Fo,Uo,!1,null,null,null),Vo=Ko.exports,Yo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-range-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"range"}},"k-input",t.$props,!1),t.$listeners))],1)},Wo=[],Jo={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Pr.props),methods:{focus:function(){this.$refs.input.focus()}}},Go=Jo,Zo=Object(_["a"])(Go,Yo,Wo,!1,null,null,null),Xo=Zo.exports,Qo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-select-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"select"}},"k-input",t.$props,!1),t.$listeners))],1)},tu=[],eu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Hr.props),{},{icon:{type:String,default:"angle-down"}}),methods:{focus:function(){this.$refs.input.focus()}}},nu=eu,iu=Object(_["a"])(nu,Qo,tu,!1,null,null,null),su=iu.exports,ru=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:{"data-invalid":t.isInvalid,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-invalid":t.isInvalid,"data-sortable":t.isSortable}},[n("thead",[n("tr",[n("th",{staticClass:"k-structure-table-index"},[t._v("#")]),t._l(t.columns,(function(e,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,r){return n("td",{key:r,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,r)}}},[!1===t.columnIsEmpty(e[r])?[t.previewExists(s.type)?n("k-"+s.type+"-field-preview",{tag:"component",attrs:{value:e[r],column:s,field:t.fields[r]},on:{input:function(e){return t.update(i,r,e)}}}):[n("p",{staticClass:"k-structure-table-text"},[t._v("\n "+t._s(s.before)+" "+t._s(t.displayText(t.fields[r],e[r])||"–")+" "+t._s(s.after)+"\n ")])]]:t._e()],2)})),n("td",{staticClass:"k-structure-table-options"},[t.duplicate&&t.more&&null===t.currentIndex?[n("k-button",{key:i,ref:"actionsToggle",refInFor:!0,staticClass:"k-structure-table-options-button",attrs:{icon:"dots"},on:{click:function(e){t.$refs[i+"-actions"][0].toggle()}}}),n("k-dropdown-content",{ref:i+"-actions",refInFor:!0,attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"copy"},on:{click:function(e){return t.duplicateItem(i)}}},[t._v(t._s(t.$t("duplicate")))]),n("k-dropdown-item",{attrs:{icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}},[t._v(t._s(t.$t("remove")))])],1)]:[n("k-button",{staticClass:"k-structure-table-options-button",attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}})]],2)],2)})),0)],1),t.limit?n("k-pagination",t._b({on:{paginate:t.paginateItems}},"k-pagination",t.pagination,!1)):t._e(),t.disabled?t._e():n("k-dialog",{ref:"remove",attrs:{"submit-button":t.$t("delete"),theme:"negative"},on:{submit:t.remove}},[n("k-text",[t._v(t._s(t.$t("field.structure.delete.confirm")))])],1)]],2)},au=[],ou={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])({},ps.props),{},{columns:Object,duplicate:{type:Boolean,default:!0},empty:String,fields:Object,limit:Number,max:Number,min:Number,prepend:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default: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 Object.keys(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)},isInvalid:function(){return!0!==this.disabled&&(!!(this.min&&this.items.lengththis.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={};Object.keys(this.fields).forEach((function(n){var i=t.fields[n];null!==i.default?e[n]=t.$helper.clone(i.default):e[n]=null})),this.currentIndex="new",this.currentModel=e,this.createForm()},addItem:function(t){!0===this.prepend?this.items.unshift(t):this.items.push(t)},beforePaginate:function(){return this.save(this.currentModel)},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("content/enable")},columnIsEmpty:function(t){return void 0===t||null===t||""===t||("object"===Object(fe["a"])(t)&&0===Object.keys(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("content/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=this.$library.dayjs(e),i=!0===t.time?"YYYY-MM-DD HH:mm":"YYYY-MM-DD";return n.isValid()?n.format(i):"";case"tags":case"multiselect":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(fe["a"])(e)&&null!==e?"…":e.toString()},duplicateItem:function(t){this.addItem(this.items[t]),this.onInput()},escape:function(){var t=this;if("new"===this.currentIndex){var e=Object.values(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&&this.$refs.add.focus&&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===Array.isArray(t)?[]:this.sort(t)},onInput:function(){this.$emit("input",this.items)},open:function(t,e){this.currentIndex=t,this.currentModel=this.$helper.clone(this.items[t]),this.createForm(e)},paginate:function(t){this.open(t.offset)},paginateItems:function(t){this.page=t.page},previewExists:function(t){return this.$helper.isComponent("k-".concat(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.addItem(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})):Promise.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.toString().split("/");if(2!==e.length)return"auto";var n=Number(e[0]),i=Number(e[1]);return parseFloat(100/i*n,2).toFixed(2)+"%"},update:function(t,e,n){this.items[t][e]=n,this.onInput()}}},uu=ou,lu=(n("088c"),Object(_["a"])(uu,ru,au,!1,null,null,null)),cu=lu.exports,pu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tags-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tags"}},"k-input",t.$props,!1),t.$listeners))],1)},du=[],fu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Gr.props),{},{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Array.isArray(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},hu=fu,mu=Object(_["a"])(hu,pu,du,!1,null,null,null),gu=mu.exports,bu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tel-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tel"}},"k-input",t.$props,!1),t.$listeners))],1)},vu=[],ku={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),ta.props),{},{icon:{type:String,default:"phone"}}),methods:{focus:function(){this.$refs.input.focus()}}},$u=ku,_u=Object(_["a"])($u,bu,vu,!1,null,null,null),yu=_u.exports,wu=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)},xu=[],Ou={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),ar.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()}}},ju=Ou,Su=(n("b746"),Object(_["a"])(ju,wu,xu,!1,null,null,null)),Cu=Su.exports,Eu=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)},Ru=[],Tu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),aa.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()}}},Iu=Tu,Lu=Object(_["a"])(Iu,Eu,Ru,!1,null,null,null),Au=Lu.exports,Bu=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",type:"time"}},"k-input",t.$props,!1),t.$listeners))],1)},qu=[],Nu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),da.props),{},{icon:{type:String,default:"clock"}}),methods:{focus:function(){this.$refs.input.focus()}}},Pu=Nu,Du=Object(_["a"])(Pu,Bu,qu,!1,null,null,null),Mu=Du.exports,Fu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-toggle-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"toggle"}},"k-input",t.$props,!1),t.$listeners))],1)},Uu=[],zu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),va.props),methods:{focus:function(){this.$refs.input.focus()}}},Hu=zu,Ku=Object(_["a"])(Hu,Fu,Uu,!1,null,null,null),Vu=Ku.exports,Yu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-url-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"url"}},"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)},Wu=[],Ju={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),ya.props),{},{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}}),methods:{focus:function(){this.$refs.input.focus()}}},Gu=Ju,Zu=Object(_["a"])(Gu,Yu,Wu,!1,null,null,null),Xu=Zu.exports,Qu=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:t.btnIcon},on:{click:t.open}},[t._v("\n "+t._s(t.btnLabel)+"\n ")]):t._e()],1),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,handle:!0,"data-invalid":t.isInvalid},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.text,info:e.info,link:t.link?t.$api.users.link(e.id):null,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:{"data-invalid":t.isInvalid,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)},tl=[],el={mixins:[za],methods:{open:function(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map((function(t){return t.id}))})}}},nl=el,il=(n("7f6e"),Object(_["a"])(nl,Qu,tl,!1,null,null,null)),sl=il.exports,rl=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)])])},al=[],ol=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")}))},ul={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:(Array.isArray(this.buttons)&&(n=this.buttons),!0!==Array.isArray(this.buttons)&&(n=this.$options.layout),n.forEach((function(n,s){if("|"===n)t["divider-"+s]={divider:!0};else if(i[n]){var r=i[n];t[n]=r,r.shortcut&&(e[r.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;Object.keys(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:"k",command:"dialog",args:"link"},email:{label:this.$t("toolbar.button.email"),icon:"email",shortcut:"e",command:"dialog",args:"email"},file:this.fileCommandSetup(),code:{label:this.$t("toolbar.button.code"),icon:"code",command:"wrap",args:"`"},ul:{label:this.$t("toolbar.button.ul"),icon:"list-bullet",command:function(){return ol.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command:function(){return ol.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)}}}},ll=ul,cl=(n("df0d"),Object(_["a"])(ll,rl,al,!1,null,null,null)),pl=cl.exports,dl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},fl=[],hl={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()}}},ml=hl,gl=Object(_["a"])(ml,dl,fl,!1,null,null,null),bl=gl.exports,vl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},kl=[],$l={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()}}},_l=$l,yl=Object(_["a"])(_l,vl,kl,!1,null,null,null),wl=yl.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()}}},["image"===e.type?n("k-image",t._b({},"k-image",t.imageOptions(e),!1)):n("k-icon",t._b({},"k-icon",e.icon,!1))],1)],1)})),0):t._e()},Ol=[],jl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"list",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"1/1";if(!t||0===t.length)return!1;var i=null,s=null;if(t.list?(i=t[e].url,s=t[e].srcset):(i=t.url,s=t.srcset),!i)return!1;var r={src:i,srcset:s,back:t.back||"black",cover:t.cover};return"cards"===e&&(r.ratio=t.ratio||"3/2",r.sizes=Sl(n)),r};function Sl(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"}}var Cl,El,Rl,Tl,Il={props:{value:Array,field:Object},methods:{imageOptions:function(t){var e=jl(t.image);return e.src?Object(I["a"])(Object(I["a"])({},e),{},{back:"pattern",cover:!1},this.field.image||{}):{src:t.url}}}},Ll=Il,Al=(n("21dc"),Object(_["a"])(Ll,xl,Ol,!1,null,null,null)),Bl=Al.exports,ql=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)},Nl=[],Pl={props:{column:{type:Object,default:function(){return{}}},value:String},computed:{link:function(){return this.value}}},Dl=Pl,Ml=(n("977f"),Object(_["a"])(Dl,ql,Nl,!1,null,null,null)),Fl=Ml.exports,Ul={extends:Fl,computed:{link:function(){return this.value&&this.value.length>0?"mailto:"+this.value:null}}},zl=Ul,Hl=Object(_["a"])(zl,Cl,El,!1,null,null,null),Kl=Hl.exports,Vl=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()},Yl=[],Wl={props:{value:Array}},Jl=Wl,Gl=(n("d0c1"),Object(_["a"])(Jl,Vl,Yl,!1,null,null,null)),Zl=Gl.exports,Xl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-input",{staticClass:"k-toggle-field-preview",attrs:{text:t.text,type:"toggle"},on:{input:function(e){return t.$emit("input",e)}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})},Ql=[],tc={props:{field:Object,value:Boolean,column:Object},computed:{text:function(){return!1!==this.column.text?this.field.text:null}}},ec=tc,nc=(n("1c4e"),Object(_["a"])(ec,Xl,Ql,!1,null,null,null)),ic=nc.exports,sc=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()},rc=[],ac={props:{value:Array}},oc=ac,uc=(n("3a85"),Object(_["a"])(oc,sc,rc,!1,null,null,null)),lc=uc.exports,cc=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()])},pc=[],dc=(n("6f7b"),{}),fc=Object(_["a"])(dc,cc,pc,!1,null,null,null),hc=fc.exports,mc=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)},gc=[],bc={props:{theme:String,text:String}},vc=bc,kc=(n("7dc7"),Object(_["a"])(vc,mc,gc,!1,null,null,null)),$c=kc.exports,_c=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)},yc=[],wc={inheritAttrs:!1,props:{column:String,flag:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},image:[Object,Boolean],info:String,link:[String,Function],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?this.$helper.ratio(this.icon.ratio):this.$helper.ratio("3/2")},imageOptions:function(){return jl(this.image,"cards",this.column)}}},xc=wc,Oc=(n("c119"),Object(_["a"])(xc,_c,yc,!1,null,null,null)),jc=Oc.exports,Sc=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)},Cc=[],Ec={props:{cards:Array}},Rc=Ec,Tc=(n("f56d"),Object(_["a"])(Rc,Sc,Cc,!1,null,null,null)),Ic=Tc.exports,Lc=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)},Ac=[],Bc={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(fe["a"])(this.pagination)?{}:this.pagination;return Object(I["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})}}},qc=Bc,Nc=(n("8c28"),Object(_["a"])(qc,Lc,Ac,!1,null,null,null)),Pc=Nc.exports,Dc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column",attrs:{"data-width":t.width,"data-sticky":t.sticky}},[n("div",[t._t("default")],2)])},Mc=[],Fc={props:{width:String,sticky:Boolean}},Uc=Fc,zc=(n("c9cb"),Object(_["a"])(Uc,Dc,Mc,!1,null,null,null)),Hc=zc.exports,Kc=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)},Vc=[],Yc={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():!1===this.$helper.isUploadEvent(t)?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset())},onEnter:function(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(this.dragging=!0)},onLeave:function(){this.reset()},onOver:function(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},Wc=Yc,Jc=(n("414d"),Object(_["a"])(Wc,Kc,Vc,!1,null,null,null)),Gc=Jc.exports,Zc=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),[t.icon?n("k-icon",{attrs:{type:t.icon}}):t._e(),n("p",[t._t("default")],2)],1)},Xc=[],Qc={props:{text:String,icon:String,layout:{type:String,default:"list"}}},tp=Qc,ep=(n("ba8f"),Object(_["a"])(tp,Zc,Xc,!1,null,null,null)),np=ep.exports,ip=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-file-preview"},[n("k-view",{staticClass:"k-file-preview-layout"},[n("div",{staticClass:"k-file-preview-image"},[n("k-link",{staticClass:"k-file-preview-image-link",attrs:{to:t.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)],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)},sp=[],rp={props:{file:Object}},ap=rp,op=(n("696b"),Object(_["a"])(ap,ip,sp,!1,null,null,null)),up=op.exports,lp=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)},cp=[],pp={props:{gutter:String}},dp=pp,fp=(n("5b23"),Object(_["a"])(dp,lp,cp,!1,null,null,null)),hp=fp.exports,mp=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)},gp=[],bp={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"}}}}},vp=bp,kp=(n("53c5"),Object(_["a"])(vp,mp,gp,!1,null,null,null)),$p=kp.exports,_p=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)},yp=[],wp={props:{items:Array}},xp=wp,Op=(n("c857"),Object(_["a"])(xp,_p,yp,!1,null,null,null)),jp=Op.exports,Sp=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",{staticClass:"k-list-item-content",attrs:{to:t.link,target:t.target}},[t.image?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):t._e(),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({staticClass:"k-list-item-status",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)},Cp=[],Ep={inheritAttrs:!1,props:{element:{type:String,default:"li"},image:[Object,Boolean],icon:{type:Object,default:function(){return{type:"file",back:"black"}}},sortable:Boolean,text:String,target:String,info:String,link:[String,Function],flag:Object,options:[Array,Function]},computed:{imageOptions:function(){return jl(this.image)}}},Rp=Ep,Tp=(n("fa6a"),Object(_["a"])(Rp,Sp,Cp,!1,null,null,null)),Ip=Tp.exports,Lp=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()},Ap=[],Bp={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)}}}},qp=Bp,Np=Object(_["a"])(qp,Lp,Ap,!1,null,null,null),Pp=Np.exports,Dp=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)},Mp=[],Fp={props:{align:String}},Up=Fp,zp=(n("daa8"),Object(_["a"])(Up,Dp,Mp,!1,null,null,null)),Hp=zp.exports,Kp=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)},Vp=[],Yp=n("310e"),Wp=n.n(Yp),Jp={components:{draggable:Wp.a},props:{element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data:function(){var t=this;return{listeners:Object(I["a"])(Object(I["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(I["a"])({fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view")},this.options)}}},Gp=Jp,Zp=Object(_["a"])(Gp,Kp,Vp,!1,null,null,null),Xp=Zp.exports,Qp={data:function(){return{error:null}},errorCaptured:function(t){return B.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]}},td=Qp,ed=Object(_["a"])(td,Rl,Tl,!1,null,null,null),nd=ed.exports,id=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=[],rd={props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},ad=rd,od=(n("f8a7"),Object(_["a"])(ad,id,sd,!1,null,null,null)),ud=od.exports,ld=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}})])])},cd=[],pd={props:{alt:String,color:String,back:String,emoji:Boolean,size:String,type:String}},dd=pd,fd=(n("3342"),Object(_["a"])(dd,ld,cd,!1,null,null,null)),hd=fd.exports,md=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)])},gd=[],bd={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 this.$helper.ratio(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=bd,kd=(n("0d56"),Object(_["a"])(vd,md,gd,!1,null,null,null)),$d=kd.exports,_d=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")])},yd=[],wd={props:{value:{type:Number,default:0}},data:function(){return{state:this.value}},methods:{set:function(t){this.state=t}}},xd=wd,Od=(n("9799"),Object(_["a"])(xd,_d,yd,!1,null,null,null)),jd=Od.exports,Sd=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"}})])])},Cd=[],Ed=(n("35cb"),{}),Rd=Object(_["a"])(Ed,Sd,Cd,!1,null,null,null),Td=Rd.exports,Id=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)},Ld=[],Ad={props:{align:String,size:String,theme:String}},Bd=Ad,qd=(n("b0d6"),Object(_["a"])(Bd,Id,Ld,!1,null,null,null)),Nd=qd.exports,Pd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.component,t._g(t._b({ref:"button",tag:"component"},"component",t.$props,!1),t.$listeners),[t._t("default")],2)},Dd=[],Md={inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,rel:String,role:String,target:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}},computed:{component:function(){return!0===this.disabled?"k-button-disabled":this.link?"k-button-link":"k-button-native"}},methods:{focus:function(){this.$refs.button.focus&&this.$refs.button.focus()},tab:function(){this.$refs.button.tab&&this.$refs.button.tab()},untab:function(){this.$refs.button.untab&&this.$refs.button.untab()}}},Fd=Md,Ud=(n("3787"),Object(_["a"])(Fd,Pd,Dd,!1,null,null,null)),zd=Ud.exports,Hd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-button",attrs:{id:t.id,"data-disabled":!0,"data-responsive":t.responsive,"data-theme":t.theme,title:t.tooltip}},[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)},Kd=[],Vd={inheritAttrs:!1,props:{icon:String,id:[String,Number],responsive:Boolean,theme:String,tooltip:String}},Yd=Vd,Wd=(n("16eb"),Object(_["a"])(Yd,Hd,Kd,!1,null,null,null)),Jd=Wd.exports,Gd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-button-group"},[t._t("default")],2)},Zd=[],Xd=(n("a567"),{}),Qd=Object(_["a"])(Xd,Gd,Zd,!1,null,null,null),tf=Qd.exports,ef=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-link",t._g({staticClass:"k-button",attrs:{"aria-current":t.current,autofocus:t.autofocus,id:t.id,"data-theme":t.theme,"data-responsive":t.responsive,rel:t.rel,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link}},t.$listeners),[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)},nf=[],sf={inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],link:String,rel:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String}},rf=sf,af=Object(_["a"])(rf,ef,nf,!1,null,null,null),of=af.exports,uf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",t._g({staticClass:"k-button",attrs:{"aria-current":t.current,autofocus:t.autofocus,id:t.id,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,title:t.tooltip,type: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)},lf=[],cf={mounted:function(){this.$el.addEventListener("keyup",this.onTab,!0),this.$el.addEventListener("blur",this.onUntab,!0)},destroyed:function(){this.$el.removeEventListener("keyup",this.onTab,!0),this.$el.removeEventListener("blur",this.onUntab,!0)},methods:{focus:function(){this.$el.focus&&this.$el.focus()},onTab:function(t){9===t.keyCode&&this.$el.setAttribute("data-tabbed",!0)},onUntab:function(){this.$el.removeAttribute("data-tabbed")},tab:function(){this.$el.focus(),this.$el.setAttribute("data-tabbed",!0)},untab:function(){this.$el.removeAttribute("data-tabbed")}}},pf={mixins:[cf],inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],responsive:Boolean,role:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}}},df=pf,ff=Object(_["a"])(df,uf,lf,!1,null,null,null),hf=ff.exports,mf=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)},gf=[],bf=(n("f95f"),{}),vf=Object(_["a"])(bf,mf,gf,!1,null,null,null),kf=vf.exports,$f=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()},_f=[],yf=null,wf={props:{options:[Array,Function],align:String},data:function(){return{items:[],current:-1,isOpen:!1}},methods:{fetchOptions:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e.options){n.next=14;break}if("string"!==typeof e.options){n.next=11;break}return n.next=4,fetch(e.options);case 4:return i=n.sent,n.next=7,i.json();case 7:return s=n.sent,n.abrupt("return",t(s));case 11:"function"===typeof e.options?e.options(t):Array.isArray(e.options)&&t(e.options);case 12:n.next=15;break;case 14:return n.abrupt("return",t(e.items));case 15:case"end":return n.stop()}}),n)})))()},open:function(){var t=this;this.reset(),yf&&yf!==this&&yf.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"),yf=t}))},reset:function(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close:function(){this.reset(),this.isOpen=yf=!1,this.$emit("close")},toggle:function(){this.isOpen?this.close():this.open()},focus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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();while(1){if(this.current--,this.current<0){this.close(),this.$emit("leave",t.code);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled){this.focus(this.current);break}}break;case"ArrowDown":t.preventDefault();while(1){if(this.current++,this.current>this.$children.length-1){var e=this.$children.filter((function(t){return!1===t.disabled}));this.current=this.$children.indexOf(e[e.length-1]);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled){this.focus(this.current);break}}break;case"Tab":while(1){if(this.current++,this.current>this.$children.length-1){this.close(),this.$emit("leave",t.code);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled)break}break}}}},xf=wf,Of=(n("98a1"),Object(_["a"])(xf,$f,_f,!1,null,null,null)),jf=Of.exports,Sf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-button",t._g(t._b({ref:"button",staticClass:"k-dropdown-item"},"k-button",t.$props,!1),t.listeners),[t._t("default")],2)},Cf=[],Ef={inheritAttrs:!1,props:{disabled:Boolean,icon:String,image:[String,Object],link:String,target:String,theme:String,upload:String,current:[String,Boolean]},data:function(){var t=this;return{listeners:Object(I["a"])(Object(I["a"])({},this.$listeners),{},{click:function(e){t.$parent.close(),t.$emit("click",e)}})}},methods:{focus:function(){this.$refs.button.focus()},tab:function(){this.$refs.button.tab()}}},Rf=Ef,Tf=(n("580a"),Object(_["a"])(Rf,Sf,Cf,!1,null,null,null)),If=Tf.exports,Lf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.to&&!t.disabled?n("a",t._g({ref:"link",staticClass:"k-link",attrs:{href:t.href,rel:t.relAttr,tabindex:t.tabindex,target:t.target,title:t.title}},t.listeners),[t._t("default")],2):n("span",{staticClass:"k-link",attrs:{title:t.title,"data-disabled":""}},[t._t("default")],2)},Af=[],Bf={mixins:[cf],props:{disabled:Boolean,rel:String,tabindex:[String,Number],target:String,title:String,to:[String,Function]},data:function(){return{relAttr:"_blank"===this.target?"noreferrer noopener":this.rel,listeners:Object(I["a"])(Object(I["a"])({},this.$listeners),{},{click:this.onClick})}},computed:{href:function(){return"function"===typeof this.to?"":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;"function"===typeof this.to&&(t.preventDefault(),this.to()),this.isRoutable(t)&&(t.preventDefault(),this.$go(this.to)),this.$emit("click",t)}}},qf=Bf,Nf=(n("cc79"),Object(_["a"])(qf,Lf,Af,!1,null,null,null)),Pf=Nf.exports,Df=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.languages.length?n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"globe"},on:{click:function(e){return t.$refs.languages.toggle()}}},[t._v("\n "+t._s(t.language.name)+"\n ")]),t.languages?n("k-dropdown-content",{ref:"languages"},[n("k-dropdown-item",{on:{click:function(e){return t.change(t.defaultLanguage)}}},[t._v(t._s(t.defaultLanguage.name))]),n("hr"),t._l(t.languages,(function(e){return n("k-dropdown-item",{key:e.code,on:{click:function(n){return t.change(e)}}},[t._v("\n "+t._s(e.name)+"\n ")])}))],2):t._e()],1):t._e()},Mf=[],Ff={computed:{defaultLanguage:function(){return this.$store.state.languages.default},language:function(){return this.$store.state.languages.current},languages:function(){return this.$store.state.languages.all.filter((function(t){return!1===t.default}))}},methods:{change:function(t){this.$store.dispatch("languages/current",t),this.$emit("change",t)}}},Uf=Ff,zf=Object(_["a"])(Uf,Df,Mf,!1,null,null,null),Hf=zf.exports,Kf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.show?n("nav",{staticClass:"k-pagination",attrs:{"data-align":t.align}},[t.show?n("k-button",{attrs:{disabled:!t.hasPrev,tooltip:t.prevLabel,icon:"angle-left"},on:{click:t.prev}}):t._e(),t.details?[t.dropdown?[n("k-dropdown",[n("k-button",{staticClass:"k-pagination-details",attrs:{disabled:!t.hasPages},on:{click:function(e){return t.$refs.dropdown.toggle()}}},[t.total>1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\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",{staticClass:"k-pagination-settings"},[n("label",{attrs:{for:"k-pagination-page"}},[n("span",[t._v(t._s(t.pageLabel)+":")]),n("select",{ref:"page",attrs:{id:"k-pagination-page"}},t._l(t.pages,(function(e){return n("option",{key:e,domProps:{selected:t.page===e,value:e}},[t._v("\n "+t._s(e)+"\n ")])})),0)]),n("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.goTo(t.$refs.page.value)}}})],1)])],1)]:[n("span",{staticClass:"k-pagination-details"},[t.total>1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\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()},Vf=[],Yf={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},validate:{type:Function,default:function(){return Promise.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:function(){return this.$t("pagination.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=parseInt(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: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}}}},Wf=Yf,Jf=(n("a66d"),Object(_["a"])(Wf,Kf,Vf,!1,null,null,null)),Gf=Jf.exports,Zf=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)},Xf=[],Qf={props:{prev:{type:Object,default:function(){return{disabled:!0,link:"#"}}},next:{type:Object,default:function(){return{disabled:!0,link:"#"}}}}},th=Qf,eh=(n("7a7d"),Object(_["a"])(th,Zf,Xf,!1,null,null,null)),nh=eh.exports,ih=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:t.close}},[n("strong",[t._v(t._s(e.title))]),n("small",[t._v(t._s(e.info))])])],1)})),0)])])},sh=[],rh={data:function(){return{items:[],q:null,selected:-1,currentType:"users"===this.$store.state.view?"users":"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"},files:{label:this.$t("files"),icon:"image",endpoint:"files/search"},users:{label:this.$t("users"),icon:"users",endpoint:"users/search"}}}},watch:{q:st((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--}}},ah=rh,oh=(n("4cb2"),Object(_["a"])(ah,ih,sh,!1,null,null,null)),uh=oh.exports,lh=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()])},ch=[],ph={props:{removable:Boolean,size:String},methods:{remove:function(){this.removable&&this.$emit("remove")},focus:function(){this.$refs.button.focus()}}},dh=ph,fh=(n("021f"),Object(_["a"])(dh,lh,ch,!1,null,null,null)),hh=fh.exports,mh=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.menuTitle(e,i))+"\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",{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",{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,tooltip:t.$t("license.unregistered"),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-form-indicator")],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()},gh=[],bh=Object(I["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),vh={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 bh[this.$store.state.view]},views:function(){return bh},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}},methods:{menuTitle:function(t,e){var n=this.$t("view."+e,t.label);return"site"===e&&this.$store.state.system.info.site||n}}},kh=vh,$h=(n("1e3b"),Object(_["a"])(kh,mh,gh,!1,null,null,null)),_h=$h.exports,yh=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,sticky:e.sticky}},[t._l(e.sections,(function(s,r){return[t.meetsCondition(s)?[t.exists(s.type)?n("k-"+s.type+"-section",t._b({key:t.parent+"-column-"+i+"-section-"+r+"-"+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-"+r,attrs:{text:t.$t("error.section.type.invalid",{type:s.type}),theme:"negative"}})]]:t._e()]}))],2)})),1)},wh=[],xh={props:{parent:String,blueprint:String,columns:[Array,Object]},computed:{content:function(){return this.$store.getters["content/values"]()}},methods:{exists:function(t){return this.$helper.isComponent("k-".concat(t,"-section"))},meetsCondition:function(t){var e=this;if(!t.when)return!0;var n=!0;return Object.keys(t.when).forEach((function(i){var s=e.content[i.toLowerCase()],r=t.when[i];s!==r&&(n=!1)})),n}}},Oh=xh,jh=(n("6bcd"),Object(_["a"])(Oh,yh,wh,!1,null,null,null)),Sh=jh.exports,Ch=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)},Eh=[],Rh={props:{blueprint:String,help:String,name:String,parent:String},methods:{load:function(){return this.$api.get(this.parent+"/sections/"+this.name)}}},Th={mixins:[Rh],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}))}},Ih=Th,Lh=(n("4333"),Object(_["a"])(Ih,Ch,Eh,!1,null,null,null)),Ah=Lh.exports,Bh=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:t.$t("section.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("\n "+t._s(t.$t("error.section.notLoaded",{name:t.name}))+":\n ")]),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,"data-invalid":t.isInvalid},on:{change:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,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()},qh=[],Nh={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},isInvalid:function(){return!!(this.options.min&&this.data.lengththis.options.max)},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;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t||(e.isLoading=!0),null===e.pagination.page&&(e.pagination.page=localStorage.getItem(e.paginationId)||1),n.prev=2,n.next=5,e.$api.get(e.parent+"/sections/"+e.name,{page:e.pagination.page});case 5:i=n.sent,e.options=i.options,e.pagination=i.pagination,e.data=e.items(i.data),n.next=14;break;case 11:n.prev=11,n.t0=n["catch"](2),e.error=n.t0.message;case 14:return n.prev=14,e.isLoading=!1,n.finish(14);case 17:case"end":return n.stop()}}),n,null,[[2,11,14,17]])})))()},paginate:function(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},reload:function(){this.load(!0)}}},Ph={mixins:[Nh],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;switch(e){case"duplicate":this.$refs.duplicate.open(t.id);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){var n=!1!==t.permissions.changeStatus;return t.flag={class:"k-status-flag k-status-flag-"+t.status,tooltip:n?e.$t("page.status"):"".concat(e.$t("page.status")," (").concat(e.$t("disabled"),")"),icon:n?"circle":"protected",disabled:!n,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")}}},Dh=Ph,Mh=Object(_["a"])(Dh,Bh,qh,!1,null,null,null),Fh=Mh.exports,Uh=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:t.$t("section.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,"data-invalid":t.isInvalid},on:{sort:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,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()},zh=[],Hh={mixins:[Nh],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.$go(t.link);break;case"download":window.open(t.url);break;case"rename":this.$refs.rename.open(t.parent,t.filename);break;case"replace":this.$refs.upload.open({url:B.api+"/"+this.$api.files.url(t.parent,t.filename),accept:"."+t.extension+","+t.mime,multiple:!1});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(I["a"])(Object(I["a"])({},this.add),{},{url:B.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:B.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.options.apiUrl+"/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(I["a"])(Object(I["a"])({},this.add),{},{url:B.api+"/"+this.add.api}))},uploaded:function(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}}},Kh=Hh,Vh=Object(_["a"])(Kh,Uh,zh,!1,null,null,null),Yh=Vh.exports,Wh=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,disabled:null!==t.$store.state.content.status.lock},on:{input:t.input,submit:t.onSubmit}})],2)},Jh=[],Gh={mixins:[Rh],inheritAttrs:!1,data:function(){return{fields:{},isLoading:!0,issue:null}},computed:{language:function(){return this.$store.state.languages.current},values:function(){return this.$store.getters["content/values"]()}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{input:function(t,e,n){this.$store.dispatch("content/update",[n,t[n]])},fetch:function(){var t=this;this.$api.get(this.parent+"/sections/"+this.name).then((function(e){t.fields=e.fields,Object.keys(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)}}},Zh=Gh,Xh=(n("7d5d"),Object(_["a"])(Zh,Wh,Jh,!1,null,null,null)),Qh=Xh.exports,tm=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)},em=[],nm={grid:function(){return!(!window.CSS||!window.CSS.supports("display","grid"))},fetch:function(){return void 0!==window.fetch},all:function(){return this.fetch()&&this.grid()}},im={computed:{hasFetchSupport:function(){return nm.fetch()},hasGridSupport:function(){return nm.grid()}},created:function(){this.$store.dispatch("content/current",null),nm.all()&&this.$go("/")}},sm=im,rm=(n("d6fc"),Object(_["a"])(sm,tm,em,!1,null,null,null)),am=rm.exports,om=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)},um=[],lm={props:{plugin:String},beforeRouteEnter:function(t,e,n){n((function(t){t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("content/current",null)}))},watch:{plugin:{handler:function(){this.$store.dispatch("view",this.plugin)},immediate:!0}}},cm=lm,pm=Object(_["a"])(cm,om,um,!1,null,null,null),dm=pm.exports,fm=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)])},hm=[],mm=(n("d221"),{}),gm=Object(_["a"])(mm,fm,hm,!1,null,null,null),bm=gm.exports,vm=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)},km=[],$m={computed:{isLocked:function(){return null!==this.$store.state.content.status.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)}}},_m={mixins:[$m],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 B.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("content/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:B.api+"/"+this.$api.files.url(this.path,this.file.filename),accept:"."+this.file.extension+","+this.file.mime});break;case"remove":this.$refs.remove.open(this.path,this.file.filename);break}},deleted:function(){this.path?this.$go("/"+this.path):this.$go("/site")},renamed:function(t){this.$go(this.$api.files.link(this.path,t.filename))},uploaded:function(){this.fetch(),this.$store.dispatch("notification/success",":)")}}},ym=_m,wm=Object(_["a"])(ym,vm,km,!1,null,null,null),xm=wm.exports,Om=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()},jm=[],Sm={data:function(){return{user:{name:"",email:"",language:"",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{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:{handler:function(t){this.user.language=t},immediate:!0},"user.language":function(t){this.$store.dispatch("translation/activate",t)}},created:function(){this.$store.dispatch("content/current",null),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.$go("/")})).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.$go("/login"):t.$api.translations.options().then((function(n){t.languages=n,t.system=e,t.$store.dispatch("title",t.$t("view.installation"))}))}))}}},Cm=Sm,Em=(n("146c"),Object(_["a"])(Cm,Om,jm,!1,null,null,null)),Rm=Em.exports,Tm=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()},Im=[],Lm=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"k-login-form",on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[n("h1",{staticClass:"k-offscreen"},[t._v(t._s(t.$t("login")))]),t.issue?n("div",{staticClass:"k-login-alert",on:{click:function(e){t.issue=null}}},[n("span",[t._v(t._s(t.issue))]),n("k-icon",{attrs:{type:"alert"}})],1):t._e(),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)},Am=[],Bm={data:function(){return{isLoading:!1,issue:"",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;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.issue=null,t.isLoading=!0,e.prev=2,e.next=5,t.$store.dispatch("user/login",t.user);case 5:return e.next=7,t.$store.dispatch("system/load",!0);case 7:t.$store.dispatch("notification/success",t.$t("welcome")),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](2),t.issue=t.$t("error.access.login");case 13:return e.prev=13,t.isLoading=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,10,13,16]])})))()}}},qm=Bm,Nm=Object(_["a"])(qm,Lm,Am,!1,null,null,null),Pm=Nm.exports,Dm={components:{"k-login-form":window.panel.plugins.login||Pm},data:function(){return{ready:!1,issue:null}},created:function(){var t=this;this.$store.dispatch("content/current",null),this.$store.dispatch("system/load").then((function(e){e.isReady||t.$go("/installation"),e.user&&e.user.id&&t.$go("/"),t.ready=!0,t.$store.dispatch("title",t.$t("login"))})).catch((function(e){t.issue=e}))}},Mm=Dm,Fm=(n("24c1"),Object(_["a"])(Mm,Tm,Im,!1,null,null,null)),Um=Fm.exports,zm=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,tooltip:t.status.label},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)},Hm=[],Km={mixins:[$m],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("content/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")}}},Vm=Km,Ym=(n("202d"),Object(_["a"])(Vm,zm,Hm,!1,null,null,null)),Wm=Ym.exports,Jm=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)},Gm=[],Zm={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.$store.dispatch("content/current",null),this.$store.dispatch("title",this.$t("view.settings")),this.$store.dispatch("breadcrumb",[]),this.fetch()},methods:{fetch:function(){var t=this;!0===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"},image:!0,text:n.name,info:n.code,link:function(){t.$refs.update.open(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}}}},Xm=Zm,Qm=(n("9bd5"),Object(_["a"])(Xm,Jm,Gm,!1,null,null,null)),tg=Qm.exports,eg=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)},ng=[],ig={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.state.content.status.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("content/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}}}},sg=ig,rg=Object(_["a"])(sg,eg,ng,!1,null,null,null),ag=rg.exports,og=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)},ug=[],lg={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.$store.dispatch("content/current",null),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:!0};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.$go("/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.$go("/users"):this.$go("/users/role/"+t.value),this.$refs.roles.close()}}},cg=lg,pg=Object(_["a"])(cg,og,ug,!1,null,null,null),dg=pg.exports,fg=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()},hg=[],mg={mixins:[$m],props:{id:{type:[Boolean,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 B.api+"/users/"+this.user.id+"/avatar"}},watch:{"$route.name":{handler:function(t){"Account"===t&&this.$store.dispatch("breadcrumb",[])},immediate:!0},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.id&&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("title",t.user.name||t.user.email),t.$store.dispatch("content/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()}}},gg=mg,bg=(n("bd96"),Object(_["a"])(gg,fg,hg,!1,null,null,null)),vg=bg.exports;F["a"].component("k-dialog",_t),F["a"].component("k-error-dialog",St),F["a"].component("k-file-rename-dialog",Dt),F["a"].component("k-file-remove-dialog",Lt),F["a"].component("k-files-dialog",Vt),F["a"].component("k-form-dialog",Xt),F["a"].component("k-language-create-dialog",se),F["a"].component("k-language-remove-dialog",ce),F["a"].component("k-language-update-dialog",be),F["a"].component("k-page-create-dialog",we),F["a"].component("k-page-duplicate-dialog",Ee),F["a"].component("k-page-rename-dialog",Fe),F["a"].component("k-page-remove-dialog",Be),F["a"].component("k-page-status-dialog",Ye),F["a"].component("k-page-template-dialog",Qe),F["a"].component("k-page-url-dialog",an),F["a"].component("k-pages-dialog",dn),F["a"].component("k-remove-dialog",vn),F["a"].component("k-site-rename-dialog",yn),F["a"].component("k-text-dialog",Cn),F["a"].component("k-user-create-dialog",An),F["a"].component("k-user-email-dialog",Mn),F["a"].component("k-user-language-dialog",Vn),F["a"].component("k-user-password-dialog",Xn),F["a"].component("k-user-remove-dialog",si),F["a"].component("k-user-rename-dialog",ci),F["a"].component("k-user-role-dialog",gi),F["a"].component("k-users-dialog",yi),F["a"].component("k-calendar",Ai),F["a"].component("k-counter",Mi),F["a"].component("k-autocomplete",Ci),F["a"].component("k-form",Vi),F["a"].component("k-form-buttons",Qi),F["a"].component("k-form-indicator",rs),F["a"].component("k-field",ps),F["a"].component("k-fieldset",bs),F["a"].component("k-input",ws),F["a"].component("k-upload",Es),F["a"].component("k-checkbox-input",qs),F["a"].component("k-checkboxes-input",Us),F["a"].component("k-date-input",Ws),F["a"].component("k-datetime-input",tr),F["a"].component("k-email-input",cr),F["a"].component("k-multiselect-input",gr),F["a"].component("k-number-input",yr),F["a"].component("k-password-input",jr),F["a"].component("k-radio-input",Ir),F["a"].component("k-range-input",Pr),F["a"].component("k-select-input",Hr),F["a"].component("k-tags-input",Gr),F["a"].component("k-tel-input",ta),F["a"].component("k-text-input",ar),F["a"].component("k-textarea-input",aa),F["a"].component("k-time-input",da),F["a"].component("k-toggle-input",va),F["a"].component("k-url-input",ya),F["a"].component("k-checkboxes-field",Ca),F["a"].component("k-date-field",Aa),F["a"].component("k-email-field",Ma),F["a"].component("k-files-field",Ya),F["a"].component("k-gap-field",Xa),F["a"].component("k-headline-field",so),F["a"].component("k-info-field",co),F["a"].component("k-line-field",go),F["a"].component("k-multiselect-field",yo),F["a"].component("k-number-field",Co),F["a"].component("k-pages-field",Ao),F["a"].component("k-password-field",Mo),F["a"].component("k-radio-field",Vo),F["a"].component("k-range-field",Xo),F["a"].component("k-select-field",su),F["a"].component("k-structure-field",cu),F["a"].component("k-tags-field",gu),F["a"].component("k-text-field",Cu),F["a"].component("k-textarea-field",Au),F["a"].component("k-tel-field",yu),F["a"].component("k-time-field",Mu),F["a"].component("k-toggle-field",Vu),F["a"].component("k-url-field",Xu),F["a"].component("k-users-field",sl),F["a"].component("k-toolbar",pl),F["a"].component("k-toolbar-email-dialog",bl),F["a"].component("k-toolbar-link-dialog",wl),F["a"].component("k-email-field-preview",Kl),F["a"].component("k-files-field-preview",Bl),F["a"].component("k-pages-field-preview",Zl),F["a"].component("k-toggle-field-preview",ic),F["a"].component("k-url-field-preview",Fl),F["a"].component("k-users-field-preview",lc),F["a"].component("k-bar",hc),F["a"].component("k-box",$c),F["a"].component("k-card",jc),F["a"].component("k-cards",Ic),F["a"].component("k-collection",Pc),F["a"].component("k-column",Hc),F["a"].component("k-dropzone",Gc),F["a"].component("k-empty",np),F["a"].component("k-file-preview",up),F["a"].component("k-grid",hp),F["a"].component("k-header",$p),F["a"].component("k-list",jp),F["a"].component("k-list-item",Ip),F["a"].component("k-tabs",Pp),F["a"].component("k-view",Hp),F["a"].component("k-draggable",Xp),F["a"].component("k-error-boundary",nd),F["a"].component("k-headline",ud),F["a"].component("k-icon",hd),F["a"].component("k-image",$d),F["a"].component("k-progress",jd),F["a"].component("k-sort-handle",Td),F["a"].component("k-text",Nd),F["a"].component("k-button",zd),F["a"].component("k-button-disabled",Jd),F["a"].component("k-button-group",tf),F["a"].component("k-button-link",of),F["a"].component("k-button-native",hf),F["a"].component("k-dropdown",kf),F["a"].component("k-dropdown-content",jf),F["a"].component("k-dropdown-item",If),F["a"].component("k-languages-dropdown",Hf),F["a"].component("k-link",Pf),F["a"].component("k-pagination",Gf),F["a"].component("k-prev-next",nh),F["a"].component("k-search",uh),F["a"].component("k-tag",hh),F["a"].component("k-topbar",_h),F["a"].component("k-sections",Sh),F["a"].component("k-info-section",Ah),F["a"].component("k-pages-section",Fh),F["a"].component("k-files-section",Yh),F["a"].component("k-fields-section",Qh),F["a"].component("k-browser-view",am),F["a"].component("k-custom-view",dm),F["a"].component("k-error-view",bm),F["a"].component("k-file-view",xm),F["a"].component("k-installation-view",Rm),F["a"].component("k-login-view",Um),F["a"].component("k-page-view",Wm),F["a"].component("k-settings-view",tg),F["a"].component("k-site-view",ag),F["a"].component("k-users-view",dg),F["a"].component("k-user-view",vg);var kg=n("2f62"),$g=n("3835"),_g=function(t,e){localStorage.setItem("kirby$content$"+t,JSON.stringify(e))},yg={namespaced:!0,state:{current:null,models:{},status:{enabled:!0,lock:null,unlock:null}},getters:{exists:function(t){return function(e){return t.models.hasOwnProperty(e)}},hasChanges:function(t,e){return function(t){var n=e.model(t).changes;return Object.keys(n).length>0}},isCurrent:function(t){return function(e){return t.current===e}},id:function(t,e,n){return function(e){return e=e||t.current,n.languages.current?e+"/"+n.languages.current.code:e}},model:function(t,e){return function(n){return n=n||t.current,!0===e.exists(n)?t.models[n]:{api:null,originals:{},values:{},changes:{}}}},originals:function(t,e){return function(t){return it(e.model(t).originals)}},values:function(t,e){return function(t){return Object(I["a"])(Object(I["a"])({},e.originals(t)),e.changes(t))}},changes:function(t,e){return function(t){return it(e.model(t).changes)}}},mutations:{CREATE:function(t,e){var n=Object($g["a"])(e,2),i=n[0],s=n[1];if(!s)return!1;var r=t.models[i]?t.models[i].changes:s.changes;F["a"].set(t.models,i,{api:s.api,originals:s.originals,changes:r||{}})},CURRENT:function(t,e){t.current=e},LOCK:function(t,e){F["a"].set(t.status,"lock",e)},MOVE:function(t,e){var n=Object($g["a"])(e,2),i=n[0],s=n[1],r=it(t.models[i]);F["a"].delete(t.models,i),F["a"].set(t.models,s,r);var a=localStorage.getItem("kirby$content$"+i);localStorage.removeItem("kirby$content$"+i),localStorage.setItem("kirby$content$"+s,a)},REMOVE:function(t,e){F["a"].delete(t.models,e),localStorage.removeItem("kirby$content$"+e)},REVERT:function(t,e){t.models[e]&&(F["a"].set(t.models[e],"changes",{}),localStorage.removeItem("kirby$content$"+e))},STATUS:function(t,e){F["a"].set(t.status,"enabled",e)},UNLOCK:function(t,e){e&&F["a"].set(t.models[t.current],"changes",{}),F["a"].set(t.status,"unlock",e)},UPDATE:function(t,e){var n=Object($g["a"])(e,3),i=n[0],s=n[1],r=n[2];if(!t.models[i])return!1;r=it(r);var a=JSON.stringify(r),o=JSON.stringify(t.models[i].originals[s]);o===a?F["a"].delete(t.models[i].changes,s):F["a"].set(t.models[i].changes,s,r),_g(i,{api:t.models[i].api,originals:t.models[i].originals,changes:t.models[i].changes})}},actions:{init:function(t){Object.keys(localStorage).filter((function(t){return t.startsWith("kirby$content$")})).map((function(t){return t.split("kirby$content$")[1]})).forEach((function(e){var n=localStorage.getItem("kirby$content$"+e);t.commit("CREATE",[e,JSON.parse(n)])})),Object.keys(localStorage).filter((function(t){return t.startsWith("kirby$form$")})).map((function(t){return t.split("kirby$form$")[1]})).forEach((function(e){var n=localStorage.getItem("kirby$form$"+e),i=null;try{i=JSON.parse(n)}catch(r){}if(!i||!i.api)return localStorage.removeItem("kirby$form$"+e),!1;var s={api:i.api,originals:i.originals,changes:i.values};t.commit("CREATE",[e,s]),_g(e,s),localStorage.removeItem("kirby$form$"+e)}))},create:function(t,e){e.id=t.getters.id(e.id),(e.id.startsWith("pages/")||e.id.startsWith("site"))&&delete e.content.title;var n={api:e.api,originals:it(e.content),changes:{}};F["a"].$api.get(e.api+"/unlock").then((function(n){!0===n.supported&&!0===n.unlocked&&t.commit("UNLOCK",t.state.models[e.id].changes)})).catch((function(){})),t.commit("CREATE",[e.id,n]),t.dispatch("current",e.id)},current:function(t,e){t.commit("CURRENT",e)},disable:function(t){t.commit("STATUS",!1)},enable:function(t){t.commit("STATUS",!0)},lock:function(t,e){t.commit("LOCK",e)},move:function(t,e){var n=Object($g["a"])(e,2),i=n[0],s=n[1];i=t.getters.id(i),s=t.getters.id(s),t.commit("MOVE",[i,s])},remove:function(t,e){t.commit("REMOVE",e),t.getters.isCurrent(e)&&t.commit("CURRENT",null)},revert:function(t,e){e=e||t.state.current,t.commit("REVERT",e)},save:function(t,e){if(e=e||t.state.current,t.getters.isCurrent(e)&&!1===t.state.status.enabled)return!1;t.dispatch("disable");var n=t.getters.model(e),i=Object(I["a"])(Object(I["a"])({},n.originals),n.changes);return F["a"].$api.patch(n.api,i).then((function(){t.commit("CREATE",[e,Object(I["a"])(Object(I["a"])({},n),{},{originals:i})]),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($g["a"])(e,3),i=n[0],s=n[1],r=n[2];r=r||t.state.current,t.commit("UPDATE",[r,i,s])}}},wg={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&&F["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")},clear:function(t){t.commit("CLEAR")},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))}}},xg={namespaced:!0,state:{all:[],current:null,default:null},mutations:{SET_ALL:function(t,e){t.all=e.map((function(t){return{code:t.code,default:t.default,direction:t.direction,locale:t.locale,name:t.name,rules:t.rules,url:t.url}}))},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 Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,F["a"].$api.languages.list();case 2:n=e.sent,t.dispatch("install",n.data);case 4:case"end":return e.stop()}}),e)})))()}}},Og={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(I["a"])({type:"success",timeout:4e3},e))},error:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(I["a"])({type:"error"},e))}}},jg={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:{load:function(t,e){return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e||!t.state.info.isReady||!t.rootState.user.current){n.next=2;break}return n.abrupt("return",new Promise((function(e){e(t.state.info)})));case 2:return n.prev=2,n.next=5,F["a"].$api.system.get();case 5:return i=n.sent,t.commit("SET_INFO",Object(I["a"])({isReady:i.isInstalled&&i.isOk},i)),i.languages&&t.dispatch("languages/install",i.languages,{root:!0}),t.dispatch("translation/install",i.translation,{root:!0}),t.dispatch("translation/activate",i.translation.id,{root:!0}),i.user&&t.dispatch("user/current",i.user,{root:!0}),n.abrupt("return",t.state.info);case 14:n.prev=14,n.t0=n["catch"](2),t.commit("SET_INFO",{isBroken:!0,error:n.t0.message});case 17:case"end":return n.stop()}}),n,null,[[2,14]])})))()},register:function(t,e){t.commit("SET_LICENSE",e)},title:function(t,e){t.commit("SET_TITLE",e)}}},Sg={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 F["a"].$api.translations.get(e)},install:function(t,e){t.commit("INSTALL",e),F["a"].i18n.add(e.id,e.data)},activate:function(t,e){return Object(j["a"])(regeneratorRuntime.mark((function n(){var i,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.state.installed[e],i){n.next=8;break}return n.next=4,t.dispatch("load",e);case 4:return s=n.sent,t.dispatch("install",s),t.dispatch("activate",e),n.abrupt("return");case 8:F["a"].i18n.set(e),t.commit("SET_CURRENT",e),document.dir=i.direction,document.documentElement.lang=e;case 12:case"end":return n.stop()}}),n)})))()}}},Cg=n("8c4f"),Eg=function(t,e,n){Ag.dispatch("system/load").then((function(){var e=Ag.state.user.current;if(!e)return Ag.dispatch("user/visit",t.path),Ag.dispatch("user/logout"),!1;var i=e.permissions.access;return!1===i.panel?(window.location.href=B.site,!1):!1===i[t.meta.view]?(Ag.dispatch("notification/error",{message:F["a"].i18n.translate("error.access.view")}),n(!1===i.site?"/account":"/")):void n()}))},Rg=[{path:"/",name:"Home",redirect:"/site"},{path:"/browser",name:"Browser",component:F["a"].component("k-browser-view"),meta:{outside:!0}},{path:"/login",component:F["a"].component("k-login-view"),meta:{outside:!0}},{path:"/logout",beforeEnter:function(){Object.keys(localStorage).forEach((function(t){t.startsWith("kirby$content$")&&localStorage.removeItem(t)})),Ag.dispatch("user/logout")},meta:{outside:!0}},{path:"/installation",component:F["a"].component("k-installation-view"),meta:{outside:!0}},{path:"/site",name:"Site",meta:{view:"site"},component:F["a"].component("k-site-view"),beforeEnter:Eg},{path:"/site/files/:filename",name:"SiteFile",meta:{view:"site"},component:F["a"].component("k-file-view"),beforeEnter:Eg,props:function(t){return{path:"site",filename:t.params.filename}}},{path:"/pages/:path/files/:filename",name:"PageFile",meta:{view:"site"},component:F["a"].component("k-file-view"),beforeEnter:Eg,props:function(t){return{path:"pages/"+t.params.path,filename:t.params.filename}}},{path:"/users/:path/files/:filename",name:"UserFile",meta:{view:"users"},component:F["a"].component("k-file-view"),beforeEnter:Eg,props:function(t){return{path:"users/"+t.params.path,filename:t.params.filename}}},{path:"/pages/:path",name:"Page",meta:{view:"site"},component:F["a"].component("k-page-view"),beforeEnter:Eg,props:function(t){return{path:t.params.path}}},{path:"/settings",name:"Settings",meta:{view:"settings"},component:F["a"].component("k-settings-view"),beforeEnter:Eg},{path:"/users/role/:role",name:"UsersByRole",meta:{view:"users"},component:F["a"].component("k-users-view"),beforeEnter:Eg,props:function(t){return{role:t.params.role}}},{path:"/users",name:"Users",meta:{view:"users"},beforeEnter:Eg,component:F["a"].component("k-users-view")},{path:"/users/:id",name:"User",meta:{view:"users"},component:F["a"].component("k-user-view"),beforeEnter:Eg,props:function(t){return{id:t.params.id}}},{path:"/account",name:"Account",meta:{view:"account"},component:F["a"].component("k-user-view"),beforeEnter:Eg,props:function(){return{id:!!Ag.state.user.current&&Ag.state.user.current.id}}},{path:"/plugins/:id",name:"Plugin",meta:{view:"plugin"},props:function(t){return{plugin:t.params.id}},beforeEnter:Eg,component:F["a"].component("k-custom-view")},{path:"*",name:"NotFound",beforeEnter:function(t,e,n){n("/")}}];F["a"].use(Cg["a"]);var Tg=new Cg["a"]({mode:"history",routes:Rg,url:"/"===B.url?"":B.url});Tg.beforeEach((function(t,e,n){"Browser"!==t.name&&!1===nm.all()&&n("/browser"),t.meta.outside||Ag.dispatch("user/visit",t.path),Ag.dispatch("view",t.meta.view),Ag.dispatch("content/lock",null),Ag.dispatch("content/unlock",null),Ag.dispatch("heartbeat/clear"),n()}));var Ig=Tg,Lg={namespaced:!0,state:{current:null,path:null},mutations:{SET_CURRENT:function(t,e){t.current=e,e&&e.permissions?(F["a"].prototype.$user=e,F["a"].prototype.$permissions=e.permissions):(F["a"].prototype.$user=null,F["a"].prototype.$permissions=null)},SET_PATH:function(t,e){t.path=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},email:function(t,e){t.commit("SET_CURRENT",Object(I["a"])(Object(I["a"])({},t.state.current),{},{email:e}))},language:function(t,e){t.dispatch("translation/activate",e,{root:!0}),t.commit("SET_CURRENT",Object(I["a"])(Object(I["a"])({},t.state.current),{},{language:e}))},load:function(t){return Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,F["a"].$api.auth.user();case 2:return n=e.sent,t.commit("SET_CURRENT",n),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))()},login:function(t,e){return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,F["a"].$api.auth.login(e);case 2:return i=n.sent,t.commit("SET_CURRENT",i),t.dispatch("translation/activate",i.language,{root:!0}),Ig.push(t.state.path||"/"),n.abrupt("return",i);case 7:case"end":return n.stop()}}),n)})))()},logout:function(t,e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.commit("SET_CURRENT",null),!e){n.next=4;break}return window.location.href=(window.panel.url||"")+"/login",n.abrupt("return");case 4:return n.prev=4,n.next=7,F["a"].$api.auth.logout();case 7:return n.prev=7,Ig.push("/login"),n.finish(7);case 10:case"end":return n.stop()}}),n,null,[[4,,7,10]])})))()},name:function(t,e){t.commit("SET_CURRENT",Object(I["a"])(Object(I["a"])({},t.state.current),{},{name:e}))},visit:function(t,e){t.commit("SET_PATH",e)}}};F["a"].use(kg["a"]);var Ag=new kg["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){var n;n=t.state.user.current?F["a"].$api.site.get(["title"]):new Promise((function(e){e(t.state.system.info)})),n.then((function(n){t.commit("SET_TITLE",e),t.dispatch("system/title",n.title),document.title=e||"",document.title+=null!==e?" | "+n.title:n.title}))},view:function(t,e){t.commit("SET_VIEW",e)}},modules:{content:yg,heartbeat:wg,languages:xg,notification:Og,system:jg,translation:Sg,user:Lg}});F["a"].config.errorHandler=function(t){B.debug&&window.console.error(t),Ag.dispatch("notification/error",{message:t.message||"An error occurred. Please reload the Panel."})},window.panel=window.panel||{},window.panel.error=function(t,e){B.debug&&window.console.error(t+": "+e),Ag.dispatch("error",t+". See the console for more information.")};var Bg=n("f2f3");F["a"].use(Bg["a"].plugin,Ag);var qg=n("19e9"),Ng=n.n(qg),Pg=n("5a0c"),Dg=n.n(Pg),Mg=n("f906"),Fg=n.n(Mg);Dg.a.extend(Fg.a),F["a"].prototype.$library={autosize:Ng.a,dayjs:Dg.a};n("4fad");var Ug={};for(var zg in F["a"].options.components)Ug[zg]=F["a"].options.components[zg];var Hg=function(t,e){e.template||e.render||e.extends?(e.extends&&"string"===typeof e.extends&&(e.extends=Ug[e.extends],e.template&&(e.render=null)),e.mixins&&(e.mixins=e.mixins.map((function(t){return"string"===typeof t?Ug[t]:t}))),Ug[t]&&window.console.warn('Plugin is replacing "'.concat(t,'"')),F["a"].component(t,e)):Ag.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.'))};Object.entries(window.panel.plugins.components).forEach((function(t){var e=Object($g["a"])(t,2),n=e[0],i=e[1];Hg(n,i)})),Object.entries(window.panel.plugins.fields).forEach((function(t){var e=Object($g["a"])(t,2),n=e[0],i=e[1];Hg(n,i)})),Object.entries(window.panel.plugins.sections).forEach((function(t){var e=Object($g["a"])(t,2),n=e[0],i=e[1];Hg(n,Object(I["a"])(Object(I["a"])({},i),{},{mixins:[Rh].concat(i.mixins||[])}))})),Object.entries(window.panel.plugins.views).forEach((function(t){var e=Object($g["a"])(t,2),n=e[0],i=e[1];if(!i.component)return Ag.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},F["a"].component("k-"+n+"-plugin-view",i.component)})),window.panel.plugins.use.forEach((function(t){F["a"].use(t)})),F["a"].config.productionTip=!1,F["a"].config.devtools=!0,F["a"].use(ft),F["a"].use(tt),F["a"].use(Q),F["a"].use(nt.a),F["a"].use(X,Ag),F["a"].prototype.$go=function(t){Ig.push(t).catch((function(t){if(t&&t.name&&"NavigationDuplicated"===t.name)return!0;throw t}))},new F["a"]({router:Ig,store:Ag,created:function(){var t=this;window.panel.app=this,window.panel.plugins.created.forEach((function(e){e(t)})),this.$store.dispatch("content/init")},render:function(t){return t(D)}}).$mount("#app")},"56d9":function(t,e,n){},"56ee":function(t,e,n){},"580a":function(t,e,n){"use strict";var i=n("df34"),s=n.n(i);s.a},5933:function(t,e,n){},"5aee":function(t,e,n){"use strict";var i=n("3523"),s=n.n(i);s.a},"5b23":function(t,e,n){"use strict";var i=n("b055"),s=n.n(i);s.a},"5c0b":function(t,e,n){"use strict";var i=n("64b0"),s=n.n(i);s.a},"5c8f":function(t,e,n){},"5d33":function(t,e,n){"use strict";var i=n("5e4b"),s=n.n(i);s.a},"5e4b":function(t,e,n){},6018:function(t,e,n){"use strict";var i=n("517f"),s=n.n(i);s.a},6233:function(t,e,n){},"64b0":function(t,e,n){},"64e4":function(t,e,n){"use strict";var i=n("d735"),s=n.n(i);s.a},6695:function(t,e,n){},"696b":function(t,e,n){"use strict";var i=n("af28"),s=n.n(i);s.a},"6a18":function(t,e,n){"use strict";var i=n("8e2b"),s=n.n(i);s.a},"6ab3":function(t,e,n){"use strict";var i=n("1aa8"),s=n.n(i);s.a},"6bcd":function(t,e,n){"use strict";var i=n("f99d"),s=n.n(i);s.a},"6f7b":function(t,e,n){"use strict";var i=n("7435"),s=n.n(i);s.a},"6fff":function(t,e,n){},"718c":function(t,e,n){"use strict";var i=n("ea6b"),s=n.n(i);s.a},"73f5":function(t,e,n){},7435:function(t,e,n){},7568:function(t,e,n){"use strict";var i=n("6695"),s=n.n(i);s.a},"756d":function(t,e,n){},7737:function(t,e,n){"use strict";var i=n("c366"),s=n.n(i);s.a},"7a7d":function(t,e,n){"use strict";var i=n("cbef"),s=n.n(i);s.a},"7d5d":function(t,e,n){"use strict";var i=n("3afb"),s=n.n(i);s.a},"7dc7":function(t,e,n){"use strict";var i=n("fa59"),s=n.n(i);s.a},"7e85":function(t,e,n){"use strict";var i=n("a925"),s=n.n(i);s.a},"7f6e":function(t,e,n){"use strict";var i=n("0f7a"),s=n.n(i);s.a},8370:function(t,e,n){},"862b":function(t,e,n){"use strict";var i=n("db66"),s=n.n(i);s.a},"863d":function(t,e,n){},"893d":function(t,e,n){"use strict";var i=n("56ee"),s=n.n(i);s.a},"8b71":function(t,e,n){},"8c28":function(t,e,n){"use strict";var i=n("6fff"),s=n.n(i);s.a},"8e2b":function(t,e,n){},9143:function(t,e,n){},"977f":function(t,e,n){"use strict";var i=n("c19c"),s=n.n(i);s.a},9799:function(t,e,n){"use strict";var i=n("f0c3"),s=n.n(i);s.a},"98a1":function(t,e,n){"use strict";var i=n("4c4a"),s=n.n(i);s.a},"9b86":function(t,e,n){},"9bd5":function(t,e,n){"use strict";var i=n("6233"),s=n.n(i);s.a},"9c45":function(t,e,n){},"9c80":function(t,e,n){},"9cce":function(t,e,n){},"9e1f":function(t,e,n){},"9e26":function(t,e,n){"use strict";var i=n("a101"),s=n.n(i);s.a},a101:function(t,e,n){},a134:function(t,e,n){"use strict";var i=n("bed0"),s=n.n(i);s.a},a14d:function(t,e,n){},a17f:function(t,e,n){},a567:function(t,e,n){"use strict";var i=n("34ba"),s=n.n(i);s.a},a5f3:function(t,e,n){"use strict";var i=n("f1ff"),s=n.n(i);s.a},a66d:function(t,e,n){"use strict";var i=n("2dc9"),s=n.n(i);s.a},a803:function(t,e,n){},a925:function(t,e,n){},abde:function(t,e,n){},ac27:function(t,e,n){"use strict";var i=n("f1ce"),s=n.n(i);s.a},af28:function(t,e,n){},b055:function(t,e,n){},b0af:function(t,e,n){},b0d6:function(t,e,n){"use strict";var i=n("3341"),s=n.n(i);s.a},b5d2:function(t,e,n){"use strict";var i=n("0656"),s=n.n(i);s.a},b746:function(t,e,n){"use strict";var i=n("5933"),s=n.n(i);s.a},b822:function(t,e,n){},b9d6:function(t,e,n){},ba8f:function(t,e,n){"use strict";var i=n("c235"),s=n.n(i);s.a},bb41:function(t,e,n){"use strict";var i=n("de06"),s=n.n(i);s.a},bbcc:function(t,e,n){},bd96:function(t,e,n){"use strict";var i=n("b0af"),s=n.n(i);s.a},bed0:function(t,e,n){},bf53:function(t,e,n){"use strict";var i=n("eb2d"),s=n.n(i);s.a},c119:function(t,e,n){"use strict";var i=n("315e"),s=n.n(i);s.a},c19c:function(t,e,n){},c235:function(t,e,n){},c366:function(t,e,n){},c429:function(t,e,n){},c4fb:function(t,e,n){},c7c8:function(t,e,n){"use strict";var i=n("abde"),s=n.n(i);s.a},c857:function(t,e,n){"use strict";var i=n("c4fb"),s=n.n(i);s.a},c9cb:function(t,e,n){"use strict";var i=n("bbcc"),s=n.n(i);s.a},cb8f:function(t,e,n){"use strict";var i=n("9b86"),s=n.n(i);s.a},cbef:function(t,e,n){},cc79:function(t,e,n){"use strict";var i=n("a14d"),s=n.n(i);s.a},cca8:function(t,e,n){"use strict";var i=n("15da"),s=n.n(i);s.a},d07b:function(t,e,n){},d0c1:function(t,e,n){"use strict";var i=n("56d9"),s=n.n(i);s.a},d221:function(t,e,n){"use strict";var i=n("8b71"),s=n.n(i);s.a},d2d1:function(t,e,n){},d343:function(t,e,n){},d34c:function(t,e,n){},d559:function(t,e,n){},d6fc:function(t,e,n){"use strict";var i=n("5c8f"),s=n.n(i);s.a},d735:function(t,e,n){},daa8:function(t,e,n){"use strict";var i=n("337f"),s=n.n(i);s.a},db66:function(t,e,n){},ddfd:function(t,e,n){"use strict";var i=n("b822"),s=n.n(i);s.a},de06:function(t,e,n){},df0d:function(t,e,n){"use strict";var i=n("9c80"),s=n.n(i);s.a},df34:function(t,e,n){},df71:function(t,e,n){},ea2e:function(t,e,n){},ea6b:function(t,e,n){},eb2d:function(t,e,n){},ee15:function(t,e,n){"use strict";var i=n("53cc"),s=n.n(i);s.a},f0c3:function(t,e,n){},f1ce:function(t,e,n){},f1ff:function(t,e,n){},f2c9:function(t,e,n){},f355:function(t,e,n){},f56d:function(t,e,n){"use strict";var i=n("9143"),s=n.n(i);s.a},f8a7:function(t,e,n){"use strict";var i=n("f2c9"),s=n.n(i);s.a},f95f:function(t,e,n){"use strict";var i=n("a803"),s=n.n(i);s.a},f99d:function(t,e,n){},fa59:function(t,e,n){},fa6a:function(t,e,n){"use strict";var i=n("ea2e"),s=n.n(i);s.a},fb36:function(t,e,n){},fc0f:function(t,e,n){"use strict";var i=n("c429"),s=n.n(i);s.a}}); \ No newline at end of file +(function(t){function e(e){for(var i,a,o=e[0],u=e[1],l=e[2],p=0,d=[];p1&&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},changeSlug:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.patch("pages/"+i.id(e)+"/slug",{slug:n}));case 1:case"end":return s.stop()}}),s)})))()},changeStatus:function(e,n,i){var s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",t.patch("pages/"+s.id(e)+"/status",{status:n,position:i}));case 1:case"end":return r.stop()}}),r)})))()},changeTemplate:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.patch("pages/"+i.id(e)+"/template",{template:n}));case 1:case"end":return s.stop()}}),s)})))()},changeTitle:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.patch("pages/"+i.id(e)+"/title",{title:n}));case 1:case"end":return s.stop()}}),s)})))()},children:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.post("pages/"+i.id(e)+"/children/search",n));case 1:case"end":return s.stop()}}),s)})))()},create:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(null!==e&&"/"!==e){s.next=2;break}return s.abrupt("return",t.post("site/children",n));case 2:return s.abrupt("return",t.post("pages/"+i.id(e)+"/children",n));case 3:case"end":return s.stop()}}),s)})))()},delete:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.delete("pages/"+i.id(e),n));case 1:case"end":return s.stop()}}),s)})))()},duplicate:function(e,n,i){var s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",t.post("pages/"+s.id(e)+"/duplicate",{slug:n,children:i.children||!1,files:i.files||!1}));case 1:case"end":return r.stop()}}),r)})))()},get:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){var r;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.next=2,t.get("pages/"+i.id(e),n);case 2:return r=s.sent,!0===Array.isArray(r.content)&&(r.content={}),s.abrupt("return",r);case 5:case"end":return s.stop()}}),s)})))()},id:function(t){return t.replace(/\//g,"+")},files:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.post("pages/"+i.id(e)+"/files/search",n));case 1:case"end":return s.stop()}}),s)})))()},link:function(t){return"/"+this.url(t)},options:function(e){var n=arguments,i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){var r,a,o,u;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:"view",s.next=3,t.get(i.url(e),{select:"options"});case 3:return a=s.sent,o=a.options,u=[],"list"===r&&(u.push({click:"preview",icon:"open",text:F["a"].i18n.translate("open"),disabled:!1===o.preview}),u.push("-")),u.push({click:"rename",icon:"title",text:F["a"].i18n.translate("rename"),disabled:!o.changeTitle}),u.push({click:"duplicate",icon:"copy",text:F["a"].i18n.translate("duplicate"),disabled:!o.duplicate}),u.push("-"),u.push({click:"url",icon:"url",text:F["a"].i18n.translate("page.changeSlug"),disabled:!o.changeSlug}),u.push({click:"status",icon:"preview",text:F["a"].i18n.translate("page.changeStatus"),disabled:!o.changeStatus}),u.push({click:"template",icon:"template",text:F["a"].i18n.translate("page.changeTemplate"),disabled:!o.changeTemplate}),u.push("-"),u.push({click:"remove",icon:"trash",text:F["a"].i18n.translate("delete"),disabled:!o.delete}),s.abrupt("return",u);case 16:case"end":return s.stop()}}),s)})))()},preview:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.get(e.id(t),{select:"previewUrl"});case 2:return i=n.sent,n.abrupt("return",i.previewUrl);case 4:case"end":return n.stop()}}),n)})))()},search:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(!e){s.next=2;break}return s.abrupt("return",t.post("pages/"+i.id(e)+"/children/search?select=id,title,hasChildren",n));case 2:return s.abrupt("return",t.post("site/children/search?select=id,title,hasChildren",n));case 3:case"end":return s.stop()}}),s)})))()},update:function(e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.abrupt("return",t.patch("pages/"+i.id(e),n));case 1:case"end":return s.stop()}}),s)})))()},url:function(t,e){var n=null===t?"pages":"pages/"+t.replace(/\//g,"+");return e&&(n+="/"+e),n}}},K=(n("a15b"),n("b64b"),n("d3b7"),function(t){return{running:0,request:function(e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a,o,u,l,c,p;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>2&&void 0!==i[2]&&i[2],n=Object.assign(n||{},{credentials:"same-origin",cache:"no-store",headers:Object(I["a"])({"x-requested-with":"xmlhttprequest","content-type":"application/json"},n.headers)}),t.methodOverwrite&&"GET"!==n.method&&"POST"!==n.method&&(n.headers["x-http-method-override"]=n.method,n.method="POST"),n=t.onPrepare(n),o=e+"/"+JSON.stringify(n),t.onStart(o,a),s.running++,r.next=9,fetch(t.endpoint+"/"+e,n);case 9:return u=r.sent,r.next=12,u.text();case 12:l=r.sent,r.prev=13,r.prev=14,c=JSON.parse(l),r.next=21;break;case 18:throw r.prev=18,r.t0=r["catch"](14),new Error("The JSON response from the API could not be parsed. Please check your API connection.");case 21:if(!(u.status<200||u.status>299)){r.next=23;break}throw c;case 23:if(!c.status||"error"!==c.status){r.next=25;break}throw c;case 25:return p=c,c.data&&c.type&&"model"===c.type&&(p=c.data),s.running--,t.onComplete(o),t.onSuccess(c),r.abrupt("return",p);case 33:throw r.prev=33,r.t1=r["catch"](13),s.running--,t.onComplete(o),t.onError(r.t1),r.t1;case 39:case"end":return r.stop()}}),r,null,[[13,33],[14,18]])})))()},get:function(t,e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>3&&void 0!==i[3]&&i[3],e&&(t+="?"+Object.keys(e).filter((function(t){return void 0!==e[t]&&null!==e[t]})).map((function(t){return t+"="+e[t]})).join("&")),r.abrupt("return",s.request(t,Object.assign(n||{},{method:"GET"}),a));case 3:case"end":return r.stop()}}),r)})))()},post:function(t,e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a,o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>3&&void 0!==i[3]?i[3]:"POST",o=i.length>4&&void 0!==i[4]&&i[4],r.abrupt("return",s.request(t,Object.assign(n||{},{method:a,body:JSON.stringify(e)}),o));case 3:case"end":return r.stop()}}),r)})))()},patch:function(t,e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>3&&void 0!==i[3]&&i[3],r.abrupt("return",s.post(t,e,n,"PATCH",a));case 2:case"end":return r.stop()}}),r)})))()},delete:function(t,e,n){var i=arguments,s=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=i.length>3&&void 0!==i[3]&&i[3],r.abrupt("return",s.post(t,e,n,"DELETE",a));case 2:case"end":return r.stop()}}),r)})))()}}}),V=(n("a4d3"),n("e01a"),function(t){return{list:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.get("roles",e));case 1:case"end":return n.stop()}}),n)})))()},get:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.get("roles/"+e));case 1:case"end":return n.stop()}}),n)})))()},options:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.list(t);case 2:return i=n.sent,n.abrupt("return",i.data.map((function(t){return{info:t.description||"(".concat(F["a"].i18n.translate("role.description.placeholder"),")"),text:t.title,value:t.name}})));case 4:case"end":return n.stop()}}),n)})))()}}}),Y=function(t){return{get:function(){var e=arguments;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]?e[0]:{view:"panel"},n.abrupt("return",t.get("system",i));case 2:case"end":return n.stop()}}),n)})))()},install:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.post("system/install",e);case 2:return i=n.sent,n.abrupt("return",i.user);case 4:case"end":return n.stop()}}),n)})))()},register:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("system/register",e));case 1:case"end":return n.stop()}}),n)})))()}}},W=function(t){return{blueprint:function(){return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",t.get("site/blueprint"));case 1:case"end":return e.stop()}}),e)})))()},blueprints:function(){return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",t.get("site/blueprints"));case 1:case"end":return e.stop()}}),e)})))()},changeTitle:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.patch("site/title",{title:e}));case 1:case"end":return n.stop()}}),n)})))()},children:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("site/children/search",e));case 1:case"end":return n.stop()}}),n)})))()},get:function(){var e=arguments;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]?e[0]:{view:"panel"},n.abrupt("return",t.get("site",i));case 2:case"end":return n.stop()}}),n)})))()},options:function(){return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.get("site",{select:"options"});case 2:return n=e.sent,i=n.options,s=[],s.push({click:"rename",icon:"title",text:F["a"].i18n.translate("rename"),disabled:!i.changeTitle}),e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})))()},update:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("site",e));case 1:case"end":return n.stop()}}),n)})))()}}},J=function(t){return{list:function(){return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",t.get("translations"));case 1:case"end":return e.stop()}}),e)})))()},get:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.get("translations/"+e));case 1:case"end":return n.stop()}}),n)})))()},options:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.list();case 2:return n=e.sent,i=n.data.map((function(t){return{value:t.id,text:t.name}})),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})))()}}},G=function(t){return{blueprint:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.get("users/"+e+"/blueprint"));case 1:case"end":return n.stop()}}),n)})))()},blueprints:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.get("users/"+e+"/blueprints",{section:n}));case 1:case"end":return i.stop()}}),i)})))()},breadcrumb:function(t){return[{link:"/users/"+t.id,label:t.username}]},changeEmail:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/email",{email:n}));case 1:case"end":return i.stop()}}),i)})))()},changeLanguage:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/language",{language:n}));case 1:case"end":return i.stop()}}),i)})))()},changeName:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/name",{name:n}));case 1:case"end":return i.stop()}}),i)})))()},changePassword:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/password",{password:n}));case 1:case"end":return i.stop()}}),i)})))()},changeRole:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e+"/role",{role:n}));case 1:case"end":return i.stop()}}),i)})))()},create:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("users",e));case 1:case"end":return n.stop()}}),n)})))()},delete:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.delete("users/"+e));case 1:case"end":return n.stop()}}),n)})))()},deleteAvatar:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.delete("users/"+e+"/avatar"));case 1:case"end":return n.stop()}}),n)})))()},link:function(t,e){return"/"+this.url(t,e)},list:function(e){var n=this;return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.post(n.url(null,"search"),e));case 1:case"end":return i.stop()}}),i)})))()},get:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.get("users/"+e,n));case 1:case"end":return i.stop()}}),i)})))()},options:function(e){var n=this;return Object(j["a"])(regeneratorRuntime.mark((function i(){var s,r,a;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,t.get(n.url(e),{select:"options"});case 2:return s=i.sent,r=s.options,a=[],a.push({click:"rename",icon:"title",text:F["a"].i18n.translate("user.changeName"),disabled:!r.changeName}),a.push({click:"email",icon:"email",text:F["a"].i18n.translate("user.changeEmail"),disabled:!r.changeEmail}),a.push({click:"role",icon:"bolt",text:F["a"].i18n.translate("user.changeRole"),disabled:!r.changeRole}),a.push({click:"password",icon:"key",text:F["a"].i18n.translate("user.changePassword"),disabled:!r.changePassword}),a.push({click:"language",icon:"globe",text:F["a"].i18n.translate("user.changeLanguage"),disabled:!r.changeLanguage}),a.push({click:"remove",icon:"trash",text:F["a"].i18n.translate("user.delete"),disabled:!r.delete}),i.abrupt("return",a);case 12:case"end":return i.stop()}}),i)})))()},roles:function(e){var n=this;return Object(j["a"])(regeneratorRuntime.mark((function i(){var s;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,t.get(n.url(e,"roles"));case 2:return s=i.sent,i.abrupt("return",s.data.map((function(t){return{info:t.description||"(".concat(F["a"].i18n.translate("role.description.placeholder"),")"),text:t.title,value:t.name}})));case 4:case"end":return i.stop()}}),i)})))()},search:function(e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",t.post("users/search",e));case 1:case"end":return n.stop()}}),n)})))()},update:function(e,n){return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",t.patch("users/"+e,n));case 1:case"end":return i.stop()}}),i)})))()},url:function(t,e){var n=t?"users/"+t:"users";return e&&(n+="/"+e),n}}},Z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={endpoint:"/api",methodOverwrite:!0,onPrepare:function(t){return t},onStart:function(){},onComplete:function(){},onSuccess:function(){},onError:function(t){throw window.console.log(t.message),t}},n=Object(I["a"])(Object(I["a"])({},e),t.config||{}),i=Object(I["a"])(Object(I["a"])(Object(I["a"])({},n),K(n)),t);return i.auth=M(i),i.files=U(i),i.languages=z(i),i.pages=H(i),i.roles=V(i),i.system=Y(i),i.site=W(i),i.translations=J(i),i.users=G(i),i.files.rename=i.files.changeName,i.pages.slug=i.pages.changeSlug,i.pages.status=i.pages.changeStatus,i.pages.template=i.pages.changeTemplate,i.pages.title=i.pages.changeTitle,i.site.title=i.site.changeTitle,i.system.info=i.system.get,i},X={install:function(t,e){t.prototype.$api=t.$api=Z({config:{endpoint:B.api,onComplete:function(n){t.$api.requests=t.$api.requests.filter((function(t){return t!==n})),0===t.$api.requests.length&&e.dispatch("isLoading",!1)},onError:function(t){B.debug&&window.console.error(t),403!==t.code||"Unauthenticated"!==t.message&&"access.panel"!==t.key||e.dispatch("user/logout",!0)},onPrepare:function(t){return e.state.languages.current&&(t.headers["x-language"]=e.state.languages.current.code),t.headers["x-csrf"]=window.panel.csrf,t},onStart:function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!1===i&&e.dispatch("isLoading",!0),t.$api.requests.push(n)},onSuccess:function(){clearInterval(t.$api.ping),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},ping:null,requests:[]}),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},Q={install:function(t){t.filter("t",(function(t){return t}))}},tt=(n("caad"),{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=this.$helper.string.lcfirst(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()}}})}}),et=n("1dce"),nt=n.n(et),it=(n("4d63"),n("25f0"),n("1276"),function(t){if(void 0!==t)return JSON.parse(JSON.stringify(t))}),st=function(t,e){var n=null;return function(){var i=this,s=arguments;clearTimeout(n),n=setTimeout((function(){t.apply(i,s)}),e)}},rt=function(t){return void 0!==F["a"].options.components[t]},at=(n("2532"),function(t){return!!t.dataTransfer&&(!!t.dataTransfer.types&&(!0===t.dataTransfer.types.includes("Files")&&!1===t.dataTransfer.types.includes("text/plain")))}),ot=function(t,e){t=String(t);var n="";e=(e||2)-t.length;while(n.length0&&void 0!==arguments[0]?arguments[0]:"3/2",e=String(t).split("/");if(2!==e.length)return"100%";var n=Number(e[0]),i=Number(e[1]),s=100;return 0!==n&&0!==i&&(s=100/n*i),s+"%"}),lt=(n("498a"),function(t){var e=arguments.length>1&&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&&Object.keys(e).forEach((function(n){var i="/"!==n.substr(0,1),s=n.substring(1,n.length-1),r=i?n:s;t=t.replace(new RegExp(RegExp.escape(r),"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}),ct=(n("466d"),function(t){t=t||{};var e=t.desc?-1:1,n=-e,i=/^0/,s=/\s+/g,r=/^\s+|\s+$/g,a=/[^\x00-\x80]/,o=/^0x[0-9a-f]+$/i,u=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,l=/(^([\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 p(""+t).replace(r,"")}:function(t){return(""+t).replace(r,"")};function p(t){return t.toLocaleLowerCase?t.toLocaleLowerCase():t.toLowerCase()}function d(t){return t.replace(u,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function f(t,e){return(!t.match(i)||1===e)&&parseFloat(t)||t.replace(s," ").replace(r,"")||0}return function(t,i){var s=c(t),r=c(i);if(!s&&!r)return 0;if(!s&&r)return n;if(s&&!r)return e;var u=d(s),p=d(r),h=parseInt(s.match(o),16)||1!==u.length&&Date.parse(s),m=parseInt(r.match(o),16)||h&&r.match(l)&&Date.parse(r)||null;if(m){if(hm)return e}for(var g=u.length,b=p.length,v=0,k=Math.max(g,b);v0)return e;if(y<0)return n;if(v===k-1)return 0}else{if($<_)return n;if($>_)return e}}return 0}}),pt={camelToKebab:function(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()},lcfirst:function(t){var e=String(t);return e.charAt(0).toLowerCase()+e.substr(1)},ucfirst:function(t){var e=String(t);return e.charAt(0).toUpperCase()+e.substr(1)}},dt=function(t,e){var n={url:"/",field:"file",method:"POST",accept:"text",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},i=Object.assign(n,e),s=new FormData;s.append(i.field,t,t.name),i.attributes&&Object.keys(i.attributes).forEach((function(t){s.append(t,i.attributes[t])}));var r=new XMLHttpRequest,a=function(e){if(e.lengthComputable&&i.progress){var n=Math.max(0,Math.min(100,e.loaded/e.total*100));i.progress(r,t,Math.ceil(n))}};r.upload.addEventListener("loadstart",a),r.upload.addEventListener("progress",a),r.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(r,t,n):(i.success(r,t,n),i.progress(r,t,100))})),r.addEventListener("error",(function(e){var n=JSON.parse(e.target.response);i.error(r,t,n),i.progress(r,t,100)})),r.open("POST",i.url,!0),i.headers&&Object.keys(i.headers).forEach((function(t){var e=i.headers[t];r.setRequestHeader(t,e)})),r.send(s)},ft={install:function(t){Array.prototype.sortBy=function(e){var n=t.prototype.$helper.sort(),i=e.split(" "),s=i[0],r=i[1]||"asc";return this.sort((function(t,e){var i=String(t[s]).toLowerCase(),a=String(e[s]).toLowerCase();return"desc"===r?n(a,i):n(i,a)}))},RegExp.escape=function(t){return t.replace(new RegExp("[-/\\\\^$*+?.()[\\]{}]","gu"),"\\$&")},t.prototype.$helper={clone:it,isComponent:rt,isUploadEvent:at,debounce:st,pad:ot,ratio:ut,slug:lt,sort:ct,string:pt,upload:dt}}},ht=(n("64e4"),{}),mt=Object(_["a"])(ht,i,s,!1,null,null,null),gt=(mt.exports,function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("div",{staticClass:"k-dialog",on:{mousedown:t.cancel}},[n("div",{staticClass:"k-dialog-box",attrs:{"data-size":t.size},on:{mousedown:function(t){t.stopPropagation()}}},[t.notification?n("div",{staticClass:"k-dialog-notification",attrs:{"data-theme":t.notification.type}},[n("p",[t._v(t._s(t.notification.message))]),n("k-button",{attrs:{icon:"cancel"},on:{click:function(e){t.notification=null}}})],1):t._e(),n("div",{staticClass:"k-dialog-body"},[t._t("default")],2),t.$slots["footer"]||t.cancelButton||t.submitButton?n("footer",{staticClass:"k-dialog-footer"},[t._t("footer",[n("k-button-group",[n("span",[t.cancelButton?n("k-button",{staticClass:"k-dialog-button-cancel",attrs:{icon:"cancel"},on:{click:t.cancel}},[t._v("\n "+t._s(t.cancelButtonLabel)+"\n ")]):t._e()],1),n("span",[t.submitButtonConfig?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.submitButtonLabel)+"\n ")]):t._e()],1)])])],2):t._e()])]):t._e()}),bt=[],vt={props:{cancelButton:{type:[String,Boolean],default:!0},icon:{type:String,default:"check"},size:{type:String,default:"default"},submitButton:{type:[String,Boolean],default:!0},theme:String,visible:Boolean},data:function(){return{notification:null,isOpen:this.visible,scrollTop:0}},computed:{cancelButtonLabel:function(){return!1!==this.cancelButton&&(!0===this.cancelButton||0===this.cancelButton.length?this.$t("cancel"):this.cancelButton)},submitButtonConfig:function(){return void 0!==this.$attrs["button"]?this.$attrs["button"]:void 0===this.submitButton||this.submitButton},submitButtonLabel:function(){return!0===this.submitButton||0===this.submitButton.length?this.$t("confirm"):this.submitButton}},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"}}}},kt=vt,$t=(n("a5f3"),Object(_["a"])(kt,gt,bt,!1,null,null,null)),_t=$t.exports,yt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.notification?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.notification.message))]),t.notification.details&&Object.keys(t.notification.details).length?n("dl",{staticClass:"k-error-details"},[t._l(t.notification.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()},wt=[],xt={mixins:[S],computed:{notification: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")}}},Ot=xt,jt=(n("7737"),Object(_["a"])(Ot,yt,wt,!1,null,null,null)),St=jt.exports,Ct=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-remove-dialog",{ref:"dialog",attrs:{text:t.$t("file.delete.confirm",{filename:t.filename})},on:{submit:t.submit}})},Et=[],Rt={mixins:[S],data:function(){return{id:null,parent:null,filename:null}},methods:{open:function(t,e){var n=this;return Object(j["a"])(regeneratorRuntime.mark((function i(){var s;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,n.$api.files.get(t,e);case 3:s=i.sent,n.id=s.id,n.filename=s.filename,n.parent=t,n.$refs.dialog.open(),i.next=13;break;case 10:i.prev=10,i.t0=i["catch"](0),n.$store.dispatch("notification/error",i.t0);case 13:case"end":return i.stop()}}),i,null,[[0,10]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.files.delete(t.parent,t.filename);case 3:t.$store.dispatch("content/remove","files/"+t.id),t.$store.dispatch("notification/success",":)"),t.$events.$emit("file.delete",t.id),t.$emit("success"),t.$refs.dialog.close(),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))()}}},Tt=Rt,It=Object(_["a"])(Tt,Ct,Et,!1,null,null,null),Lt=It.exports,At=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("rename")},on:{input:function(e){t.file.name=t.sluggify(t.file.name)},submit:t.submit},model:{value:t.file,callback:function(e){t.file=e},expression:"file"}})},Bt=[],qt={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,n.$api.files.get(t,e,{select:["id","filename","name","extension"]});case 3:n.file=i.sent,n.parent=t,n.$refs.dialog.open(),i.next=11;break;case 8:i.prev=8,i.t0=i["catch"](0),n.$store.dispatch("notification/error",i.t0);case 11:case"end":return i.stop()}}),i,null,[[0,8]])})))()},sluggify:function(t){return this.$helper.slug(t,[this.slugs,this.system.ascii],"@._-")},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.file.name=t.file.name.trim(),0!==t.file.name.length){e.next=4;break}return t.$refs.dialog.error(t.$t("error.file.changeName.empty")),e.abrupt("return");case 4:return e.prev=4,e.next=7,t.$api.files.changeName(t.parent,t.file.filename,t.file.name);case 7:n=e.sent,t.$store.dispatch("content/move",["files/"+t.file.id,"files/"+n.id]),t.$store.dispatch("notification/success",":)"),t.$emit("success",n),t.$events.$emit("file.changeName",n),t.$refs.dialog.close(),e.next=18;break;case 15:e.prev=15,e.t0=e["catch"](4),t.$refs.dialog.error(e.t0.message);case 18:case"end":return e.stop()}}),e,null,[[4,15]])})))()}}},Nt=qt,Pt=Object(_["a"])(Nt,At,Bt,!1,null,null,null),Dt=Pt.exports,Mt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-files-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.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)}}},[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-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:n("k-empty",{attrs:{icon:"image"}},[t._v("\n "+t._s(t.$t("dialog.files.empty"))+"\n ")])]],2)},Ft=[],Ut=(n("07ac"),{data:function(){return{models:[],issue:null,selected:{},options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[],search:!0},search:null,pagination:{limit:20,page:1,total:0}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},watch:{search:st((function(){this.pagination.page=0,this.fetch()}),200)},methods:{fetch:function(){var t=this,e=Object(I["a"])({page:this.pagination.page,search:this.search},this.fetchData||{});return this.$api.get(this.options.endpoint,e).then((function(e){t.models=e.data,t.pagination=e.pagination,t.onFetched&&t.onFetched(e)})).catch((function(e){t.models=[],t.issue=e.message}))},open:function(t,e){var n=this;this.pagination.page=0,this.search=null;var i=!0;Array.isArray(t)?(this.models=t,i=!1):(this.models=[],e=t),this.options=Object(I["a"])(Object(I["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()},paginate:function(t){this.pagination.page=t.page,this.pagination.limit=t.limit,this.fetch()},submit:function(){this.$emit("submit",Object.values(this.selected)),this.$refs.dialog.close()},isSelected:function(t){return void 0!==this.selected[t.id]},toggle:function(t){!1!==this.options.multiple&&1!==this.options.max||(this.selected={}),!0!==this.isSelected(t)?this.options.max&&this.options.max<=Object.keys(this.selected).length||this.$set(this.selected,t.id,t):this.$delete(this.selected,t.id)}}}),zt={mixins:[Ut]},Ht=zt,Kt=(n("bf53"),Object(_["a"])(Ht,Mt,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",t._g(t._b({ref:"dialog"},"k-dialog",t.$props,!1),t.$listeners),[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:t.novalidate},on:{input:function(e){return t.$emit("input",e)},submit:function(e){return t.$emit("submit",e)}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},Wt=[],Jt={mixins:[S],props:{fields:{type:[Array,Object],default:function(){return[]}},novalidate:{type:Boolean,default:!0},size:{type:String,default:"medium"},submitButton:{type:[String,Boolean],default:function(){return this.$t("save")}},theme:{type:String,default:"positive"},value:{type:Object,default:function(){return{}}}}},Gt=Jt,Zt=Object(_["a"])(Gt,Yt,Wt,!1,null,null,null),Xt=Zt.exports,Qt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("language.create")},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})},te=[],ee={mixins:[S],data:function(){return{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=this.$helper.slug(t,[this.system.ascii])}},methods:{onNameChanges:function(t){this.language.code=this.$helper.slug(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;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.language.locale&&(t.language.locale=t.language.locale.trim()||null),e.prev=1,e.next=4,t.$api.languages.create({name:t.language.name,code:t.language.code,direction:t.language.direction,locale:t.language.locale});case 4:t.$store.dispatch("languages/load"),t.success({message:":)",event:"language.create"}),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),t.$refs.dialog.error(e.t0.message);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))()}}},ne=ee,ie=Object(_["a"])(ne,Qt,te,!1,null,null,null),se=ie.exports,re=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-remove-dialog",{ref:"dialog",attrs:{text:t.$t("language.delete.confirm",{name:t.language.name})},on:{submit:t.submit}})},ae=[],oe={mixins:[S],data:function(){return{language:{name:null}}},methods:{open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.languages.get(t);case 3:e.language=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.languages.delete(t.language.code);case 3:t.$store.dispatch("languages/load"),t.success({message:t.$t("language.deleted"),event:"language.delete"}),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()}}},ue=oe,le=Object(_["a"])(ue,re,ae,!1,null,null,null),ce=le.exports,pe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,size:"medium"},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})},de=[],fe=n("53ca"),he={mixins:[se],computed:{fields:function(){var t=se.computed.fields.apply(this);return t.code.disabled=!0,"object"===Object(fe["a"])(this.language.locale)&&(t.locale={label:t.locale.label,type:"info",text:this.$t("language.locale.warning")}),t}},methods:{onNameChanges:function(){return!1},open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.languages.get(t);case 3:e.language=n.sent,i=Object.keys(e.language.locale),1===i.length&&(e.language.locale=e.language.locale[i[0]]),e.$refs.dialog.open(),n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 12:case"end":return n.stop()}}),n,null,[[0,9]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(0!==t.language.name.length){e.next=2;break}return e.abrupt("return",t.$refs.dialog.error(t.$t("error.language.name")));case 2:return"string"===typeof t.language.locale&&(t.language.locale=t.language.locale.trim()||null),e.prev=3,e.next=6,t.$api.languages.update(t.language.code,{name:t.language.name,direction:t.language.direction,locale:t.language.locale});case 6:t.$store.dispatch("languages/load"),t.success({message:t.$t("language.updated"),event:"language.update"}),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](3),t.$refs.dialog.error(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[3,10]])})))()}}},me=he,ge=Object(_["a"])(me,pe,de,!1,null,null,null),be=ge.exports,ve=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("page.draft.create")},on:{submit:t.submit,close:t.reset},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},ke=[],$e={mixins:[S],data:function(){return{parent:null,section:null,templates:[],page:this.emptyForm()}},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=this.$helper.slug(t,[this.slugs,this.system.ascii])}},methods:{emptyForm:function(){return{title:"",slug:"",template:null}},open:function(t,e,n){var i=this;return Object(j["a"])(regeneratorRuntime.mark((function s(){var r;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return i.parent=t,i.section=n,s.prev=2,s.next=5,i.$api.get(e,{section:n});case 5:r=s.sent,i.templates=r.map((function(t){return{value:t.name,text:t.title}})),i.templates[0]&&(i.page.template=i.templates[0].value),i.$refs.dialog.open(),s.next=14;break;case 11:s.prev=11,s.t0=s["catch"](2),i.$store.dispatch("notification/error",s.t0);case 14:case"end":return s.stop()}}),s,null,[[2,11]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.page.title=t.page.title.trim(),0!==t.page.title.length){e.next=4;break}return t.$refs.dialog.error(t.$t("error.page.changeTitle.empty")),e.abrupt("return");case 4:return n={template:t.page.template,slug:t.page.slug,content:{title:t.page.title}},e.prev=5,e.next=8,t.$api.post(t.parent+"/children",n);case 8:i=e.sent,t.success({route:t.$api.pages.link(i.id),message:":)",event:"page.create"}),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](5),t.$refs.dialog.error(e.t0.message);case 15:case"end":return e.stop()}}),e,null,[[5,12]])})))()},reset:function(){this.page=this.emptyForm()}}},_e=$e,ye=Object(_["a"])(_e,ve,ke,!1,null,null,null),we=ye.exports,xe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("duplicate")},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},Oe=[],je={mixins:[S],data:function(){return{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=this.$helper.slug(t,[this.slugs,this.system.ascii])}},methods:{open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{language:"@default",select:"id,slug,hasChildren,hasDrafts,hasFiles,title"});case 3:i=n.sent,e.page.id=i.id,e.page.slug=i.slug+"-"+e.$helper.slug(e.$t("page.duplicate.appendix")),e.page.hasChildren=i.hasChildren,e.page.hasDrafts=i.hasDrafts,e.page.hasFiles=i.hasFiles,e.$refs.dialog.open(),n.next=15;break;case 12:n.prev=12,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 15:case"end":return n.stop()}}),n,null,[[0,12]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.pages.duplicate(t.page.id,t.page.slug,{children:t.page.children,files:t.page.files});case 3:n=e.sent,t.success({route:t.$api.pages.link(n.id),message:":)",event:"page.duplicate"}),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()}}},Se=je,Ce=Object(_["a"])(Se,xe,Oe,!1,null,null,null),Ee=Ce.exports,Re=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-remove-dialog",{ref:"dialog",attrs:{size:t.hasSubpages?"medium":"small"},on:{submit:t.submit,close:t.reset}},[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)},Te=[],Ie={mixins:[S],data:function(){return{page:{title:null,hasChildren:!1,hasDrafts:!1},model:this.emptyForm()}},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:{emptyForm:function(){return{check:null}},open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{select:"id, title, hasChildren, hasDrafts, parent"});case 3:e.page=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.hasSubpages||t.model.check===t.page.title){e.next=2;break}return e.abrupt("return",t.$refs.dialog.error(t.$t("error.page.delete.confirm")));case 2:return e.prev=2,e.next=5,t.$api.pages.delete(t.page.id,{force:!0});case 5:t.$store.dispatch("content/remove","pages/"+t.page.id),n={message:":)",event:"page.delete"},t.$route.params.path&&t.page.id===t.$route.params.path.replace(/\+/g,"/")&&(t.page.parent?n.route=t.$api.pages.link(t.page.parent.id):n.route="/pages"),t.success(n),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](2),t.$refs.dialog.error(e.t0.message);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})))()},reset:function(){this.model=this.emptyForm()}}},Le=Ie,Ae=(n("12fb"),Object(_["a"])(Le,Re,Te,!1,null,null,null)),Be=Ae.exports,qe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("rename")},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},Ne=[],Pe={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{select:["id","title"]});case 3:e.page=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.page.title=t.page.title.trim(),0!==t.page.title.length){e.next=3;break}return e.abrupt("return",t.$refs.dialog.error(t.$t("error.page.changeTitle.empty")));case 3:return e.prev=3,e.next=6,t.$api.pages.changeTitle(t.page.id,t.page.title);case 6:t.success({message:":)",event:"page.changeTitle"}),e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](3),t.$refs.dialog.error(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[3,9]])})))()}}},De=Pe,Me=Object(_["a"])(De,qe,Ne,!1,null,null,null),Fe=Me.exports,Ue=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.form,callback:function(e){t.form=e},expression:"form"}})},ze=[],He={mixins:[S],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:Object.keys(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;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{select:["id","status","num","errors","blueprint"]});case 3:if(i=n.sent,!1!==i.blueprint.options.changeStatus){n.next=6;break}return n.abrupt("return",e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.permission")}));case 6:if(!("draft"===i.status&&Object.keys(i.errors).length>0)){n.next=8;break}return n.abrupt("return",e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.incomplete"),details:i.errors}));case 8:if("default"!==i.blueprint.num){n.next=21;break}return n.prev=9,n.next=12,e.$api.pages.get(t,{select:["siblings"]});case 12:s=n.sent,e.setup(Object(I["a"])(Object(I["a"])({},i),{},{siblings:s.siblings})),n.next=19;break;case 16:n.prev=16,n.t0=n["catch"](9),e.$store.dispatch("notification/error",n.t0);case 19:n.next=22;break;case 21:e.setup(Object(I["a"])(Object(I["a"])({},i),{},{siblings:[]}));case 22:n.next=27;break;case 24:n.prev=24,n.t1=n["catch"](0),e.$store.dispatch("notification/error",n.t1);case 27:case"end":return n.stop()}}),n,null,[[0,24],[9,16]])})))()},setup:function(t){this.page=t,this.form.position=t.num||t.siblings.length+1,this.form.status=t.status,this.states=t.blueprint.status,this.$refs.dialog.open()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.pages.changeStatus(t.page.id,t.form.status,t.form.position||1);case 3:t.success({message:":)",event:"page.changeStatus"}),e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))()}}},Ke=He,Ve=Object(_["a"])(Ke,Ue,ze,!1,null,null,null),Ye=Ve.exports,We=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},Je=[],Ge={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{select:["id","template","blueprints"]});case 3:if(i=n.sent,!(i.blueprints.length<=1)){n.next=6;break}return n.abrupt("return",e.$store.dispatch("notification/error",{message:e.$t("error.page.changeTemplate.invalid",{slug:i.id})}));case 6:e.page=i,e.page.blueprints=e.page.blueprints.map((function(t){return{text:t.title,value:t.name}})),e.$refs.dialog.open(),n.next=14;break;case 11:n.prev=11,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 14:case"end":return n.stop()}}),n,null,[[0,11]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$events.$emit("keydown.cmd.s"),e.prev=1,e.next=4,t.$api.pages.changeTemplate(t.page.id,t.page.template);case 4:t.success({message:":)",event:"page.changeTemplate"}),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),t.$refs.dialog.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))()}}},Ze=Ge,Xe=Object(_["a"])(Ze,We,Je,!1,null,null,null),Qe=Xe.exports,tn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-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)},en=[],nn=(n("99af"),{mixins:[S],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=this.$helper.slug(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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.pages.get(t,{view:"panel"});case 3:e.page=n.sent,e.sluggify(e.page.slug),e.$refs.dialog.open(),n.next=11;break;case 8:n.prev=8,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 11:case"end":return n.stop()}}),n,null,[[0,8]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.slug!==t.page.slug){e.next=4;break}return t.$refs.dialog.close(),t.$store.dispatch("notification/success",":)"),e.abrupt("return");case 4:if(0!==t.slug.length){e.next=6;break}return e.abrupt("return",t.$refs.dialog.error(t.$t("error.page.slug.invalid")));case 6:return e.prev=6,e.next=9,t.$api.pages.changeSlug(t.page.id,t.slug);case 9:n=e.sent,t.$store.dispatch("content/move",["pages/"+t.page.id,"pages/"+n.id]),i={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||(i.route=t.$api.pages.link(n.id),delete i.event),t.success(i),e.next=19;break;case 16:e.prev=16,e.t0=e["catch"](6),t.$refs.dialog.error(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[6,16]])})))()}}}),sn=nn,rn=Object(_["a"])(sn,tn,en,!1,null,null,null),an=rn.exports,on=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-pages-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.model?n("header",{staticClass:"k-pages-dialog-navbar"},[n("k-button",{attrs:{disabled:!t.model.id,tooltip:t.$t("back"),icon:"angle-left"},on:{click:t.back}}),n("k-headline",[t._v(t._s(t.model.title))])],1):t._e(),t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.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-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:n("k-empty",{attrs:{icon:"page"}},[t._v("\n "+t._s(t.$t("dialog.pages.empty"))+"\n ")])]],2)},un=[],ln={mixins:[Ut],data:function(){var t=Ut.data();return Object(I["a"])(Object(I["a"])({},t),{},{model:{title:null,parent:null},options:Object(I["a"])(Object(I["a"])({},t.options),{},{parent:null})})},computed:{fetchData:function(){return{parent:this.options.parent}}},methods:{back:function(){this.options.parent=this.model.parent,this.pagination.page=1,this.fetch()},go:function(t){this.options.parent=t.id,this.pagination.page=1,this.fetch()},onFetched:function(t){this.model=t.model}}},cn=ln,pn=(n("ac27"),Object(_["a"])(cn,on,un,!1,null,null,null)),dn=pn.exports,fn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-text-dialog",t._g(t._b({ref:"dialog"},"k-text-dialog",t.$props,!1),t.$listeners),[t._t("default")],2)},hn=[],mn={mixins:[S],props:{icon:{type:String,default:"trash"},submitButton:{type:[String,Boolean],default:function(){return this.$t("delete")}},text:String,theme:{type:String,default:"negative"}}},gn=mn,bn=Object(_["a"])(gn,fn,hn,!1,null,null,null),vn=bn.exports,kn={extends:Fe,methods:{open:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.site.get({select:["title"]});case 3:t.page=e.sent,t.$refs.dialog.open(),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$store.dispatch("notification/error",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.page.title=t.page.title.trim(),0!==t.page.title.length){e.next=4;break}return t.$refs.dialog.error(t.$t("error.site.changeTitle.empty")),e.abrupt("return");case 4:return e.prev=4,e.next=7,t.$api.site.changeTitle(t.page.title);case 7:t.$store.dispatch("system/title",t.page.title),t.success({message:":)",event:"site.changeTitle"}),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](4),t.$refs.dialog.error(e.t0.message);case 14:case"end":return e.stop()}}),e,null,[[4,11]])})))()}}},$n=kn,_n=Object(_["a"])($n,r,a,!1,null,null,null),yn=_n.exports,wn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",t._g(t._b({ref:"dialog"},"k-dialog",t.$props,!1),t.$listeners),[t._t("default",[n("k-text",{domProps:{innerHTML:t._s(t.text)}})])],2)},xn=[],On={mixins:[S],props:{text:String}},jn=On,Sn=Object(_["a"])(jn,wn,xn,!1,null,null,null),Cn=Sn.exports,En=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("create")},on:{submit:t.create,close:t.reset},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},Rn=[],Tn={mixins:[S],data:function(){return{user:this.emptyForm(),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;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.create(t.user);case 3:t.success({message:":)",event:"user.create"}),e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))()},emptyForm:function(){return{name:"",email:"",password:"",language:this.$store.state.system.info.defaultLanguage||"en",role:this.$user.role.name}},open:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.roles.options({canBe:"created"});case 3:t.roles=e.sent,"admin"!==t.$user.role.name&&(t.roles=t.roles.filter((function(t){return"admin"!==t.value}))),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$store.dispatch("notification/error",e.t0);case 10:return e.prev=10,e.next=13,t.$api.translations.options();case 13:t.languages=e.sent,e.next=19;break;case 16:e.prev=16,e.t1=e["catch"](10),t.$store.dispatch("notification/error",e.t1);case 19:t.$refs.dialog.open();case 20:case"end":return e.stop()}}),e,null,[[0,7],[10,16]])})))()},reset:function(){this.user=this.emptyForm()}}},In=Tn,Ln=Object(_["a"])(In,En,Rn,!1,null,null,null),An=Ln.exports,Bn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},qn=[],Nn={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t,{select:["id","email"]});case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.changeEmail(t.user.id,t.user.email);case 3:n=e.sent,t.$store.dispatch("content/revert","users/"+t.user.id),t.$user.id===t.user.id&&t.$store.dispatch("user/email",t.user.email),i={message:":)",event:"user.changeEmail"},"User"===t.$route.name&&(i.route=t.$api.users.link(n.id)),t.success(i),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))()}}},Pn=Nn,Dn=Object(_["a"])(Pn,Bn,qn,!1,null,null,null),Mn=Dn.exports,Fn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},Un=[],zn={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.translations.options();case 2:t.languages=e.sent;case 3:case"end":return e.stop()}}),e)})))()},methods:{open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t,{view:"compact"});case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.changeLanguage(t.user.id,t.user.language);case 3:t.user=e.sent,t.$user.id===t.user.id&&t.$store.dispatch("user/language",t.user.language),t.success({message:":)",event:"user.changeLanguage"}),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))()}}},Hn=zn,Kn=Object(_["a"])(Hn,Fn,Un,!1,null,null,null),Vn=Kn.exports,Yn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})},Wn=[],Jn=(n("ddb0"),{mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t);case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.values.password&&!(t.values.password.length<8)){e.next=3;break}return t.$refs.dialog.error(t.$t("error.user.password.invalid")),e.abrupt("return",!1);case 3:if(t.values.password===t.values.passwordConfirmation){e.next=6;break}return t.$refs.dialog.error(t.$t("error.user.password.notSame")),e.abrupt("return",!1);case 6:return e.prev=6,e.next=9,t.$api.users.changePassword(t.user.id,t.values.password);case 9:t.success({message:":)",event:"user.changePassword"}),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](6),t.$refs.dialog.error(e.t0.message);case 15:case"end":return e.stop()}}),e,null,[[6,12]])})))()}}}),Gn=Jn,Zn=Object(_["a"])(Gn,Yn,Wn,!1,null,null,null),Xn=Zn.exports,Qn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-remove-dialog",{ref:"dialog",attrs:{text:t.$t("user.delete.confirm",{email:t.user.email})},on:{submit:t.submit}})},ti=[],ei={mixins:[S],data:function(){return{user:{email:null}}},methods:{open:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t);case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.delete(t.user.id);case 3:t.$store.dispatch("content/remove","users/"+t.user.id),t.success({message:":)",event:"user.delete"}),"User"===t.$route.name&&t.$go("/users"),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))()}}},ni=ei,ii=Object(_["a"])(ni,Qn,ti,!1,null,null,null),si=ii.exports,ri=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("rename")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},ai=[],oi={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.$api.users.get(t,{select:["id","name"]});case 3:e.user=n.sent,e.$refs.dialog.open(),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),e.$store.dispatch("notification/error",n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.user.name=t.user.name.trim(),e.prev=1,e.next=4,t.$api.users.changeName(t.user.id,t.user.name);case 4:t.$user.id===t.user.id&&t.$store.dispatch("user/name",t.user.name),t.success({message:":)",event:"user.changeName"}),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),t.$refs.dialog.error(e.t0.message);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))()}}},ui=oi,li=Object(_["a"])(ui,ri,ai,!1,null,null,null),ci=li.exports,pi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("user.changeRole")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},di=[],fi={mixins:[S],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;return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.id=t,n.prev=1,n.next=4,e.$api.users.get(t);case 4:return e.user=n.sent,e.user.role=e.user.role.name,n.next=8,e.$api.users.roles(t);case 8:e.roles=n.sent,"admin"!==e.$user.role.name&&(e.roles=e.roles.filter((function(t){return"admin"!==t.value}))),e.$refs.dialog.open(),n.next=16;break;case 13:n.prev=13,n.t0=n["catch"](1),e.$store.dispatch("notification/error",n.t0);case 16:case"end":return n.stop()}}),n,null,[[1,13]])})))()},submit:function(){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$api.users.changeRole(t.user.id,t.user.role);case 3:t.$user.id===t.user.id&&t.$store.dispatch("user/load"),t.success({message:":)",event:"user.changeRole"}),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$refs.dialog.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()}}},hi=fi,mi=Object(_["a"])(hi,pi,di,!1,null,null,null),gi=mi.exports,bi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-users-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.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-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:n("k-empty",{attrs:{icon:"users"}},[t._v("\n "+t._s(t.$t("dialog.users.empty"))+"\n ")])]],2)},vi=[],ki={mixins:[Ut]},$i=ki,_i=(n("7568"),Object(_["a"])($i,bi,vi,!1,null,null,null)),yi=_i.exports,wi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dropdown",{staticClass:"k-autocomplete"},[t._t("default"),n("k-dropdown-content",t._g({ref:"dropdown",attrs:{autofocus:!0}},t.$listeners),t._l(t.matches,(function(e,i){return n("k-dropdown-item",t._b({key:i,on:{mousedown:function(n){return t.onSelect(e)},keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"tab",9,n.key,"Tab")?null:(n.preventDefault(),t.onSelect(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.onSelect(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?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)},xi=[],Oi=(n("c975"),n("fb6a"),{props:{limit:{type:Number,default: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()}}}}),ji=Oi,Si=Object(_["a"])(ji,wi,xi,!1,null,null,null),Ci=Si.exports,Ei=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:t.selectToday}},[t._v(t._s(t.$t("today")))])],1)])])])])},Ri=[],Ti={props:{value:String,disabled:Boolean},data:function(){var t=this.value?this.$library.dayjs(this.value):this.$library.dayjs();return{day:t.date(),month:t.month(),year:t.year(),today:this.$library.dayjs(),current:t}},computed:{date:function(){return this.$library.dayjs("".concat(this.year,"-").concat(this.month+1,"-").concat(this.day))},numberOfDays:function(){return this.date.daysInMonth()},numberOfWeeks:function(){return Math.ceil((this.numberOfDays+this.firstWeekday-1)/7)},firstWeekday:function(){var t=this.date.clone().startOf("month").day();return t>0?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:this.$helper.pad(e)});return t}},watch:{value:function(t){var e=this.$library.dayjs(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()},selectToday:function(){this.set(this.$library.dayjs()),this.select(this.day)},select:function(t){t&&(this.day=t);var e=this.$library.dayjs(new Date(this.year,this.month,this.day,this.current.hour(),this.current.minute()));this.$emit("input",e.toISOString())}}},Ii=Ti,Li=(n("ee15"),Object(_["a"])(Ii,Ei,Ri,!1,null,null,null)),Ai=Li.exports,Bi=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()])},qi=[],Ni={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))}}},Pi=Ni,Di=(n("fc0f"),Object(_["a"])(Pi,Bi,qi,!1,null,null,null)),Mi=Di.exports,Fi=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)},Ui=[],zi={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(I["a"])(Object(I["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()}}},Hi=zi,Ki=(n("5d33"),Object(_["a"])(Hi,Fi,Ui,!1,null,null,null)),Vi=Ki.exports,Yi=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),t.form.lock.unlockable?n("k-button",{staticClass:"k-form-button",attrs:{icon:"unlock"},on:{click:t.setUnlock}},[t._v("\n "+t._s(t.$t("lock.unlock"))+"\n ")]):n("k-icon",{staticClass:"k-form-lock-loader",attrs:{type:"loader"}})],1):"changes"===t.mode?n("k-view",[n("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,icon:"undo"},on:{click:function(e){return t.$refs.revert.open()}}},[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(),n("k-dialog",{ref:"revert",attrs:{"submit-button":t.$t("revert"),icon:"undo",theme:"negative"},on:{submit:t.onRevert}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("revert.confirm"))}})],1)],1)},Wi=[],Ji=n("2909"),Gi={data:function(){return{supportsLocking:!0}},computed:{api:function(){return{lock:[this.$route.path+"/lock",null,null,!0],unlock:[this.$route.path+"/unlock",null,null,!0]}},hasChanges:function(){return this.$store.getters["content/hasChanges"]()},form:function(){return{lock:this.$store.state.content.status.lock,unlock:this.$store.state.content.status.unlock}},id:function(){return this.$store.state.content.current},isDisabled:function(){return!1===this.$store.state.content.status.enabled},isLocked:function(){return null!==this.form.lock},isUnlocked:function(){return null!==this.form.unlock},mode:function(){return!0===this.isUnlocked?"unlock":!0===this.isLocked?"lock":!0===this.hasChanges?"changes":void 0}},watch:{hasChanges:function(t,e){if(!1===e&&!0===t)return this.$store.dispatch("heartbeat/remove",this.getLock),void this.$store.dispatch("heartbeat/add",[this.setLock,30]);this.id&&!0===e&&!1===t&&this.removeLock()},id:function(){this.id&&!1===this.hasChanges&&this.$store.dispatch("heartbeat/add",[this.getLock,10])}},created:function(){this.$events.$on("keydown.cmd.s",this.onSave)},destroyed:function(){this.$events.$off("keydown.cmd.s",this.onSave)},methods:{getLock:function(){var t,e=this;return(t=this.$api).get.apply(t,Object(Ji["a"])(this.api.lock)).then((function(t){if(!1===t.supported)return e.supportsLocking=!1,void e.$store.dispatch("heartbeat/remove",e.getLock);!1===t.locked?(e.isLocked&&e.form.lock.user!==e.$store.state.user.current.id&&e.$events.$emit("model.reload"),e.$store.dispatch("content/lock",null)):e.$store.dispatch("content/lock",t.locked)})).catch((function(){}))},setLock:function(){var t,e=this;!0===this.supportsLocking&&(t=this.$api).patch.apply(t,Object(Ji["a"])(this.api.lock)).catch((function(t){if("error.lock.notImplemented"===t.key)return e.supportsLocking=!1,e.$store.dispatch("heartbeat/remove",e.setLock),!1;e.$store.dispatch("content/revert",e.id),e.$store.dispatch("heartbeat/remove",e.setLock),e.$store.dispatch("heartbeat/add",[e.getLock,10])}))},removeLock:function(){var t,e=this;!0===this.supportsLocking&&(this.$store.dispatch("heartbeat/remove",this.setLock),(t=this.$api).delete.apply(t,Object(Ji["a"])(this.api.lock)).then((function(){e.$store.dispatch("content/lock",null),e.$store.dispatch("heartbeat/add",[e.getLock,10])})).catch((function(){})))},setUnlock:function(){var t,e=this;!0===this.supportsLocking&&(this.$store.dispatch("heartbeat/remove",this.setLock),(t=this.$api).patch.apply(t,Object(Ji["a"])(this.api.unlock)).then((function(){e.$store.dispatch("content/lock",null),e.$store.dispatch("heartbeat/add",[e.getLock,10])})).catch((function(){})))},removeUnlock:function(){var t,e=this;!0===this.supportsLocking&&(this.$store.dispatch("heartbeat/remove",this.setLock),(t=this.$api).delete.apply(t,Object(Ji["a"])(this.api.unlock)).then((function(){e.$store.dispatch("content/unlock",null),e.$store.dispatch("heartbeat/add",[e.getLock,10])})).catch((function(){})))},onDownload:function(){var t=this,e="";Object.keys(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("content/revert"),this.removeUnlock()},onRevert:function(){this.$store.dispatch("content/revert"),this.$refs.revert.close()},onSave:function(t){var e=this;return!!t&&(t.preventDefault&&t.preventDefault(),!1===this.hasChanges||void this.$store.dispatch("content/save").then((function(){e.$events.$emit("model.update"),e.$store.dispatch("notification/success",":)")})).catch((function(t){403!==t.code&&(t.details&&Object.keys(t.details).length>0?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}]}))})))}}},Zi=Gi,Xi=(n("18dd"),Object(_["a"])(Zi,Yi,Wi,!1,null,null,null)),Qi=Xi.exports,ts=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hasChanges?n("k-dropdown",{staticClass:"k-form-indicator"},[n("k-button",{staticClass:"k-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.id,attrs:{icon:e.icon},nativeOn:{click:function(n){return n.stopPropagation(),t.go(e.target)}}},[t._v("\n "+t._s(e.label)+"\n ")])}))],2)],1):t._e()},es=[],ns=(n("3ca3"),n("2ca0"),{data:function(){return{isOpen:!1,entries:[]}},computed:{store:function(){return this.$store.state.content.models},models:function(){var t=this,e=Object.keys(this.store).filter((function(e){return!!t.store[e]})),n=e.map((function(e){return Object(I["a"])({id:e},t.store[e])}));return n.filter((function(t){return Object.keys(t.changes).length>0}))},hasChanges:function(){return this.models.length>0}},methods:{go:function(t){if(t.language&&this.$store.state.languages.current.code!==t.language){var e=this.$store.state.languages.all.filter((function(e){return e.code===t.language}))[0];this.$store.dispatch("languages/current",e)}this.$go(t.link)},load:function(){var t=this,e=this.models.map((function(e){return t.$api.get(e.api,{view:"compact"},null,!0).then((function(n){var i;if(i=!0===e.id.startsWith("pages/")?{icon:"page",label:n.title,target:{link:t.$api.pages.link(n.id)}}:!0===e.id.startsWith("files/")?{icon:"image",label:n.filename,target:{link:n.link}}:!0===e.id.startsWith("users/")?{icon:"user",label:n.email,target:{link:t.$api.users.link(n.id)}}:{icon:"home",label:n.title,target:{link:"/site"}},t.$store.state.languages.current){var s=e.id.split("/").pop();i.label=i.label+" ("+s+")",i.target.language=s}return i})).catch((function(){return t.$store.dispatch("content/remove",e.id),null}))}));return Promise.all(e).then((function(e){t.entries=e.filter((function(t){return null!==t})),0===t.entries.length&&t.$store.dispatch("notification/success",t.$t("lock.unsaved.empty"))}))},toggle:function(){var t=this;!1===this.$refs.list.isOpen?this.load().then((function(){t.$refs.list&&t.$refs.list.toggle()})):this.$refs.list.toggle()}}}),is=ns,ss=(n("9e26"),Object(_["a"])(is,ts,es,!1,null,null,null)),rs=ss.exports,as=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"k-field k-field-name-"+t.name,attrs:{"data-disabled":t.disabled,"data-translate":t.translate},on:{focusin:function(e){return t.$emit("focus",e)},focusout:function(e){return t.$emit("blur",e)}}},[t._t("header",[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:t.$t("field.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)},os=[],us={inheritAttrs:!1,props:{counter:[Boolean,Object],disabled:Boolean,endpoints:Object,help:String,input:[String,Number],label:String,name:[String,Number],required:Boolean,translate:Boolean,type:String},computed:{labelText:function(){return this.label||" "}}},ls=us,cs=(n("a134"),Object(_["a"])(ls,as,os,!1,null,null,null)),ps=cs.exports,ds=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()]}))],2)],1)},fs=[],hs={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=Object.keys(this.$refs)[0];this.focus(e)}},hasFieldType:function(t){return this.$helper.isComponent("k-".concat(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 Object.keys(t.when).forEach((function(i){var s=e.value[i.toLowerCase()],r=t.when[i];s!==r&&(n=!1)})),n},onInvalid:function(t,e,n,i){this.errors[i]=e,this.$emit("invalid",this.errors)},hasErrors:function(){return Object.keys(this.errors).length}}},ms=hs,gs=(n("862b"),Object(_["a"])(ms,ds,fs,!1,null,null,null)),bs=gs.exports,vs=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()])},ks=[],$s={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(I["a"])(Object(I["a"])({},this.$listeners),{},{invalid:function(e,n){t.isInvalid=e,t.$emit("invalid",e,n)}})}},computed:{inputProps:function(){return Object(I["a"])(Object(I["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()}}}},_s=$s,ys=(n("c7c8"),Object(_["a"])(_s,vs,ks,!1,null,null,null)),ws=ys.exports,xs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-upload"},[n("input",{ref:"input",attrs:{accept:t.options.accept,multiple:t.options.multiple,"aria-hidden":"true",type:"file",tabindex:"-1"},on:{change:t.select,click:function(t){t.stopPropagation()}}}),n("k-dialog",{ref:"dialog",attrs:{"cancel-button":!1,"submit-button":!1,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)},Os=[],js={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=Object.assign({},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(Ji["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){e.$helper.upload(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,Object.keys(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout((function(){n.$refs.dialog.close(),n.$emit("success",n.files,Object.values(n.completed))}),250)}}}},Ss=js,Cs=(n("5aee"),Object(_["a"])(Ss,xs,Os,!1,null,null,null)),Es=Cs.exports,Rs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-checkbox-input",on:{click:function(t){t.stopPropagation()}}},[n("input",{ref:"input",staticClass:"k-checkbox-input-native",attrs:{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)}})])},Ts=[],Is=n("b5ae"),Ls={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.focus()}},validations:function(){return{value:{required:!this.required||Is["required"]}}}},As=Ls,Bs=(n("42e4"),Object(_["a"])(As,Rs,Ts,!1,null,null,null)),qs=Bs.exports,Ns=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)},Ps=[],Ds=(n("a434"),{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,Object],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!0===Array.isArray(t)?t:"string"===typeof t?String(t).split(","):"object"===Object(fe["a"])(t)?Object.values(t):void 0}},validations:function(){return{selected:{required:!this.required||Is["required"],min:!this.min||Object(Is["minLength"])(this.min),max:!this.max||Object(Is["maxLength"])(this.max)}}}}),Ms=Ds,Fs=Object(_["a"])(Ms,Ns,Ps,!1,null,null,null),Us=Fs.exports,zs=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)},Hs=[],Ks={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:String,min:String,required:Boolean,value:String},data:function(){return{date:this.$library.dayjs(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=this.$library.dayjs(t)}},methods:{calculate:function(t,e){var n={min:{run:"subtract",take:"startOf"},max:{run:"add",take:"endOf"}}[e],i=t?this.$library.dayjs(t):null;return i&&!1!==i.isValid()||(i=this.$library.dayjs()[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:this.$helper.pad(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,parseInt(e)),"month"===t&&this.date.date()!==i&&(this.date=n.set("date",1).set("month",e).endOf("month")),this.onInput()},setInvalid:function(){this.date=this.$library.dayjs("invalid")},setInitialDate:function(t,e){var n=this.$library.dayjs();return this.date=this.$library.dayjs().set(t,parseInt(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)}}},Vs=Ks,Ys=(n("6ab3"),Object(_["a"])(Vs,zs,Hs,!1,null,null,null)),Ws=Ys.exports,Js=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,min:t.min,max:t.max,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=[],Zs={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])({},Ws.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=this.$library.dayjs(t);return e.isValid()?e.format("YYYY-MM-DD"):null},parseTime:function(t){var e=this.$library.dayjs(t);return e.isValid()?e.format("HH:mm"):null},setDate:function(t){t&&!this.timeValue&&(this.timeValue=this.$library.dayjs().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=this.$library.dayjs().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||Is["required"]}}}},Xs=Zs,Qs=(n("4433"),Object(_["a"])(Xs,Js,Gs,!1,null,null,null)),tr=Qs.exports,er=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))},nr=[],ir={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(I["a"])(Object(I["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(){var t=this,e=function(e){return!t.required&&!e||!t.$refs.input.validity.patternMismatch};return{value:{required:!this.required||Is["required"],minLength:!this.minlength||Object(Is["minLength"])(this.minlength),maxLength:!this.maxlength||Object(Is["maxLength"])(this.maxlength),email:"email"!==this.type||Is["email"],url:"url"!==this.type||Is["url"],pattern:!this.pattern||e}}}},sr=ir,rr=(n("cb8f"),Object(_["a"])(sr,er,nr,!1,null,null,null)),ar=rr.exports,or={extends:ar,props:Object(I["a"])(Object(I["a"])({},ar.props),{},{autocomplete:{type:String,default:"email"},placeholder:{type:String,default:function(){return this.$t("email.placeholder")}},type:{type:String,default:"email"}})},ur=or,lr=Object(_["a"])(ur,o,u,!1,null,null,null),cr=lr.exports,pr=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:t.onClose},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.close(e))}},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",attrs:{placeholder:t.search.min?t.$t("search.min",{min:t.search.min}):t.$t("search")+" …"},domProps:{value:t.q},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.escape(e))},input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),n("div",{staticClass:"k-multiselect-options"},[t._l(t.visible,(function(e){return n("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.more},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(n){return n.preventDefault(),t.select(e)}},nativeOn:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),n.stopPropagation(),t.select(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:(n.preventDefault(),n.stopPropagation(),t.select(e))}]}},[n("span",{domProps:{innerHTML:t._s(e.display)}}),n("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])})),0===t.filtered.length?n("k-dropdown-item",{staticClass:"k-multiselect-option",attrs:{disabled:!0}},[t._v("\n "+t._s(t.emptyLabel)+"\n ")]):t._e()],2),t.visible.length1&&!this.sort},dragOptions:function(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},emptyLabel:function(){return this.q?this.$t("search.results.none"):this.$t("options.none")},visible:function(){return this.limit?this.filtered.slice(0,this.search.display||this.filtered.length):this.filtered},filtered:function(){if(this.q&&this.q.length>=(this.search.min||0)){var t=new RegExp("(".concat(RegExp.escape(this.q),")"),"ig");return this.options.filter((function(e){return String(e.text).match(t)||String(e.value).match(t)})).map((function(e){return Object(I["a"])(Object(I["a"])({},e),{},{display:String(e.text).replace(t,"$1"),info:String(e.value).replace(t,"$1")})}))}return this.options.map((function(t){return Object(I["a"])(Object(I["a"])({},t),{},{display:t.text,info:t.value})}))},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)}))},more:function(){return!this.max||this.state.length1?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{position:{required:!this.required||Is["required"],min:!this.min||Object(Is["minValue"])(this.min),max:!this.max||Object(Is["maxValue"])(this.max)}}}},qr=Br,Nr=(n("b5d2"),Object(_["a"])(qr,Lr,Ar,!1,null,null,null)),Pr=Nr.exports,Dr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-select-input",attrs:{"data-disabled":t.disabled,"data-empty":""===t.selected}},[n("select",t._g({ref:"input",staticClass:"k-select-input-native",attrs:{autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,id:t.id,name:t.name,required:t.required},domProps:{value:t.selected}},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")])},Mr=[],Fr={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(I["a"])(Object(I["a"])({},this.$listeners),{},{click:function(e){return t.onClick(e)},change:function(e){return t.onInput(e.target.value)},input:function(){}})}},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||Is["required"]}}}},Ur=Fr,zr=(n("6a18"),Object(_["a"])(Ur,Dr,Mr,!1,null,null,null)),Hr=zr.exports,Kr=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)},Vr=[],Yr={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(){var t=this;return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map((function(e){return t.icon&&t.icon.length>0&&(e.icon=t.icon),e}),this)}},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.length=this.tags.length)return;break;case"first":e=0;break;case"last":e=this.tags.length-1;break;default:e=t;break}var i=this.tags[e];if(i){var s=this.$refs[i.value];if(s&&s[0])return{ref:s[0],tag:i,index:e}}return!1},index:function(t){return this.tags.findIndex((function(e){return e.value===t.value}))},onInput:function(){this.$emit("input",this.tags)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},leaveInput:function(t){0===t.target.selectionStart&&t.target.selectionStart===t.target.selectionEnd&&0!==this.tags.length&&(this.$refs.autocomplete.close(),this.navigate("last"),t.preventDefault())},navigate:function(t){var e=this.get(t);e?(e.ref.focus(),this.selectTag(e.tag)):"next"===t&&(this.$refs.input.focus(),this.selectTag(null))},prepareTags:function(t){return!1===Array.isArray(t)?[]:t.map((function(t){return"string"===typeof t?{text:t,value:t}:t}))},remove:function(t){var e=this.get("prev"),n=this.get("next");this.tags.splice(this.index(t),1),this.onInput(),e?(this.selectTag(e.tag),e.ref.focus()):n?this.selectTag(n.tag):(this.selectTag(null),this.$refs.input.focus())},select:function(){this.focus()},selectTag:function(t){this.selected=t},tab:function(t){this.newTag&&this.newTag.length>0&&(t.preventDefault(),this.addString(this.newTag))},type:function(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations:function(){return{tags:{required:!this.required||Is["required"],minLength:!this.min||Object(Is["minLength"])(this.min),maxLength:!this.max||Object(Is["maxLength"])(this.max)}}}},Wr=Yr,Jr=(n("27c1"),Object(_["a"])(Wr,Kr,Vr,!1,null,null,null)),Gr=Jr.exports,Zr={extends:ar,props:Object(I["a"])(Object(I["a"])({},ar.props),{},{autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}})},Xr=Zr,Qr=Object(_["a"])(Xr,p,d,!1,null,null,null),ta=Qr.exports,ea=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.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey?t.onSubmit(e):null},function(e){return e.metaKey?t.onShortcut(e):null},function(e){return e.ctrlKey?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)},na=[],ia={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(){t.$library.autosize(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.map((function(t){return t.dragText})).join("\n\n"))},insertUpload:function(t,e){this.insert(e.map((function(t){return t.dragText})).join("\n\n")),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(this.uploads&&this.$helper.isUploadEvent(t))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:B.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&&this.$helper.isUploadEvent(t))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&&"Control"!==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(){this.$library.autosize.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:B.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap:function(t){this.insert(t+this.selection()+t)}},validations:function(){return{value:{required:!this.required||Is["required"],minLength:!this.minlength||Object(Is["minLength"])(this.minlength),maxLength:!this.maxlength||Object(Is["maxLength"])(this.maxlength)}}}},sa=ia,ra=(n("cca8"),Object(_["a"])(sa,ea,na,!1,null,null,null)),aa=ra.exports,oa=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)},ua=[],la={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=this.$helper.pad(this.hour||0),e=this.$helper.pad(this.minute||0),n=String(this.meridiem||"AM").toUpperCase(),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",r=this.$library.dayjs("2000-01-01 "+i,"YYYY-MM-DD "+s);this.$emit("input",r.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:this.$helper.pad(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=this.$library.dayjs("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}}}},ca=la,pa=(n("50da"),Object(_["a"])(ca,oa,ua,!1,null,null,null)),da=pa.exports,fa=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)}})])},ha=[],ma={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 Array.isArray(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||Is["required"]}}}},ga=ma,ba=(n("bb41"),Object(_["a"])(ga,fa,ha,!1,null,null,null)),va=ba.exports,ka={extends:ar,props:Object(I["a"])(Object(I["a"])({},ar.props),{},{autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}})},$a=ka,_a=Object(_["a"])($a,f,h,!1,null,null,null),ya=_a.exports,wa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-checkboxes-field",attrs:{counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"checkboxes"}},"k-input",t.$props,!1),t.$listeners))],1)},xa=[],Oa={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Us.props),{},{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Array.isArray(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},ja=Oa,Sa=Object(_["a"])(ja,wa,xa,!1,null,null,null),Ca=Sa.exports,Ea=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)},Ra=[],Ta={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),tr.props),{},{icon:{type:String,default:"calendar"}}),data:function(){return{date:this.value,listeners:Object(I["a"])(Object(I["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)}}},Ia=Ta,La=Object(_["a"])(Ia,Ea,Ra,!1,null,null,null),Aa=La.exports,Ba=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-email-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"email"}},"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.mailto,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},qa=[],Na={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),cr.props),{},{link:{type:Boolean,default:!0},icon:{type:String,default:"email"}}),computed:{mailto:function(){return this.value&&this.value.length>0?"mailto:"+this.value:null}},methods:{focus:function(){this.$refs.input.focus()}}},Pa=Na,Da=Object(_["a"])(Pa,Ba,qa,!1,null,null,null),Ma=Da.exports,Fa=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:t.btnIcon},on:{click:function(e){return t.$refs.picker.toggle()}}},[t._v("\n "+t._s(t.btnLabel)+"\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,"data-invalid":t.isInvalid},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,link:t.link?e.link:null,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,"data-invalid":t.isInvalid,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)},Ua=[],za={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])({},ps.props),{},{empty:String,info:String,link:Boolean,layout:String,max:Number,multiple:Boolean,parent:String,search:Boolean,size:String,text:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{selected:this.value}},computed:{btnIcon:function(){return!this.multiple&&this.selected.length>0?"refresh":"add"},btnLabel:function(){return!this.multiple&&this.selected.length>0?this.$t("change"):this.$t("add")},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"]},isInvalid:function(){return!(!this.required||0!==this.selected.length)||(!!(this.min&&this.selected.lengththis.max))},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=[]}}},Ha={mixins:[za],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,search:this.search,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:B.api+"/"+this.endpoints.field+"/upload",multiple:this.multiple,accept:this.uploads.accept})}}},Ka=Ha,Va=(n("4a4b"),Object(_["a"])(Ka,Fa,Ua,!1,null,null,null)),Ya=Va.exports,Wa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-field k-gap-field"})},Ja=[],Ga={},Za=Object(_["a"])(Ga,Wa,Ja,!1,null,null,null),Xa=Za.exports,Qa=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")])},to=[],eo={props:{label:String,numbered:Boolean}},no=eo,io=(n("19d7"),Object(_["a"])(no,Qa,to,!1,null,null,null)),so=io.exports,ro=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)},ao=[],oo={props:{label:String,text:String,theme:{type:String,default:"info"}}},uo=oo,lo=(n("ddfd"),Object(_["a"])(uo,ro,ao,!1,null,null,null)),co=lo.exports,po=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("hr",{staticClass:"k-line-field"})},fo=[],ho=(n("718c"),{}),mo=Object(_["a"])(ho,po,fo,!1,null,null,null),go=mo.exports,bo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-multiselect-field",attrs:{input:t._uid,counter:t.counterOptions},on:{blur:t.blur},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.focus(e))}}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"multiselect"}},"k-input",t.$props,!1),t.$listeners))],1)},vo=[],ko={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),gr.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&&Array.isArray(this.value)?this.value.length:0,min:this.min,max:this.max}}},mounted:function(){this.$refs.input.$el.setAttribute("tabindex",0)},methods:{blur:function(t){this.$refs.input.blur(t)},focus:function(){this.$refs.input.focus()}}},$o=ko,_o=Object(_["a"])($o,bo,vo,!1,null,null,null),yo=_o.exports,wo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-number-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"number"}},"k-input",t.$props,!1),t.$listeners))],1)},xo=[],Oo={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),yr.props),methods:{focus:function(){this.$refs.input.focus()}}},jo=Oo,So=Object(_["a"])(jo,wo,xo,!1,null,null,null),Co=So.exports,Eo=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:t.btnIcon},on:{click:t.open}},[t._v("\n "+t._s(t.btnLabel)+"\n ")]):t._e()],1),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,handle:!0,list:t.selected,"data-size":t.size,"data-invalid":t.isInvalid},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:t.link?e.link:null,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,"data-invalid":t.isInvalid,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)},Ro=[],To={mixins:[za],methods:{open:function(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map((function(t){return t.id}))})}}},Io=To,Lo=(n("7e85"),Object(_["a"])(Io,Eo,Ro,!1,null,null,null)),Ao=Lo.exports,Bo=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",type:"password"}},"k-input",t.$props,!1),t.$listeners))],1)},qo=[],No={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),jr.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()}}},Po=No,Do=Object(_["a"])(Po,Bo,qo,!1,null,null,null),Mo=Do.exports,Fo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-radio-field"},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"radio"}},"k-input",t.$props,!1),t.$listeners))],1)},Uo=[],zo={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Ir.props),methods:{focus:function(){this.$refs.input.focus()}}},Ho=zo,Ko=Object(_["a"])(Ho,Fo,Uo,!1,null,null,null),Vo=Ko.exports,Yo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-range-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"range"}},"k-input",t.$props,!1),t.$listeners))],1)},Wo=[],Jo={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Pr.props),methods:{focus:function(){this.$refs.input.focus()}}},Go=Jo,Zo=Object(_["a"])(Go,Yo,Wo,!1,null,null,null),Xo=Zo.exports,Qo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-select-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"select"}},"k-input",t.$props,!1),t.$listeners))],1)},tu=[],eu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Hr.props),{},{icon:{type:String,default:"angle-down"}}),methods:{focus:function(){this.$refs.input.focus()}}},nu=eu,iu=Object(_["a"])(nu,Qo,tu,!1,null,null,null),su=iu.exports,ru=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:{"data-invalid":t.isInvalid,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-invalid":t.isInvalid,"data-sortable":t.isSortable}},[n("thead",[n("tr",[n("th",{staticClass:"k-structure-table-index"},[t._v("#")]),t._l(t.columns,(function(e,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,r){return n("td",{key:r,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,r)}}},[!1===t.columnIsEmpty(e[r])?[t.previewExists(s.type)?n("k-"+s.type+"-field-preview",{tag:"component",attrs:{value:e[r],column:s,field:t.fields[r]},on:{input:function(e){return t.update(i,r,e)}}}):[n("p",{staticClass:"k-structure-table-text"},[t._v("\n "+t._s(s.before)+" "+t._s(t.displayText(t.fields[r],e[r])||"–")+" "+t._s(s.after)+"\n ")])]]:t._e()],2)})),n("td",{staticClass:"k-structure-table-options"},[t.duplicate&&t.more&&null===t.currentIndex?[n("k-button",{key:i,ref:"actionsToggle",refInFor:!0,staticClass:"k-structure-table-options-button",attrs:{icon:"dots"},on:{click:function(e){t.$refs[i+"-actions"][0].toggle()}}}),n("k-dropdown-content",{ref:i+"-actions",refInFor:!0,attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"copy"},on:{click:function(e){return t.duplicateItem(i)}}},[t._v(t._s(t.$t("duplicate")))]),n("k-dropdown-item",{attrs:{icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}},[t._v(t._s(t.$t("remove")))])],1)]:[n("k-button",{staticClass:"k-structure-table-options-button",attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}})]],2)],2)})),0)],1),t.limit?n("k-pagination",t._b({on:{paginate:t.paginateItems}},"k-pagination",t.pagination,!1)):t._e(),t.disabled?t._e():n("k-dialog",{ref:"remove",attrs:{"submit-button":t.$t("delete"),theme:"negative"},on:{submit:t.remove}},[n("k-text",[t._v(t._s(t.$t("field.structure.delete.confirm")))])],1)]],2)},au=[],ou={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])({},ps.props),{},{columns:Object,duplicate:{type:Boolean,default:!0},empty:String,fields:Object,limit:Number,max:Number,min:Number,prepend:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default: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 Object.keys(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)},isInvalid:function(){return!0!==this.disabled&&(!!(this.min&&this.items.lengththis.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={};Object.keys(this.fields).forEach((function(n){var i=t.fields[n];null!==i.default?e[n]=t.$helper.clone(i.default):e[n]=null})),this.currentIndex="new",this.currentModel=e,this.createForm()},addItem:function(t){!0===this.prepend?this.items.unshift(t):this.items.push(t)},beforePaginate:function(){return this.save(this.currentModel)},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("content/enable")},columnIsEmpty:function(t){return void 0===t||null===t||""===t||("object"===Object(fe["a"])(t)&&0===Object.keys(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("content/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=this.$library.dayjs(e),i=!0===t.time?"YYYY-MM-DD HH:mm":"YYYY-MM-DD";return n.isValid()?n.format(i):"";case"tags":case"multiselect":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(fe["a"])(e)&&null!==e?"…":e.toString()},duplicateItem:function(t){this.addItem(this.items[t]),this.onInput()},escape:function(){var t=this;if("new"===this.currentIndex){var e=Object.values(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&&this.$refs.add.focus&&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===Array.isArray(t)?[]:this.sort(t)},onInput:function(){this.$emit("input",this.items)},open:function(t,e){this.currentIndex=t,this.currentModel=this.$helper.clone(this.items[t]),this.createForm(e)},paginate:function(t){this.open(t.offset)},paginateItems:function(t){this.page=t.page},previewExists:function(t){return this.$helper.isComponent("k-".concat(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.addItem(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})):Promise.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.toString().split("/");if(2!==e.length)return"auto";var n=Number(e[0]),i=Number(e[1]);return parseFloat(100/i*n,2).toFixed(2)+"%"},update:function(t,e,n){this.items[t][e]=n,this.onInput()}}},uu=ou,lu=(n("088c"),Object(_["a"])(uu,ru,au,!1,null,null,null)),cu=lu.exports,pu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tags-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tags"}},"k-input",t.$props,!1),t.$listeners))],1)},du=[],fu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),Gr.props),{},{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Array.isArray(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},hu=fu,mu=Object(_["a"])(hu,pu,du,!1,null,null,null),gu=mu.exports,bu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tel-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tel"}},"k-input",t.$props,!1),t.$listeners))],1)},vu=[],ku={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),ta.props),{},{icon:{type:String,default:"phone"}}),methods:{focus:function(){this.$refs.input.focus()}}},$u=ku,_u=Object(_["a"])($u,bu,vu,!1,null,null,null),yu=_u.exports,wu=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)},xu=[],Ou={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),ar.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()}}},ju=Ou,Su=(n("b746"),Object(_["a"])(ju,wu,xu,!1,null,null,null)),Cu=Su.exports,Eu=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)},Ru=[],Tu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),aa.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()}}},Iu=Tu,Lu=Object(_["a"])(Iu,Eu,Ru,!1,null,null,null),Au=Lu.exports,Bu=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",type:"time"}},"k-input",t.$props,!1),t.$listeners))],1)},qu=[],Nu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),da.props),{},{icon:{type:String,default:"clock"}}),methods:{focus:function(){this.$refs.input.focus()}}},Pu=Nu,Du=Object(_["a"])(Pu,Bu,qu,!1,null,null,null),Mu=Du.exports,Fu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-toggle-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"toggle"}},"k-input",t.$props,!1),t.$listeners))],1)},Uu=[],zu={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),va.props),methods:{focus:function(){this.$refs.input.focus()}}},Hu=zu,Ku=Object(_["a"])(Hu,Fu,Uu,!1,null,null,null),Vu=Ku.exports,Yu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-url-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"url"}},"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)},Wu=[],Ju={inheritAttrs:!1,props:Object(I["a"])(Object(I["a"])(Object(I["a"])(Object(I["a"])({},ps.props),ws.props),ya.props),{},{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}}),methods:{focus:function(){this.$refs.input.focus()}}},Gu=Ju,Zu=Object(_["a"])(Gu,Yu,Wu,!1,null,null,null),Xu=Zu.exports,Qu=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:t.btnIcon},on:{click:t.open}},[t._v("\n "+t._s(t.btnLabel)+"\n ")]):t._e()],1),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,handle:!0,"data-invalid":t.isInvalid},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.text,info:e.info,link:t.link?t.$api.users.link(e.id):null,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:{"data-invalid":t.isInvalid,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)},tl=[],el={mixins:[za],methods:{open:function(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map((function(t){return t.id}))})}}},nl=el,il=(n("7f6e"),Object(_["a"])(nl,Qu,tl,!1,null,null,null)),sl=il.exports,rl=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)])])},al=[],ol=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")}))},ul={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:(Array.isArray(this.buttons)&&(n=this.buttons),!0!==Array.isArray(this.buttons)&&(n=this.$options.layout),n.forEach((function(n,s){if("|"===n)t["divider-"+s]={divider:!0};else if(i[n]){var r=i[n];t[n]=r,r.shortcut&&(e[r.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;Object.keys(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:"k",command:"dialog",args:"link"},email:{label:this.$t("toolbar.button.email"),icon:"email",shortcut:"e",command:"dialog",args:"email"},file:this.fileCommandSetup(),code:{label:this.$t("toolbar.button.code"),icon:"code",command:"wrap",args:"`"},ul:{label:this.$t("toolbar.button.ul"),icon:"list-bullet",command:function(){return ol.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command:function(){return ol.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)}}}},ll=ul,cl=(n("df0d"),Object(_["a"])(ll,rl,al,!1,null,null,null)),pl=cl.exports,dl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},fl=[],hl={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()}}},ml=hl,gl=Object(_["a"])(ml,dl,fl,!1,null,null,null),bl=gl.exports,vl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},kl=[],$l={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()}}},_l=$l,yl=Object(_["a"])(_l,vl,kl,!1,null,null,null),wl=yl.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()}}},["image"===e.type?n("k-image",t._b({},"k-image",t.imageOptions(e),!1)):n("k-icon",t._b({},"k-icon",e.icon,!1))],1)],1)})),0):t._e()},Ol=[],jl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"list",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"1/1";if(!t||0===t.length)return!1;var i=null,s=null;if(t.list?(i=t[e].url,s=t[e].srcset):(i=t.url,s=t.srcset),!i)return!1;var r={src:i,srcset:s,back:t.back||"black",cover:t.cover};return"cards"===e&&(r.ratio=t.ratio||"3/2",r.sizes=Sl(n)),r};function Sl(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"}}var Cl,El,Rl,Tl,Il={props:{value:Array,field:Object},methods:{imageOptions:function(t){var e=jl(t.image);return e.src?Object(I["a"])(Object(I["a"])({},e),{},{back:"pattern",cover:!1},this.field.image||{}):{src:t.url}}}},Ll=Il,Al=(n("21dc"),Object(_["a"])(Ll,xl,Ol,!1,null,null,null)),Bl=Al.exports,ql=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)},Nl=[],Pl={props:{column:{type:Object,default:function(){return{}}},value:String},computed:{link:function(){return this.value}}},Dl=Pl,Ml=(n("977f"),Object(_["a"])(Dl,ql,Nl,!1,null,null,null)),Fl=Ml.exports,Ul={extends:Fl,computed:{link:function(){return this.value&&this.value.length>0?"mailto:"+this.value:null}}},zl=Ul,Hl=Object(_["a"])(zl,Cl,El,!1,null,null,null),Kl=Hl.exports,Vl=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()},Yl=[],Wl={props:{value:Array}},Jl=Wl,Gl=(n("d0c1"),Object(_["a"])(Jl,Vl,Yl,!1,null,null,null)),Zl=Gl.exports,Xl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-input",{staticClass:"k-toggle-field-preview",attrs:{text:t.text,type:"toggle"},on:{input:function(e){return t.$emit("input",e)}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})},Ql=[],tc={props:{field:Object,value:Boolean,column:Object},computed:{text:function(){return!1!==this.column.text?this.field.text:null}}},ec=tc,nc=(n("1c4e"),Object(_["a"])(ec,Xl,Ql,!1,null,null,null)),ic=nc.exports,sc=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()},rc=[],ac={props:{value:Array}},oc=ac,uc=(n("3a85"),Object(_["a"])(oc,sc,rc,!1,null,null,null)),lc=uc.exports,cc=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()])},pc=[],dc=(n("6f7b"),{}),fc=Object(_["a"])(dc,cc,pc,!1,null,null,null),hc=fc.exports,mc=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)},gc=[],bc={props:{theme:String,text:String}},vc=bc,kc=(n("7dc7"),Object(_["a"])(vc,mc,gc,!1,null,null,null)),$c=kc.exports,_c=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)},yc=[],wc={inheritAttrs:!1,props:{column:String,flag:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},image:[Object,Boolean],info:String,link:[String,Function],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?this.$helper.ratio(this.icon.ratio):this.$helper.ratio("3/2")},imageOptions:function(){return jl(this.image,"cards",this.column)}}},xc=wc,Oc=(n("c119"),Object(_["a"])(xc,_c,yc,!1,null,null,null)),jc=Oc.exports,Sc=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)},Cc=[],Ec={props:{cards:Array}},Rc=Ec,Tc=(n("f56d"),Object(_["a"])(Rc,Sc,Cc,!1,null,null,null)),Ic=Tc.exports,Lc=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)},Ac=[],Bc={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(fe["a"])(this.pagination)?{}:this.pagination;return Object(I["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})}}},qc=Bc,Nc=(n("8c28"),Object(_["a"])(qc,Lc,Ac,!1,null,null,null)),Pc=Nc.exports,Dc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column",attrs:{"data-width":t.width,"data-sticky":t.sticky}},[n("div",[t._t("default")],2)])},Mc=[],Fc={props:{width:String,sticky:Boolean}},Uc=Fc,zc=(n("c9cb"),Object(_["a"])(Uc,Dc,Mc,!1,null,null,null)),Hc=zc.exports,Kc=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)},Vc=[],Yc={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():!1===this.$helper.isUploadEvent(t)?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset())},onEnter:function(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(this.dragging=!0)},onLeave:function(){this.reset()},onOver:function(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},Wc=Yc,Jc=(n("414d"),Object(_["a"])(Wc,Kc,Vc,!1,null,null,null)),Gc=Jc.exports,Zc=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),[t.icon?n("k-icon",{attrs:{type:t.icon}}):t._e(),n("p",[t._t("default")],2)],1)},Xc=[],Qc={props:{text:String,icon:String,layout:{type:String,default:"list"}}},tp=Qc,ep=(n("ba8f"),Object(_["a"])(tp,Zc,Xc,!1,null,null,null)),np=ep.exports,ip=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-file-preview"},[n("k-view",{staticClass:"k-file-preview-layout"},[n("div",{staticClass:"k-file-preview-image"},[n("k-link",{staticClass:"k-file-preview-image-link",attrs:{to:t.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)],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)},sp=[],rp={props:{file:Object}},ap=rp,op=(n("696b"),Object(_["a"])(ap,ip,sp,!1,null,null,null)),up=op.exports,lp=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)},cp=[],pp={props:{gutter:String}},dp=pp,fp=(n("5b23"),Object(_["a"])(dp,lp,cp,!1,null,null,null)),hp=fp.exports,mp=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)},gp=[],bp={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"}}}}},vp=bp,kp=(n("53c5"),Object(_["a"])(vp,mp,gp,!1,null,null,null)),$p=kp.exports,_p=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)},yp=[],wp={props:{items:Array}},xp=wp,Op=(n("c857"),Object(_["a"])(xp,_p,yp,!1,null,null,null)),jp=Op.exports,Sp=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",{staticClass:"k-list-item-content",attrs:{to:t.link,target:t.target}},[t.image?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):t._e(),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({staticClass:"k-list-item-status",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)},Cp=[],Ep={inheritAttrs:!1,props:{element:{type:String,default:"li"},image:[Object,Boolean],icon:{type:Object,default:function(){return{type:"file",back:"black"}}},sortable:Boolean,text:String,target:String,info:String,link:[String,Function],flag:Object,options:[Array,Function]},computed:{imageOptions:function(){return jl(this.image)}}},Rp=Ep,Tp=(n("fa6a"),Object(_["a"])(Rp,Sp,Cp,!1,null,null,null)),Ip=Tp.exports,Lp=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()},Ap=[],Bp={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)}}}},qp=Bp,Np=Object(_["a"])(qp,Lp,Ap,!1,null,null,null),Pp=Np.exports,Dp=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)},Mp=[],Fp={props:{align:String}},Up=Fp,zp=(n("daa8"),Object(_["a"])(Up,Dp,Mp,!1,null,null,null)),Hp=zp.exports,Kp=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)},Vp=[],Yp=n("310e"),Wp=n.n(Yp),Jp={components:{draggable:Wp.a},props:{element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data:function(){var t=this;return{listeners:Object(I["a"])(Object(I["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(I["a"])({fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view")},this.options)}}},Gp=Jp,Zp=Object(_["a"])(Gp,Kp,Vp,!1,null,null,null),Xp=Zp.exports,Qp={data:function(){return{error:null}},errorCaptured:function(t){return B.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]}},td=Qp,ed=Object(_["a"])(td,Rl,Tl,!1,null,null,null),nd=ed.exports,id=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=[],rd={props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},ad=rd,od=(n("f8a7"),Object(_["a"])(ad,id,sd,!1,null,null,null)),ud=od.exports,ld=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}})])])},cd=[],pd={props:{alt:String,color:String,back:String,emoji:Boolean,size:String,type:String}},dd=pd,fd=(n("3342"),Object(_["a"])(dd,ld,cd,!1,null,null,null)),hd=fd.exports,md=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)])},gd=[],bd={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 this.$helper.ratio(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=bd,kd=(n("0d56"),Object(_["a"])(vd,md,gd,!1,null,null,null)),$d=kd.exports,_d=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")])},yd=[],wd={props:{value:{type:Number,default:0}},data:function(){return{state:this.value}},methods:{set:function(t){this.state=t}}},xd=wd,Od=(n("9799"),Object(_["a"])(xd,_d,yd,!1,null,null,null)),jd=Od.exports,Sd=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"}})])])},Cd=[],Ed=(n("35cb"),{}),Rd=Object(_["a"])(Ed,Sd,Cd,!1,null,null,null),Td=Rd.exports,Id=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)},Ld=[],Ad={props:{align:String,size:String,theme:String}},Bd=Ad,qd=(n("b0d6"),Object(_["a"])(Bd,Id,Ld,!1,null,null,null)),Nd=qd.exports,Pd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.component,t._g(t._b({ref:"button",tag:"component"},"component",t.$props,!1),t.$listeners),[t._t("default")],2)},Dd=[],Md={inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,rel:String,role:String,target:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}},computed:{component:function(){return!0===this.disabled?"k-button-disabled":this.link?"k-button-link":"k-button-native"}},methods:{focus:function(){this.$refs.button.focus&&this.$refs.button.focus()},tab:function(){this.$refs.button.tab&&this.$refs.button.tab()},untab:function(){this.$refs.button.untab&&this.$refs.button.untab()}}},Fd=Md,Ud=(n("3787"),Object(_["a"])(Fd,Pd,Dd,!1,null,null,null)),zd=Ud.exports,Hd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-button",attrs:{id:t.id,"data-disabled":!0,"data-responsive":t.responsive,"data-theme":t.theme,title:t.tooltip}},[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)},Kd=[],Vd={inheritAttrs:!1,props:{icon:String,id:[String,Number],responsive:Boolean,theme:String,tooltip:String}},Yd=Vd,Wd=(n("16eb"),Object(_["a"])(Yd,Hd,Kd,!1,null,null,null)),Jd=Wd.exports,Gd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-button-group"},[t._t("default")],2)},Zd=[],Xd=(n("a567"),{}),Qd=Object(_["a"])(Xd,Gd,Zd,!1,null,null,null),tf=Qd.exports,ef=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-link",t._g({staticClass:"k-button",attrs:{"aria-current":t.current,autofocus:t.autofocus,id:t.id,"data-theme":t.theme,"data-responsive":t.responsive,rel:t.rel,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link}},t.$listeners),[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)},nf=[],sf={inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],link:String,rel:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String}},rf=sf,af=Object(_["a"])(rf,ef,nf,!1,null,null,null),of=af.exports,uf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",t._g({staticClass:"k-button",attrs:{"aria-current":t.current,autofocus:t.autofocus,id:t.id,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,title:t.tooltip,type: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)},lf=[],cf={mounted:function(){this.$el.addEventListener("keyup",this.onTab,!0),this.$el.addEventListener("blur",this.onUntab,!0)},destroyed:function(){this.$el.removeEventListener("keyup",this.onTab,!0),this.$el.removeEventListener("blur",this.onUntab,!0)},methods:{focus:function(){this.$el.focus&&this.$el.focus()},onTab:function(t){9===t.keyCode&&this.$el.setAttribute("data-tabbed",!0)},onUntab:function(){this.$el.removeAttribute("data-tabbed")},tab:function(){this.$el.focus(),this.$el.setAttribute("data-tabbed",!0)},untab:function(){this.$el.removeAttribute("data-tabbed")}}},pf={mixins:[cf],inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],responsive:Boolean,role:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}}},df=pf,ff=Object(_["a"])(df,uf,lf,!1,null,null,null),hf=ff.exports,mf=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)},gf=[],bf=(n("f95f"),{}),vf=Object(_["a"])(bf,mf,gf,!1,null,null,null),kf=vf.exports,$f=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()},_f=[],yf=null,wf={props:{options:[Array,Function],align:String},data:function(){return{items:[],current:-1,isOpen:!1}},methods:{fetchOptions:function(t){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e.options){n.next=14;break}if("string"!==typeof e.options){n.next=11;break}return n.next=4,fetch(e.options);case 4:return i=n.sent,n.next=7,i.json();case 7:return s=n.sent,n.abrupt("return",t(s));case 11:"function"===typeof e.options?e.options(t):Array.isArray(e.options)&&t(e.options);case 12:n.next=15;break;case 14:return n.abrupt("return",t(e.items));case 15:case"end":return n.stop()}}),n)})))()},open:function(){var t=this;this.reset(),yf&&yf!==this&&yf.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"),yf=t}))},reset:function(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close:function(){this.reset(),this.isOpen=yf=!1,this.$emit("close")},toggle:function(){this.isOpen?this.close():this.open()},focus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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();while(1){if(this.current--,this.current<0){this.close(),this.$emit("leave",t.code);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled){this.focus(this.current);break}}break;case"ArrowDown":t.preventDefault();while(1){if(this.current++,this.current>this.$children.length-1){var e=this.$children.filter((function(t){return!1===t.disabled}));this.current=this.$children.indexOf(e[e.length-1]);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled){this.focus(this.current);break}}break;case"Tab":while(1){if(this.current++,this.current>this.$children.length-1){this.close(),this.$emit("leave",t.code);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled)break}break}}}},xf=wf,Of=(n("98a1"),Object(_["a"])(xf,$f,_f,!1,null,null,null)),jf=Of.exports,Sf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-button",t._g(t._b({ref:"button",staticClass:"k-dropdown-item"},"k-button",t.$props,!1),t.listeners),[t._t("default")],2)},Cf=[],Ef={inheritAttrs:!1,props:{disabled:Boolean,icon:String,image:[String,Object],link:String,target:String,theme:String,upload:String,current:[String,Boolean]},data:function(){var t=this;return{listeners:Object(I["a"])(Object(I["a"])({},this.$listeners),{},{click:function(e){t.$parent.close(),t.$emit("click",e)}})}},methods:{focus:function(){this.$refs.button.focus()},tab:function(){this.$refs.button.tab()}}},Rf=Ef,Tf=(n("580a"),Object(_["a"])(Rf,Sf,Cf,!1,null,null,null)),If=Tf.exports,Lf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.to&&!t.disabled?n("a",t._g({ref:"link",staticClass:"k-link",attrs:{href:t.href,rel:t.relAttr,tabindex:t.tabindex,target:t.target,title:t.title}},t.listeners),[t._t("default")],2):n("span",{staticClass:"k-link",attrs:{title:t.title,"data-disabled":""}},[t._t("default")],2)},Af=[],Bf={mixins:[cf],props:{disabled:Boolean,rel:String,tabindex:[String,Number],target:String,title:String,to:[String,Function]},data:function(){return{relAttr:"_blank"===this.target?"noreferrer noopener":this.rel,listeners:Object(I["a"])(Object(I["a"])({},this.$listeners),{},{click:this.onClick})}},computed:{href:function(){return"function"===typeof this.to?"":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;"function"===typeof this.to&&(t.preventDefault(),this.to()),this.isRoutable(t)&&(t.preventDefault(),this.$go(this.to)),this.$emit("click",t)}}},qf=Bf,Nf=(n("cc79"),Object(_["a"])(qf,Lf,Af,!1,null,null,null)),Pf=Nf.exports,Df=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.languages.length?n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"globe"},on:{click:function(e){return t.$refs.languages.toggle()}}},[t._v("\n "+t._s(t.language.name)+"\n ")]),t.languages?n("k-dropdown-content",{ref:"languages"},[n("k-dropdown-item",{on:{click:function(e){return t.change(t.defaultLanguage)}}},[t._v(t._s(t.defaultLanguage.name))]),n("hr"),t._l(t.languages,(function(e){return n("k-dropdown-item",{key:e.code,on:{click:function(n){return t.change(e)}}},[t._v("\n "+t._s(e.name)+"\n ")])}))],2):t._e()],1):t._e()},Mf=[],Ff={computed:{defaultLanguage:function(){return this.$store.state.languages.default},language:function(){return this.$store.state.languages.current},languages:function(){return this.$store.state.languages.all.filter((function(t){return!1===t.default}))}},methods:{change:function(t){this.$store.dispatch("languages/current",t),this.$emit("change",t)}}},Uf=Ff,zf=Object(_["a"])(Uf,Df,Mf,!1,null,null,null),Hf=zf.exports,Kf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.show?n("nav",{staticClass:"k-pagination",attrs:{"data-align":t.align}},[t.show?n("k-button",{attrs:{disabled:!t.hasPrev,tooltip:t.prevLabel,icon:"angle-left"},on:{click:t.prev}}):t._e(),t.details?[t.dropdown?[n("k-dropdown",[n("k-button",{staticClass:"k-pagination-details",attrs:{disabled:!t.hasPages},on:{click:function(e){return t.$refs.dropdown.toggle()}}},[t.total>1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\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",{staticClass:"k-pagination-settings"},[n("label",{attrs:{for:"k-pagination-page"}},[n("span",[t._v(t._s(t.pageLabel)+":")]),n("select",{ref:"page",attrs:{id:"k-pagination-page"}},t._l(t.pages,(function(e){return n("option",{key:e,domProps:{selected:t.page===e,value:e}},[t._v("\n "+t._s(e)+"\n ")])})),0)]),n("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.goTo(t.$refs.page.value)}}})],1)])],1)]:[n("span",{staticClass:"k-pagination-details"},[t.total>1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\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()},Vf=[],Yf={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},validate:{type:Function,default:function(){return Promise.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:function(){return this.$t("pagination.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=parseInt(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: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}}}},Wf=Yf,Jf=(n("a66d"),Object(_["a"])(Wf,Kf,Vf,!1,null,null,null)),Gf=Jf.exports,Zf=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)},Xf=[],Qf={props:{prev:{type:Object,default:function(){return{disabled:!0,link:"#"}}},next:{type:Object,default:function(){return{disabled:!0,link:"#"}}}}},th=Qf,eh=(n("7a7d"),Object(_["a"])(th,Zf,Xf,!1,null,null,null)),nh=eh.exports,ih=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:t.close}},[n("strong",[t._v(t._s(e.title))]),n("small",[t._v(t._s(e.info))])])],1)})),0)])])},sh=[],rh={data:function(){return{items:[],q:null,selected:-1,currentType:"users"===this.$store.state.view?"users":"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"},files:{label:this.$t("files"),icon:"image",endpoint:"files/search"},users:{label:this.$t("users"),icon:"users",endpoint:"users/search"}}}},watch:{q:st((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--}}},ah=rh,oh=(n("4cb2"),Object(_["a"])(ah,ih,sh,!1,null,null,null)),uh=oh.exports,lh=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()])},ch=[],ph={props:{removable:Boolean,size:String},methods:{remove:function(){this.removable&&this.$emit("remove")},focus:function(){this.$refs.button.focus()}}},dh=ph,fh=(n("021f"),Object(_["a"])(dh,lh,ch,!1,null,null,null)),hh=fh.exports,mh=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.menuTitle(e,i))+"\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",{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",{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,tooltip:t.$t("license.unregistered"),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-form-indicator")],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()},gh=[],bh=Object(I["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),vh={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 bh[this.$store.state.view]},views:function(){return bh},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}},methods:{menuTitle:function(t,e){var n=this.$t("view."+e,t.label);return"site"===e&&this.$store.state.system.info.site||n}}},kh=vh,$h=(n("1e3b"),Object(_["a"])(kh,mh,gh,!1,null,null,null)),_h=$h.exports,yh=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,sticky:e.sticky}},[t._l(e.sections,(function(s,r){return[t.meetsCondition(s)?[t.exists(s.type)?n("k-"+s.type+"-section",t._b({key:t.parent+"-column-"+i+"-section-"+r+"-"+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-"+r,attrs:{text:t.$t("error.section.type.invalid",{type:s.type}),theme:"negative"}})]]:t._e()]}))],2)})),1)},wh=[],xh={props:{parent:String,blueprint:String,columns:[Array,Object]},computed:{content:function(){return this.$store.getters["content/values"]()}},methods:{exists:function(t){return this.$helper.isComponent("k-".concat(t,"-section"))},meetsCondition:function(t){var e=this;if(!t.when)return!0;var n=!0;return Object.keys(t.when).forEach((function(i){var s=e.content[i.toLowerCase()],r=t.when[i];s!==r&&(n=!1)})),n}}},Oh=xh,jh=(n("6bcd"),Object(_["a"])(Oh,yh,wh,!1,null,null,null)),Sh=jh.exports,Ch=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)},Eh=[],Rh={props:{blueprint:String,help:String,name:String,parent:String},methods:{load:function(){return this.$api.get(this.parent+"/sections/"+this.name)}}},Th={mixins:[Rh],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}))}},Ih=Th,Lh=(n("4333"),Object(_["a"])(Ih,Ch,Eh,!1,null,null,null)),Ah=Lh.exports,Bh=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:t.$t("section.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("\n "+t._s(t.$t("error.section.notLoaded",{name:t.name}))+":\n ")]),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,"data-invalid":t.isInvalid},on:{change:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,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()},qh=[],Nh={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},isInvalid:function(){return!!(this.options.min&&this.data.lengththis.options.max)},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;return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t||(e.isLoading=!0),null===e.pagination.page&&(e.pagination.page=localStorage.getItem(e.paginationId)||1),n.prev=2,n.next=5,e.$api.get(e.parent+"/sections/"+e.name,{page:e.pagination.page});case 5:i=n.sent,e.options=i.options,e.pagination=i.pagination,e.data=e.items(i.data),n.next=14;break;case 11:n.prev=11,n.t0=n["catch"](2),e.error=n.t0.message;case 14:return n.prev=14,e.isLoading=!1,n.finish(14);case 17:case"end":return n.stop()}}),n,null,[[2,11,14,17]])})))()},paginate:function(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},reload:function(){this.load(!0)}}},Ph={mixins:[Nh],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+"/blueprints",this.name)},action:function(t,e){var n=this;switch(e){case"duplicate":this.$refs.duplicate.open(t.id);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){var n=!1!==t.permissions.changeStatus;return t.flag={class:"k-status-flag k-status-flag-"+t.status,tooltip:n?e.$t("page.status"):"".concat(e.$t("page.status")," (").concat(e.$t("disabled"),")"),icon:n?"circle":"protected",disabled:!n,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")}}},Dh=Ph,Mh=Object(_["a"])(Dh,Bh,qh,!1,null,null,null),Fh=Mh.exports,Uh=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:t.$t("section.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,"data-invalid":t.isInvalid},on:{sort:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,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()},zh=[],Hh={mixins:[Nh],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.$go(t.link);break;case"download":window.open(t.url);break;case"rename":this.$refs.rename.open(t.parent,t.filename);break;case"replace":this.$refs.upload.open({url:B.api+"/"+this.$api.files.url(t.parent,t.filename),accept:"."+t.extension+","+t.mime,multiple:!1});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(I["a"])(Object(I["a"])({},this.add),{},{url:B.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:B.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.options.apiUrl+"/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(I["a"])(Object(I["a"])({},this.add),{},{url:B.api+"/"+this.add.api}))},uploaded:function(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}}},Kh=Hh,Vh=Object(_["a"])(Kh,Uh,zh,!1,null,null,null),Yh=Vh.exports,Wh=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,disabled:null!==t.$store.state.content.status.lock},on:{input:t.input,submit:t.onSubmit}})],2)},Jh=[],Gh={mixins:[Rh],inheritAttrs:!1,data:function(){return{fields:{},isLoading:!0,issue:null}},computed:{language:function(){return this.$store.state.languages.current},values:function(){return this.$store.getters["content/values"]()}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{input:function(t,e,n){this.$store.dispatch("content/update",[n,t[n]])},fetch:function(){var t=this;this.$api.get(this.parent+"/sections/"+this.name).then((function(e){t.fields=e.fields,Object.keys(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)}}},Zh=Gh,Xh=(n("7d5d"),Object(_["a"])(Zh,Wh,Jh,!1,null,null,null)),Qh=Xh.exports,tm=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)},em=[],nm={grid:function(){return!(!window.CSS||!window.CSS.supports("display","grid"))},fetch:function(){return void 0!==window.fetch},all:function(){return this.fetch()&&this.grid()}},im={computed:{hasFetchSupport:function(){return nm.fetch()},hasGridSupport:function(){return nm.grid()}},created:function(){this.$store.dispatch("content/current",null),nm.all()&&this.$go("/")}},sm=im,rm=(n("d6fc"),Object(_["a"])(sm,tm,em,!1,null,null,null)),am=rm.exports,om=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)},um=[],lm={props:{plugin:String},beforeRouteEnter:function(t,e,n){n((function(t){t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("content/current",null)}))},watch:{plugin:{handler:function(){this.$store.dispatch("view",this.plugin)},immediate:!0}}},cm=lm,pm=Object(_["a"])(cm,om,um,!1,null,null,null),dm=pm.exports,fm=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)])},hm=[],mm=(n("d221"),{}),gm=Object(_["a"])(mm,fm,hm,!1,null,null,null),bm=gm.exports,vm=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)},km=[],$m={computed:{isLocked:function(){return null!==this.$store.state.content.status.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)}}},_m={mixins:[$m],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 B.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("content/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:B.api+"/"+this.$api.files.url(this.path,this.file.filename),accept:"."+this.file.extension+","+this.file.mime});break;case"remove":this.$refs.remove.open(this.path,this.file.filename);break}},deleted:function(){this.path?this.$go("/"+this.path):this.$go("/site")},renamed:function(t){this.$go(this.$api.files.link(this.path,t.filename))},uploaded:function(){this.fetch(),this.$store.dispatch("notification/success",":)")}}},ym=_m,wm=Object(_["a"])(ym,vm,km,!1,null,null,null),xm=wm.exports,Om=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()},jm=[],Sm={data:function(){return{user:{name:"",email:"",language:"",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{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:{handler:function(t){this.user.language=t},immediate:!0},"user.language":function(t){this.$store.dispatch("translation/activate",t)}},created:function(){this.$store.dispatch("content/current",null),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.$go("/")})).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.$go("/login"):t.$api.translations.options().then((function(n){t.languages=n,t.system=e,t.$store.dispatch("title",t.$t("view.installation"))}))}))}}},Cm=Sm,Em=(n("146c"),Object(_["a"])(Cm,Om,jm,!1,null,null,null)),Rm=Em.exports,Tm=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()},Im=[],Lm=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"k-login-form",on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[n("h1",{staticClass:"k-offscreen"},[t._v(t._s(t.$t("login")))]),t.issue?n("div",{staticClass:"k-login-alert",on:{click:function(e){t.issue=null}}},[n("span",[t._v(t._s(t.issue))]),n("k-icon",{attrs:{type:"alert"}})],1):t._e(),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)},Am=[],Bm={data:function(){return{isLoading:!1,issue:"",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;return Object(j["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.issue=null,t.isLoading=!0,e.prev=2,e.next=5,t.$store.dispatch("user/login",t.user);case 5:return e.next=7,t.$store.dispatch("system/load",!0);case 7:t.$store.dispatch("notification/success",t.$t("welcome")),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](2),t.issue=t.$t("error.access.login");case 13:return e.prev=13,t.isLoading=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,10,13,16]])})))()}}},qm=Bm,Nm=Object(_["a"])(qm,Lm,Am,!1,null,null,null),Pm=Nm.exports,Dm={components:{"k-login-form":window.panel.plugins.login||Pm},data:function(){return{ready:!1,issue:null}},created:function(){var t=this;this.$store.dispatch("content/current",null),this.$store.dispatch("system/load").then((function(e){e.isReady||t.$go("/installation"),e.user&&e.user.id&&t.$go("/"),t.ready=!0,t.$store.dispatch("title",t.$t("login"))})).catch((function(e){t.issue=e}))}},Mm=Dm,Fm=(n("24c1"),Object(_["a"])(Mm,Tm,Im,!1,null,null,null)),Um=Fm.exports,zm=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,tooltip:t.status.label},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)},Hm=[],Km={mixins:[$m],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("content/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")}}},Vm=Km,Ym=(n("202d"),Object(_["a"])(Vm,zm,Hm,!1,null,null,null)),Wm=Ym.exports,Jm=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)},Gm=[],Zm={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.$store.dispatch("content/current",null),this.$store.dispatch("title",this.$t("view.settings")),this.$store.dispatch("breadcrumb",[]),this.fetch()},methods:{fetch:function(){var t=this;!0===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"},image:!0,text:n.name,info:n.code,link:function(){t.$refs.update.open(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}}}},Xm=Zm,Qm=(n("9bd5"),Object(_["a"])(Xm,Jm,Gm,!1,null,null,null)),tg=Qm.exports,eg=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)},ng=[],ig={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.state.content.status.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("content/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}}}},sg=ig,rg=Object(_["a"])(sg,eg,ng,!1,null,null,null),ag=rg.exports,og=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)},ug=[],lg={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.$store.dispatch("content/current",null),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:!0};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.$go("/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.$go("/users"):this.$go("/users/role/"+t.value),this.$refs.roles.close()}}},cg=lg,pg=Object(_["a"])(cg,og,ug,!1,null,null,null),dg=pg.exports,fg=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()},hg=[],mg={mixins:[$m],props:{id:{type:[Boolean,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 B.api+"/users/"+this.user.id+"/avatar"}},watch:{"$route.name":{handler:function(t){"Account"===t&&this.$store.dispatch("breadcrumb",[])},immediate:!0},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.id&&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("title",t.user.name||t.user.email),t.$store.dispatch("content/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()}}},gg=mg,bg=(n("bd96"),Object(_["a"])(gg,fg,hg,!1,null,null,null)),vg=bg.exports;F["a"].component("k-dialog",_t),F["a"].component("k-error-dialog",St),F["a"].component("k-file-rename-dialog",Dt),F["a"].component("k-file-remove-dialog",Lt),F["a"].component("k-files-dialog",Vt),F["a"].component("k-form-dialog",Xt),F["a"].component("k-language-create-dialog",se),F["a"].component("k-language-remove-dialog",ce),F["a"].component("k-language-update-dialog",be),F["a"].component("k-page-create-dialog",we),F["a"].component("k-page-duplicate-dialog",Ee),F["a"].component("k-page-rename-dialog",Fe),F["a"].component("k-page-remove-dialog",Be),F["a"].component("k-page-status-dialog",Ye),F["a"].component("k-page-template-dialog",Qe),F["a"].component("k-page-url-dialog",an),F["a"].component("k-pages-dialog",dn),F["a"].component("k-remove-dialog",vn),F["a"].component("k-site-rename-dialog",yn),F["a"].component("k-text-dialog",Cn),F["a"].component("k-user-create-dialog",An),F["a"].component("k-user-email-dialog",Mn),F["a"].component("k-user-language-dialog",Vn),F["a"].component("k-user-password-dialog",Xn),F["a"].component("k-user-remove-dialog",si),F["a"].component("k-user-rename-dialog",ci),F["a"].component("k-user-role-dialog",gi),F["a"].component("k-users-dialog",yi),F["a"].component("k-calendar",Ai),F["a"].component("k-counter",Mi),F["a"].component("k-autocomplete",Ci),F["a"].component("k-form",Vi),F["a"].component("k-form-buttons",Qi),F["a"].component("k-form-indicator",rs),F["a"].component("k-field",ps),F["a"].component("k-fieldset",bs),F["a"].component("k-input",ws),F["a"].component("k-upload",Es),F["a"].component("k-checkbox-input",qs),F["a"].component("k-checkboxes-input",Us),F["a"].component("k-date-input",Ws),F["a"].component("k-datetime-input",tr),F["a"].component("k-email-input",cr),F["a"].component("k-multiselect-input",gr),F["a"].component("k-number-input",yr),F["a"].component("k-password-input",jr),F["a"].component("k-radio-input",Ir),F["a"].component("k-range-input",Pr),F["a"].component("k-select-input",Hr),F["a"].component("k-tags-input",Gr),F["a"].component("k-tel-input",ta),F["a"].component("k-text-input",ar),F["a"].component("k-textarea-input",aa),F["a"].component("k-time-input",da),F["a"].component("k-toggle-input",va),F["a"].component("k-url-input",ya),F["a"].component("k-checkboxes-field",Ca),F["a"].component("k-date-field",Aa),F["a"].component("k-email-field",Ma),F["a"].component("k-files-field",Ya),F["a"].component("k-gap-field",Xa),F["a"].component("k-headline-field",so),F["a"].component("k-info-field",co),F["a"].component("k-line-field",go),F["a"].component("k-multiselect-field",yo),F["a"].component("k-number-field",Co),F["a"].component("k-pages-field",Ao),F["a"].component("k-password-field",Mo),F["a"].component("k-radio-field",Vo),F["a"].component("k-range-field",Xo),F["a"].component("k-select-field",su),F["a"].component("k-structure-field",cu),F["a"].component("k-tags-field",gu),F["a"].component("k-text-field",Cu),F["a"].component("k-textarea-field",Au),F["a"].component("k-tel-field",yu),F["a"].component("k-time-field",Mu),F["a"].component("k-toggle-field",Vu),F["a"].component("k-url-field",Xu),F["a"].component("k-users-field",sl),F["a"].component("k-toolbar",pl),F["a"].component("k-toolbar-email-dialog",bl),F["a"].component("k-toolbar-link-dialog",wl),F["a"].component("k-email-field-preview",Kl),F["a"].component("k-files-field-preview",Bl),F["a"].component("k-pages-field-preview",Zl),F["a"].component("k-toggle-field-preview",ic),F["a"].component("k-url-field-preview",Fl),F["a"].component("k-users-field-preview",lc),F["a"].component("k-bar",hc),F["a"].component("k-box",$c),F["a"].component("k-card",jc),F["a"].component("k-cards",Ic),F["a"].component("k-collection",Pc),F["a"].component("k-column",Hc),F["a"].component("k-dropzone",Gc),F["a"].component("k-empty",np),F["a"].component("k-file-preview",up),F["a"].component("k-grid",hp),F["a"].component("k-header",$p),F["a"].component("k-list",jp),F["a"].component("k-list-item",Ip),F["a"].component("k-tabs",Pp),F["a"].component("k-view",Hp),F["a"].component("k-draggable",Xp),F["a"].component("k-error-boundary",nd),F["a"].component("k-headline",ud),F["a"].component("k-icon",hd),F["a"].component("k-image",$d),F["a"].component("k-progress",jd),F["a"].component("k-sort-handle",Td),F["a"].component("k-text",Nd),F["a"].component("k-button",zd),F["a"].component("k-button-disabled",Jd),F["a"].component("k-button-group",tf),F["a"].component("k-button-link",of),F["a"].component("k-button-native",hf),F["a"].component("k-dropdown",kf),F["a"].component("k-dropdown-content",jf),F["a"].component("k-dropdown-item",If),F["a"].component("k-languages-dropdown",Hf),F["a"].component("k-link",Pf),F["a"].component("k-pagination",Gf),F["a"].component("k-prev-next",nh),F["a"].component("k-search",uh),F["a"].component("k-tag",hh),F["a"].component("k-topbar",_h),F["a"].component("k-sections",Sh),F["a"].component("k-info-section",Ah),F["a"].component("k-pages-section",Fh),F["a"].component("k-files-section",Yh),F["a"].component("k-fields-section",Qh),F["a"].component("k-browser-view",am),F["a"].component("k-custom-view",dm),F["a"].component("k-error-view",bm),F["a"].component("k-file-view",xm),F["a"].component("k-installation-view",Rm),F["a"].component("k-login-view",Um),F["a"].component("k-page-view",Wm),F["a"].component("k-settings-view",tg),F["a"].component("k-site-view",ag),F["a"].component("k-users-view",dg),F["a"].component("k-user-view",vg);var kg=n("2f62"),$g=n("3835"),_g=function(t,e){localStorage.setItem("kirby$content$"+t,JSON.stringify(e))},yg={namespaced:!0,state:{current:null,models:{},status:{enabled:!0,lock:null,unlock:null}},getters:{exists:function(t){return function(e){return t.models.hasOwnProperty(e)}},hasChanges:function(t,e){return function(t){var n=e.model(t).changes;return Object.keys(n).length>0}},isCurrent:function(t){return function(e){return t.current===e}},id:function(t,e,n){return function(e){return e=e||t.current,n.languages.current?e+"/"+n.languages.current.code:e}},model:function(t,e){return function(n){return n=n||t.current,!0===e.exists(n)?t.models[n]:{api:null,originals:{},values:{},changes:{}}}},originals:function(t,e){return function(t){return it(e.model(t).originals)}},values:function(t,e){return function(t){return Object(I["a"])(Object(I["a"])({},e.originals(t)),e.changes(t))}},changes:function(t,e){return function(t){return it(e.model(t).changes)}}},mutations:{CREATE:function(t,e){var n=Object($g["a"])(e,2),i=n[0],s=n[1];if(!s)return!1;var r=t.models[i]?t.models[i].changes:s.changes;F["a"].set(t.models,i,{api:s.api,originals:s.originals,changes:r||{}})},CURRENT:function(t,e){t.current=e},LOCK:function(t,e){F["a"].set(t.status,"lock",e)},MOVE:function(t,e){var n=Object($g["a"])(e,2),i=n[0],s=n[1],r=it(t.models[i]);F["a"].delete(t.models,i),F["a"].set(t.models,s,r);var a=localStorage.getItem("kirby$content$"+i);localStorage.removeItem("kirby$content$"+i),localStorage.setItem("kirby$content$"+s,a)},REMOVE:function(t,e){F["a"].delete(t.models,e),localStorage.removeItem("kirby$content$"+e)},REVERT:function(t,e){t.models[e]&&(F["a"].set(t.models[e],"changes",{}),localStorage.removeItem("kirby$content$"+e))},STATUS:function(t,e){F["a"].set(t.status,"enabled",e)},UNLOCK:function(t,e){e&&F["a"].set(t.models[t.current],"changes",{}),F["a"].set(t.status,"unlock",e)},UPDATE:function(t,e){var n=Object($g["a"])(e,3),i=n[0],s=n[1],r=n[2];if(!t.models[i])return!1;r=it(r);var a=JSON.stringify(r),o=JSON.stringify(t.models[i].originals[s]);o===a?F["a"].delete(t.models[i].changes,s):F["a"].set(t.models[i].changes,s,r),_g(i,{api:t.models[i].api,originals:t.models[i].originals,changes:t.models[i].changes})}},actions:{init:function(t){Object.keys(localStorage).filter((function(t){return t.startsWith("kirby$content$")})).map((function(t){return t.split("kirby$content$")[1]})).forEach((function(e){var n=localStorage.getItem("kirby$content$"+e);t.commit("CREATE",[e,JSON.parse(n)])})),Object.keys(localStorage).filter((function(t){return t.startsWith("kirby$form$")})).map((function(t){return t.split("kirby$form$")[1]})).forEach((function(e){var n=localStorage.getItem("kirby$form$"+e),i=null;try{i=JSON.parse(n)}catch(r){}if(!i||!i.api)return localStorage.removeItem("kirby$form$"+e),!1;var s={api:i.api,originals:i.originals,changes:i.values};t.commit("CREATE",[e,s]),_g(e,s),localStorage.removeItem("kirby$form$"+e)}))},create:function(t,e){e.id=t.getters.id(e.id),(e.id.startsWith("pages/")||e.id.startsWith("site"))&&delete e.content.title;var n={api:e.api,originals:it(e.content),changes:{}};F["a"].$api.get(e.api+"/unlock").then((function(n){!0===n.supported&&!0===n.unlocked&&t.commit("UNLOCK",t.state.models[e.id].changes)})).catch((function(){})),t.commit("CREATE",[e.id,n]),t.dispatch("current",e.id)},current:function(t,e){t.commit("CURRENT",e)},disable:function(t){t.commit("STATUS",!1)},enable:function(t){t.commit("STATUS",!0)},lock:function(t,e){t.commit("LOCK",e)},move:function(t,e){var n=Object($g["a"])(e,2),i=n[0],s=n[1];i=t.getters.id(i),s=t.getters.id(s),t.commit("MOVE",[i,s])},remove:function(t,e){t.commit("REMOVE",e),t.getters.isCurrent(e)&&t.commit("CURRENT",null)},revert:function(t,e){e=e||t.state.current,t.commit("REVERT",e)},save:function(t,e){if(e=e||t.state.current,t.getters.isCurrent(e)&&!1===t.state.status.enabled)return!1;t.dispatch("disable");var n=t.getters.model(e),i=Object(I["a"])(Object(I["a"])({},n.originals),n.changes);return F["a"].$api.patch(n.api,i).then((function(){t.commit("CREATE",[e,Object(I["a"])(Object(I["a"])({},n),{},{originals:i})]),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($g["a"])(e,3),i=n[0],s=n[1],r=n[2];r=r||t.state.current,t.commit("UPDATE",[r,i,s])}}},wg={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&&F["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")},clear:function(t){t.commit("CLEAR")},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))}}},xg={namespaced:!0,state:{all:[],current:null,default:null},mutations:{SET_ALL:function(t,e){t.all=e.map((function(t){return{code:t.code,default:t.default,direction:t.direction,locale:t.locale,name:t.name,rules:t.rules,url:t.url}}))},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 Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,F["a"].$api.languages.list();case 2:n=e.sent,t.dispatch("install",n.data);case 4:case"end":return e.stop()}}),e)})))()}}},Og={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(I["a"])({type:"success",timeout:4e3},e))},error:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(I["a"])({type:"error"},e))}}},jg={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:{load:function(t,e){return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e||!t.state.info.isReady||!t.rootState.user.current){n.next=2;break}return n.abrupt("return",new Promise((function(e){e(t.state.info)})));case 2:return n.prev=2,n.next=5,F["a"].$api.system.get();case 5:return i=n.sent,t.commit("SET_INFO",Object(I["a"])({isReady:i.isInstalled&&i.isOk},i)),i.languages&&t.dispatch("languages/install",i.languages,{root:!0}),t.dispatch("translation/install",i.translation,{root:!0}),t.dispatch("translation/activate",i.translation.id,{root:!0}),i.user&&t.dispatch("user/current",i.user,{root:!0}),n.abrupt("return",t.state.info);case 14:n.prev=14,n.t0=n["catch"](2),t.commit("SET_INFO",{isBroken:!0,error:n.t0.message});case 17:case"end":return n.stop()}}),n,null,[[2,14]])})))()},register:function(t,e){t.commit("SET_LICENSE",e)},title:function(t,e){t.commit("SET_TITLE",e)}}},Sg={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 F["a"].$api.translations.get(e)},install:function(t,e){t.commit("INSTALL",e),F["a"].i18n.add(e.id,e.data)},activate:function(t,e){return Object(j["a"])(regeneratorRuntime.mark((function n(){var i,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.state.installed[e],i){n.next=8;break}return n.next=4,t.dispatch("load",e);case 4:return s=n.sent,t.dispatch("install",s),t.dispatch("activate",e),n.abrupt("return");case 8:F["a"].i18n.set(e),t.commit("SET_CURRENT",e),document.dir=i.direction,document.documentElement.lang=e;case 12:case"end":return n.stop()}}),n)})))()}}},Cg=n("8c4f"),Eg=function(t,e,n){Ag.dispatch("system/load").then((function(){var e=Ag.state.user.current;if(!e)return Ag.dispatch("user/visit",t.path),Ag.dispatch("user/logout"),!1;var i=e.permissions.access;return!1===i.panel?(window.location.href=B.site,!1):!1===i[t.meta.view]?(Ag.dispatch("notification/error",{message:F["a"].i18n.translate("error.access.view")}),n(!1===i.site?"/account":"/")):void n()}))},Rg=[{path:"/",name:"Home",redirect:"/site"},{path:"/browser",name:"Browser",component:F["a"].component("k-browser-view"),meta:{outside:!0}},{path:"/login",component:F["a"].component("k-login-view"),meta:{outside:!0}},{path:"/logout",beforeEnter:function(){Object.keys(localStorage).forEach((function(t){t.startsWith("kirby$content$")&&localStorage.removeItem(t)})),Ag.dispatch("user/logout")},meta:{outside:!0}},{path:"/installation",component:F["a"].component("k-installation-view"),meta:{outside:!0}},{path:"/site",name:"Site",meta:{view:"site"},component:F["a"].component("k-site-view"),beforeEnter:Eg},{path:"/site/files/:filename",name:"SiteFile",meta:{view:"site"},component:F["a"].component("k-file-view"),beforeEnter:Eg,props:function(t){return{path:"site",filename:t.params.filename}}},{path:"/pages/:path/files/:filename",name:"PageFile",meta:{view:"site"},component:F["a"].component("k-file-view"),beforeEnter:Eg,props:function(t){return{path:"pages/"+t.params.path,filename:t.params.filename}}},{path:"/users/:path/files/:filename",name:"UserFile",meta:{view:"users"},component:F["a"].component("k-file-view"),beforeEnter:Eg,props:function(t){return{path:"users/"+t.params.path,filename:t.params.filename}}},{path:"/pages/:path",name:"Page",meta:{view:"site"},component:F["a"].component("k-page-view"),beforeEnter:Eg,props:function(t){return{path:t.params.path}}},{path:"/settings",name:"Settings",meta:{view:"settings"},component:F["a"].component("k-settings-view"),beforeEnter:Eg},{path:"/users/role/:role",name:"UsersByRole",meta:{view:"users"},component:F["a"].component("k-users-view"),beforeEnter:Eg,props:function(t){return{role:t.params.role}}},{path:"/users",name:"Users",meta:{view:"users"},beforeEnter:Eg,component:F["a"].component("k-users-view")},{path:"/users/:id",name:"User",meta:{view:"users"},component:F["a"].component("k-user-view"),beforeEnter:Eg,props:function(t){return{id:t.params.id}}},{path:"/account",name:"Account",meta:{view:"account"},component:F["a"].component("k-user-view"),beforeEnter:Eg,props:function(){return{id:!!Ag.state.user.current&&Ag.state.user.current.id}}},{path:"/plugins/:id",name:"Plugin",meta:{view:"plugin"},props:function(t){return{plugin:t.params.id}},beforeEnter:Eg,component:F["a"].component("k-custom-view")},{path:"*",name:"NotFound",beforeEnter:function(t,e,n){n("/")}}];F["a"].use(Cg["a"]);var Tg=new Cg["a"]({mode:"history",routes:Rg,url:"/"===B.url?"":B.url});Tg.beforeEach((function(t,e,n){"Browser"!==t.name&&!1===nm.all()&&n("/browser"),t.meta.outside||Ag.dispatch("user/visit",t.path),Ag.dispatch("view",t.meta.view),Ag.dispatch("content/lock",null),Ag.dispatch("content/unlock",null),Ag.dispatch("heartbeat/clear"),n()}));var Ig=Tg,Lg={namespaced:!0,state:{current:null,path:null},mutations:{SET_CURRENT:function(t,e){t.current=e,e&&e.permissions?(F["a"].prototype.$user=e,F["a"].prototype.$permissions=e.permissions):(F["a"].prototype.$user=null,F["a"].prototype.$permissions=null)},SET_PATH:function(t,e){t.path=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},email:function(t,e){t.commit("SET_CURRENT",Object(I["a"])(Object(I["a"])({},t.state.current),{},{email:e}))},language:function(t,e){t.dispatch("translation/activate",e,{root:!0}),t.commit("SET_CURRENT",Object(I["a"])(Object(I["a"])({},t.state.current),{},{language:e}))},load:function(t){return Object(j["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,F["a"].$api.auth.user();case 2:return n=e.sent,t.commit("SET_CURRENT",n),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))()},login:function(t,e){return Object(j["a"])(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,F["a"].$api.auth.login(e);case 2:return i=n.sent,t.commit("SET_CURRENT",i),t.dispatch("translation/activate",i.language,{root:!0}),Ig.push(t.state.path||"/"),n.abrupt("return",i);case 7:case"end":return n.stop()}}),n)})))()},logout:function(t,e){return Object(j["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.commit("SET_CURRENT",null),!e){n.next=4;break}return window.location.href=(window.panel.url||"")+"/login",n.abrupt("return");case 4:return n.prev=4,n.next=7,F["a"].$api.auth.logout();case 7:return n.prev=7,Ig.push("/login"),n.finish(7);case 10:case"end":return n.stop()}}),n,null,[[4,,7,10]])})))()},name:function(t,e){t.commit("SET_CURRENT",Object(I["a"])(Object(I["a"])({},t.state.current),{},{name:e}))},visit:function(t,e){t.commit("SET_PATH",e)}}};F["a"].use(kg["a"]);var Ag=new kg["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){var n;n=t.state.user.current?F["a"].$api.site.get(["title"]):new Promise((function(e){e(t.state.system.info)})),n.then((function(n){t.commit("SET_TITLE",e),t.dispatch("system/title",n.title),document.title=e||"",document.title+=null!==e?" | "+n.title:n.title}))},view:function(t,e){t.commit("SET_VIEW",e)}},modules:{content:yg,heartbeat:wg,languages:xg,notification:Og,system:jg,translation:Sg,user:Lg}});F["a"].config.errorHandler=function(t){B.debug&&window.console.error(t),Ag.dispatch("notification/error",{message:t.message||"An error occurred. Please reload the Panel."})},window.panel=window.panel||{},window.panel.error=function(t,e){B.debug&&window.console.error(t+": "+e),Ag.dispatch("error",t+". See the console for more information.")};var Bg=n("f2f3");F["a"].use(Bg["a"].plugin,Ag);var qg=n("19e9"),Ng=n.n(qg),Pg=n("5a0c"),Dg=n.n(Pg),Mg=n("f906"),Fg=n.n(Mg);Dg.a.extend(Fg.a),F["a"].prototype.$library={autosize:Ng.a,dayjs:Dg.a};n("4fad");var Ug={};for(var zg in F["a"].options.components)Ug[zg]=F["a"].options.components[zg];var Hg=function(t,e){e.template||e.render||e.extends?(e.extends&&"string"===typeof e.extends&&(e.extends=Ug[e.extends],e.template&&(e.render=null)),e.mixins&&(e.mixins=e.mixins.map((function(t){return"string"===typeof t?Ug[t]:t}))),Ug[t]&&window.console.warn('Plugin is replacing "'.concat(t,'"')),F["a"].component(t,e)):Ag.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.'))};Object.entries(window.panel.plugins.components).forEach((function(t){var e=Object($g["a"])(t,2),n=e[0],i=e[1];Hg(n,i)})),Object.entries(window.panel.plugins.fields).forEach((function(t){var e=Object($g["a"])(t,2),n=e[0],i=e[1];Hg(n,i)})),Object.entries(window.panel.plugins.sections).forEach((function(t){var e=Object($g["a"])(t,2),n=e[0],i=e[1];Hg(n,Object(I["a"])(Object(I["a"])({},i),{},{mixins:[Rh].concat(i.mixins||[])}))})),Object.entries(window.panel.plugins.views).forEach((function(t){var e=Object($g["a"])(t,2),n=e[0],i=e[1];if(!i.component)return Ag.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},F["a"].component("k-"+n+"-plugin-view",i.component)})),window.panel.plugins.use.forEach((function(t){F["a"].use(t)})),F["a"].config.productionTip=!1,F["a"].config.devtools=!0,F["a"].use(ft),F["a"].use(tt),F["a"].use(Q),F["a"].use(nt.a),F["a"].use(X,Ag),F["a"].prototype.$go=function(t){Ig.push(t).catch((function(t){if(t&&t.name&&"NavigationDuplicated"===t.name)return!0;throw t}))},new F["a"]({router:Ig,store:Ag,created:function(){var t=this;window.panel.app=this,window.panel.plugins.created.forEach((function(e){e(t)})),this.$store.dispatch("content/init")},render:function(t){return t(D)}}).$mount("#app")},"56d9":function(t,e,n){},"56ee":function(t,e,n){},"580a":function(t,e,n){"use strict";var i=n("df34"),s=n.n(i);s.a},5933:function(t,e,n){},"5aee":function(t,e,n){"use strict";var i=n("3523"),s=n.n(i);s.a},"5b23":function(t,e,n){"use strict";var i=n("b055"),s=n.n(i);s.a},"5c0b":function(t,e,n){"use strict";var i=n("64b0"),s=n.n(i);s.a},"5c8f":function(t,e,n){},"5d33":function(t,e,n){"use strict";var i=n("5e4b"),s=n.n(i);s.a},"5e4b":function(t,e,n){},6018:function(t,e,n){"use strict";var i=n("517f"),s=n.n(i);s.a},6233:function(t,e,n){},"64b0":function(t,e,n){},"64e4":function(t,e,n){"use strict";var i=n("d735"),s=n.n(i);s.a},6695:function(t,e,n){},"696b":function(t,e,n){"use strict";var i=n("af28"),s=n.n(i);s.a},"6a18":function(t,e,n){"use strict";var i=n("8e2b"),s=n.n(i);s.a},"6ab3":function(t,e,n){"use strict";var i=n("1aa8"),s=n.n(i);s.a},"6bcd":function(t,e,n){"use strict";var i=n("f99d"),s=n.n(i);s.a},"6f7b":function(t,e,n){"use strict";var i=n("7435"),s=n.n(i);s.a},"6fff":function(t,e,n){},"718c":function(t,e,n){"use strict";var i=n("ea6b"),s=n.n(i);s.a},"73f5":function(t,e,n){},7435:function(t,e,n){},7568:function(t,e,n){"use strict";var i=n("6695"),s=n.n(i);s.a},"756d":function(t,e,n){},7737:function(t,e,n){"use strict";var i=n("c366"),s=n.n(i);s.a},"7a7d":function(t,e,n){"use strict";var i=n("cbef"),s=n.n(i);s.a},"7d5d":function(t,e,n){"use strict";var i=n("3afb"),s=n.n(i);s.a},"7dc7":function(t,e,n){"use strict";var i=n("fa59"),s=n.n(i);s.a},"7e85":function(t,e,n){"use strict";var i=n("a925"),s=n.n(i);s.a},"7f6e":function(t,e,n){"use strict";var i=n("0f7a"),s=n.n(i);s.a},8370:function(t,e,n){},"862b":function(t,e,n){"use strict";var i=n("db66"),s=n.n(i);s.a},"863d":function(t,e,n){},"893d":function(t,e,n){"use strict";var i=n("56ee"),s=n.n(i);s.a},"8b71":function(t,e,n){},"8c28":function(t,e,n){"use strict";var i=n("6fff"),s=n.n(i);s.a},"8e2b":function(t,e,n){},9143:function(t,e,n){},"977f":function(t,e,n){"use strict";var i=n("c19c"),s=n.n(i);s.a},9799:function(t,e,n){"use strict";var i=n("f0c3"),s=n.n(i);s.a},"98a1":function(t,e,n){"use strict";var i=n("4c4a"),s=n.n(i);s.a},"9b86":function(t,e,n){},"9bd5":function(t,e,n){"use strict";var i=n("6233"),s=n.n(i);s.a},"9c45":function(t,e,n){},"9c80":function(t,e,n){},"9cce":function(t,e,n){},"9e1f":function(t,e,n){},"9e26":function(t,e,n){"use strict";var i=n("a101"),s=n.n(i);s.a},a101:function(t,e,n){},a134:function(t,e,n){"use strict";var i=n("bed0"),s=n.n(i);s.a},a14d:function(t,e,n){},a17f:function(t,e,n){},a567:function(t,e,n){"use strict";var i=n("34ba"),s=n.n(i);s.a},a5f3:function(t,e,n){"use strict";var i=n("f1ff"),s=n.n(i);s.a},a66d:function(t,e,n){"use strict";var i=n("2dc9"),s=n.n(i);s.a},a803:function(t,e,n){},a925:function(t,e,n){},abde:function(t,e,n){},ac27:function(t,e,n){"use strict";var i=n("f1ce"),s=n.n(i);s.a},af28:function(t,e,n){},b055:function(t,e,n){},b0af:function(t,e,n){},b0d6:function(t,e,n){"use strict";var i=n("3341"),s=n.n(i);s.a},b5d2:function(t,e,n){"use strict";var i=n("0656"),s=n.n(i);s.a},b746:function(t,e,n){"use strict";var i=n("5933"),s=n.n(i);s.a},b822:function(t,e,n){},b9d6:function(t,e,n){},ba8f:function(t,e,n){"use strict";var i=n("c235"),s=n.n(i);s.a},bb41:function(t,e,n){"use strict";var i=n("de06"),s=n.n(i);s.a},bbcc:function(t,e,n){},bd96:function(t,e,n){"use strict";var i=n("b0af"),s=n.n(i);s.a},bed0:function(t,e,n){},bf53:function(t,e,n){"use strict";var i=n("eb2d"),s=n.n(i);s.a},c119:function(t,e,n){"use strict";var i=n("315e"),s=n.n(i);s.a},c19c:function(t,e,n){},c235:function(t,e,n){},c366:function(t,e,n){},c429:function(t,e,n){},c4fb:function(t,e,n){},c7c8:function(t,e,n){"use strict";var i=n("abde"),s=n.n(i);s.a},c857:function(t,e,n){"use strict";var i=n("c4fb"),s=n.n(i);s.a},c9cb:function(t,e,n){"use strict";var i=n("bbcc"),s=n.n(i);s.a},cb8f:function(t,e,n){"use strict";var i=n("9b86"),s=n.n(i);s.a},cbef:function(t,e,n){},cc79:function(t,e,n){"use strict";var i=n("a14d"),s=n.n(i);s.a},cca8:function(t,e,n){"use strict";var i=n("15da"),s=n.n(i);s.a},d07b:function(t,e,n){},d0c1:function(t,e,n){"use strict";var i=n("56d9"),s=n.n(i);s.a},d221:function(t,e,n){"use strict";var i=n("8b71"),s=n.n(i);s.a},d2d1:function(t,e,n){},d343:function(t,e,n){},d34c:function(t,e,n){},d559:function(t,e,n){},d6fc:function(t,e,n){"use strict";var i=n("5c8f"),s=n.n(i);s.a},d735:function(t,e,n){},daa8:function(t,e,n){"use strict";var i=n("337f"),s=n.n(i);s.a},db66:function(t,e,n){},ddfd:function(t,e,n){"use strict";var i=n("b822"),s=n.n(i);s.a},de06:function(t,e,n){},df0d:function(t,e,n){"use strict";var i=n("9c80"),s=n.n(i);s.a},df34:function(t,e,n){},df71:function(t,e,n){},ea2e:function(t,e,n){},ea6b:function(t,e,n){},eb2d:function(t,e,n){},ee15:function(t,e,n){"use strict";var i=n("53cc"),s=n.n(i);s.a},f0c3:function(t,e,n){},f1ce:function(t,e,n){},f1ff:function(t,e,n){},f2c9:function(t,e,n){},f355:function(t,e,n){},f56d:function(t,e,n){"use strict";var i=n("9143"),s=n.n(i);s.a},f8a7:function(t,e,n){"use strict";var i=n("f2c9"),s=n.n(i);s.a},f95f:function(t,e,n){"use strict";var i=n("a803"),s=n.n(i);s.a},f99d:function(t,e,n){},fa59:function(t,e,n){},fa6a:function(t,e,n){"use strict";var i=n("ea2e"),s=n.n(i);s.a},fb36:function(t,e,n){},fc0f:function(t,e,n){"use strict";var i=n("c429"),s=n.n(i);s.a}}); \ No newline at end of file diff --git a/kirby/src/Api/Api.php b/kirby/src/Api/Api.php index 774772d..831ee52 100755 --- a/kirby/src/Api/Api.php +++ b/kirby/src/Api/Api.php @@ -32,7 +32,7 @@ class Api /** * Authentication callback * - * @var Closure + * @var \Closure */ protected $authentication; @@ -67,14 +67,14 @@ class Api /** * The current route * - * @var Route + * @var \Kirby\Http\Route */ protected $route; /** * The Router instance * - * @var Router + * @var \Kirby\Http\Router */ protected $router; @@ -107,6 +107,7 @@ class Api * @param string $method * @param array $args * @return mixed + * @throws \Kirby\Exception\NotFoundException */ public function __call(string $method, array $args = []) { @@ -141,7 +142,7 @@ class Api /** * Returns the authentication callback * - * @return Closure|null + * @return \Closure|null */ public function authentication() { @@ -152,10 +153,12 @@ class Api * Execute an API call for the given path, * request method and optional request data * - * @param string $path + * @param string|null $path * @param string $method * @param array $requestData * @return mixed + * @throws \Kirby\Exception\NotFoundException + * @throws \Exception */ public function call(string $path = null, string $method = 'GET', array $requestData = []) { @@ -209,7 +212,10 @@ class Api // restore old pagination validation mode Pagination::$validate = $validate; - if (is_object($output) === true && is_a($output, 'Kirby\\Http\\Response') !== true) { + if ( + is_object($output) === true && + is_a($output, 'Kirby\\Http\\Response') !== true + ) { return $this->resolve($output)->toResponse(); } @@ -222,8 +228,8 @@ class Api * @param string $name * @param array|null $collection * @return \Kirby\Api\Collection - * * @throws \Kirby\Exception\NotFoundException If no collection for `$name` exists + * @throws \Exception */ public function collection(string $name, $collection = null) { @@ -314,7 +320,7 @@ class Api /** * Returns an API model instance by name * - * @param string $name + * @param string|null $name * @param mixed $object * @return \Kirby\Api\Model * @@ -351,8 +357,8 @@ class Api * Can either get all the data * or certain parts of it. * - * @param string $type - * @param string $key + * @param string|null $type + * @param string|null $key * @param mixed $default * @return mixed */ @@ -375,7 +381,7 @@ class Api /** * Returns the request body if available * - * @param string $key + * @param string|null $key * @param mixed $default * @return mixed */ @@ -387,7 +393,7 @@ class Api /** * Returns the files from the request if available * - * @param string $key + * @param string|null $key * @param mixed $default * @return mixed */ @@ -399,7 +405,7 @@ class Api /** * Returns all headers from the request if available * - * @param string $key + * @param string|null $key * @param mixed $default * @return mixed */ @@ -421,7 +427,7 @@ class Api /** * Returns the request query if available * - * @param string $key + * @param string|null $key * @param mixed $default * @return mixed */ @@ -469,7 +475,7 @@ class Api /** * Setter for the authentication callback * - * @param Closure $authentication + * @param \Closure|null $authentication * @return self */ protected function setAuthentication(Closure $authentication = null) @@ -481,7 +487,7 @@ class Api /** * Setter for the collections definition * - * @param array $collections + * @param array|null $collections * @return self */ protected function setCollections(array $collections = null) @@ -495,7 +501,7 @@ class Api /** * Setter for the injected data * - * @param array $data + * @param array|null $data * @return self */ protected function setData(array $data = null) @@ -519,7 +525,7 @@ class Api /** * Setter for the model definitions * - * @param array $models + * @param array|null $models * @return self */ protected function setModels(array $models = null) @@ -534,7 +540,7 @@ class Api /** * Setter for the request data * - * @param array $requestData + * @param array|null $requestData * @return self */ protected function setRequestData(array $requestData = null) @@ -552,7 +558,7 @@ class Api /** * Setter for the request method * - * @param string $requestMethod + * @param string|null $requestMethod * @return self */ protected function setRequestMethod(string $requestMethod = null) @@ -564,7 +570,7 @@ class Api /** * Setter for the route definitions * - * @param array $routes + * @param array|null $routes * @return self */ protected function setRoutes(array $routes = null) @@ -668,10 +674,10 @@ class Api * an exception. Kirby exceptions will * have more information * - * @param Exception $e + * @param \Throwable $e * @return array */ - public function responseForException($e): array + public function responseForException(Throwable $e): array { // prepare the result array for all exception types $result = [ @@ -710,14 +716,17 @@ class Api /** * Upload helper method * - * @param Closure $callback + * move_uploaded_file() not working with unit test + * Added debug parameter for testing purposes as we did in the Email class + * + * @param \Closure $callback * @param bool $single + * @param bool $debug * @return array * - * @throws \Exception If request has no files - * @throws \Exception If there was an error with the upload + * @throws \Exception If request has no files or there was an error with the upload */ - public function upload(Closure $callback, $single = false): array + public function upload(Closure $callback, $single = false, $debug = false): array { $trials = 0; $uploads = []; @@ -776,7 +785,7 @@ class Api // move the file to a location including the extension, // for better mime detection - if (move_uploaded_file($upload['tmp_name'], $source) === false) { + if ($debug === false && move_uploaded_file($upload['tmp_name'], $source) === false) { throw new Exception(t('upload.error.cantMove')); } diff --git a/kirby/src/Api/Collection.php b/kirby/src/Api/Collection.php index 1de5d8e..ba5cb4a 100755 --- a/kirby/src/Api/Collection.php +++ b/kirby/src/Api/Collection.php @@ -19,12 +19,39 @@ use Kirby\Toolkit\Str; */ class Collection { + /** + * @var \Kirby\Api\Api + */ protected $api; + + /** + * @var mixed|null + */ protected $data; + + /** + * @var mixed|null + */ protected $model; + + /** + * @var mixed|null + */ protected $select; + + /** + * @var mixed|null + */ protected $view; + /** + * Collection constructor + * + * @param \Kirby\Api\Api $api + * @param mixed|null $data + * @param array $schema + * @throws \Exception + */ public function __construct(Api $api, $data = null, array $schema) { $this->api = $api; @@ -48,6 +75,11 @@ class Collection } } + /** + * @param string|array|null $keys + * @return self + * @throws \Exception + */ public function select($keys = null) { if ($keys === false) { @@ -66,6 +98,11 @@ class Collection return $this; } + /** + * @return array + * @throws \Kirby\Exception\NotFoundException + * @throws \Exception + */ public function toArray(): array { $result = []; @@ -87,6 +124,11 @@ class Collection return $result; } + /** + * @return array + * @throws \Kirby\Exception\NotFoundException + * @throws \Exception + */ public function toResponse(): array { if ($query = $this->api->requestQuery('query')) { @@ -124,6 +166,10 @@ class Collection ]; } + /** + * @param string $view + * @return self + */ public function view(string $view) { $this->view = $view; diff --git a/kirby/src/Api/Model.php b/kirby/src/Api/Model.php index 558da5e..23012bb 100755 --- a/kirby/src/Api/Model.php +++ b/kirby/src/Api/Model.php @@ -3,13 +3,12 @@ namespace Kirby\Api; use Exception; - use Kirby\Toolkit\Str; /** * The API Model class can be wrapped around any * kind of object. Each model defines a set of properties that - * are availabel in REST calls. Those properties are defined as + * are available in REST calls. Those properties are defined as * simple Closures which are resolved on demand. This is inspired * by GraphQLs architecture and makes it possible to load * only the model data that is needed for the current API call. @@ -22,12 +21,39 @@ use Kirby\Toolkit\Str; */ class Model { + /** + * @var \Kirby\Api\Api + */ protected $api; + + /** + * @var mixed|null + */ protected $data; + + /** + * @var array|mixed + */ protected $fields; + + /** + * @var mixed|null + */ protected $select; + + /** + * @var array|mixed + */ protected $views; + /** + * Model constructor + * + * @param \Kirby\Api\Api $api + * @param null $data + * @param array $schema + * @throws \Exception + */ public function __construct(Api $api, $data = null, array $schema) { $this->api = $api; @@ -56,6 +82,11 @@ class Model } } + /** + * @param null $keys + * @return self + * @throws \Exception + */ public function select($keys = null) { if ($keys === false) { @@ -74,6 +105,10 @@ class Model return $this; } + /** + * @return array + * @throws \Exception + */ public function selection(): array { $select = $this->select; @@ -117,6 +152,11 @@ class Model return $selection; } + /** + * @return array + * @throws \Kirby\Exception\NotFoundException + * @throws \Exception + */ public function toArray(): array { $select = $this->selection(); @@ -158,6 +198,11 @@ class Model return $result; } + /** + * @return array + * @throws \Kirby\Exception\NotFoundException + * @throws \Exception + */ public function toResponse(): array { $model = $this; @@ -178,6 +223,11 @@ class Model ]; } + /** + * @param string $name + * @return self + * @throws \Exception + */ public function view(string $name) { if ($name === 'any') { diff --git a/kirby/src/Cms/Api.php b/kirby/src/Cms/Api.php index bcc2a34..df1e58f 100755 --- a/kirby/src/Cms/Api.php +++ b/kirby/src/Cms/Api.php @@ -27,7 +27,7 @@ class Api extends BaseApi * Execute an API call for the given path, * request method and optional request data * - * @param string $path + * @param string|null $path * @param string $method * @param array $requestData * @return mixed @@ -50,8 +50,9 @@ class Api extends BaseApi /** * @param mixed $model * @param string $name - * @param string $path + * @param string|null $path * @return mixed + * @throws \Kirby\Exception\NotFoundException if the field type cannot be found or the field cannot be loaded */ public function fieldApi($model, string $name, string $path = null) { @@ -73,8 +74,9 @@ class Api extends BaseApi } } + // it can get this error only if $name is an empty string as $name = '' if ($field === null) { - throw new NotFoundException('The field "' . $fieldNames . '" could not be found'); + throw new NotFoundException('No field could be loaded'); } $fieldApi = $this->clone([ @@ -89,9 +91,10 @@ class Api extends BaseApi * Returns the file object for the given * parent path and filename * - * @param string $path Path to file's parent model + * @param string|null $path Path to file's parent model * @param string $filename Filename * @return \Kirby\Cms\File|null + * @throws \Kirby\Exception\NotFoundException if the file cannot be found */ public function file(string $path = null, string $filename) { @@ -115,6 +118,8 @@ class Api extends BaseApi * * @param string $path Path to parent model * @return \Kirby\Cms\Model|null + * @throws \Kirby\Exception\InvalidArgumentException if the model type is invalid + * @throws \Kirby\Exception\NotFoundException if the model cannot be found */ public function parent(string $path) { @@ -151,7 +156,7 @@ class Api extends BaseApi $model = $kirby->user(basename($path)); break; default: - throw new InvalidArgumentException('Invalid file model type: ' . $modelType); + throw new InvalidArgumentException('Invalid model type: ' . $modelType); } if ($model) { @@ -188,6 +193,7 @@ class Api extends BaseApi * * @param string $id Page's id * @return \Kirby\Cms\Page|null + * @throws \Kirby\Exception\NotFoundException if the page cannot be found */ public function page(string $id) { @@ -206,6 +212,12 @@ class Api extends BaseApi ]); } + /** + * Returns the current Session instance + * + * @param array $options Additional options, see the session component + * @return \Kirby\Session\Session + */ public function session(array $options = []) { return $this->kirby->session(array_merge([ @@ -214,7 +226,10 @@ class Api extends BaseApi } /** + * Setter for the parent Kirby instance + * * @param \Kirby\Cms\App $kirby + * @return self */ protected function setKirby(App $kirby) { @@ -237,8 +252,9 @@ class Api extends BaseApi * returns the current authenticated user if no * id is passed * - * @param string $id User's id + * @param string|null $id User's id * @return \Kirby\Cms\User|null + * @throws \Kirby\Exception\NotFoundException if the user for the given id cannot be found */ public function user(string $id = null) { diff --git a/kirby/src/Cms/App.php b/kirby/src/Cms/App.php index 98318a2..76063d2 100755 --- a/kirby/src/Cms/App.php +++ b/kirby/src/Cms/App.php @@ -256,7 +256,7 @@ class App /** * Sets the directory structure * - * @param array $roots + * @param array|null $roots * @return self */ protected function bakeRoots(array $roots = null) @@ -269,7 +269,7 @@ class App /** * Sets the Url structure * - * @param array $urls + * @param array|null $urls * @return self */ protected function bakeUrls(array $urls = null) @@ -314,8 +314,8 @@ class App /** * Calls any Kirby route * - * @param string $path - * @param string $method + * @param string|null $path + * @param string|null $method * @return mixed */ public function call(string $path = null, string $method = null) @@ -504,7 +504,7 @@ class App } /** - * Detect the prefered language from the visitor object + * Detect the preferred language from the visitor object * * @return \Kirby\Cms\Language */ @@ -586,7 +586,7 @@ class App /** * Returns the current App instance * - * @param \Kirby\Cms\App $instance + * @param \Kirby\Cms\App|null $instance * @param bool $lazy If `true`, the instance is only returned if already existing * @return self|null */ @@ -699,7 +699,7 @@ class App * * @internal * @param string $type - * @param string $value + * @param string|null $value * @param array $attr * @param array $data * @return string @@ -717,7 +717,7 @@ class App * KirbyTags Parser * * @internal - * @param string $text + * @param string|null $text * @param array $data * @return string */ @@ -734,7 +734,7 @@ class App * Parses KirbyTags first and Markdown afterwards * * @internal - * @param string $text + * @param string|null $text * @param array $data * @param bool $inline * @return string @@ -825,7 +825,7 @@ class App * Parses Markdown * * @internal - * @param string $text + * @param string|null $text * @param bool $inline * @return string */ @@ -945,8 +945,12 @@ class App $this->site = null; } - if (isset($options['slugs']) === true) { - $this->i18n(); + // checks custom language definition for slugs + if ($slugsOption = $this->option('slugs')) { + // slugs option must be set to string or "slugs" => ["language" => "de"] as array + if (is_string($slugsOption) === true || isset($slugsOption['language']) === true) { + $this->i18n(); + } } } @@ -956,7 +960,7 @@ class App /** * Returns any page from the content folder * - * @param string $id|null + * @param string|null $id * @param \Kirby\Cms\Page|\Kirby\Cms\Site|null $parent * @param bool $drafts * @return \Kirby\Cms\Page|null @@ -1028,9 +1032,10 @@ class App * Path resolver for the router * * @internal - * @param string $path + * @param string|null $path * @param string|null $language * @return mixed + * @throws \Kirby\Exception\NotFoundException if the home page cannot be found */ public function resolve(string $path = null, string $language = null) { @@ -1211,7 +1216,7 @@ class App /** * Create your own set of languages * - * @param array $languages + * @param array|null $languages * @return self */ protected function setLanguages(array $languages = null) @@ -1233,7 +1238,7 @@ class App * Sets the request path that is * used for the router * - * @param string $path + * @param string|null $path * @return self */ protected function setPath(string $path = null) @@ -1245,7 +1250,7 @@ class App /** * Sets the request * - * @param array $request + * @param array|null $request * @return self */ protected function setRequest(array $request = null) @@ -1260,7 +1265,7 @@ class App /** * Create your own set of roles * - * @param array $roles + * @param array|null $roles * @return self */ protected function setRoles(array $roles = null) @@ -1277,7 +1282,7 @@ class App /** * Sets a custom Site object * - * @param \Kirby\Cms\Site|array $site + * @param \Kirby\Cms\Site|array|null $site * @return self */ protected function setSite($site = null) @@ -1321,7 +1326,7 @@ class App * Applies the smartypants rule on the text * * @internal - * @param string $text + * @param string|null $text * @return string */ public function smartypants(string $text = null): string @@ -1469,6 +1474,7 @@ class App * the composer.json (Keep that up to date! :)) * * @return string|null + * @throws \Kirby\Exception\LogicException if the Kirby version cannot be detected */ public static function version(): ?string { @@ -1492,7 +1498,7 @@ class App /** * Returns the visitor object * - * @return \Kirby\Cms\Visitor + * @return \Kirby\Http\Visitor */ public function visitor() { diff --git a/kirby/src/Cms/AppPlugins.php b/kirby/src/Cms/AppPlugins.php index b6200a5..37c3628 100755 --- a/kirby/src/Cms/AppPlugins.php +++ b/kirby/src/Cms/AppPlugins.php @@ -92,7 +92,7 @@ trait AppPlugins * * @internal * @param array $extensions - * @param \Kirby\Cms\Plugin $plugin The plugin which defined those extensions + * @param \Kirby\Cms\Plugin $plugin|null The plugin which defined those extensions * @return array */ public function extend(array $extensions, Plugin $plugin = null): array @@ -361,7 +361,7 @@ trait AppPlugins /** * Registers additional routes * - * @param array|Closure $routes + * @param array|\Closure $routes * @return array */ protected function extendRoutes($routes): array @@ -398,8 +398,8 @@ trait AppPlugins /** * Registers SmartyPants component * - * @param Closure $smartypants - * @return Closure + * @param \Closure $smartypants + * @return \Closure */ protected function extendSmartypants(Closure $smartypants) { @@ -455,7 +455,6 @@ trait AppPlugins * so they can be used as plugins for plugins * for example. * - * @param string $type * @param array $extensions * @return array */ @@ -567,7 +566,7 @@ trait AppPlugins * the options array. I.e. hooks and routes can be * setup from the config. * - * @return array + * @return void */ protected function extensionsFromOptions() { @@ -582,7 +581,6 @@ trait AppPlugins /** * Apply all plugin extensions * - * @param array $plugins * @return void */ protected function extensionsFromPlugins() @@ -701,7 +699,7 @@ trait AppPlugins * of a core component * * @param string $component - * @return \Closure | false + * @return \Closure|false */ public function nativeComponent(string $component) { @@ -714,6 +712,7 @@ trait AppPlugins * @param string $name * @param array|null $extends If null is passed it will be used as getter. Otherwise as factory. * @return \Kirby\Cms\Plugin|null + * @throws \Kirby\Exception\DuplicateException */ public static function plugin(string $name, array $extends = null) { @@ -739,7 +738,7 @@ trait AppPlugins * Loading only happens on the first call. * * @internal - * @param array $plugins Can be used to overwrite the plugins registry + * @param array|null $plugins Can be used to overwrite the plugins registry * @return array */ public function plugins(array $plugins = null): array diff --git a/kirby/src/Cms/AppTranslations.php b/kirby/src/Cms/AppTranslations.php index 073addf..8141b54 100755 --- a/kirby/src/Cms/AppTranslations.php +++ b/kirby/src/Cms/AppTranslations.php @@ -2,6 +2,7 @@ namespace Kirby\Cms; +use Exception; use Kirby\Data\Data; use Kirby\Toolkit\F; use Kirby\Toolkit\I18n; @@ -64,17 +65,25 @@ trait AppTranslations I18n::$translations = []; - if (isset($this->options['slugs']) === true) { - $file = $this->root('i18n:rules') . '/' . $this->options['slugs'] . '.json'; + // checks custom language definition for slugs + if ($slugsOption = $this->option('slugs')) { + // checks setting in two different ways + // "slugs" => "de" or "slugs" => ["language" => "de"] + $slugsLanguage = is_string($slugsOption) === true ? $slugsOption : ($slugsOption['language'] ?? null); - if (F::exists($file) === true) { - try { - $data = Data::read($file); - } catch (\Exception $e) { - $data = []; + // load custom slugs language if it's defined + if ($slugsLanguage !== null) { + $file = $this->root('i18n:rules') . '/' . $slugsLanguage . '.json'; + + if (F::exists($file) === true) { + try { + $data = Data::read($file); + } catch (Exception $e) { + $data = []; + } + + Str::$language = $data; } - - Str::$language = $data; } } } @@ -84,7 +93,7 @@ trait AppTranslations * Otherwise fall back to the default language * * @internal - * @param string $languageCode + * @param string|null $languageCode * @return \Kirby\Cms\Language|null */ public function setCurrentLanguage(string $languageCode = null) @@ -111,7 +120,7 @@ trait AppTranslations * Set the current translation * * @internal - * @param string $translationCode + * @param string|null $translationCode * @return void */ public function setCurrentTranslation(string $translationCode = null): void diff --git a/kirby/src/Cms/AppUsers.php b/kirby/src/Cms/AppUsers.php index 3ca24f8..f5d235d 100755 --- a/kirby/src/Cms/AppUsers.php +++ b/kirby/src/Cms/AppUsers.php @@ -43,6 +43,7 @@ trait AppUsers * impersonation will be reset afterwards * @return mixed If called without callback: User that was impersonated; * if called with callback: Return value from the callback + * @throws \Throwable */ public function impersonate(?string $who = null, ?Closure $callback = null) { @@ -82,7 +83,7 @@ trait AppUsers /** * Create your own set of app users * - * @param array $users + * @param array|null $users * @return \Kirby\Cms\App */ protected function setUsers(array $users = null) diff --git a/kirby/src/Cms/Auth.php b/kirby/src/Cms/Auth.php index af15854..b92ecc8 100755 --- a/kirby/src/Cms/Auth.php +++ b/kirby/src/Cms/Auth.php @@ -64,6 +64,8 @@ class Auth * * @param \Kirby\Http\Request\Auth\BasicAuth|null $auth * @return \Kirby\Cms\User|null + * @throws \Kirby\Exception\InvalidArgumentException if the authorization header is invalid + * @throws \Kirby\Exception\PermissionException if basic authentication is not allowed */ public function currentUserFromBasicAuth(BasicAuth $auth = null) { @@ -137,6 +139,7 @@ class Auth * * @param string|null $who User ID or email address * @return \Kirby\Cms\User|null + * @throws \Kirby\Exception\NotFoundException if the given user cannot be found */ public function impersonate(?string $who = null) { diff --git a/kirby/src/Cms/Blueprint.php b/kirby/src/Cms/Blueprint.php index 404f8c8..edfc9fe 100755 --- a/kirby/src/Cms/Blueprint.php +++ b/kirby/src/Cms/Blueprint.php @@ -38,7 +38,7 @@ class Blueprint * Magic getter/caller for any blueprint prop * * @param string $key - * @param array $arguments + * @param array|null $arguments * @return mixed */ public function __call(string $key, array $arguments = null) @@ -50,6 +50,7 @@ class Blueprint * Creates a new blueprint object with the given props * * @param array $props + * @throws \Kirby\Exception\InvalidArgumentException If the blueprint model is missing */ public function __construct(array $props) { @@ -215,7 +216,7 @@ class Blueprint * Create a new blueprint for a model * * @param string $name - * @param string $fallback + * @param string|null $fallback * @param \Kirby\Cms\Model $model * @return self */ @@ -263,6 +264,7 @@ class Blueprint * * @param string $name * @return array + * @throws \Kirby\Exception\NotFoundException If the blueprint cannot be found */ public static function find(string $name): array { @@ -398,6 +400,10 @@ class Blueprint return $columns; } + /** + * @param array $items + * @return string + */ public static function helpList(array $items): string { $md = []; @@ -414,6 +420,7 @@ class Blueprint * * @param array|string $props * @return array + * @throws \Kirby\Exception\InvalidArgumentException If the filed name is missing or the field type is invalid */ public static function fieldProps($props): array { @@ -499,7 +506,7 @@ class Blueprint $fieldProps = []; } - // unset / remove field if its propperty is false + // unset / remove field if its property is false if ($fieldProps === false) { unset($fields[$fieldName]); continue; @@ -582,7 +589,7 @@ class Blueprint { foreach ($sections as $sectionName => $sectionProps) { - // unset / remove section if its propperty is false + // unset / remove section if its property is false if ($sectionProps === false) { unset($sections[$sectionName]); continue; @@ -668,7 +675,7 @@ class Blueprint foreach ($tabs as $tabName => $tabProps) { - // unset / remove tab if its propperty is false + // unset / remove tab if its property is false if ($tabProps === false) { unset($tabs[$tabName]); continue; diff --git a/kirby/src/Cms/Collection.php b/kirby/src/Cms/Collection.php index f987a18..4bb9431 100755 --- a/kirby/src/Cms/Collection.php +++ b/kirby/src/Cms/Collection.php @@ -54,7 +54,7 @@ class Collection extends BaseCollection * Creates a new Collection with the given objects * * @param array $objects - * @param object $parent + * @param object|null $parent */ public function __construct($objects = [], $parent = null) { @@ -101,6 +101,7 @@ class Collection extends BaseCollection /** * Appends an element to the data array * + * @param mixed ...$args * @param mixed $key Optional collection key, will be determined from the item if not given * @param mixed $item * @return \Kirby\Cms\Collection @@ -126,6 +127,7 @@ class Collection extends BaseCollection * @param string $field * @param bool $i Ignore upper/lowercase for group names * @return \Kirby\Cms\Collection + * @throws \Kirby\Exception\Exception */ public function groupBy($field, bool $i = true) { @@ -203,7 +205,9 @@ class Collection extends BaseCollection { $collection = $this->clone(); foreach ($keys as $key) { - if (is_a($key, 'Kirby\Toolkit\Collection') === true) { + if (is_array($key) === true) { + return $this->not(...$key); + } elseif (is_a($key, 'Kirby\Toolkit\Collection') === true) { $collection = $collection->not(...$key->keys()); } elseif (is_object($key) === true) { $key = $key->id(); @@ -240,6 +244,7 @@ class Collection extends BaseCollection /** * Prepends an element to the data array * + * @param mixed ...$args * @param mixed $key Optional collection key, will be determined from the item if not given * @param mixed $item * @return \Kirby\Cms\Collection @@ -307,7 +312,7 @@ class Collection extends BaseCollection /** * Searches the collection * - * @param string $query + * @param string|null $query * @param array $params * @return self */ @@ -321,7 +326,7 @@ class Collection extends BaseCollection * to an array. This can also take a callback * function to further modify the array result. * - * @param Closure $map + * @param \Closure|null $map * @return array */ public function toArray(Closure $map = null): array diff --git a/kirby/src/Cms/Collections.php b/kirby/src/Cms/Collections.php index de44581..2b49e6f 100755 --- a/kirby/src/Cms/Collections.php +++ b/kirby/src/Cms/Collections.php @@ -112,6 +112,7 @@ class Collections * * @param string $name * @return mixed + * @throws \Kirby\Exception\NotFoundException */ public function load(string $name) { diff --git a/kirby/src/Cms/Content.php b/kirby/src/Cms/Content.php index c702a60..a9cbf86 100755 --- a/kirby/src/Cms/Content.php +++ b/kirby/src/Cms/Content.php @@ -146,7 +146,7 @@ class Content * Returns either a single field object * or all registered fields * - * @param string $key + * @param string|null $key * @return \Kirby\Cms\Field|array */ public function get(string $key = null) @@ -250,7 +250,7 @@ class Content * Updates the content and returns * a cloned object * - * @param array $content + * @param array|null $content * @param bool $overwrite * @return self */ diff --git a/kirby/src/Cms/ContentLock.php b/kirby/src/Cms/ContentLock.php index 072166d..7769630 100755 --- a/kirby/src/Cms/ContentLock.php +++ b/kirby/src/Cms/ContentLock.php @@ -62,6 +62,7 @@ class ContentLock * Sets lock with the current user * * @return bool + * @throws \Kirby\Exception\DuplicateException */ public function create(): bool { @@ -153,6 +154,7 @@ class ContentLock * Removes lock of current user * * @return bool + * @throws \Kirby\Exception\LogicException */ public function remove(): bool { @@ -217,6 +219,7 @@ class ContentLock * throws exception if none is authenticated * * @return \Kirby\Cms\User + * @throws \Kirby\Exception\PermissionException */ protected function user(): User { diff --git a/kirby/src/Cms/ContentLocks.php b/kirby/src/Cms/ContentLocks.php index 4c48a3f..bd67918 100755 --- a/kirby/src/Cms/ContentLocks.php +++ b/kirby/src/Cms/ContentLocks.php @@ -52,6 +52,7 @@ class ContentLocks * * @param string $file * @return void + * @throws \Kirby\Exception\Exception */ protected function closeHandle(string $file) { @@ -123,6 +124,7 @@ class ContentLocks * @param string $file * @param bool $create Whether to create the file if it does not exist * @return resource|null File handle + * @throws \Kirby\Exception\Exception */ protected function handle(string $file, bool $create = false) { @@ -168,6 +170,7 @@ class ContentLocks * @param \Kirby\Cms\ModelWithContent $model * @param array $data * @return bool + * @throws \Kirby\Exception\Exception */ public function set(ModelWithContent $model, array $data): bool { diff --git a/kirby/src/Cms/ContentTranslation.php b/kirby/src/Cms/ContentTranslation.php index e51bfc0..cf25974 100755 --- a/kirby/src/Cms/ContentTranslation.php +++ b/kirby/src/Cms/ContentTranslation.php @@ -172,7 +172,7 @@ class ContentTranslation } /** - * @param array $content + * @param array|null $content * @return self */ protected function setContent(array $content = null) @@ -192,7 +192,7 @@ class ContentTranslation } /** - * @param string $slug + * @param string|null $slug * @return self */ protected function setSlug(string $slug = null) @@ -225,7 +225,7 @@ class ContentTranslation } /** - * Converts the most imporant translation + * Converts the most important translation * props to an array * * @return array diff --git a/kirby/src/Cms/Dir.php b/kirby/src/Cms/Dir.php index efcd3bd..7c42c62 100755 --- a/kirby/src/Cms/Dir.php +++ b/kirby/src/Cms/Dir.php @@ -26,7 +26,7 @@ class Dir extends \Kirby\Toolkit\Dir * * @param string $dir * @param string $contentExtension - * @param array $contentIgnore + * @param array|null $contentIgnore * @param bool $multilang * @return array */ diff --git a/kirby/src/Cms/Email.php b/kirby/src/Cms/Email.php index 242fa84..4b78858 100755 --- a/kirby/src/Cms/Email.php +++ b/kirby/src/Cms/Email.php @@ -53,6 +53,11 @@ class Email $this->props['transport'] = $this->options['transport'] ?? []; } + // add predefined beforeSend option + if (isset($this->props['beforeSend']) === false) { + $this->props['beforeSend'] = $this->options['beforeSend'] ?? null; + } + // transform model objects to values $this->transformUserSingle('from', 'fromName'); $this->transformUserSingle('replyTo', 'replyToName'); @@ -71,6 +76,7 @@ class Email * * @param string|array $preset Preset name or simple prop array * @return array + * @throws \Kirby\Exception\NotFoundException */ protected function preset($preset): array { @@ -95,6 +101,7 @@ class Email * to the result * * @return void + * @throws \Kirby\Exception\NotFoundException */ protected function template(): void { diff --git a/kirby/src/Cms/Event.php b/kirby/src/Cms/Event.php index 3b9f3ec..deaccdc 100755 --- a/kirby/src/Cms/Event.php +++ b/kirby/src/Cms/Event.php @@ -276,6 +276,7 @@ class Event * @param string $name * @param mixed $value * @return void + * @throws \Kirby\Exception\InvalidArgumentException */ public function updateArgument(string $name, $value): void { diff --git a/kirby/src/Cms/Field.php b/kirby/src/Cms/Field.php index 5ce8e7b..e6632e1 100755 --- a/kirby/src/Cms/Field.php +++ b/kirby/src/Cms/Field.php @@ -2,7 +2,6 @@ namespace Kirby\Cms; -use Closure; use Kirby\Exception\InvalidArgumentException; /** @@ -93,7 +92,7 @@ class Field /** * Creates a new field object * - * @param object $parent + * @param object|null $parent * @param string $key * @param mixed $value */ @@ -108,7 +107,7 @@ class Field * Simplifies the var_dump result * * @see Field::toArray - * @return void + * @return array */ public function __debugInfo() { @@ -232,8 +231,9 @@ class Field * the modified field will be returned. Otherwise it * will return the field value. * - * @param string|Closure $value + * @param string|\Closure $value * @return mixed + * @throws \Kirby\Exception\InvalidArgumentException */ public function value($value = null) { diff --git a/kirby/src/Cms/File.php b/kirby/src/Cms/File.php index 422d124..45dda5e 100755 --- a/kirby/src/Cms/File.php +++ b/kirby/src/Cms/File.php @@ -231,34 +231,31 @@ class File extends ModelWithContent * gets dragged onto a textarea * * @internal - * @param string $type (null|auto|kirbytext|markdown) + * @param string|null $type (null|auto|kirbytext|markdown) * @param bool $absolute * @return string */ public function dragText(string $type = null, bool $absolute = false): string { - $type = $type ?? 'auto'; + $type = $this->dragTextType($type); + $url = $absolute ? $this->id() : $this->filename(); - if ($type === 'auto') { - $type = option('panel.kirbytext', true) ? 'kirbytext' : 'markdown'; + if ($dragTextFromCallback = $this->dragTextFromCallback($type, $url)) { + return $dragTextFromCallback; } - $url = $absolute ? $this->id() : $this->filename(); - - switch ($type) { - case 'markdown': - if ($this->type() === 'image') { - return '![' . $this->alt() . '](' . $url . ')'; - } else { - return '[' . $this->filename() . '](' . $url . ')'; - } - // no break - default: - if ($this->type() === 'image') { - return '(image: ' . $url . ')'; - } else { - return '(file: ' . $url . ')'; - } + if ($type === 'markdown') { + if ($this->type() === 'image') { + return '![' . $this->alt() . '](' . $url . ')'; + } else { + return '[' . $this->filename() . '](' . $url . ')'; + } + } else { + if ($this->type() === 'image') { + return '(image: ' . $url . ')'; + } else { + return '(file: ' . $url . ')'; + } } } @@ -392,6 +389,7 @@ class File extends ModelWithContent * @deprecated 3.0.0 Use `File::content()` instead * * @return \Kirby\Cms\Content + * @codeCoverageIgnore */ public function meta() { @@ -403,7 +401,7 @@ class File extends ModelWithContent /** * Get the file's last modification time. * - * @param string $format + * @param string|null $format * @param string|null $handler date or strftime * @param string|null $languageCode * @return mixed @@ -460,7 +458,7 @@ class File extends ModelWithContent * Panel icon definition * * @internal - * @param array $params + * @param array|null $params * @return array */ public function panelIcon(array $params = null): array @@ -677,7 +675,7 @@ class File extends ModelWithContent /** * Sets the parent model object * - * @param \Kirby\Cms\Model $parent + * @param \Kirby\Cms\Model|null $parent * @return self */ protected function setParent(Model $parent = null) @@ -700,7 +698,7 @@ class File extends ModelWithContent } /** - * @param string $template + * @param string|null $template * @return self */ protected function setTemplate(string $template = null) @@ -712,7 +710,7 @@ class File extends ModelWithContent /** * Sets the url * - * @param string $url + * @param string|null $url * @return self */ protected function setUrl(string $url = null) diff --git a/kirby/src/Cms/FileActions.php b/kirby/src/Cms/FileActions.php index 5dfe7e9..1960192 100755 --- a/kirby/src/Cms/FileActions.php +++ b/kirby/src/Cms/FileActions.php @@ -26,6 +26,7 @@ trait FileActions * @param string $name * @param bool $sanitize * @return self + * @throws \Kirby\Exception\LogicException */ public function changeName(string $name, bool $sanitize = true) { @@ -161,6 +162,8 @@ trait FileActions * * @param array $props * @return self + * @throws \Kirby\Exception\InvalidArgumentException + * @throws \Kirby\Exception\LogicException */ public static function create(array $props) { @@ -264,6 +267,7 @@ trait FileActions * @param string $name * @param bool $sanitize * @return self + * @codeCoverageIgnore */ public function rename(string $name, bool $sanitize = true) { @@ -281,6 +285,7 @@ trait FileActions * * @param string $source * @return self + * @throws \Kirby\Exception\LogicException */ public function replace(string $source) { diff --git a/kirby/src/Cms/FileFoundation.php b/kirby/src/Cms/FileFoundation.php index cc1b4f9..058a455 100755 --- a/kirby/src/Cms/FileFoundation.php +++ b/kirby/src/Cms/FileFoundation.php @@ -27,6 +27,7 @@ trait FileFoundation * @param string $method * @param array $arguments * @return mixed + * @throws \Kirby\Exception\BadMethodCallException */ public function __call(string $method, array $arguments = []) { @@ -187,7 +188,7 @@ trait FileFoundation /** * Setter for the root * - * @param string $root + * @param string|null $root * @return self */ protected function setRoot(string $root = null) diff --git a/kirby/src/Cms/FileModifications.php b/kirby/src/Cms/FileModifications.php index 51e3962..e628ab9 100755 --- a/kirby/src/Cms/FileModifications.php +++ b/kirby/src/Cms/FileModifications.php @@ -40,7 +40,7 @@ trait FileModifications * Crops the image by the given width and height * * @param int $width - * @param int $height + * @param int|null $height * @param string|array $options * @return \Kirby\Cms\FileVersion|\Kirby\Cms\File */ @@ -103,10 +103,11 @@ trait FileModifications * Resizes the file with the given width and height * while keeping the aspect ratio. * - * @param int $width - * @param int $height - * @param int $quality + * @param int|null $width + * @param int|null $height + * @param int|null $quality * @return \Kirby\Cms\FileVersion|\Kirby\Cms\File + * @throws \Kirby\Exception\InvalidArgumentException */ public function resize(int $width = null, int $height = null, int $quality = null) { @@ -123,7 +124,7 @@ trait FileModifications * also be set up in the config with the thumbs.srcsets option. * @since 3.1.0 * - * @param array|string $sizes + * @param array|string|null $sizes * @return string|null */ public function srcset($sizes = null): ?string @@ -175,6 +176,7 @@ trait FileModifications * * @param array|null|string $options * @return \Kirby\Cms\FileVersion|\Kirby\Cms\File + * @throws \Kirby\Exception\InvalidArgumentException */ public function thumb($options = null) { diff --git a/kirby/src/Cms/FilePicker.php b/kirby/src/Cms/FilePicker.php index b09c09f..4385679 100755 --- a/kirby/src/Cms/FilePicker.php +++ b/kirby/src/Cms/FilePicker.php @@ -34,6 +34,7 @@ class FilePicker extends Picker * Search all files for the picker * * @return \Kirby\Cms\Files|null + * @throws \Kirby\Exception\InvalidArgumentException */ public function items() { diff --git a/kirby/src/Cms/FileRules.php b/kirby/src/Cms/FileRules.php index d406368..889dda1 100755 --- a/kirby/src/Cms/FileRules.php +++ b/kirby/src/Cms/FileRules.php @@ -4,7 +4,6 @@ namespace Kirby\Cms; use Kirby\Exception\DuplicateException; use Kirby\Exception\InvalidArgumentException; -use Kirby\Exception\LogicException; use Kirby\Exception\PermissionException; use Kirby\Image\Image; use Kirby\Toolkit\Str; @@ -21,6 +20,15 @@ use Kirby\Toolkit\V; */ class FileRules { + /** + * Validates if the filename can be changed + * + * @param \Kirby\Cms\File $file + * @param string $name + * @return bool + * @throws \Kirby\Exception\DuplicateException If a file with this name exists + * @throws \Kirby\Exception\PermissionException If the user is not allowed to rename the file + */ public static function changeName(File $file, string $name): bool { if ($file->permissions()->changeName() !== true) { @@ -43,15 +51,31 @@ class FileRules return true; } + /** + * Validates if the file can be sorted + * + * @param \Kirby\Cms\File $file + * @param int $sort + * @return bool + */ public static function changeSort(File $file, int $sort): bool { return true; } + /** + * Validates if the file can be created + * + * @param \Kirby\Cms\File $file + * @param \Kirby\Image\Image $upload + * @return bool + * @throws \Kirby\Exception\DuplicateException If a file with the same name exists + * @throws \Kirby\Exception\PermissionException If the user is not allowed to create the file + */ public static function create(File $file, Image $upload): bool { if ($file->exists() === true) { - throw new LogicException('The file exists and cannot be overwritten'); + throw new DuplicateException('The file exists and cannot be overwritten'); } if ($file->permissions()->create() !== true) { @@ -67,6 +91,13 @@ class FileRules return true; } + /** + * Validates if the file can be deleted + * + * @param \Kirby\Cms\File $file + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to delete the file + */ public static function delete(File $file): bool { if ($file->permissions()->delete() !== true) { @@ -76,6 +107,15 @@ class FileRules return true; } + /** + * Validates if the file can be replaced + * + * @param \Kirby\Cms\File $file + * @param \Kirby\Image\Image $upload + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to replace the file + * @throws \Kirby\Exception\InvalidArgumentException If the file type of the new file is different + */ public static function replace(File $file, Image $upload): bool { if ($file->permissions()->replace() !== true) { @@ -84,7 +124,6 @@ class FileRules static::validMime($file, $upload->mime()); - if ( (string)$upload->mime() !== (string)$file->mime() && (string)$upload->extension() !== (string)$file->extension() @@ -100,6 +139,14 @@ class FileRules return true; } + /** + * Validates if the file can be updated + * + * @param \Kirby\Cms\File $file + * @param array $content + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to update the file + */ public static function update(File $file, array $content = []): bool { if ($file->permissions()->update() !== true) { @@ -109,6 +156,14 @@ class FileRules return true; } + /** + * Validates the file extension + * + * @param \Kirby\Cms\File $file + * @param string $extension + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the extension is missing or forbidden + */ public static function validExtension(File $file, string $extension): bool { // make it easier to compare the extension @@ -145,9 +200,16 @@ class FileRules return true; } + /** + * Validates the filename + * + * @param \Kirby\Cms\File $file + * @param string $filename + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the filename is missing or forbidden + */ public static function validFilename(File $file, string $filename) { - // make it easier to compare the filename $filename = strtolower($filename); @@ -177,6 +239,14 @@ class FileRules return true; } + /** + * Validates the MIME type + * + * @param \Kirby\Cms\File $file + * @param string|null $mime + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the MIME type is missing or forbidden + */ public static function validMime(File $file, string $mime = null) { // make it easier to compare the mime diff --git a/kirby/src/Cms/FileVersion.php b/kirby/src/Cms/FileVersion.php index 2bdb6f9..b9913a5 100755 --- a/kirby/src/Cms/FileVersion.php +++ b/kirby/src/Cms/FileVersion.php @@ -23,6 +23,14 @@ class FileVersion protected $modifications; protected $original; + /** + * Proxy for public properties, asset methods + * and content field getters + * + * @param string $method + * @param array $arguments + * @return mixed + */ public function __call(string $method, array $arguments = []) { // public property access @@ -45,12 +53,19 @@ class FileVersion } } + /** + * Returns the unique ID + * + * @return string + */ public function id(): string { return dirname($this->original()->id()) . '/' . $this->filename(); } /** + * Returns the parent Kirby App instance + * * @return \Kirby\Cms\App */ public function kirby() @@ -58,34 +73,60 @@ class FileVersion return $this->original()->kirby(); } + /** + * Returns an array with all applied modifications + * + * @return array + */ public function modifications(): array { return $this->modifications ?? []; } + /** + * Returns the instance of the original File object + * + * @return mixed + */ public function original() { return $this->original; } + /** + * Applies the stored modifications and + * saves the file on disk + * + * @return self + */ public function save() { $this->kirby()->thumb($this->original()->root(), $this->root(), $this->modifications()); return $this; } + /** + * Setter for modifications + * + * @param array|null $modifications + */ protected function setModifications(array $modifications = null) { $this->modifications = $modifications; } + /** + * Setter for the original File object + * + * @param $original + */ protected function setOriginal($original) { $this->original = $original; } /** - * Convert the object to an array + * Converts the object to an array * * @return array */ diff --git a/kirby/src/Cms/Filename.php b/kirby/src/Cms/Filename.php index 3f48a45..b5e1867 100755 --- a/kirby/src/Cms/Filename.php +++ b/kirby/src/Cms/Filename.php @@ -118,7 +118,7 @@ class Filename * to a string, that can be used in the * new filename * - * @param string $prefix The prefix will be used in the filename creation + * @param string|null $prefix The prefix will be used in the filename creation * @return string */ public function attributesToString(string $prefix = null): string diff --git a/kirby/src/Cms/Files.php b/kirby/src/Cms/Files.php index 8a7e968..25e28dd 100755 --- a/kirby/src/Cms/Files.php +++ b/kirby/src/Cms/Files.php @@ -76,7 +76,6 @@ class Files extends Collection * * @param array $files * @param \Kirby\Cms\Model $parent - * @param array $inject * @return self */ public static function factory(array $files, Model $parent) diff --git a/kirby/src/Cms/Form.php b/kirby/src/Cms/Form.php index 30e72fc..0bf6e4b 100755 --- a/kirby/src/Cms/Form.php +++ b/kirby/src/Cms/Form.php @@ -21,6 +21,11 @@ class Form extends BaseForm protected $fields; protected $values = []; + /** + * Form constructor. + * + * @param array $props + */ public function __construct(array $props) { $kirby = App::instance(); diff --git a/kirby/src/Cms/HasChildren.php b/kirby/src/Cms/HasChildren.php index 34d950e..644b718 100755 --- a/kirby/src/Cms/HasChildren.php +++ b/kirby/src/Cms/HasChildren.php @@ -177,6 +177,7 @@ trait HasChildren /** * @deprecated 3.0.0 Use `Page::hasUnlistedChildren()` instead * @return bool + * @codeCoverageIgnore */ public function hasInvisibleChildren(): bool { @@ -208,6 +209,7 @@ trait HasChildren /** * @deprecated 3.0.0 Use `Page::hasListedChildren()` instead * @return bool + * @codeCoverageIgnore */ public function hasVisibleChildren(): bool { diff --git a/kirby/src/Cms/HasFiles.php b/kirby/src/Cms/HasFiles.php index 9156a47..41048a3 100755 --- a/kirby/src/Cms/HasFiles.php +++ b/kirby/src/Cms/HasFiles.php @@ -80,7 +80,7 @@ trait HasFiles /** * Returns a specific file by filename or the first one * - * @param string $filename + * @param string|null $filename * @param string $in * @return \Kirby\Cms\File|null */ @@ -181,7 +181,7 @@ trait HasFiles /** * Returns a specific image by filename or the first one * - * @param string $filename + * @param string|null $filename * @return \Kirby\Cms\File|null */ public function image(string $filename = null) diff --git a/kirby/src/Cms/HasMethods.php b/kirby/src/Cms/HasMethods.php index b6d812b..9abe109 100755 --- a/kirby/src/Cms/HasMethods.php +++ b/kirby/src/Cms/HasMethods.php @@ -30,6 +30,7 @@ trait HasMethods * @param string $method * @param array $args * @return mixed + * @throws \Kirby\Exception\BadMethodCallException */ public function callMethod(string $method, array $args = []) { @@ -60,7 +61,7 @@ trait HasMethods * inheritance order (top to bottom) * * @param string $method - * @return Closure|null + * @return \Closure|null */ protected function getMethod(string $method) { @@ -73,7 +74,7 @@ trait HasMethods return $parent::$methods[$method]; } } - + return null; } } diff --git a/kirby/src/Cms/Html.php b/kirby/src/Cms/Html.php index c0ded7e..634f8de 100755 --- a/kirby/src/Cms/Html.php +++ b/kirby/src/Cms/Html.php @@ -18,7 +18,7 @@ class Html extends \Kirby\Toolkit\Html /** * Generates an `a` tag with an absolute Url * - * @param string $href Relative or absolute Url + * @param string|null $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 array $attr Additional attributes for the a tag. * @return string diff --git a/kirby/src/Cms/Ingredients.php b/kirby/src/Cms/Ingredients.php index 64fd9d2..618ed4d 100755 --- a/kirby/src/Cms/Ingredients.php +++ b/kirby/src/Cms/Ingredients.php @@ -35,7 +35,7 @@ class Ingredients * Magic getter for single ingredients * * @param string $method - * @param array $args + * @param array|null $args * @return mixed */ public function __call(string $method, array $args = null) diff --git a/kirby/src/Cms/KirbyTags.php b/kirby/src/Cms/KirbyTags.php index a3fea05..d92d719 100755 --- a/kirby/src/Cms/KirbyTags.php +++ b/kirby/src/Cms/KirbyTags.php @@ -22,10 +22,10 @@ class KirbyTags extends \Kirby\Text\KirbyTags protected static $tagClass = 'Kirby\Cms\KirbyTag'; /** - * @param string $text + * @param string|null $text * @param array $data * @param array $options - * @param \Kirby\Cms\App $app + * @param \Kirby\Cms\App|null $app * @return string */ public static function parse(string $text = null, array $data = [], array $options = [], ?App $app = null): string diff --git a/kirby/src/Cms/Language.php b/kirby/src/Cms/Language.php index 4c0cc8c..c597208 100755 --- a/kirby/src/Cms/Language.php +++ b/kirby/src/Cms/Language.php @@ -230,6 +230,7 @@ class Language extends Model * * @internal * @return bool + * @throws \Kirby\Exception\Exception */ public function delete(): bool { diff --git a/kirby/src/Cms/LanguageRouter.php b/kirby/src/Cms/LanguageRouter.php index 5c49b10..a770c35 100755 --- a/kirby/src/Cms/LanguageRouter.php +++ b/kirby/src/Cms/LanguageRouter.php @@ -50,6 +50,7 @@ class LanguageRouter * current language from the Kirby instance * * @return array + * @throws \Kirby\Exception\NotFoundException */ public function routes(): array { diff --git a/kirby/src/Cms/LanguageRules.php b/kirby/src/Cms/LanguageRules.php index b2aea58..4588f1b 100755 --- a/kirby/src/Cms/LanguageRules.php +++ b/kirby/src/Cms/LanguageRules.php @@ -17,6 +17,13 @@ use Kirby\Toolkit\Str; */ class LanguageRules { + /** + * Validates if the language can be created + * + * @param \Kirby\Cms\Language $language + * @return bool + * @throws \Kirby\Exception\DuplicateException If the language already exists + */ public static function create(Language $language): bool { static::validLanguageCode($language); @@ -34,12 +41,24 @@ class LanguageRules return true; } + /** + * Validates if the language can be updated + * + * @param \Kirby\Cms\Language $language + */ public static function update(Language $language) { static::validLanguageCode($language); static::validLanguageName($language); } + /** + * Validates if the language code is formatted correctly + * + * @param \Kirby\Cms\Language $language + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the language code is not valid + */ public static function validLanguageCode(Language $language): bool { if (Str::length($language->code()) < 2) { @@ -55,6 +74,13 @@ class LanguageRules return true; } + /** + * Validates if the language name is formatted correctly + * + * @param \Kirby\Cms\Language $language + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the language name is invalid + */ public static function validLanguageName(Language $language): bool { if (Str::length($language->name()) < 1) { diff --git a/kirby/src/Cms/Languages.php b/kirby/src/Cms/Languages.php index 4aeac34..f27349b 100755 --- a/kirby/src/Cms/Languages.php +++ b/kirby/src/Cms/Languages.php @@ -20,7 +20,8 @@ class Languages extends Collection * Creates a new collection with the given language objects * * @param array $objects - * @param object $parent + * @param null $parent + * @throws \Kirby\Exception\DuplicateException */ public function __construct($objects = [], $parent = null) { @@ -74,6 +75,7 @@ class Languages extends Collection /** * @deprecated 3.0.0 Use `Languages::default()` instead * @return \Kirby\Cms\Language|null + * @codeCoverageIgnore */ public function findDefault() { diff --git a/kirby/src/Cms/Media.php b/kirby/src/Cms/Media.php index a065122..67ce9f9 100755 --- a/kirby/src/Cms/Media.php +++ b/kirby/src/Cms/Media.php @@ -24,7 +24,7 @@ class Media * Tries to find a file by model and filename * and to copy it to the media folder. * - * @param \Kirby\Cms\Model $model + * @param \Kirby\Cms\Model|null $model * @param string $hash * @param string $filename * @return \Kirby\Cms\Response|false @@ -137,7 +137,7 @@ class Media * * @param string $directory * @param \Kirby\Cms\File $file - * @param string $ignore + * @param string|null $ignore * @return bool */ public static function unpublish(string $directory, File $file, string $ignore = null): bool diff --git a/kirby/src/Cms/ModelPermissions.php b/kirby/src/Cms/ModelPermissions.php index 214c5a7..faba61e 100755 --- a/kirby/src/Cms/ModelPermissions.php +++ b/kirby/src/Cms/ModelPermissions.php @@ -21,11 +21,21 @@ abstract class ModelPermissions protected $permissions; protected $user; + /** + * @param string $method + * @param array $arguments + * @return bool + */ public function __call(string $method, array $arguments = []): bool { return $this->can($method); } + /** + * ModelPermissions constructor + * + * @param \Kirby\Cms\Model $model + */ public function __construct(Model $model) { $this->model = $model; @@ -44,6 +54,10 @@ abstract class ModelPermissions return $this->toArray(); } + /** + * @param string $action + * @return bool + */ public function can(string $action): bool { $role = $this->user->role()->id(); @@ -77,11 +91,18 @@ abstract class ModelPermissions return $this->permissions->for($this->category, $action); } + /** + * @param string $action + * @return bool + */ public function cannot(string $action): bool { return $this->can($action) === false; } + /** + * @return array + */ public function toArray(): array { $array = []; diff --git a/kirby/src/Cms/ModelWithContent.php b/kirby/src/Cms/ModelWithContent.php index 1eeb3a2..3b338aa 100755 --- a/kirby/src/Cms/ModelWithContent.php +++ b/kirby/src/Cms/ModelWithContent.php @@ -46,12 +46,37 @@ abstract class ModelWithContent extends Model */ abstract public function blueprint(); + /** + * Returns an array with all blueprints that are available + * + * @param string|null $inSection + * @return array + */ + public function blueprints(string $inSection = null): array + { + $blueprints = []; + $blueprint = $this->blueprint(); + $sections = $inSection !== null ? [$blueprint->section($inSection)] : $blueprint->sections(); + + foreach ($sections as $section) { + if ($section === null) { + continue; + } + + foreach ((array)$section->blueprints() as $blueprint) { + $blueprints[$blueprint['name']] = $blueprint; + } + } + + return array_values($blueprints); + } + /** * Executes any given model action * * @param string $action * @param array $arguments - * @param Closure $callback + * @param \Closure $callback * @return mixed */ abstract protected function commit(string $action, array $arguments, Closure $callback); @@ -59,8 +84,9 @@ abstract class ModelWithContent extends Model /** * Returns the content * - * @param string $languageCode + * @param string|null $languageCode * @return \Kirby\Cms\Content + * @throws \Kirby\Exception\InvalidArgumentException If the language for the given code does not exist */ public function content(string $languageCode = null) { @@ -104,6 +130,7 @@ abstract class ModelWithContent extends Model * @param string|null $languageCode * @param bool $force * @return string + * @throws \Kirby\Exception\InvalidArgumentException If the language for the given code does not exist */ public function contentFile(string $languageCode = null, bool $force = false): string { @@ -158,7 +185,7 @@ abstract class ModelWithContent extends Model * * @internal * @param array $data - * @param string $languageCode + * @param string|null $languageCode * @return array */ public function contentFileData(array $data, string $languageCode = null): array @@ -217,6 +244,46 @@ abstract class ModelWithContent extends Model return $this->update([$field => $value]); } + /** + * Returns the drag text from a custom callback + * if the callback is defined in the config + * + * @internal + * @param string $type markdown or kirbytext + * @param mixed ...$args + * @return string|null + */ + public function dragTextFromCallback(string $type, ...$args): ?string + { + $dragTextCallback = option('panel.' . $type . '.' . static::CLASS_ALIAS . 'DragText'); + + if (empty($dragTextCallback) === false && is_a($dragTextCallback, 'Closure') === true && ($dragText = $dragTextCallback($this, ...$args)) !== null) { + return $dragText; + } + + return null; + } + + /** + * Returns the correct drag text type + * depending on the given type or the + * configuration + * + * @internal + * @param string $type (null|auto|kirbytext|markdown) + * @return string + */ + public function dragTextType(string $type = null): string + { + $type = $type ?? 'auto'; + + if ($type === 'auto') { + $type = option('panel.kirbytext', true) ? 'kirbytext' : 'markdown'; + } + + return $type === 'markdown' ? 'markdown' : 'kirbytext'; + } + /** * Returns all content validation errors * @@ -240,7 +307,7 @@ abstract class ModelWithContent extends Model * * @param string $field * @param int $by - * @param int $max + * @param int|null $max * @return self */ public function increment(string $field, int $by = 1, int $max = null) @@ -300,7 +367,7 @@ abstract class ModelWithContent extends Model * Returns the panel icon definition * * @internal - * @param array $params + * @param array|null $params * @return array */ public function panelIcon(array $params = null): array @@ -317,7 +384,7 @@ abstract class ModelWithContent extends Model /** * @internal - * @param string|array|false $settings + * @param string|array|false|null $settings * @return array|null */ public function panelImage($settings = null): ?array @@ -349,32 +416,36 @@ abstract class ModelWithContent extends Model // main url $settings['url'] = $image->url(); - // for cards - $settings['cards'] = [ - 'url' => 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw', - 'srcset' => $image->srcset([ - 352, - 864, - 1408, - ]) - ]; + // only create srcsets for actual File objects + if (is_a($image, 'Kirby\Cms\File') === true) { - // 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' - ], - ]) - ]; + // 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']); } @@ -497,8 +568,8 @@ abstract class ModelWithContent extends Model * Stores the content on disk * * @internal - * @param string $languageCode - * @param array $data + * @param array|null $data + * @param string|null $languageCode * @param bool $overwrite * @return self */ @@ -539,6 +610,7 @@ abstract class ModelWithContent extends Model * @param string|null $languageCode * @param bool $overwrite * @return self + * @throws \Kirby\Exception\InvalidArgumentException If the language for the given code does not exist */ protected function saveTranslation(array $data = null, string $languageCode = null, bool $overwrite = false) { @@ -598,7 +670,7 @@ abstract class ModelWithContent extends Model /** * Create the translations collection from an array * - * @param array $translations + * @param array|null $translations * @return self */ protected function setTranslations(array $translations = null) @@ -679,10 +751,11 @@ abstract class ModelWithContent extends Model /** * Updates the model data * - * @param array $input - * @param string $languageCode + * @param array|null $input + * @param string|null $languageCode * @param bool $validate * @return self + * @throws \Kirby\Exception\InvalidArgumentException If the input array contains invalid values */ public function update(array $input = null, string $languageCode = null, bool $validate = false) { @@ -720,7 +793,7 @@ abstract class ModelWithContent extends Model * * @internal * @param array $data - * @param string $languageCode + * @param string|null $languageCode * @return bool */ public function writeContent(array $data, string $languageCode = null): bool diff --git a/kirby/src/Cms/Nest.php b/kirby/src/Cms/Nest.php index 21c3eaf..0fa2318 100755 --- a/kirby/src/Cms/Nest.php +++ b/kirby/src/Cms/Nest.php @@ -18,6 +18,11 @@ namespace Kirby\Cms; */ class Nest { + /** + * @param $data + * @param null $parent + * @return mixed + */ public static function create($data, $parent = null) { if (is_scalar($data) === true) { diff --git a/kirby/src/Cms/NestCollection.php b/kirby/src/Cms/NestCollection.php index 2251dcb..4dbe31b 100755 --- a/kirby/src/Cms/NestCollection.php +++ b/kirby/src/Cms/NestCollection.php @@ -21,7 +21,7 @@ class NestCollection extends BaseCollection * to an array. This can also take a callback * function to further modify the array result. * - * @param Closure $map + * @param \Closure|null $map * @return array */ public function toArray(Closure $map = null): array diff --git a/kirby/src/Cms/Page.php b/kirby/src/Cms/Page.php index 108aa8d..91a5b75 100755 --- a/kirby/src/Cms/Page.php +++ b/kirby/src/Cms/Page.php @@ -237,7 +237,7 @@ class Page extends ModelWithContent /** * Returns an array with all blueprints that are available for the page * - * @param string $inSection + * @param string|null $inSection * @return array */ public function blueprints(string $inSection = null): array @@ -302,7 +302,7 @@ class Page extends ModelWithContent * * @internal * @param array $data - * @param string $languageCode + * @param string|null $languageCode * @return array */ public function contentFileData(array $data, string $languageCode = null): array @@ -318,7 +318,7 @@ class Page extends ModelWithContent * which is found by the inventory method * * @internal - * @param string $languageCode + * @param string|null $languageCode * @return string */ public function contentFileName(string $languageCode = null): string @@ -333,6 +333,7 @@ class Page extends ModelWithContent * @param array $data * @param string $contentType * @return array + * @throws \Kirby\Exception\InvalidArgumentException If the controller returns invalid objects for `kirby`, `site`, `pages` or `page` */ public function controller($data = [], $contentType = 'html'): array { @@ -432,22 +433,21 @@ class Page extends ModelWithContent * gets dragged onto a textarea * * @internal - * @param string $type (null|auto|kirbytext|markdown) + * @param string|null $type (null|auto|kirbytext|markdown) * @return string */ public function dragText(string $type = null): string { - $type = $type ?? 'auto'; + $type = $this->dragTextType($type); - if ($type === 'auto') { - $type = option('panel.kirbytext', true) ? 'kirbytext' : 'markdown'; + if ($dragTextFromCallback = $this->dragTextFromCallback($type)) { + return $dragTextFromCallback; } - switch ($type) { - case 'markdown': - return '[' . $this->title() . '](' . $this->url() . ')'; - default: - return '(link: ' . $this->id() . ' text: ' . $this->title() . ')'; + if ($type === 'markdown') { + return '[' . $this->title() . '](' . $this->url() . ')'; + } else { + return '(link: ' . $this->id() . ' text: ' . $this->title() . ')'; } } @@ -757,6 +757,7 @@ class Page extends ModelWithContent /** * @deprecated 3.0.0 Use `Page::isUnlisted()` instead * @return bool + * @codeCoverageIgnore */ public function isInvisible(): bool { @@ -848,6 +849,7 @@ class Page extends ModelWithContent /** * @deprecated 3.0.0 Use `Page::isListed()` instead * @return bool + * @codeCoverageIgnore */ public function isVisible(): bool { @@ -861,7 +863,7 @@ class Page extends ModelWithContent * This is only used for drafts so far. * * @internal - * @param string $token + * @param string|null $token * @return bool */ public function isVerified(string $token = null) @@ -926,7 +928,7 @@ class Page extends ModelWithContent /** * Returns the last modification date of the page * - * @param string $format + * @param string|null $format * @param string|null $handler * @param string|null $languageCode * @return int|string @@ -955,7 +957,7 @@ class Page extends ModelWithContent * according to the blueprint settings * * @internal - * @param array $params + * @param array|null $params * @return array */ public function panelIcon(array $params = null): array @@ -1158,8 +1160,8 @@ class Page extends ModelWithContent * * @param array $data * @param string $contentType - * @param int $code * @return string + * @throws \Kirby\Exception\NotFoundException If the default template cannot be found */ public function render(array $data = [], $contentType = 'html'): string { @@ -1218,6 +1220,7 @@ class Page extends ModelWithContent * @internal * @param mixed $type * @return \Kirby\Cms\Template + * @throws \Kirby\Exception\NotFoundException If the content representation cannot be found */ public function representation($type) { @@ -1258,7 +1261,7 @@ class Page extends ModelWithContent /** * Search all pages within the current page * - * @param string $query + * @param string|null $query * @param array $params * @return \Kirby\Cms\Pages */ @@ -1288,7 +1291,7 @@ class Page extends ModelWithContent * more reliable in connection with the inventory * than computing the dirname afterwards * - * @param string $dirname + * @param string|null $dirname * @return self */ protected function setDirname(string $dirname = null) @@ -1312,7 +1315,7 @@ class Page extends ModelWithContent /** * Sets the sorting number * - * @param int $num + * @param int|null $num * @return self */ protected function setNum(int $num = null) @@ -1360,7 +1363,7 @@ class Page extends ModelWithContent /** * Sets the intended template * - * @param string $template + * @param string|null $template * @return self */ protected function setTemplate(string $template = null) @@ -1375,7 +1378,7 @@ class Page extends ModelWithContent /** * Sets the Url * - * @param string $url + * @param string|null $url * @return self */ protected function setUrl(string $url = null) @@ -1570,8 +1573,8 @@ class Page extends ModelWithContent * Builds the Url for a specific language * * @internal - * @param string $language - * @param array $options + * @param string|null $language + * @param array|null $options * @return string */ public function urlForLanguage($language = null, array $options = null): string diff --git a/kirby/src/Cms/PageActions.php b/kirby/src/Cms/PageActions.php index dcc9c74..ccaec93 100755 --- a/kirby/src/Cms/PageActions.php +++ b/kirby/src/Cms/PageActions.php @@ -4,7 +4,6 @@ namespace Kirby\Cms; use Closure; use Kirby\Exception\DuplicateException; -use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; use Kirby\Exception\NotFoundException; @@ -28,8 +27,9 @@ trait PageActions * The sorting number must already be correct * when the method is called * - * @param int $num + * @param int|null $num * @return self + * @throws \Kirby\Exception\LogicException If a draft is being sorted or the directory cannot be moved */ public function changeNum(int $num = null) { @@ -74,8 +74,9 @@ trait PageActions * Changes the slug/uid of the page * * @param string $slug - * @param string $languageCode + * @param string|null $languageCode * @return self + * @throws \Kirby\Exception\LogicException If the directory cannot be moved */ public function changeSlug(string $slug, string $languageCode = null) { @@ -137,8 +138,10 @@ trait PageActions * Change the slug for a specific language * * @param string $slug - * @param string $languageCode + * @param string|null $languageCode * @return self + * @throws \Kirby\Exception\NotFoundException If the language for the given language code cannot be found + * @throws \Kirby\Exception\InvalidArgumentException If the slug for the default language is being changed */ protected function changeSlugForLanguage(string $slug, string $languageCode = null) { @@ -168,8 +171,9 @@ trait PageActions * to either draft, listed or unlisted * * @param string $status "draft", "listed" or "unlisted" - * @param int $position Optional sorting number + * @param int|null $position Optional sorting number * @return self + * @throws \Kirby\Exception\InvalidArgumentException If an invalid status is being passed */ public function changeStatus(string $status, int $position = null) { @@ -181,10 +185,13 @@ trait PageActions case 'unlisted': return $this->changeStatusToUnlisted(); default: - throw new Exception('Invalid status: ' . $status); + throw new InvalidArgumentException('Invalid status: ' . $status); } } + /** + * @return self + */ protected function changeStatusToDraft() { $arguments = ['page' => $this, 'status' => 'draft', 'position' => null]; @@ -245,6 +252,7 @@ trait PageActions * * @param string $template * @return self + * @throws \Kirby\Exception\LogicException If the textfile cannot be renamed/moved */ public function changeTemplate(string $template) { @@ -312,7 +320,7 @@ trait PageActions * * @param string $action * @param array $arguments - * @param Closure $callback + * @param \Closure $callback * @return mixed */ protected function commit(string $action, array $arguments, Closure $callback) @@ -346,6 +354,7 @@ trait PageActions * * @param array $options * @return \Kirby\Cms\Page + * @throws \Kirby\Exception\DuplicateException If the page already exists */ public function copy(array $options = []) { @@ -491,7 +500,7 @@ trait PageActions * Create the sorting number for the page * depending on the blueprint settings * - * @param int $num + * @param int|null $num * @return int */ public function createNum(int $num = null): int @@ -604,7 +613,7 @@ trait PageActions * Duplicates the page with the given * slug and optionally copies all files * - * @param string $slug + * @param string|null $slug * @param array $options * @return \Kirby\Cms\Page */ @@ -626,6 +635,10 @@ trait PageActions }); } + /** + * @return self + * @throws \Kirby\Exception\LogicException If the folder cannot be moved + */ public function publish() { if ($this->isDraft() === false) { @@ -676,6 +689,11 @@ trait PageActions return $this; } + /** + * @param int|null $position + * @return bool + * @throws \Kirby\Exception\LogicException If the page is not included in the siblings collection + */ protected function resortSiblingsAfterListing(int $position = null): bool { // get all siblings including the current page @@ -722,6 +740,9 @@ trait PageActions return true; } + /** + * @return bool + */ public function resortSiblingsAfterUnlisting(): bool { $index = 0; @@ -746,6 +767,10 @@ trait PageActions return true; } + /** + * @param null $position + * @return self + */ public function sort($position = null) { return $this->changeStatus('listed', $position); @@ -756,6 +781,7 @@ trait PageActions * unlisted to draft. * * @return self + * @throws \Kirby\Exception\LogicException If the folder cannot be moved */ public function unpublish() { @@ -789,8 +815,8 @@ trait PageActions /** * Updates the page data * - * @param array $input - * @param string $language + * @param array|null $input + * @param string|null $language * @param bool $validate * @return self */ diff --git a/kirby/src/Cms/PageBlueprint.php b/kirby/src/Cms/PageBlueprint.php index 3771e4b..bef7ba1 100755 --- a/kirby/src/Cms/PageBlueprint.php +++ b/kirby/src/Cms/PageBlueprint.php @@ -180,7 +180,7 @@ class PageBlueprint extends Blueprint /** * Returns the preview settings - * The preview setting controlls the "Open" + * The preview setting controls the "Open" * button in the panel and redirects it to a * different URL if necessary. * diff --git a/kirby/src/Cms/PagePermissions.php b/kirby/src/Cms/PagePermissions.php index 1f79353..acb0adf 100755 --- a/kirby/src/Cms/PagePermissions.php +++ b/kirby/src/Cms/PagePermissions.php @@ -13,18 +13,30 @@ namespace Kirby\Cms; */ class PagePermissions extends ModelPermissions { + /** + * @var string + */ protected $category = 'pages'; + /** + * @return bool + */ protected function canChangeSlug(): bool { return $this->model->isHomeOrErrorPage() !== true; } + /** + * @return bool + */ protected function canChangeStatus(): bool { return $this->model->isErrorPage() !== true; } + /** + * @return bool + */ protected function canChangeTemplate(): bool { if ($this->model->isHomeOrErrorPage() === true) { @@ -38,11 +50,17 @@ class PagePermissions extends ModelPermissions return true; } + /** + * @return bool + */ protected function canDelete(): bool { return $this->model->isHomeOrErrorPage() !== true; } + /** + * @return bool + */ protected function canSort(): bool { if ($this->model->isErrorPage() === true) { diff --git a/kirby/src/Cms/PagePicker.php b/kirby/src/Cms/PagePicker.php index e8529ac..40ece5f 100755 --- a/kirby/src/Cms/PagePicker.php +++ b/kirby/src/Cms/PagePicker.php @@ -185,6 +185,7 @@ class PagePicker extends Picker * Search for pages by query string * * @return \Kirby\Cms\Pages + * @throws \Kirby\Exception\InvalidArgumentException */ public function itemsForQuery() { diff --git a/kirby/src/Cms/PageRules.php b/kirby/src/Cms/PageRules.php index d385237..0e863b5 100755 --- a/kirby/src/Cms/PageRules.php +++ b/kirby/src/Cms/PageRules.php @@ -19,6 +19,14 @@ use Kirby\Toolkit\Str; */ class PageRules { + /** + * Validates if the sorting number of the page can be changed + * + * @param \Kirby\Cms\Page $page + * @param int|null $num + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the given number is invalid + */ public static function changeNum(Page $page, int $num = null): bool { if ($num !== null && $num < 0) { @@ -28,6 +36,15 @@ class PageRules return true; } + /** + * Validates if the slug for the page can be changed + * + * @param \Kirby\Cms\Page $page + * @param string $slug + * @return bool + * @throws \Kirby\Exception\DuplicateException If a page with this slug already exists + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the slug + */ public static function changeSlug(Page $page, string $slug): bool { if ($page->permissions()->changeSlug() !== true) { @@ -39,6 +56,8 @@ class PageRules ]); } + self::validateSlugLength($slug); + $siblings = $page->parentModel()->children(); $drafts = $page->parentModel()->drafts(); @@ -67,6 +86,15 @@ class PageRules return true; } + /** + * Validates if the status for the page can be changed + * + * @param \Kirby\Cms\Page $page + * @param string $status + * @param int|null $position + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the given status is invalid + */ public static function changeStatus(Page $page, string $status, int $position = null): bool { if (isset($page->blueprint()->status()[$status]) === false) { @@ -85,6 +113,13 @@ class PageRules } } + /** + * Validates if a page can be converted to a draft + * + * @param \Kirby\Cms\Page $page + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the status or the page cannot be converted to a draft + */ public static function changeStatusToDraft(Page $page) { if ($page->permissions()->changeStatus() !== true) { @@ -108,6 +143,15 @@ class PageRules return true; } + /** + * Validates if the status of a page can be changed to listed + * + * @param \Kirby\Cms\Page $page + * @param int $position + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the given position is invalid + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the status or the status for the page cannot be changed by any user + */ public static function changeStatusToListed(Page $page, int $position) { // no need to check for status changing permissions, @@ -148,6 +192,13 @@ class PageRules return true; } + /** + * Validates if the status of a page can be changed to unlisted + * + * @param \Kirby\Cms\Page $page + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the status + */ public static function changeStatusToUnlisted(Page $page) { if ($page->permissions()->changeStatus() !== true) { @@ -162,6 +213,15 @@ class PageRules return true; } + /** + * Validates if the template of the page can be changed + * + * @param \Kirby\Cms\Page $page + * @param string $template + * @return bool + * @throws \Kirby\Exception\LogicException If the template of the page cannot be changed at all + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the template + */ public static function changeTemplate(Page $page, string $template): bool { if ($page->permissions()->changeTemplate() !== true) { @@ -183,6 +243,15 @@ class PageRules return true; } + /** + * Validates if the title of the page can be changed + * + * @param \Kirby\Cms\Page $page + * @param string $title + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the new title is empty + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the title + */ public static function changeTitle(Page $page, string $title): bool { if (Str::length($title) === 0) { @@ -203,6 +272,15 @@ class PageRules return true; } + /** + * Validates if the page can be created + * + * @param \Kirby\Cms\Page $page + * @return bool + * @throws \Kirby\Exception\DuplicateException If the same page or a draft already exists + * @throws \Kirby\Exception\InvalidArgumentException If the slug is invalid + * @throws \Kirby\Exception\PermissionException If the user is not allowed to create this page + */ public static function create(Page $page): bool { if (Str::length($page->slug()) < 1) { @@ -211,6 +289,8 @@ class PageRules ]); } + self::validateSlugLength($page->slug()); + if ($page->exists() === true) { throw new DuplicateException([ 'key' => 'page.draft.duplicate', @@ -250,6 +330,15 @@ class PageRules return true; } + /** + * Validates if the page can be deleted + * + * @param \Kirby\Cms\Page $page + * @param bool $force + * @return bool + * @throws \Kirby\Exception\LogicException If the page has children and should not be force-deleted + * @throws \Kirby\Exception\PermissionException If the user is not allowed to delete the page + */ public static function delete(Page $page, bool $force = false): bool { if ($page->permissions()->delete() !== true) { @@ -268,6 +357,15 @@ class PageRules return true; } + /** + * Validates if the page can be duplicated + * + * @param \Kirby\Cms\Page $page + * @param string $slug + * @param array $options + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to duplicate the page + */ public static function duplicate(Page $page, string $slug, array $options = []): bool { if ($page->permissions()->duplicate() !== true) { @@ -282,6 +380,14 @@ class PageRules return true; } + /** + * Validates if the page can be updated + * + * @param \Kirby\Cms\Page $page + * @param array $content + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to update the page + */ public static function update(Page $page, array $content = []): bool { if ($page->permissions()->update() !== true) { @@ -295,4 +401,28 @@ class PageRules return true; } + + /** + * Ensures that the slug doesn't exceed the maximum length to make + * sure that the directory name will be accepted by the filesystem + * + * @param string $slug New slug to check + * @return void + * @throws \Kirby\Exception\InvalidArgumentException If the slug is too long + */ + protected static function validateSlugLength(string $slug): void + { + if ($slugsMaxlength = App::instance()->option('slugs.maxlength', 255)) { + $maxlength = (int)$slugsMaxlength; + + if (Str::length($slug) > $maxlength) { + throw new InvalidArgumentException([ + 'key' => 'page.slug.maxlength', + 'data' => [ + 'length' => $maxlength + ] + ]); + } + } + } } diff --git a/kirby/src/Cms/PageSiblings.php b/kirby/src/Cms/PageSiblings.php index 37e294c..f592d10 100755 --- a/kirby/src/Cms/PageSiblings.php +++ b/kirby/src/Cms/PageSiblings.php @@ -141,6 +141,7 @@ trait PageSiblings /** * @deprecated 3.0.0 Use `Page::hasNextUnlisted()` instead * @return bool + * @codeCoverageIgnore */ public function hasNextInvisible(): bool { @@ -152,6 +153,7 @@ trait PageSiblings /** * @deprecated 3.0.0 Use `Page::hasNextListed()` instead * @return bool + * @codeCoverageIgnore */ public function hasNextVisible(): bool { @@ -163,6 +165,7 @@ trait PageSiblings /** * @deprecated 3.0.0 Use `Page::hasPrevUnlisted()` instead * @return bool + * @codeCoverageIgnore */ public function hasPrevInvisible(): bool { @@ -174,6 +177,7 @@ trait PageSiblings /** * @deprecated 3.0.0 Use `Page::hasPrevListed()` instead * @return bool + * @codeCoverageIgnore */ public function hasPrevVisible(): bool { @@ -185,6 +189,7 @@ trait PageSiblings /** * @deprecated 3.0.0 Use `Page::nextUnlisted()` instead * @return self|null + * @codeCoverageIgnore */ public function nextInvisible() { @@ -197,6 +202,7 @@ trait PageSiblings /** * @deprecated 3.0.0 Use `Page::nextListed()` instead * @return self|null + * @codeCoverageIgnore */ public function nextVisible() { @@ -208,6 +214,7 @@ trait PageSiblings /** * @deprecated 3.0.0 Use `Page::prevUnlisted()` instead * @return self|null + * @codeCoverageIgnore */ public function prevInvisible() { @@ -219,6 +226,7 @@ trait PageSiblings /** * @deprecated 3.0.0 Use `Page::prevListed()` instead * @return self|null + * @codeCoverageIgnore */ public function prevVisible() { diff --git a/kirby/src/Cms/Pages.php b/kirby/src/Cms/Pages.php index 9125637..30fb10e 100755 --- a/kirby/src/Cms/Pages.php +++ b/kirby/src/Cms/Pages.php @@ -43,6 +43,7 @@ class Pages extends Collection * * @param mixed $object * @return self + * @throws \Kirby\Exception\InvalidArgumentException */ public function add($object) { @@ -136,7 +137,7 @@ class Pages extends Collection * Creates a pages collection from an array of props * * @param array $pages - * @param \Kirby\Cms\Model $model + * @param \Kirby\Cms\Model|null $model * @param bool $draft * @return self */ @@ -354,6 +355,7 @@ class Pages extends Collection * @deprecated 3.0.0 Use `Pages::unlisted()` instead * * @return self + * @codeCoverageIgnore */ public function invisible() { @@ -514,6 +516,7 @@ class Pages extends Collection * @deprecated 3.0.0 Use `Pages::listed()` instead * * @return \Kirby\Cms\Pages + * @codeCoverageIgnore */ public function visible() { diff --git a/kirby/src/Cms/Panel.php b/kirby/src/Cms/Panel.php index 922b503..acd11d4 100755 --- a/kirby/src/Cms/Panel.php +++ b/kirby/src/Cms/Panel.php @@ -24,6 +24,12 @@ use Throwable; */ class Panel { + /** + * Returns custom css path for panel ui + * + * @param \Kirby\Cms\App $kirby + * @return bool|string + */ public static function customCss(App $kirby) { if ($css = $kirby->option('panel.css')) { @@ -37,6 +43,12 @@ class Panel return false; } + /** + * Returns predefined icons path as sprite svg file + * + * @param \Kirby\Cms\App $kirby + * @return string + */ public static function icons(App $kirby): string { return F::read($kirby->root('kirby') . '/panel/dist/img/icons.svg'); @@ -48,6 +60,7 @@ class Panel * * @param \Kirby\Cms\App $kirby * @return bool + * @throws \Exception If Panel assets could not be moved to the public directory */ public static function link(App $kirby): bool { @@ -79,7 +92,7 @@ class Panel * Renders the main panel view * * @param \Kirby\Cms\App $kirby - * @return \Kirby\Cms\Response + * @return \Kirby\Http\Response */ public static function render(App $kirby) { diff --git a/kirby/src/Cms/Permissions.php b/kirby/src/Cms/Permissions.php index d9c2dee..e44b827 100755 --- a/kirby/src/Cms/Permissions.php +++ b/kirby/src/Cms/Permissions.php @@ -17,8 +17,14 @@ use Kirby\Exception\InvalidArgumentException; */ class Permissions { + /** + * @var array + */ public static $extendedActions = []; + /** + * @var array + */ protected $actions = [ 'access' => [ 'panel' => true, @@ -76,6 +82,12 @@ class Permissions ] ]; + /** + * Permissions constructor + * + * @param array $settings + * @throws \Kirby\Exception\InvalidArgumentException + */ public function __construct($settings = []) { // dynamically register the extended actions @@ -96,6 +108,11 @@ class Permissions } } + /** + * @param string|null $category + * @param string|null $action + * @return bool + */ public function for(string $category = null, string $action = null): bool { if ($action === null) { @@ -113,16 +130,31 @@ class Permissions return $this->actions[$category][$action]; } + /** + * @param string $category + * @param string $action + * @return bool + */ protected function hasAction(string $category, string $action): bool { return $this->hasCategory($category) === true && array_key_exists($action, $this->actions[$category]) === true; } + /** + * @param string $category + * @return bool + */ protected function hasCategory(string $category): bool { return array_key_exists($category, $this->actions) === true; } + /** + * @param string $category + * @param string $action + * @param $setting + * @return self + */ protected function setAction(string $category, string $action, $setting) { // wildcard to overwrite the entire category @@ -135,6 +167,10 @@ class Permissions return $this; } + /** + * @param bool $setting + * @return self + */ protected function setAll(bool $setting) { foreach ($this->actions as $categoryName => $actions) { @@ -144,6 +180,10 @@ class Permissions return $this; } + /** + * @param array $settings + * @return self + */ protected function setCategories(array $settings) { foreach ($settings as $categoryName => $categoryActions) { @@ -161,6 +201,12 @@ class Permissions return $this; } + /** + * @param string $category + * @param bool $setting + * @return self + * @throws \Kirby\Exception\InvalidArgumentException + */ protected function setCategory(string $category, bool $setting) { if ($this->hasCategory($category) === false) { @@ -174,6 +220,9 @@ class Permissions return $this; } + /** + * @return array + */ public function toArray(): array { return $this->actions; diff --git a/kirby/src/Cms/Picker.php b/kirby/src/Cms/Picker.php index c034a63..c729396 100755 --- a/kirby/src/Cms/Picker.php +++ b/kirby/src/Cms/Picker.php @@ -117,7 +117,7 @@ abstract class Picker * @param \Kirby\Cms\Collection $items * @return \Kirby\Cms\Collection */ - public function paginate($items) + public function paginate(Collection $items) { return $items->paginate([ 'limit' => $this->options['limit'], @@ -148,7 +148,7 @@ abstract class Picker * @param \Kirby\Cms\Collection $items * @return \Kirby\Cms\Collection */ - public function search($items) + public function search(Collection $items) { if (empty($this->options['search']) === false) { return $items->search($this->options['search']); diff --git a/kirby/src/Cms/Plugin.php b/kirby/src/Cms/Plugin.php index e0dedc5..e60ddae 100755 --- a/kirby/src/Cms/Plugin.php +++ b/kirby/src/Cms/Plugin.php @@ -24,11 +24,22 @@ class Plugin extends Model protected $name; protected $root; + /** + * @param string $key + * @param array|null $arguments + * @return mixed|null + */ public function __call(string $key, array $arguments = null) { return $this->info()[$key] ?? null; } + /** + * Plugin constructor + * + * @param string $name + * @param array $extends + */ public function __construct(string $name, array $extends = []) { $this->setName($name); @@ -38,11 +49,17 @@ class Plugin extends Model unset($this->extends['root']); } + /** + * @return array + */ public function extends(): array { return $this->extends; } + /** + * @return array + */ public function info(): array { if (is_array($this->info) === true) { @@ -59,36 +76,58 @@ class Plugin extends Model return $this->info = $info; } + /** + * @return string + */ public function manifest(): string { return $this->root() . '/composer.json'; } + /** + * @return string + */ public function mediaRoot(): string { return App::instance()->root('media') . '/plugins/' . $this->name(); } + /** + * @return string + */ public function mediaUrl(): string { return App::instance()->url('media') . '/plugins/' . $this->name(); } + /** + * @return string + */ public function name(): string { return $this->name; } + /** + * @param string $key + * @return mixed + */ public function option(string $key) { return $this->kirby()->option($this->prefix() . '.' . $key); } + /** + * @return string + */ public function prefix(): string { return str_replace('/', '.', $this->name()); } + /** + * @return string + */ public function root(): string { return $this->root; @@ -97,6 +136,7 @@ class Plugin extends Model /** * @param string $name * @return self + * @throws \Kirby\Exception\InvalidArgumentException */ protected function setName(string $name) { @@ -108,6 +148,9 @@ class Plugin extends Model return $this; } + /** + * @return array + */ public function toArray(): array { return $this->propertiesToArray(); diff --git a/kirby/src/Cms/Responder.php b/kirby/src/Cms/Responder.php index 0ed5169..3b91da7 100755 --- a/kirby/src/Cms/Responder.php +++ b/kirby/src/Cms/Responder.php @@ -57,7 +57,7 @@ class Responder /** * Setter and getter for the response body * - * @param string $body + * @param string|null $body * @return string|self */ public function body(string $body = null) @@ -73,7 +73,7 @@ class Responder /** * Setter and getter for the status code * - * @param int $code + * @param int|null $code * @return int|self */ public function code(int $code = null) @@ -124,7 +124,7 @@ class Responder /** * Setter and getter for all headers * - * @param array $headers + * @param array|null $headers * @return array|self */ public function headers(array $headers = null) @@ -140,7 +140,7 @@ class Responder /** * Shortcut to configure a json response * - * @param array $json + * @param array|null $json * @return string|self */ public function json(array $json = null) @@ -203,7 +203,7 @@ class Responder /** * Setter and getter for the content type * - * @param string $type + * @param string|null $type * @return string|self */ public function type(string $type = null) diff --git a/kirby/src/Cms/Response.php b/kirby/src/Cms/Response.php index 5eb6d88..fe2deca 100755 --- a/kirby/src/Cms/Response.php +++ b/kirby/src/Cms/Response.php @@ -19,8 +19,8 @@ class Response extends \Kirby\Http\Response * parses locations with the Url::to method * first. * - * @param string $location - * @param int $code + * @param string|null $location + * @param int|null $code * @return self */ public static function redirect(?string $location = null, ?int $code = null) diff --git a/kirby/src/Cms/Role.php b/kirby/src/Cms/Role.php index 0405c35..35a9a49 100755 --- a/kirby/src/Cms/Role.php +++ b/kirby/src/Cms/Role.php @@ -39,11 +39,18 @@ class Role extends Model return $this->toArray(); } + /** + * @return string + */ public function __toString(): string { return $this->name(); } + /** + * @param array $inject + * @return self + */ public static function admin(array $inject = []) { try { @@ -53,6 +60,9 @@ class Role extends Model } } + /** + * @return array + */ protected static function defaults(): array { return [ @@ -71,6 +81,9 @@ class Role extends Model ]; } + /** + * @return mixed + */ public function description() { return $this->description; @@ -86,16 +99,25 @@ class Role extends Model return new static($props + $inject); } + /** + * @return string + */ public function id(): string { return $this->name(); } + /** + * @return bool + */ public function isAdmin(): bool { return $this->name() === 'admin'; } + /** + * @return bool + */ public function isNobody(): bool { return $this->name() === 'nobody'; @@ -114,6 +136,9 @@ class Role extends Model return static::factory($data, $inject); } + /** + * @return string + */ public function name(): string { return $this->name; @@ -180,6 +205,9 @@ class Role extends Model return $this; } + /** + * @return string + */ public function title(): string { return $this->title = $this->title ?? ucfirst($this->name()); diff --git a/kirby/src/Cms/Roles.php b/kirby/src/Cms/Roles.php index 9095633..de9a08e 100755 --- a/kirby/src/Cms/Roles.php +++ b/kirby/src/Cms/Roles.php @@ -24,6 +24,7 @@ class Roles extends Collection * current user * * @return self + * @throws \Exception */ public function canBeChanged() { @@ -47,6 +48,7 @@ class Roles extends Collection * current user * * @return self + * @throws \Exception */ public function canBeCreated() { @@ -89,7 +91,7 @@ class Roles extends Collection } /** - * @param string $root + * @param string|null $root * @param array $inject * @return self */ diff --git a/kirby/src/Cms/Search.php b/kirby/src/Cms/Search.php index 91d68be..d4fd894 100755 --- a/kirby/src/Cms/Search.php +++ b/kirby/src/Cms/Search.php @@ -17,7 +17,7 @@ namespace Kirby\Cms; class Search { /** - * @param string $query + * @param string|null $query * @param array $params * @return \Kirby\Cms\Files */ @@ -30,7 +30,7 @@ class Search * Native search method to search for anything within the collection * * @param \Kirby\Cms\Collection $collection - * @param string $query + * @param string|null $query * @param mixed $params * @return \Kirby\Cms\Collection|bool */ @@ -41,7 +41,7 @@ class Search } /** - * @param string $query + * @param string|null $query * @param array $params * @return \Kirby\Cms\Pages */ @@ -51,7 +51,7 @@ class Search } /** - * @param string $query + * @param string|null $query * @param array $params * @return \Kirby\Cms\Users */ diff --git a/kirby/src/Cms/Section.php b/kirby/src/Cms/Section.php index 6e7abbc..a8d62e7 100755 --- a/kirby/src/Cms/Section.php +++ b/kirby/src/Cms/Section.php @@ -31,6 +31,13 @@ class Section extends Component public static $types = []; + /** + * Section constructor. + * + * @param string $type + * @param array $attrs + * @throws \Kirby\Exception\InvalidArgumentException + */ public function __construct(string $type, array $attrs = []) { if (isset($attrs['model']) === false) { @@ -60,6 +67,9 @@ class Section extends Component return $this->model; } + /** + * @return array + */ public function toArray(): array { $array = parent::toArray(); @@ -69,6 +79,9 @@ class Section extends Component return $array; } + /** + * @return array + */ public function toResponse(): array { return array_merge([ diff --git a/kirby/src/Cms/Site.php b/kirby/src/Cms/Site.php index cf1334c..eab8597 100755 --- a/kirby/src/Cms/Site.php +++ b/kirby/src/Cms/Site.php @@ -140,6 +140,17 @@ class Site extends ModelWithContent ]); } + /** + * Makes it possible to convert the site model + * to a string. Mostly useful for debugging + * + * @return string + */ + public function __toString(): string + { + return $this->url(); + } + /** * Returns the url to the api endpoint * @@ -170,32 +181,6 @@ class Site extends ModelWithContent return $this->blueprint = SiteBlueprint::factory('site', null, $this); } - /** - * Returns an array with all blueprints that are available - * as subpages of the site - * - * @param string $inSection - * @return array - */ - public function blueprints(string $inSection = null): array - { - $blueprints = []; - $blueprint = $this->blueprint(); - $sections = $inSection !== null ? [$blueprint->section($inSection)] : $blueprint->sections(); - - foreach ($sections as $section) { - if ($section === null) { - continue; - } - - foreach ((array)$section->blueprints() as $blueprint) { - $blueprints[$blueprint['name']] = $blueprint; - } - } - - return array_values($blueprints); - } - /** * Builds a breadcrumb collection * @@ -220,7 +205,7 @@ class Site extends ModelWithContent * * @internal * @param array $data - * @param string $languageCode + * @param string|null $languageCode * @return array */ public function contentFileData(array $data, string $languageCode = null): array @@ -391,7 +376,7 @@ class Site extends ModelWithContent * prop, the home page will be returned if * it can be found. (see `Site::homePage()`) * - * @param string $path + * @param string|null $path * @return \Kirby\Cms\Page|null */ public function page(string $path = null) @@ -507,7 +492,7 @@ class Site extends ModelWithContent /** * Search all pages in the site * - * @param string $query + * @param string|null $query * @param array $params * @return \Kirby\Cms\Pages */ @@ -578,7 +563,7 @@ class Site extends ModelWithContent /** * Sets the Url * - * @param string $url + * @param string|null $url * @return self */ protected function setUrl($url = null) @@ -626,8 +611,8 @@ class Site extends ModelWithContent * Returns the translated url * * @internal - * @param string $languageCode - * @param array $options + * @param string|null $languageCode + * @param array|null $options * @return string */ public function urlForLanguage(string $languageCode = null, array $options = null): string diff --git a/kirby/src/Cms/SiteBlueprint.php b/kirby/src/Cms/SiteBlueprint.php index 72d84be..9b58538 100755 --- a/kirby/src/Cms/SiteBlueprint.php +++ b/kirby/src/Cms/SiteBlueprint.php @@ -41,7 +41,7 @@ class SiteBlueprint extends Blueprint /** * Returns the preview settings - * The preview setting controlls the "Open" + * The preview setting controls the "Open" * button in the panel and redirects it to a * different URL if necessary. * diff --git a/kirby/src/Cms/SiteRules.php b/kirby/src/Cms/SiteRules.php index 8fd1d03..f4797fd 100755 --- a/kirby/src/Cms/SiteRules.php +++ b/kirby/src/Cms/SiteRules.php @@ -17,6 +17,15 @@ use Kirby\Toolkit\Str; */ class SiteRules { + /** + * Validates if the site title can be changed + * + * @param \Kirby\Cms\Site $site + * @param string $title + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the title is empty + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the title + */ public static function changeTitle(Site $site, string $title): bool { if ($site->permissions()->changeTitle() !== true) { @@ -30,6 +39,14 @@ class SiteRules return true; } + /** + * Validates if the site can be updated + * + * @param \Kirby\Cms\Site $site + * @param array $content + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to update the site + */ public static function update(Site $site, array $content = []): bool { if ($site->permissions()->update() !== true) { diff --git a/kirby/src/Cms/Structure.php b/kirby/src/Cms/Structure.php index f1c3602..5050690 100755 --- a/kirby/src/Cms/Structure.php +++ b/kirby/src/Cms/Structure.php @@ -24,7 +24,7 @@ class Structure extends Collection * Creates a new Collection with the given objects * * @param array $objects - * @param object $parent + * @param object|null $parent */ public function __construct($objects = [], $parent = null) { @@ -40,6 +40,7 @@ class Structure extends Collection * * @param string $id * @param array|StructureObject $props + * @throws \Kirby\Exception\InvalidArgumentException */ public function __set(string $id, $props) { diff --git a/kirby/src/Cms/StructureObject.php b/kirby/src/Cms/StructureObject.php index e04a78a..5496f6f 100755 --- a/kirby/src/Cms/StructureObject.php +++ b/kirby/src/Cms/StructureObject.php @@ -170,7 +170,7 @@ class StructureObject extends Model /** * Sets the parent Structure collection * - * @param \Kirby\Cms\Structure $structure + * @param \Kirby\Cms\Structure|null $structure * @return self */ protected function setStructure(Structure $structure = null) diff --git a/kirby/src/Cms/System.php b/kirby/src/Cms/System.php index 0ec28c9..70f6779 100755 --- a/kirby/src/Cms/System.php +++ b/kirby/src/Cms/System.php @@ -33,7 +33,7 @@ use Throwable; class System { /** - * @var App + * @var \Kirby\Cms\App */ protected $app; @@ -135,6 +135,7 @@ class System * if they don't exist yet * * @return void + * @throws \Kirby\Exception\PermissionException */ public function init() { @@ -374,9 +375,11 @@ class System * and adds it to the .license file in the config * folder if possible. * - * @param string $license - * @param string $email + * @param string|null $license + * @param string|null $email * @return bool + * @throws \Kirby\Exception\Exception + * @throws \Kirby\Exception\InvalidArgumentException */ public function register(string $license = null, string $email = null): bool { diff --git a/kirby/src/Cms/Translation.php b/kirby/src/Cms/Translation.php index 66efb3d..b4b3a33 100755 --- a/kirby/src/Cms/Translation.php +++ b/kirby/src/Cms/Translation.php @@ -113,8 +113,8 @@ class Translation * string by key * * @param string $key - * @param string $default - * @return void + * @param string|null $default + * @return string|null */ public function get(string $key, string $default = null): ?string { diff --git a/kirby/src/Cms/Translations.php b/kirby/src/Cms/Translations.php index 468f782..d55ce61 100755 --- a/kirby/src/Cms/Translations.php +++ b/kirby/src/Cms/Translations.php @@ -19,11 +19,19 @@ use Kirby\Toolkit\F; */ class Translations extends Collection { + /** + * @param string $code + * @return void + */ public function start(string $code): void { F::move($this->parent->contentFile('', true), $this->parent->contentFile($code, true)); } + /** + * @param string $code + * @return void + */ public function stop(string $code): void { F::move($this->parent->contentFile($code, true), $this->parent->contentFile('', true)); diff --git a/kirby/src/Cms/Url.php b/kirby/src/Cms/Url.php index af7fcbd..3f743db 100755 --- a/kirby/src/Cms/Url.php +++ b/kirby/src/Cms/Url.php @@ -54,7 +54,7 @@ class Url extends BaseUrl /** * Smart resolver for internal and external urls * - * @param string $path + * @param string|null $path * @param array|string|null $options Either an array of options for the Uri class or a language string * @return string */ diff --git a/kirby/src/Cms/User.php b/kirby/src/Cms/User.php index f58f8f1..69f3480 100755 --- a/kirby/src/Cms/User.php +++ b/kirby/src/Cms/User.php @@ -82,7 +82,7 @@ class User extends ModelWithContent public static $models = []; /** - * @var string + * @var \Kirby\Cms\Field */ protected $name; @@ -176,7 +176,7 @@ class User extends ModelWithContent /** * Returns the UserBlueprint object * - * @return \Kirby\Cms\UserBlueprint + * @return \Kirby\Cms\Blueprint */ public function blueprint() { @@ -200,7 +200,7 @@ class User extends ModelWithContent * * @internal * @param array $data - * @param string $languageCode Not used so far + * @param string $languageCode|null Not used so far * @return array */ public function contentFileData(array $data, string $languageCode = null): array @@ -400,10 +400,8 @@ class User extends ModelWithContent * Logs the user in * * @param string $password - * @param \Kirby\Session\Session|array $session Session options or session object to set the user in + * @param \Kirby\Session\Session|array|null $session Session options or session object to set the user in * @return bool - * - * @throws \Kirby\Exception\PermissionException If the password is not valid */ public function login(string $password, $session = null): bool { @@ -416,7 +414,7 @@ class User extends ModelWithContent /** * Logs the user in without checking the password * - * @param \Kirby\Session\Session|array $session Session options or session object to set the user in + * @param \Kirby\Session\Session|array|null $session Session options or session object to set the user in * @return void */ public function loginPasswordless($session = null): void @@ -437,7 +435,7 @@ class User extends ModelWithContent /** * Logs the user out * - * @param \Kirby\Session\Session|array $session Session options or session object to unset the user in + * @param \Kirby\Session\Session|array|null $session Session options or session object to unset the user in * @return void */ public function logout($session = null): void @@ -757,7 +755,7 @@ class User extends ModelWithContent /** * Sets the user email * - * @param string $email + * @param string $email|null * @return self */ protected function setEmail(string $email = null) @@ -771,7 +769,7 @@ class User extends ModelWithContent /** * Sets the user id * - * @param string $id + * @param string $id|null * @return self */ protected function setId(string $id = null) @@ -783,7 +781,7 @@ class User extends ModelWithContent /** * Sets the user language * - * @param string $language + * @param string $language|null * @return self */ protected function setLanguage(string $language = null) @@ -795,7 +793,7 @@ class User extends ModelWithContent /** * Sets the user name * - * @param string $name + * @param string $name|null * @return self */ protected function setName(string $name = null) @@ -807,7 +805,7 @@ class User extends ModelWithContent /** * Sets the user's password hash * - * @param string $password + * @param string $password|null * @return self */ protected function setPassword(string $password = null) @@ -819,7 +817,7 @@ class User extends ModelWithContent /** * Sets the user role * - * @param string $role + * @param string $role|null * @return self */ protected function setRole(string $role = null) @@ -907,12 +905,12 @@ class User extends ModelWithContent /** * Compares the given password with the stored one * - * @param string $password + * @param string $password|null * @return bool * * @throws \Kirby\Exception\NotFoundException If the user has no password * @throws \Kirby\Exception\InvalidArgumentException If the entered password is not valid - * @throws \Kirby\Exception\InvalidArgumentException If the entered password does not match the user password + * or does not match the user password */ public function validatePassword(string $password = null): bool { diff --git a/kirby/src/Cms/UserActions.php b/kirby/src/Cms/UserActions.php index 1fffc2a..534ac5e 100755 --- a/kirby/src/Cms/UserActions.php +++ b/kirby/src/Cms/UserActions.php @@ -136,8 +136,9 @@ trait UserActions * * @param string $action * @param array $arguments - * @param Closure $callback + * @param \Closure $callback * @return mixed + * @throws \Kirby\Exception\PermissionException */ protected function commit(string $action, array $arguments = [], Closure $callback) { @@ -170,7 +171,7 @@ trait UserActions /** * Creates a new User from the given props and returns a new User object * - * @param array $props + * @param array|null $props * @return self */ public static function create(array $props = null) @@ -245,6 +246,7 @@ trait UserActions * Deletes the user * * @return bool + * @throws \Kirby\Exception\LogicException */ public function delete(): bool { @@ -299,8 +301,8 @@ trait UserActions /** * Updates the user data * - * @param array $input - * @param string $language + * @param array|null $input + * @param string|null $language * @param bool $validate * @return self */ @@ -342,7 +344,7 @@ trait UserActions /** * Writes the password to disk * - * @param string $password + * @param string|null $password * @return bool */ protected function writePassword(string $password = null): bool diff --git a/kirby/src/Cms/UserBlueprint.php b/kirby/src/Cms/UserBlueprint.php index e86c89c..ae55569 100755 --- a/kirby/src/Cms/UserBlueprint.php +++ b/kirby/src/Cms/UserBlueprint.php @@ -14,6 +14,12 @@ namespace Kirby\Cms; */ class UserBlueprint extends Blueprint { + /** + * UserBlueprint constructor. + * + * @param array $props + * @throws \Kirby\Exception\InvalidArgumentException + */ public function __construct(array $props) { // normalize and translate the description diff --git a/kirby/src/Cms/UserPermissions.php b/kirby/src/Cms/UserPermissions.php index f3b8e22..35c706a 100755 --- a/kirby/src/Cms/UserPermissions.php +++ b/kirby/src/Cms/UserPermissions.php @@ -13,8 +13,16 @@ namespace Kirby\Cms; */ class UserPermissions extends ModelPermissions { + /** + * @var string + */ protected $category = 'users'; + /** + * UserPermissions constructor + * + * @param \Kirby\Cms\Model $model + */ public function __construct(Model $model) { parent::__construct($model); @@ -23,11 +31,17 @@ class UserPermissions extends ModelPermissions $this->category = $this->user && $this->user->is($model) ? 'user' : 'users'; } + /** + * @return bool + */ protected function canChangeRole(): bool { return $this->model->roles()->count() > 1; } + /** + * @return bool + */ protected function canCreate(): bool { // the admin can always create new users @@ -43,6 +57,9 @@ class UserPermissions extends ModelPermissions return true; } + /** + * @return bool + */ protected function canDelete(): bool { return $this->model->isLastAdmin() !== true; diff --git a/kirby/src/Cms/UserPicker.php b/kirby/src/Cms/UserPicker.php index 98780db..a23799a 100755 --- a/kirby/src/Cms/UserPicker.php +++ b/kirby/src/Cms/UserPicker.php @@ -34,6 +34,7 @@ class UserPicker extends Picker * Search all users for the picker * * @return \Kirby\Cms\Users|null + * @throws \Kirby\Exception\InvalidArgumentException */ public function items() { diff --git a/kirby/src/Cms/UserRules.php b/kirby/src/Cms/UserRules.php index 20ed836..2e262cf 100755 --- a/kirby/src/Cms/UserRules.php +++ b/kirby/src/Cms/UserRules.php @@ -20,6 +20,14 @@ use Kirby\Toolkit\V; */ class UserRules { + /** + * Validates if the email address can be changed + * + * @param \Kirby\Cms\User $user + * @param string $email + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the address + */ public static function changeEmail(User $user, string $email): bool { if ($user->permissions()->changeEmail() !== true) { @@ -32,6 +40,14 @@ class UserRules return static::validEmail($user, $email); } + /** + * Validates if the language can be changed + * + * @param \Kirby\Cms\User $user + * @param string $language + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the language + */ public static function changeLanguage(User $user, string $language): bool { if ($user->permissions()->changeLanguage() !== true) { @@ -44,6 +60,14 @@ class UserRules return static::validLanguage($user, $language); } + /** + * Validates if the name can be changed + * + * @param \Kirby\Cms\User $user + * @param string $name + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the name + */ public static function changeName(User $user, string $name): bool { if ($user->permissions()->changeName() !== true) { @@ -56,6 +80,14 @@ class UserRules return true; } + /** + * Validates if the password can be changed + * + * @param \Kirby\Cms\User $user + * @param string $password + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the password + */ public static function changePassword(User $user, string $password): bool { if ($user->permissions()->changePassword() !== true) { @@ -68,6 +100,15 @@ class UserRules return static::validPassword($user, $password); } + /** + * Validates if the role can be changed + * + * @param \Kirby\Cms\User $user + * @param string $role + * @return bool + * @throws \Kirby\Exception\LogicException If the user is the last admin + * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the role + */ public static function changeRole(User $user, string $role): bool { // protect admin from role changes by non-admin @@ -110,19 +151,27 @@ class UserRules return true; } + /** + * Validates if the user can be created + * + * @param \Kirby\Cms\User $user + * @param array $props + * @return bool + * @throws \Kirby\Exception\PermissionException If the user is not allowed to create a new user + */ public static function create(User $user, array $props = []): bool { static::validId($user, $user->id()); static::validEmail($user, $user->email(), true); static::validLanguage($user, $user->language()); - + if (empty($props['password']) === false) { static::validPassword($user, $props['password']); } // get the current user if it exists $currentUser = $user->kirby()->user(); - + // admins are allowed everything if ($currentUser && $currentUser->isAdmin() === true) { return true; @@ -136,7 +185,7 @@ class UserRules 'key' => 'user.create.permission' ]); } - + // check user permissions (if not on install) if ($user->kirby()->users()->count() > 0) { if ($user->permissions()->create() !== true) { @@ -149,6 +198,14 @@ class UserRules return true; } + /** + * Validates if the user can be deleted + * + * @param \Kirby\Cms\User $user + * @return bool + * @throws \Kirby\Exception\LogicException If this is the last user or last admin, which cannot be deleted + * @throws \Kirby\Exception\PermissionException If the user is not allowed to delete this user + */ public static function delete(User $user): bool { if ($user->isLastAdmin() === true) { @@ -171,6 +228,15 @@ class UserRules return true; } + /** + * Validates if the user can be updated + * + * @param \Kirby\Cms\User $user + * @param array $values + * @param array $strings + * @return bool + * @throws \Kirby\Exception\PermissionException If the user it not allowed to update this user + */ public static function update(User $user, array $values = [], array $strings = []): bool { if ($user->permissions()->update() !== true) { @@ -183,6 +249,16 @@ class UserRules return true; } + /** + * Validates an email address + * + * @param \Kirby\Cms\User $user + * @param string $email + * @param bool $strict + * @return bool + * @throws \Kirby\Exception\DuplicateException If the email address already exists + * @throws \Kirby\Exception\InvalidArgumentException If the email address is invalid + */ public static function validEmail(User $user, string $email, bool $strict = false): bool { if (V::email($email ?? null) === false) { @@ -207,6 +283,14 @@ class UserRules return true; } + /** + * Validates a user id + * + * @param \Kirby\Cms\User $user + * @param string $id + * @return bool + * @throws \Kirby\Exception\DuplicateException If the user already exists + */ public static function validId(User $user, string $id): bool { if ($user->kirby()->users()->find($id)) { @@ -216,6 +300,14 @@ class UserRules return true; } + /** + * Validates a user language code + * + * @param \Kirby\Cms\User $user + * @param string $language + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the language does not exist + */ public static function validLanguage(User $user, string $language): bool { if (in_array($language, $user->kirby()->translations()->keys(), true) === false) { @@ -227,6 +319,14 @@ class UserRules return true; } + /** + * Validates a password + * + * @param \Kirby\Cms\User $user + * @param string $password + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the password is too short + */ public static function validPassword(User $user, string $password): bool { if (Str::length($password ?? null) < 8) { @@ -238,6 +338,14 @@ class UserRules return true; } + /** + * Validates a user role + * + * @param \Kirby\Cms\User $user + * @param string $role + * @return bool + * @throws \Kirby\Exception\InvalidArgumentException If the user role does not exist + */ public static function validRole(User $user, string $role): bool { if (is_a($user->kirby()->roles()->find($role), 'Kirby\Cms\Role') === true) { diff --git a/kirby/src/Database/Database.php b/kirby/src/Database/Database.php index f770b20..6360754 100755 --- a/kirby/src/Database/Database.php +++ b/kirby/src/Database/Database.php @@ -8,7 +8,6 @@ use Kirby\Exception\InvalidArgumentException; use Kirby\Toolkit\A; use Kirby\Toolkit\Str; use PDO; -use PDOStatement; use Throwable; /** @@ -39,7 +38,7 @@ class Database /** * The established connection * - * @var PDO|null + * @var \PDO|null */ protected $connection; @@ -79,7 +78,7 @@ class Database /** * The last error * - * @var Exception|null + * @var \Exception|null */ protected $lastError; @@ -114,16 +113,16 @@ class Database /** * The PDO query statement * - * @var PDOStatement|null + * @var \PDOStatement|null */ protected $statement; /** - * Whitelists for table names + * List of existing tables in the database * * @var array|null */ - protected $tableWhitelist; + protected $tables; /** * An array with all queries which are being made @@ -156,10 +155,10 @@ class Database } /** - * Returns one of the started instance + * Returns one of the started instances * - * @param string $id - * @return self + * @param string|null $id + * @return self|null */ public static function instance(string $id = null) { @@ -180,7 +179,8 @@ 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 \Kirby\Database\Database + * @return \PDO|null + * @throws \Kirby\Exception\InvalidArgumentException */ public function connect(array $params = null) { @@ -223,9 +223,9 @@ class Database /** * Returns the currently active connection * - * @return \Kirby\Database\Database|null + * @return \PDO|null */ - public function connection() + public function connection(): ?PDO { return $this->connection; } @@ -277,10 +277,10 @@ class Database /** * Adds a value to the db trace and also returns the entire trace if nothing is specified * - * @param array $data + * @param array|null $data * @return array */ - public function trace($data = null): array + public function trace(array $data = null): array { // return the full trace if ($data === null) { @@ -336,7 +336,7 @@ class Database /** * Returns the last db error * - * @return Throwable + * @return \Throwable */ public function lastError() { @@ -363,7 +363,6 @@ class Database */ protected function hit(string $query, array $bindings = []): bool { - // try to prepare and execute the sql try { $this->statement = $this->connection->prepare($query); @@ -401,7 +400,7 @@ class Database } /** - * Exectues a sql query, which is expected to return a set of results + * Executes a sql query, which is expected to return a set of results * * @param string $query * @param array $bindings @@ -504,19 +503,19 @@ class Database */ public function validateTable(string $table): bool { - if ($this->tableWhitelist === null) { - // Get the table whitelist from the database + if ($this->tables === null) { + // Get the list of tables from the database $sql = $this->sql()->tables($this->database); $results = $this->query($sql['query'], $sql['bindings']); if ($results) { - $this->tableWhitelist = $results->pluck('name'); + $this->tables = $results->pluck('name'); } else { return false; } } - return in_array($table, $this->tableWhitelist) === true; + return in_array($table, $this->tables) === true; } /** @@ -569,8 +568,8 @@ class Database } // update cache - if (in_array($table, $this->tableWhitelist) !== true) { - $this->tableWhitelist[] = $table; + if (in_array($table, $this->tables ?? []) !== true) { + $this->tables[] = $table; } return true; @@ -582,7 +581,7 @@ class Database * @param string $table * @return bool */ - public function dropTable($table): bool + public function dropTable(string $table): bool { $sql = $this->sql()->dropTable($table); if ($this->execute($sql['query'], $sql['bindings']) !== true) { @@ -590,9 +589,9 @@ class Database } // update cache - $key = array_search($this->tableWhitelist, $table); + $key = array_search($table, $this->tables ?? []); if ($key !== false) { - unset($this->tableWhitelist[$key]); + unset($this->tables[$key]); } return true; @@ -605,6 +604,7 @@ class Database * * @param mixed $method * @param mixed $arguments + * @return \Kirby\Database\Query */ public function __call($method, $arguments = null) { diff --git a/kirby/src/Database/Db.php b/kirby/src/Database/Db.php index 8d6c9b0..00065db 100755 --- a/kirby/src/Database/Db.php +++ b/kirby/src/Database/Db.php @@ -26,7 +26,7 @@ class Db /** * The singleton Database object * - * @var Database + * @var \Kirby\Database\Database */ public static $connection = null; @@ -76,7 +76,7 @@ class Db * @param string $table * @return \Kirby\Database\Query */ - public static function table($table) + public static function table(string $table) { $db = static::connect(); return $db->table($table); @@ -117,8 +117,9 @@ class Db * @param string $method * @param mixed $arguments * @return mixed + * @throws \Kirby\Exception\InvalidArgumentException */ - public static function __callStatic($method, $arguments) + public static function __callStatic(string $method, $arguments) { if (isset(static::$queries[$method])) { return static::$queries[$method](...$arguments); diff --git a/kirby/src/Database/Query.php b/kirby/src/Database/Query.php index ea92fdf..56f775f 100755 --- a/kirby/src/Database/Query.php +++ b/kirby/src/Database/Query.php @@ -24,7 +24,7 @@ class Query /** * Parent Database object * - * @var Database + * @var \Kirby\Database\Database */ protected $database = null; @@ -251,6 +251,7 @@ class Query * * @param string $table * @return \Kirby\Database\Query + * @throws \Kirby\Exception\InvalidArgumentException if the table does not exist */ public function table(string $table) { @@ -293,7 +294,7 @@ class Query * @param string $table Name of the table, which should be joined * @param string $on The on clause for this join * @param string $type The join type. Uses an inner join by default - * @return object + * @return self */ public function join(string $table, string $on, string $type = 'JOIN') { @@ -362,7 +363,7 @@ class Query * Also can be used as getter for all attached bindings by not passing an argument. * * @param mixed $bindings Array of bindings or null to use this method as getter - * @return array|Query + * @return array|\Kirby\Database\Query */ public function bindings(array $bindings = null) { @@ -445,7 +446,7 @@ class Query /** * Attaches a group by clause * - * @param string $group + * @param string|null $group * @return \Kirby\Database\Query */ public function group(string $group = null) @@ -477,7 +478,7 @@ class Query /** * Attaches an order clause * - * @param string $order + * @param string|null $order * @return \Kirby\Database\Query */ public function order(string $order = null) @@ -489,7 +490,7 @@ class Query /** * Sets the offset for select clauses * - * @param int $offset + * @param int|null $offset * @return \Kirby\Database\Query */ public function offset(int $offset = null) @@ -501,7 +502,7 @@ class Query /** * Sets the limit for select clauses * - * @param int $limit + * @param int|null $limit * @return \Kirby\Database\Query */ public function limit(int $limit = null) @@ -515,9 +516,9 @@ class Query * This uses the SQL class to build stuff. * * @param string $type (select, update, insert) - * @return string The final query + * @return array The final query */ - public function build($type) + public function build(string $type) { $sql = $this->database->sql(); @@ -618,7 +619,7 @@ class Query * * @param string $method * @param string $column - * @param string $default An optional default value, which should be returned if the query fails + * @param int $default An optional default value, which should be returned if the query fails * @return mixed */ public function aggregate(string $method, string $column = '*', $default = 0) @@ -812,7 +813,7 @@ class Query * @param string $column * @return mixed */ - public function column($column) + public function column(string $column) { // if there isn't already an explicit order, order by the primary key // instead of the column that was requested (which would be implied otherwise) @@ -850,7 +851,7 @@ class Query * @param mixed $value * @return mixed */ - public function findBy($column, $value) + public function findBy(string $column, $value) { return $this->where([$column => $value])->first(); } @@ -869,7 +870,7 @@ class Query /** * Fires an insert query * - * @param array $values You can pass values here or set them with ->values() before + * @param mixed $values You can pass values here or set them with ->values() before * @return mixed Returns the last inserted id on success or false. */ public function insert($values = null) @@ -886,7 +887,7 @@ class Query /** * Fires an update query * - * @param array $values You can pass values here or set them with ->values() before + * @param mixed $values You can pass values here or set them with ->values() before * @param mixed $where You can pass a where clause here or set it with ->where() before * @return bool */ @@ -927,10 +928,10 @@ class Query * Builder for where and having clauses * * @param array $args Arguments, see where() description - * @param string $current Current value (like $this->where) + * @param mixed $current Current value (like $this->where) * @return string */ - protected function filterQuery($args, $current) + protected function filterQuery(array $args, $current) { $mode = A::last($args); $result = ''; diff --git a/kirby/src/Database/Sql.php b/kirby/src/Database/Sql.php index dc402b5..2c4236a 100755 --- a/kirby/src/Database/Sql.php +++ b/kirby/src/Database/Sql.php @@ -175,6 +175,7 @@ abstract class Sql * - `unique`: Whether the index (or if not set the column itself) has a UNIQUE constraint * - `default`: Default value of this column * @return array Array with `query` and `key` strings, a `unique` boolean and a `bindings` array + * @throws \Kirby\Exception\InvalidArgumentException if no column type is given or the column type is not supported. */ public function createColumn(string $name, array $column): array { @@ -408,7 +409,7 @@ abstract class Sql /** * Creates the having syntax * - * @param string $having + * @param string|null $having * @return array */ public function having(string $having = null): array @@ -455,6 +456,7 @@ abstract class Sql * @param string $type * @param string $on * @return array + * @throws \Kirby\Exception\InvalidArgumentException if an invalid join type is given */ public function join(string $type, string $table, string $on): array { @@ -489,7 +491,7 @@ abstract class Sql /** * Create the syntax for multiple joins * - * @param array $joins + * @param array|null $joins * @return array */ public function joins(array $joins = null): array @@ -692,6 +694,7 @@ abstract class Sql * @param $table string Default table if the identifier is not qualified * @param $identifier string * @return array + * @throws \Kirby\Exception\InvalidArgumentException if an invalid identifier is given */ public function splitIdentifier($table, $identifier): array { @@ -726,6 +729,7 @@ abstract class Sql * * @param string $table * @return string + * @throws \Kirby\Exception\InvalidArgumentException if an invalid table name is given */ public function tableName(string $table): string { @@ -797,7 +801,6 @@ abstract class Sql * @param string $table * @param string $column * @return bool - * * @throws \Kirby\Exception\InvalidArgumentException If the column is invalid */ public function validateColumn(string $table, string $column): bool @@ -882,6 +885,7 @@ abstract class Sql * @param string $separator * @param bool $enforceQualified * @param array + * @return array */ public function valueSet(string $table, $values, string $separator = ',', bool $enforceQualified = false): array { diff --git a/kirby/src/Form/Field.php b/kirby/src/Form/Field.php index d1cb9c5..57b8f69 100755 --- a/kirby/src/Form/Field.php +++ b/kirby/src/Form/Field.php @@ -23,6 +23,20 @@ use Kirby\Toolkit\V; */ class Field extends Component { + /** + * An array of all found errors + * + * @var array|null + */ + protected $errors; + + /** + * Parent collection with all fields of the current form + * + * @var \Kirby\Form\Fields|null + */ + protected $formFields; + /** * Registry for all component mixins * @@ -37,14 +51,7 @@ class Field extends Component */ public static $types = []; - /** - * An array of all found errors - * - * @var array - */ - protected $errors = []; - - public function __construct(string $type, array $attrs = []) + public function __construct(string $type, array $attrs = [], ?Fields $formFields = null) { if (isset(static::$types[$type]) === false) { throw new InvalidArgumentException('The field type "' . $type . '" does not exist'); @@ -54,13 +61,13 @@ class Field extends Component throw new InvalidArgumentException('Field requires a model'); } + $this->formFields = $formFields; + // use the type as fallback for the name $attrs['name'] = $attrs['name'] ?? $type; $attrs['type'] = $type; parent::__construct($type, $attrs); - - $this->validate(); } /** @@ -225,8 +232,17 @@ class Field extends Component ]; } + public function formFields(): ?Fields + { + return $this->formFields; + } + public function errors(): array { + if ($this->errors === null) { + $this->validate(); + } + return $this->errors; } @@ -247,7 +263,7 @@ class Field extends Component public function isInvalid(): bool { - return empty($this->errors) === false; + return empty($this->errors()) === false; } public function isRequired(): bool @@ -257,7 +273,7 @@ class Field extends Component public function isValid(): bool { - return empty($this->errors) === true; + return empty($this->errors()) === true; } /** @@ -273,6 +289,46 @@ class Field extends Component return $this->model; } + /** + * Checks if the field needs a value before being saved; + * this is the case if all of the following requirements are met: + * - The field is saveable + * - The field is required + * - The field is currently empty + * - The field is not currently inactive because of a `when` rule + * + * @return bool + */ + protected function needsValue(): bool + { + // check simple conditions first + if ($this->save() === false || $this->isRequired() === false || $this->isEmpty() === false) { + return false; + } + + // check the data of the relevant fields if there is a `when` option + if (empty($this->when) === false && is_array($this->when) === true) { + $formFields = $this->formFields(); + + if ($formFields !== null) { + foreach ($this->when as $field => $value) { + $field = $formFields->get($field); + $inputValue = $field !== null ? $field->value() : ''; + + // if the input data doesn't match the requested `when` value, + // that means that this field is not required and can be saved + // (*all* `when` conditions must be met for this field to be required) + if ($inputValue !== $value) { + return false; + } + } + } + } + + // either there was no `when` condition or all conditions matched + return true; + } + public function save(): bool { return ($this->options['save'] ?? true) !== false; @@ -302,7 +358,7 @@ class Field extends Component $this->errors = []; // validate required values - if ($this->isRequired() === true && $this->save() === true && $this->isEmpty() === true) { + if ($this->needsValue() === true) { $this->errors['required'] = I18n::translate('error.validation.required'); } diff --git a/kirby/src/Form/Form.php b/kirby/src/Form/Form.php index 1f34d5b..aa957d7 100755 --- a/kirby/src/Form/Form.php +++ b/kirby/src/Form/Form.php @@ -59,7 +59,7 @@ class Form } try { - $field = new Field($props['type'], $props); + $field = new Field($props['type'], $props, $this->fields); } catch (Throwable $e) { $field = static::exceptionField($e, $props); } diff --git a/kirby/src/Image/Darkroom.php b/kirby/src/Image/Darkroom.php index 0c4cafb..503eddc 100755 --- a/kirby/src/Image/Darkroom.php +++ b/kirby/src/Image/Darkroom.php @@ -23,11 +23,25 @@ class Darkroom protected $settings = []; + /** + * Darkroom constructor + * + * @param array $settings + */ public function __construct(array $settings = []) { $this->settings = array_merge($this->defaults(), $settings); } + /** + * Creates a new Darkroom instance for the given + * type/driver + * + * @param string $type + * @param array $settings + * @return mixed + * @throws \Exception + */ public static function factory(string $type, array $settings = []) { if (isset(static::$types[$type]) === false) { @@ -38,6 +52,11 @@ class Darkroom return new $class($settings); } + /** + * Returns the default thumb settings + * + * @return array + */ protected function defaults(): array { return [ @@ -51,6 +70,12 @@ class Darkroom ]; } + /** + * Normalizes all thumb options + * + * @param array $options + * @return array + */ protected function options(array $options = []): array { $options = array_merge($this->settings, $options); @@ -84,6 +109,15 @@ class Darkroom return $options; } + /** + * Calculates the dimensions of the final thumb based + * on the given options and returns a full array with + * all the final options to be used for the image generator + * + * @param string $file + * @param array $options + * @return array + */ public function preprocess(string $file, array $options = []) { $options = $this->options($options); @@ -96,6 +130,14 @@ class Darkroom return $options; } + /** + * This method must be replaced by the driver to run the + * actual image processing job. + * + * @param string $file + * @param array $options + * @return array + */ public function process(string $file, array $options = []): array { return $this->preprocess($file, $options); diff --git a/kirby/src/Image/Darkroom/GdLib.php b/kirby/src/Image/Darkroom/GdLib.php index 3d9b08c..eda6118 100755 --- a/kirby/src/Image/Darkroom/GdLib.php +++ b/kirby/src/Image/Darkroom/GdLib.php @@ -18,6 +18,13 @@ use Kirby\Image\Darkroom; */ class GdLib extends Darkroom { + /** + * Processes the image with the SimpleImage library + * + * @param string $file + * @param array $options + * @return array + */ public function process(string $file, array $options = []): array { $options = $this->preprocess($file, $options); @@ -35,6 +42,14 @@ class GdLib extends Darkroom return $options; } + /** + * Activates the autoOrient option in SimpleImage + * unless this is deactivated + * + * @param \claviska\SimpleImage $image + * @param $options + * @return \claviska\SimpleImage + */ protected function autoOrient(SimpleImage $image, $options) { if ($options['autoOrient'] === false) { @@ -44,6 +59,13 @@ class GdLib extends Darkroom return $image->autoOrient(); } + /** + * Wrapper around SimpleImage's resize and crop methods + * + * @param \claviska\SimpleImage $image + * @param array $options + * @return \claviska\SimpleImage + */ protected function resize(SimpleImage $image, array $options) { if ($options['crop'] === false) { @@ -53,6 +75,13 @@ class GdLib extends Darkroom return $image->thumbnail($options['width'], $options['height'] ?? $options['width'], $options['crop']); } + /** + * Applies the correct blur settings for SimpleImage + * + * @param \claviska\SimpleImage $image + * @param array $options + * @return \claviska\SimpleImage + */ protected function blur(SimpleImage $image, array $options) { if ($options['blur'] === false) { @@ -62,6 +91,13 @@ class GdLib extends Darkroom return $image->blur('gaussian', (int)$options['blur']); } + /** + * Applies grayscale conversion if activated in the options. + * + * @param \claviska\SimpleImage $image + * @param array $options + * @return \claviska\SimpleImage + */ protected function grayscale(SimpleImage $image, array $options) { if ($options['grayscale'] === false) { diff --git a/kirby/src/Image/Darkroom/ImageMagick.php b/kirby/src/Image/Darkroom/ImageMagick.php index b997552..f27dd4c 100755 --- a/kirby/src/Image/Darkroom/ImageMagick.php +++ b/kirby/src/Image/Darkroom/ImageMagick.php @@ -17,6 +17,14 @@ use Kirby\Toolkit\F; */ class ImageMagick extends Darkroom { + /** + * Activates imagemagick's auto-orient feature unless + * it is deactivated via the options + * + * @param string $file + * @param array $options + * @return string + */ protected function autoOrient(string $file, array $options) { if ($options['autoOrient'] === true) { @@ -24,6 +32,13 @@ class ImageMagick extends Darkroom } } + /** + * Applies the blur settings + * + * @param string $file + * @param array $options + * @return string + */ protected function blur(string $file, array $options) { if ($options['blur'] !== false) { @@ -31,6 +46,13 @@ class ImageMagick extends Darkroom } } + /** + * Keep animated gifs + * + * @param string $file + * @param array $options + * @return string + */ protected function coalesce(string $file, array $options) { if (F::extension($file) === 'gif') { @@ -38,11 +60,23 @@ class ImageMagick extends Darkroom } } + /** + * Creates the convert command with the right path to the binary file + * + * @param string $file + * @param array $options + * @return string + */ protected function convert(string $file, array $options): string { return sprintf($options['bin'] . ' "%s"', $file); } + /** + * Returns additional default parameters for imagemagick + * + * @return array + */ protected function defaults(): array { return parent::defaults() + [ @@ -51,6 +85,13 @@ class ImageMagick extends Darkroom ]; } + /** + * Applies the correct settings for grayscale images + * + * @param string $file + * @param array $options + * @return string + */ protected function grayscale(string $file, array $options) { if ($options['grayscale'] === true) { @@ -58,6 +99,14 @@ class ImageMagick extends Darkroom } } + /** + * Applies the correct settings for interlaced JPEGs if + * activated via options + * + * @param string $file + * @param array $options + * @return string + */ protected function interlace(string $file, array $options) { if ($options['interlace'] === true) { @@ -65,6 +114,15 @@ class ImageMagick extends Darkroom } } + /** + * Creates and runs the full imagemagick command + * to process the image + * + * @param string $file + * @param array $options + * @return array + * @throws \Exception + */ public function process(string $file, array $options = []): array { $options = $this->preprocess($file, $options); @@ -95,11 +153,26 @@ class ImageMagick extends Darkroom return $options; } + /** + * Applies the correct JPEG compression quality settings + * + * @param string $file + * @param array $options + * @return string + */ protected function quality(string $file, array $options): string { return '-quality ' . $options['quality']; } + /** + * Creates the correct options to crop or resize the image + * and translates the crop positions for imagemagick + * + * @param string $file + * @param array $options + * @return string + */ protected function resize(string $file, array $options): string { // simple resize @@ -128,11 +201,26 @@ class ImageMagick extends Darkroom return $command; } + /** + * Makes sure to not process too many images at once + * which could crash the server + * + * @param string $file + * @param array $options + * @return string + */ protected function save(string $file, array $options): string { return sprintf('-limit thread 1 "%s"', $file); } + /** + * Removes all metadata from the image + * + * @param string $file + * @param array $options + * @return string + */ protected function strip(string $file, array $options): string { return '-strip'; diff --git a/kirby/src/Image/Dimensions.php b/kirby/src/Image/Dimensions.php index ed20b88..4a20662 100755 --- a/kirby/src/Image/Dimensions.php +++ b/kirby/src/Image/Dimensions.php @@ -66,7 +66,7 @@ class Dimensions * Crops the dimensions by width and height * * @param int $width - * @param int $height + * @param int|null $height * @return self */ public function crop(int $width, int $height = null) @@ -159,7 +159,7 @@ class Dimensions * * * - * @param int $fit the max height + * @param int|null $fit the max height * @param bool $force If true, the dimensions will be * upscaled to fit the box if smaller * @return self object with recalculated dimensions @@ -173,7 +173,7 @@ class Dimensions * Helper for fitWidth and fitHeight methods * * @param string $ref reference (width or height) - * @param int $fit the max width + * @param int|null $fit the max width * @param bool $force If true, the dimensions will be * upscaled to fit the box if smaller * @return self object with recalculated dimensions @@ -212,7 +212,7 @@ class Dimensions * * * - * @param int $fit the max width + * @param int|null $fit the max width * @param bool $force If true, the dimensions will be * upscaled to fit the box if smaller * @return self object with recalculated dimensions @@ -225,8 +225,8 @@ class Dimensions /** * Recalculates the dimensions by the width and height * - * @param int $width the max height - * @param int $height the max width + * @param int|null $width the max height + * @param int|null $height the max width * @param bool $force * @return self */ @@ -362,8 +362,8 @@ class Dimensions } /** - * @param int $width - * @param int $height + * @param int|null $width + * @param int|null $height * @param bool $force * @return self */ diff --git a/kirby/src/Image/Image.php b/kirby/src/Image/Image.php index def07dc..9a512b5 100755 --- a/kirby/src/Image/Image.php +++ b/kirby/src/Image/Image.php @@ -31,19 +31,19 @@ class Image extends File protected $url; /** - * @var Exif|null + * @var \Kirby\Image\Exif|null */ protected $exif; /** - * @var Dimensions|null + * @var \Kirby\Image\Dimensions|null */ protected $dimensions; /** * Constructor * - * @param string $root + * @param string|null $root * @param string|null $url */ public function __construct(string $root = null, string $url = null) @@ -132,8 +132,7 @@ class Image extends File */ public function header(bool $send = true) { - $response = new Response(); - $response->type($this->mime()); + $response = new Response('', $this->mime()); return $send === true ? $response->send() : $response; } @@ -201,6 +200,7 @@ class Image extends File * * @param array $rules * @return bool + * @throws \Exception */ public function match(array $rules): bool { diff --git a/kirby/src/Toolkit/Collection.php b/kirby/src/Toolkit/Collection.php index 865813b..b7aeb37 100755 --- a/kirby/src/Toolkit/Collection.php +++ b/kirby/src/Toolkit/Collection.php @@ -36,7 +36,7 @@ class Collection extends Iterator implements Countable /** * Pagination object - * @var Pagination + * @var \Kirby\Toolkit\Pagination */ protected $pagination; @@ -95,6 +95,7 @@ class Collection extends Iterator implements Countable * * @param string $key string or array * @param mixed $value + * @return \Kirby\Toolkit\Collection */ public function __set(string $key, $value) { @@ -132,6 +133,7 @@ class Collection extends Iterator implements Countable * * @param mixed $key * @param mixed $item + * @param mixed ...$args * @return \Kirby\Toolkit\Collection */ public function append(...$args) @@ -159,7 +161,7 @@ class Collection extends Iterator implements Countable // chunk size keep keys of the elements $chunks = array_chunk($this->data, $size, true); - // convert each chunk to a subcollection + // convert each chunk to a sub collection $collection = []; foreach ($chunks as $items) { @@ -181,7 +183,7 @@ class Collection extends Iterator implements Countable /** * Returns a cloned instance of the collection * - * @return self + * @return \Kirby\Toolkit\Collection */ public function clone() { @@ -191,8 +193,8 @@ class Collection extends Iterator implements Countable /** * Getter and setter for the data * - * @param array $data - * @return array|Collection + * @param array|null $data + * @return array|\Kirby\Toolkit\Collection */ public function data(array $data = null) { @@ -226,7 +228,7 @@ class Collection extends Iterator implements Countable * Adds all elements to the collection * * @param mixed $items - * @return self + * @return \Kirby\Toolkit\Collection */ public function extend($items) { @@ -238,8 +240,9 @@ class Collection extends Iterator implements Countable * Filters elements by a custom * filter function or an array of filters * - * @param Closure $filter + * @param array|\Closure $filter * @return self + * @throws \Exception if $filter is neither a closure nor an array */ public function filter($filter) { @@ -267,7 +270,7 @@ class Collection extends Iterator implements Countable * * @param string $field * @param array ...$args - * @return self + * @return \Kirby\Toolkit\Collection */ public function filterBy(string $field, ...$args) { @@ -317,6 +320,12 @@ class Collection extends Iterator implements Countable return $filter(clone $this, $field, $test, $split); } + /** + * @param string $validator + * @param mixed $values + * @param mixed $test + * @return bool + */ protected function filterMatchesAny($validator, $values, $test): bool { foreach ($values as $value) { @@ -328,6 +337,12 @@ class Collection extends Iterator implements Countable return false; } + /** + * @param string $validator + * @param array $values + * @param mixed $test + * @return bool + */ protected function filterMatchesAll($validator, $values, $test): bool { foreach ($values as $value) { @@ -339,6 +354,12 @@ class Collection extends Iterator implements Countable return true; } + /** + * @param string $validator + * @param array $values + * @param mixed $test + * @return bool + */ protected function filterMatchesNone($validator, $values, $test): bool { $matches = 0; @@ -487,7 +508,7 @@ class Collection extends Iterator implements Countable /** * @param object $object * @param string $attribute - * @return void + * @return mixed */ protected function getAttributeFromObject($object, string $attribute) { @@ -497,8 +518,9 @@ class Collection extends Iterator implements Countable /** * Groups the elements by a given callback * - * @param Closure $callback - * @return self A new collection with an element for each group and a subcollection in each group + * @param \Closure $callback + * @return \Kirby\Toolkit\Collection A new collection with an element for each group and a sub collection in each group + * @throws \Exception */ public function group(Closure $callback) { @@ -542,7 +564,8 @@ class Collection extends Iterator implements Countable * * @param string $field * @param bool $i - * @return \Kirby\Toolkit\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 sub collection in each group + * @throws \Exception */ public function groupBy($field, bool $i = true) { @@ -728,7 +751,7 @@ class Collection extends Iterator implements Countable * a new array * * @param string $field - * @param string $split + * @param string|null $split * @param bool $unique * @return array */ @@ -758,7 +781,8 @@ class Collection extends Iterator implements Countable * * @param mixed $key * @param mixed $item - * @return self + * @param mixed ...$args + * @return \Kirby\Toolkit\Collection */ public function prepend(...$args) { @@ -780,7 +804,7 @@ class Collection extends Iterator implements Countable * Any part of the query is optional. * * @param array $arguments - * @return self + * @return \Kirby\Toolkit\Collection */ public function query(array $arguments = []) { @@ -810,6 +834,11 @@ class Collection extends Iterator implements Countable if (is_array($arguments['sortBy'])) { $sort = explode(' ', implode(' ', $arguments['sortBy'])); } else { + // if there are commas in the sortBy argument, removes it + if (Str::contains($arguments['sortBy'], ',') === true) { + $arguments['sortBy'] = Str::replace($arguments['sortBy'], ',', ''); + } + $sort = explode(' ', $arguments['sortBy']); } $result = $result->sortBy(...$sort); @@ -826,6 +855,7 @@ class Collection extends Iterator implements Countable * Removes an element from the array by key * * @param mixed $key the name of the key + * @return \Kirby\Toolkit\Collection */ public function remove($key) { @@ -838,7 +868,7 @@ class Collection extends Iterator implements Countable * * @param mixed $key string or array * @param mixed $value - * @return self + * @return \Kirby\Toolkit\Collection */ public function set($key, $value = null) { @@ -877,7 +907,7 @@ class Collection extends Iterator implements Countable * Returns a slice of the object * * @param int $offset The optional index to start the slice from - * @param int $limit The optional number of elements to return + * @param int|null $limit The optional number of elements to return * @return \Kirby\Toolkit\Collection */ public function slice(int $offset = 0, int $limit = null) @@ -899,6 +929,11 @@ class Collection extends Iterator implements Countable */ public static function sortArgs(string $sortBy): array { + // if there are commas in the sortBy argument, removes it + if (Str::contains($sortBy, ',') === true) { + $sortBy = Str::replace($sortBy, ',', ''); + } + $sortArgs = Str::split($sortBy, ' '); // fill in PHP constants @@ -917,7 +952,7 @@ class Collection extends Iterator implements Countable * @param string|callable $field Field name or value callback to sort by * @param string $direction asc or desc * @param int $method The sort flag, SORT_REGULAR, SORT_NUMERIC etc. - * @return Collection + * @return \Kirby\Toolkit\Collection */ public function sortBy() { @@ -1030,7 +1065,7 @@ class Collection extends Iterator implements Countable /** * Converts the object into an array * - * @param Closure $map + * @param \Closure|null $map * @return array */ public function toArray(Closure $map = null): array @@ -1053,7 +1088,7 @@ class Collection extends Iterator implements Countable } /** - * Convertes the object to a string + * Converts the object to a string * * @return string */ @@ -1078,11 +1113,11 @@ class Collection extends Iterator implements Countable * is true. If the first parameter is false, the Closure will not be executed. * You may pass another Closure as the third parameter to the when method. * This Closure will execute if the first parameter evaluates as false - * @since 3.3.0 * + * @since 3.3.0 * @param mixed $condition - * @param Closure $callback - * @param Closure $fallback + * @param \Closure $callback + * @param \Closure|null $fallback * @return mixed */ public function when($condition, Closure $callback, Closure $fallback = null) @@ -1112,6 +1147,12 @@ class Collection extends Iterator implements Countable /** * Equals Filter + * + * @param \Kirby\Toolkit\Collection $collection + * @param mixed $field + * @param mixed $test + * @param bool $split + * @return mixed */ Collection::$filters['=='] = function ($collection, $field, $test, $split = false) { foreach ($collection->data as $key => $item) { @@ -1131,6 +1172,12 @@ Collection::$filters['=='] = function ($collection, $field, $test, $split = fals /** * Not Equals Filter + * + * @param \Kirby\Toolkit\Collection $collection + * @param mixed $field + * @param mixed $test + * @param bool $split + * @return mixed */ Collection::$filters['!='] = function ($collection, $field, $test, $split = false) { foreach ($collection->data as $key => $item) { diff --git a/kirby/src/Toolkit/Pagination.php b/kirby/src/Toolkit/Pagination.php index bcb47f5..ffd8588 100755 --- a/kirby/src/Toolkit/Pagination.php +++ b/kirby/src/Toolkit/Pagination.php @@ -128,6 +128,7 @@ class Pagination * * @deprecated 3.3.0 Setter is no longer supported, use $pagination->clone() * @return int + * @codeCoverageIgnore */ public function page(int $page = null): int { @@ -143,6 +144,7 @@ class Pagination * * @deprecated 3.3.0 Setter is no longer supported, use $pagination->clone() * @return int + * @codeCoverageIgnore */ public function total(int $total = null): int { @@ -158,6 +160,7 @@ class Pagination * * @deprecated 3.3.0 Setter is no longer supported, use $pagination->clone() * @return int + * @codeCoverageIgnore */ public function limit(int $limit = null): int { diff --git a/kirby/src/Toolkit/Str.php b/kirby/src/Toolkit/Str.php index a47ed44..c96ca1c 100755 --- a/kirby/src/Toolkit/Str.php +++ b/kirby/src/Toolkit/Str.php @@ -179,7 +179,7 @@ class Str $position = static::position($string, $needle, $caseInsensitive); if ($position === false) { - return false; + return ''; } else { return static::substr($string, $position + static::length($needle)); } @@ -221,7 +221,7 @@ class Str $position = static::position($string, $needle, $caseInsensitive); if ($position === false) { - return false; + return ''; } else { return static::substr($string, 0, $position); } @@ -396,7 +396,7 @@ class Str $position = static::position($string, $needle, $caseInsensitive); if ($position === false) { - return false; + return ''; } else { return static::substr($string, $position); } @@ -748,8 +748,12 @@ class Str * string is too long. Ellipsis is the default. * @return string The shortened string */ - public static function short(string $string = null, int $length = 0, string $appendix = '…'): ?string + public static function short(string $string = null, int $length = 0, string $appendix = '…'): string { + if ($string === null) { + return ''; + } + if ($length === 0) { return $string; } @@ -1041,7 +1045,7 @@ class Str $position = static::position($string, $needle, $caseInsensitive); if ($position === false) { - return false; + return ''; } else { return static::substr($string, 0, $position + static::length($needle)); } diff --git a/kirby/src/Toolkit/V.php b/kirby/src/Toolkit/V.php index 1064238..49efbdd 100755 --- a/kirby/src/Toolkit/V.php +++ b/kirby/src/Toolkit/V.php @@ -153,7 +153,10 @@ class V $fieldValue = $input[$fieldName] ?? null; // first check for required fields - if (($fieldRules['required'] ?? false) === true && $fieldValue === null) { + if ( + ($fieldRules['required'] ?? false) === true && + $fieldValue === null + ) { throw new Exception(sprintf('The "%s" field is missing', $fieldName)); } @@ -166,12 +169,10 @@ class V } try { - V::value($fieldValue, $fieldRules); + static::value($fieldValue, $fieldRules); } catch (Exception $e) { throw new Exception(sprintf($e->getMessage() . ' for field "%s"', $fieldName)); } - - static::value($fieldValue, $fieldRules); } return true; @@ -213,15 +214,15 @@ V::$validators = [ /** * Valid: `a-z | A-Z` */ - 'alpha' => function ($value): bool { - return V::match($value, '/^([a-z])+$/i') === true; + 'alpha' => function ($value, bool $unicode = false): bool { + return V::match($value, ($unicode === true ? '/^([\pL])+$/u' : '/^([a-z])+$/i')) === true; }, /** * Valid: `a-z | A-Z | 0-9` */ - 'alphanum' => function ($value): bool { - return V::match($value, '/^[a-z0-9]+$/i') === true; + 'alphanum' => function ($value, bool $unicode = false): bool { + return V::match($value, ($unicode === true ? '/^[\pL\pN]+$/u' : '/^([a-z0-9])+$/i')) === true; }, /** diff --git a/kirby/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php b/kirby/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php index d06acd7..dd7dae3 100755 --- a/kirby/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php +++ b/kirby/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php @@ -66,6 +66,10 @@ class Autoloader */ private static function getClassLoader() { + if (file_exists(getenv('COMPOSER_VENDOR_DIR') . '/autoload.php')) { + return include getenv('COMPOSER_VENDOR_DIR') . '/autoload.php'; + } + if (file_exists(__DIR__ . '/../../../autoload.php')) { return include __DIR__ . '/../../../autoload.php'; }