From 9e18cf635df90bf452845a77a4fdebacb09ce8f3 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Tue, 21 May 2019 12:16:05 +0200 Subject: [PATCH] Upgrade to 3.1.4 --- kirby/composer.json | 2 +- kirby/composer.lock | 2 +- kirby/config/fields/checkboxes.php | 2 +- kirby/config/fields/date.php | 4 +- kirby/config/fields/files.php | 4 +- kirby/config/fields/headline.php | 2 +- kirby/config/fields/info.php | 3 ++ kirby/config/fields/mixins/options.php | 4 +- kirby/config/fields/multiselect.php | 2 +- kirby/config/fields/number.php | 4 +- kirby/config/fields/pages.php | 8 ++-- kirby/config/fields/structure.php | 2 +- kirby/config/fields/tags.php | 4 +- kirby/config/fields/text.php | 4 +- kirby/config/fields/textarea.php | 6 +-- kirby/config/fields/time.php | 4 +- kirby/config/fields/toggle.php | 2 +- kirby/config/fields/users.php | 19 ++++++---- kirby/config/sections/files.php | 4 +- kirby/config/sections/mixins/layout.php | 2 +- kirby/config/sections/pages.php | 6 +-- kirby/config/tags.php | 6 ++- kirby/panel/dist/js/app.js | 2 +- kirby/src/Cms/App.php | 19 +++++++++- kirby/src/Cms/Collection.php | 7 +++- kirby/src/Cms/Collections.php | 16 +++++--- kirby/src/Cms/Language.php | 7 +++- kirby/src/Cms/Nest.php | 2 +- kirby/src/Cms/Page.php | 6 ++- kirby/src/Cms/PanelPlugins.php | 2 +- kirby/src/Cms/StructureObject.php | 15 ++++++++ kirby/src/Cms/User.php | 6 +++ kirby/src/Toolkit/Collection.php | 41 ++++++++++++--------- kirby/src/Toolkit/Html.php | 20 +++++----- kirby/src/Toolkit/Mime.php | 5 ++- kirby/src/Toolkit/Str.php | 30 +++++++++++++++ kirby/translations/cs.json | 14 +++---- kirby/translations/de.json | 20 +++++----- kirby/translations/fa.json | 2 +- kirby/translations/it.json | 12 +++--- kirby/vendor/composer/autoload_classmap.php | 1 + kirby/vendor/composer/autoload_static.php | 1 + 42 files changed, 215 insertions(+), 109 deletions(-) diff --git a/kirby/composer.json b/kirby/composer.json index 86b97ce..b48e8b3 100755 --- a/kirby/composer.json +++ b/kirby/composer.json @@ -1,7 +1,7 @@ { "name": "getkirby/cms", "description": "The Kirby 3 core", - "version": "3.1.3", + "version": "3.1.4", "license": "proprietary", "keywords": ["kirby", "cms", "core"], "homepage": "https://getkirby.com", diff --git a/kirby/composer.lock b/kirby/composer.lock index 22a3a46..bbc6a22 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": "7c03372aae9d6bcfc8fdb6399a1e9e38", + "content-hash": "ed043f76d01c39662efae54a2c917b0a", "packages": [ { "name": "claviska/simpleimage", diff --git a/kirby/config/fields/checkboxes.php b/kirby/config/fields/checkboxes.php index 85aaa25..065db4f 100755 --- a/kirby/config/fields/checkboxes.php +++ b/kirby/config/fields/checkboxes.php @@ -21,7 +21,7 @@ return [ return $columns; }, /** - * Default value for the field, which will be used when a Page/File/User is created + * Default value for the field, which will be used when a page/file/user is created */ 'default' => function ($default = null) { return Str::split($default, ','); diff --git a/kirby/config/fields/date.php b/kirby/config/fields/date.php index f60b645..08a0902 100755 --- a/kirby/config/fields/date.php +++ b/kirby/config/fields/date.php @@ -3,7 +3,7 @@ return [ 'props' => [ /** - * Default date when a new Page/File/User gets created + * Default date when a new page/file/user gets created */ 'default' => function ($default = null) { return $default; @@ -39,7 +39,7 @@ return [ */ 'placeholder' => null, /** - * Pass true or an array of time field options to show the time selector. + * Pass `true` or an array of time field options to show the time selector. */ 'time' => function ($time = false) { return $time; diff --git a/kirby/config/fields/files.php b/kirby/config/fields/files.php index 80f77bb..fd6ebeb 100755 --- a/kirby/config/fields/files.php +++ b/kirby/config/fields/files.php @@ -43,7 +43,7 @@ return [ }, /** - * Changes the layout of the selected files. Available layouts: list, cards + * Changes the layout of the selected files. Available layouts: `list`, `cards` */ 'layout' => function (string $layout = 'list') { return $layout; @@ -78,7 +78,7 @@ return [ }, /** - * Layout size for cards + * Layout size for cards: `tiny`, `small`, `medium`, `large` or `huge` */ 'size' => function (string $size = null) { return $size; diff --git a/kirby/config/fields/headline.php b/kirby/config/fields/headline.php index 44a70de..9b52938 100755 --- a/kirby/config/fields/headline.php +++ b/kirby/config/fields/headline.php @@ -18,7 +18,7 @@ return [ 'translate' => null, /** - * If false, the prepended number will be hidden + * If `false`, the prepended number will be hidden */ 'numbered' => function (bool $numbered = true) { return $numbered; diff --git a/kirby/config/fields/info.php b/kirby/config/fields/info.php index 5913f80..f259806 100755 --- a/kirby/config/fields/info.php +++ b/kirby/config/fields/info.php @@ -4,6 +4,9 @@ use Kirby\Toolkit\I18n; return [ 'props' => [ + /** + * Text to be displayed + */ 'text' => function ($value = null) { return I18n::translate($value, $value); }, diff --git a/kirby/config/fields/mixins/options.php b/kirby/config/fields/mixins/options.php index 42618cb..7e60056 100755 --- a/kirby/config/fields/mixins/options.php +++ b/kirby/config/fields/mixins/options.php @@ -5,7 +5,7 @@ use Kirby\Form\Options; return [ 'props' => [ /** - * API settings for options requests. This will only take affect when options is set to api. + * API settings for options requests. This will only take affect when `options` is set to `api`. */ 'api' => function ($api = null) { return $api; @@ -17,7 +17,7 @@ return [ return $options; }, /** - * Query settings for options queries. This will only take affect when options is set to query. + * Query settings for options queries. This will only take affect when `options` is set to `query`. */ 'query' => function ($query = null) { return $query; diff --git a/kirby/config/fields/multiselect.php b/kirby/config/fields/multiselect.php index 37b0530..122d0c2 100755 --- a/kirby/config/fields/multiselect.php +++ b/kirby/config/fields/multiselect.php @@ -22,7 +22,7 @@ return [ return $search; }, /** - * If true, selected entries will be sorted + * If `true`, selected entries will be sorted * according to their position in the dropdown */ 'sort' => function (bool $sort = false) { diff --git a/kirby/config/fields/number.php b/kirby/config/fields/number.php index c1abc2d..9e0b960 100755 --- a/kirby/config/fields/number.php +++ b/kirby/config/fields/number.php @@ -3,7 +3,7 @@ return [ 'props' => [ /** - * Default number that will be saved when a new Page/User/File is created + * Default number that will be saved when a new page/user/file is created */ 'default' => function ($default = null) { return $this->toNumber($default); @@ -21,7 +21,7 @@ return [ return $max; }, /** - * Allowed incremental steps between numbers (i.e 0.5) + * Allowed incremental steps between numbers (i.e `0.5`) */ 'step' => function ($step = 1) { return $this->toNumber($step); diff --git a/kirby/config/fields/pages.php b/kirby/config/fields/pages.php index 3f4cf9d..b560b48 100755 --- a/kirby/config/fields/pages.php +++ b/kirby/config/fields/pages.php @@ -16,7 +16,7 @@ return [ 'placeholder' => null, /** - * Default selected page(s) when a new Page/File/User is created + * Default selected page(s) when a new page/file/user is created */ 'default' => function ($default = null) { return $this->toPages($default); @@ -44,7 +44,7 @@ return [ }, /** - * Changes the layout of the selected files. Available layouts: list, cards + * Changes the layout of the selected files. Available layouts: `list`, `cards` */ 'layout' => function (string $layout = 'list') { return $layout; @@ -65,7 +65,7 @@ return [ }, /** - * If false, only a single page can be selected + * If `false`, only a single page can be selected */ 'multiple' => function (bool $multiple = true) { return $multiple; @@ -79,7 +79,7 @@ return [ }, /** - * Layout size for cards + * Layout size for cards: `tiny`, `small`, `medium`, `large` or `huge` */ 'size' => function (string $size = null) { return $size; diff --git a/kirby/config/fields/structure.php b/kirby/config/fields/structure.php index fcc987e..992db7c 100755 --- a/kirby/config/fields/structure.php +++ b/kirby/config/fields/structure.php @@ -68,7 +68,7 @@ return [ return $sortable; }, /** - * Sorts the entries by the given field and order (i.e. title desc) + * Sorts the entries by the given field and order (i.e. `title desc`) * Drag & drop is disabled in this case */ 'sortBy' => function (string $sort = null) { diff --git a/kirby/config/fields/tags.php b/kirby/config/fields/tags.php index 87300e4..a38f677 100755 --- a/kirby/config/fields/tags.php +++ b/kirby/config/fields/tags.php @@ -12,7 +12,7 @@ return [ 'placeholder' => null, /** - * If set to all, any type of input is accepted. If set to options only the predefined options are accepted as input. + * If set to `all`, any type of input is accepted. If set to `options` only the predefined options are accepted as input. */ 'accept' => function ($value = 'all') { return V::in($value, ['all', 'options']) ? $value : 'all'; @@ -75,7 +75,7 @@ return [ 'value' => $option, 'text' => $option, ]; - }, Str::split($value)); + }, Str::split($value, $this->separator())); } ], 'save' => function (array $value = null): string { diff --git a/kirby/config/fields/text.php b/kirby/config/fields/text.php index 1217af9..7faabfd 100755 --- a/kirby/config/fields/text.php +++ b/kirby/config/fields/text.php @@ -8,7 +8,7 @@ return [ 'props' => [ /** - * The field value will be converted with the selected converter before the value gets saved. Available converters: lower, upper, ucfirst, slug + * The field value will be converted with the selected converter before the value gets saved. Available converters: `lower`, `upper`, `ucfirst`, `slug` */ 'converter' => function ($value = null) { if ($value !== null && in_array($value, array_keys($this->converters())) === false) { @@ -50,7 +50,7 @@ return [ }, /** - * If false, spellcheck will be switched off + * If `false`, spellcheck will be switched off */ 'spellcheck' => function (bool $spellcheck = false) { return $spellcheck; diff --git a/kirby/config/fields/textarea.php b/kirby/config/fields/textarea.php index eed1519..9842aa1 100755 --- a/kirby/config/fields/textarea.php +++ b/kirby/config/fields/textarea.php @@ -9,7 +9,7 @@ return [ 'before' => null, /** - * Enables/disables the format buttons. Can either be true/false or a list of allowed buttons. Available buttons: headlines, italic, bold, link, email, file, list, code, ul, ol + * Enables/disables the format buttons. Can either be `true`/`false` or a list of allowed buttons. Available buttons: `headlines`, `italic`, `bold`, `link`, `email`, `file`, `list`, `code`, `ul`, `ol` (as well as `|` for a divider) */ 'buttons' => function ($buttons = true) { return $buttons; @@ -23,7 +23,7 @@ return [ }, /** - * Sets the default text when a new Page/File/User is created + * Sets the default text when a new page/file/user is created */ 'default' => function (string $default = null) { return trim($default); @@ -59,7 +59,7 @@ return [ }, /** - * Changes the size of the textarea. Available sizes: small, medium, large, huge + * Changes the size of the textarea. Available sizes: `small`, `medium`, `large`, `huge` */ 'size' => function (string $size = null) { return $size; diff --git a/kirby/config/fields/time.php b/kirby/config/fields/time.php index 5b9d5f4..ef2fa23 100755 --- a/kirby/config/fields/time.php +++ b/kirby/config/fields/time.php @@ -8,7 +8,7 @@ return [ 'placeholder' => null, /** - * Sets the default time when a new Page/File/User is created + * Sets the default time when a new page/file/user is created */ 'default' => function ($default = null) { return $default; @@ -20,7 +20,7 @@ return [ return $icon; }, /** - * 12 or 24 hour notation. If 12, an AM/PM selector will be shown. + * `12` or `24` hour notation. If `12`, an AM/PM selector will be shown. */ 'notation' => function (int $value = 24) { return $value === 24 ? 24 : 12; diff --git a/kirby/config/fields/toggle.php b/kirby/config/fields/toggle.php index 6182788..0842e8b 100755 --- a/kirby/config/fields/toggle.php +++ b/kirby/config/fields/toggle.php @@ -10,7 +10,7 @@ return [ 'placeholder' => null, /** - * Default value which will be saved when a new Page/User/File is created + * Default value which will be saved when a new page/user/file is created */ 'default' => function ($value = null) { return $this->toBool($value); diff --git a/kirby/config/fields/users.php b/kirby/config/fields/users.php index d813ac2..6ee6abc 100755 --- a/kirby/config/fields/users.php +++ b/kirby/config/fields/users.php @@ -1,7 +1,7 @@ ['min'], + 'mixins' => ['min', 'selector'], 'props' => [ /** * Unset inherited props @@ -13,7 +13,7 @@ return [ 'placeholder' => null, /** - * Default selected user(s) when a new Page/File/User is created + * Default selected user(s) when a new page/file/user is created */ 'default' => function ($default = null) { if ($default === false) { @@ -28,30 +28,35 @@ return [ return $this->toUsers($default); }, - /** - * The placeholder text if no users have been selected yet + + /** + * The placeholder text if none have been selected yet */ 'empty' => function ($empty = null) { return I18n::translate($empty, $empty); }, + /** - * The minimum number of required selected users + * The minimum number of required selected */ 'min' => function (int $min = null) { return $min; }, + /** - * The maximum number of allowed selected users + * The maximum number of allowed selected */ 'max' => function (int $max = null) { return $max; }, + /** - * If false, only a single user can be selected + * If `false`, only a single one can be selected */ 'multiple' => function (bool $multiple = true) { return $multiple; }, + 'value' => function ($value = null) { return $this->toUsers($value); }, diff --git a/kirby/config/sections/files.php b/kirby/config/sections/files.php index aa2e1e4..5e5220c 100755 --- a/kirby/config/sections/files.php +++ b/kirby/config/sections/files.php @@ -29,7 +29,7 @@ return [ return $info; }, /** - * The size option controls the size of cards. By default cards are auto-sized and the cards grid will always fill the full width. With a size you can disable auto-sizing. Available sizes: tiny, small, medium, large + * The size option controls the size of cards. By default cards are auto-sized and the cards grid will always fill the full width. With a size you can disable auto-sizing. Available sizes: `tiny`, `small`, `medium`, `large`, `huge` */ 'size' => function (string $size = 'auto') { return $size; @@ -41,7 +41,7 @@ return [ return $sortable; }, /** - * Overwrites manual sorting and sorts by the given field and sorting direction (i.e. filename desc) + * Overwrites manual sorting and sorts by the given field and sorting direction (i.e. `filename desc`) */ 'sortBy' => function (string $sortBy = null) { return $sortBy; diff --git a/kirby/config/sections/mixins/layout.php b/kirby/config/sections/mixins/layout.php index 7ab1634..4a7a621 100755 --- a/kirby/config/sections/mixins/layout.php +++ b/kirby/config/sections/mixins/layout.php @@ -3,7 +3,7 @@ return [ 'props' => [ /** - * Section layout. Available layout methods: list, cards. + * Section layout. Available layout methods: `list`, `cards`. */ 'layout' => function (string $layout = 'list') { return $layout === 'cards' ? 'cards' : 'list'; diff --git a/kirby/config/sections/pages.php b/kirby/config/sections/pages.php index 269565e..7960a8f 100755 --- a/kirby/config/sections/pages.php +++ b/kirby/config/sections/pages.php @@ -37,7 +37,7 @@ return [ return $info; }, /** - * The size option controls the size of cards. By default cards are auto-sized and the cards grid will always fill the full width. With a size you can disable auto-sizing. Available sizes: tiny, small, medium, large + * The size option controls the size of cards. By default cards are auto-sized and the cards grid will always fill the full width. With a size you can disable auto-sizing. Available sizes: `tiny`, `small`, `medium`, `large`, `huge` */ 'size' => function (string $size = 'auto') { return $size; @@ -49,13 +49,13 @@ return [ return $sortable; }, /** - * Overwrites manual sorting and sorts by the given field and sorting direction (i.e. date desc) + * Overwrites manual sorting and sorts by the given field and sorting direction (i.e. `date desc`) */ 'sortBy' => function (string $sortBy = null) { return $sortBy; }, /** - * Filters pages by their status. Available status settings: draft, unlisted, listed, published, all. + * Filters pages by their status. Available status settings: `draft`, `unlisted`, `listed`, `published`, `all`. */ 'status' => function (string $status = '') { if ($status === 'drafts') { diff --git a/kirby/config/tags.php b/kirby/config/tags.php index fede76b..49f18bb 100755 --- a/kirby/config/tags.php +++ b/kirby/config/tags.php @@ -1,6 +1,5 @@ caption) { + $tag->caption = [$tag->kirby()->kirbytext($tag->caption, [], true)]; + } + return Html::figure([ $link($image) ], $tag->caption, [ 'class' => $tag->class ]); diff --git a/kirby/panel/dist/js/app.js b/kirby/panel/dist/js/app.js index f1c815f..44485f3 100755 --- a/kirby/panel/dist/js/app.js +++ b/kirby/panel/dist/js/app.js @@ -1 +1 @@ -(function(t){function e(e){for(var i,o,r=e[0],l=e[1],u=e[2],d=0,p=[];d=0&&this.selected--}}},f=p,h=(n("4cb2"),n("2877")),m=Object(h["a"])(f,a,o,!1,null,null,null),g=m.exports,v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("license.register"),size:"medium"},on:{submit:t.submit}},[n("k-form",{attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.registration,callback:function(e){t.registration=e},expression:"registration"}})],1)},b=[],k={methods:{open:function(){this.$refs.dialog.open(),this.$emit("open")},close:function(){this.$refs.dialog.close(),this.$emit("close")},success:function(t){this.$refs.dialog.close(),t.route&&this.$router.push(t.route),t.message&&this.$store.dispatch("notification/success",t.message),t.event&&this.$events.$emit(t.event),this.$emit("success")}}},$={mixins:[k],data:function(){return{registration:{license:null,email:null}}},computed:{fields:function(){return{license:{label:this.$t("license.register.label"),type:"text",required:!0,counter:!1,placeholder:"K3-",help:this.$t("license.register.help")},email:{label:this.$t("email"),type:"email",required:!0,counter:!1}}}},methods:{submit:function(){var t=this;this.$api.system.register(this.registration).then(function(){t.$store.dispatch("system/register",t.registration.license),t.success({message:t.$t("license.register.success")})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},_=$,y=Object(h["a"])(_,v,b,!1,null,null,null),x=y.exports,w={name:"App",components:{"k-registration":x,"k-search":g},data:function(){return{offline:!1,dragging:!1,debug:d.debug}},computed:{inside:function(){return!(this.$route.meta.outside||!this.$store.state.user.current)}},created:function(){this.$events.$on("offline",this.isOffline),this.$events.$on("online",this.isOnline),this.$events.$on("keydown.cmd.shift.f",this.search),this.$events.$on("drop",this.drop)},destroyed:function(){this.$events.$off("offline",this.isOffline),this.$events.$off("online",this.isOnline),this.$events.$off("keydown.cmd.shift.f",this.search),this.$events.$off("drop",this.drop)},methods:{drop:function(){this.$store.dispatch("drag",null)},isOnline:function(){this.offline=!1},isOffline:function(){!1===this.$store.state.system.info.isLocal&&(this.offline=!0)},search:function(t){t.preventDefault(),this.$store.dispatch("search",!0)}}},O=w,S=(n("5c0b"),Object(h["a"])(O,i,s,!1,null,null,null)),C=S.exports,E={inserted:function(t){t.addEventListener("keyup",function(e){9===e.keyCode&&(t.dataset.tabbed=!0)}),t.addEventListener("blur",function(){delete t.dataset.tabbed})}},T={install:function(t){t.directive("tab",E)}},j={install:function(t){t.filter("t",function(t){return t})}};n("6762"),n("2fdb");function I(t){var e=String(t);return e.charAt(0).toLowerCase()+e.substr(1)}var L,q,N={install:function(t){t.prototype.$events=new t({data:function(){return{entered:null}},created:function(){window.addEventListener("online",this.online),window.addEventListener("offline",this.offline),window.addEventListener("dragenter",this.dragenter,!1),window.addEventListener("dragover",this.prevent,!1),window.addEventListener("dragexit",this.prevent,!1),window.addEventListener("dragleave",this.dragleave,!1),window.addEventListener("drop",this.drop,!1),window.addEventListener("keydown",this.keydown,!1),window.addEventListener("keyup",this.keyup,!1),document.addEventListener("click",this.click,!1)},destroyed:function(){window.removeEventListener("online",this.online),window.removeEventListener("offline",this.offline),window.removeEventListener("dragenter",this.dragenter,!1),window.removeEventListener("dragover",this.prevent,!1),window.removeEventListener("dragexit",this.prevent,!1),window.removeEventListener("dragleave",this.dragleave,!1),window.removeEventListener("drop",this.drop,!1),window.removeEventListener("keydown",this.keydown,!1),window.removeEventListener("keyup",this.keyup,!1),document.removeEventListener("click",this.click,!1)},methods:{click:function(t){this.$emit("click",t)},drop:function(t){this.prevent(t),this.$emit("drop",t)},dragenter:function(t){this.entered=t.target,this.prevent(t),this.$emit("dragenter",t)},dragleave:function(t){this.prevent(t),this.entered===t.target&&this.$emit("dragleave",t)},keydown:function(t){var e=["keydown"];(t.metaKey||t.ctrlKey)&&e.push("cmd"),!0===t.altKey&&e.push("alt"),!0===t.shiftKey&&e.push("shift");var n=I(t.key),i={escape:"esc",arrowUp:"up",arrowDown:"down",arrowLeft:"left",arrowRight:"right"};i[n]&&(n=i[n]),!1===["alt","control","shift","meta"].includes(n)&&e.push(n),this.$emit(e.join("."),t),this.$emit("keydown",t)},keyup:function(t){this.$emit("keyup",t)},online:function(t){this.$emit("online",t)},offline:function(t){this.$emit("offline",t)},prevent:function(t){t.stopPropagation(),t.preventDefault()}}})}},A=n("a026"),B=n("1dce"),P=n.n(B),D=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("div",{staticClass:"k-dialog",on:{click:t.cancel}},[n("div",{staticClass:"k-dialog-box",attrs:{"data-size":t.size},on:{click:function(t){t.stopPropagation()}}},[t.notification?n("div",{staticClass:"k-dialog-notification",attrs:{"data-theme":t.notification.type}},[n("p",[t._v(t._s(t.notification.message))]),n("k-button",{attrs:{icon:"cancel"},on:{click:function(e){t.notification=null}}})],1):t._e(),n("div",{staticClass:"k-dialog-body"},[t._t("default")],2),n("footer",{staticClass:"k-dialog-footer"},[t._t("footer",[n("k-button-group",[n("k-button",{staticClass:"k-dialog-button-cancel",attrs:{icon:"cancel"},on:{click:t.cancel}},[t._v("\n "+t._s(t.$t("cancel"))+"\n ")]),n("k-button",{staticClass:"k-dialog-button-submit",attrs:{icon:t.icon,theme:t.theme},on:{click:t.submit}},[t._v("\n "+t._s(t.button||t.$t("confirm"))+"\n ")])],1)])],2)])]):t._e()},M=[],R={props:{button:{type:String,default:"Ok"},icon:{type:String,default:"check"},size:String,theme:String,visible:Boolean},data:function(){return{notification:null,isOpen:this.visible,scrollTop:0}},created:function(){this.$events.$on("keydown.esc",this.close,!1)},destroyed:function(){this.$events.$off("keydown.esc",this.close,!1)},mounted:function(){!0===this.isOpen&&this.$emit("open")},methods:{storeScrollPosition:function(){var t=document.querySelector(".k-panel-view");t&&t.scrollTop?this.scrollTop=t.scrollTop:this.scrollTop=0},restoreScrollPosition:function(){var t=document.querySelector(".k-panel-view");t&&t.scrollTop&&(t.scrollTop=this.scrollTop)},open:function(){var t=this;this.storeScrollPosition(),this.$store.dispatch("dialog",!0),this.notification=null,this.isOpen=!0,this.$emit("open"),this.$events.$on("keydown.esc",this.close),this.$nextTick(function(){t.$el&&(t.focus(),document.body.addEventListener("focus",function(e){!1===t.$el.contains(e.target)&&t.focus()},!0))})},close:function(){this.notification=null,this.isOpen=!1,this.$emit("close"),this.$events.$off("keydown.esc",this.close),this.$store.dispatch("dialog",null),this.restoreScrollPosition()},cancel:function(){this.$emit("cancel"),this.close()},focus:function(){if(this.$el&&this.$el.querySelector){var t=this.$el.querySelector("[autofocus], [data-autofocus], input, textarea, select, .k-dialog-button-submit");if(t||(t=this.$el.querySelector(".k-dialog-button-cancel")),t)return void t.focus()}},error:function(t){this.notification={message:t,type:"error"}},submit:function(){this.$emit("submit")},success:function(t){this.notification={message:t,type:"success"}}}},z=R,F=(n("a5f3"),Object(h["a"])(z,D,M,!1,null,null,null)),U=F.exports,H=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.error?n("k-dialog",{ref:"dialog",staticClass:"k-error-dialog",attrs:{visible:!0},on:{close:t.exit,open:t.enter}},[n("k-text",[t._v(t._s(t.error.message))]),t.error.details&&Object.keys(t.error.details).length?n("dl",{staticClass:"k-error-details"},[t._l(t.error.details,function(e,i){return[n("dt",{key:"detail-label-"+i},[t._v(t._s(e.label))]),n("dd",{key:"detail-message-"+i},["object"===typeof e.message?[n("ul",t._l(e.message,function(e,i){return n("li",{key:i},[t._v("\n "+t._s(e)+"\n ")])}),0)]:[t._v("\n "+t._s(e.message)+"\n ")]],2)]})],2):t._e(),n("k-button-group",{attrs:{slot:"footer"},slot:"footer"},[n("k-button",{attrs:{icon:"check"},on:{click:t.close}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],1)],1):t._e()},K=[],V={mixins:[k],computed:{error:function(){var t=this.$store.state.notification;return"error"===t.type?t:null}},methods:{enter:function(){var t=this;this.$nextTick(function(){t.$el.querySelector(".k-dialog-footer .k-button").focus()})},exit:function(){this.$store.dispatch("notification/close")}}},Y=V,G=(n("7737"),Object(h["a"])(Y,H,K,!1,null,null,null)),W=G.exports,J=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("file.delete.confirm",{filename:t.filename}))}})],1)},X=[],Z={mixins:[k],data:function(){return{id:null,parent:null,filename:null}},methods:{open:function(t,e){var n=this;this.$api.files.get(t,e).then(function(e){n.id=e.id,n.filename=e.filename,n.parent=t,n.$refs.dialog.open()}).catch(function(t){n.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.files.delete(this.parent,this.filename).then(function(){t.$store.dispatch("form/remove","files/"+t.id),t.$store.dispatch("notification/success",":)"),t.$events.$emit("file.delete",t.id),t.$emit("success"),t.$refs.dialog.close()}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Q=Z,tt=Object(h["a"])(Q,J,X,!1,null,null,null),et=tt.exports,nt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit,input:function(e){t.file.name=t.sluggify(t.file.name)}},model:{value:t.file,callback:function(e){t.file=e},expression:"file"}})],1)},it=[],st=n("b747"),at=n.n(st),ot=function(t){return at()(t,{remove:/[$*_+~.,;:()'"`!?§$%\/=#@]/g}).toLowerCase()},rt={mixins:[k],data:function(){return{parent:null,file:{id:null,name:null,filename:null,extension:null}}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",required:!0,icon:"title",after:"."+this.file.extension,preselect:!0}}}},methods:{open:function(t,e){var n=this;this.$api.files.get(t,e,{select:["id","filename","name","extension"]}).then(function(e){n.file=e,n.parent=t,n.$refs.dialog.open()}).catch(function(t){n.$store.dispatch("notification/error",t)})},sluggify:function(t){return ot(t)},submit:function(){var t=this;this.$api.files.rename(this.parent,this.file.filename,this.file.name).then(function(e){t.$store.dispatch("form/revert","files/"+t.file.id),t.$store.dispatch("notification/success",":)"),t.$emit("success",e),t.$events.$emit("file.changeName",e),t.$refs.dialog.close()}).catch(function(e){t.$refs.dialog.error(e.message)})}}},lt=rt,ut=Object(h["a"])(lt,nt,it,!1,null,null,null),ct=ut.exports,dt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-files-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.files.length?n("k-list",t._l(t.files,function(e,i){return n("k-list-item",{key:e.filename,attrs:{text:e.filename,image:e.image,icon:e.icon},on:{click:function(e){return t.toggle(i)}}},[e.selected?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)}),1):n("k-empty",{attrs:{icon:"image"}},[t._v("\n No files to select\n ")])]],2)},pt=[],ft={data:function(){return{files:[],issue:null,options:{max:null,multiple:!0,api:null,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{selected:function(){return this.files.filter(function(t){return t.selected})},submit:function(){this.$emit("submit",this.selected()),this.$refs.dialog.close()},toggle:function(t){if(!1===this.multiple)this.files=this.files.map(function(t){return t.selected=!1,t}),this.files[t].selected=!0;else if(this.files[t].selected)this.files[t].selected=!1;else{if(this.options.max&&this.options.max<=this.selected().length)return;this.files[t].selected=!0}},open:function(t,e){this.files=t,this.options=e,this.$refs.dialog.open()}}},ht=ft,mt=(n("bf53"),Object(h["a"])(ht,dt,pt,!1,null,null,null)),gt=mt.exports,vt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("language.create"),notification:t.notification,theme:"positive",size:"medium"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})],1)},bt=[],kt={mixins:[k],data:function(){return{notification:null,language:{name:"",code:"",direction:"ltr"}}},computed:{fields:function(){return{name:{label:this.$t("language.name"),type:"text",required:!0,icon:"title"},code:{label:this.$t("language.code"),type:"text",required:!0,counter:!1,icon:"globe",width:"1/2"},direction:{label:this.$t("language.direction"),type:"select",required:!0,empty:!1,options:[{value:"ltr",text:this.$t("language.direction.ltr")},{value:"rtl",text:this.$t("language.direction.rtl")}],width:"1/2"},locale:{label:this.$t("language.locale"),type:"text",placeholder:"en_US"}}}},watch:{"language.name":function(t){this.onNameChanges(t)},"language.code":function(t){this.language.code=ot(t)}},methods:{onNameChanges:function(t){this.language.code=ot(t).substr(0,2)},open:function(){this.language={name:"",code:"",direction:"ltr"},this.$refs.dialog.open()},submit:function(){var t=this;this.$api.post("languages",{name:this.language.name,code:this.language.code,direction:this.language.direction,locale:this.language.locale}).then(function(){t.$store.dispatch("languages/load"),t.success({message:":)",event:"language.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},$t=kt,_t=Object(h["a"])($t,vt,bt,!1,null,null,null),yt=_t.exports,xt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("language.delete.confirm",{name:t.language.name}))}})],1)},wt=[],Ot={mixins:[k],data:function(){return{language:{name:null}}},methods:{open:function(t){var e=this;this.$api.get("languages/"+t).then(function(t){e.language=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.delete("languages/"+this.language.code).then(function(){t.$store.dispatch("languages/load"),t.success({message:t.$t("language.deleted"),event:"language.delete"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},St=Ot,Ct=Object(h["a"])(St,xt,wt,!1,null,null,null),Et=Ct.exports,Tt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("save"),notification:t.notification,size:"medium"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})],1)},jt=[],It={mixins:[yt],computed:{fields:function(){var t=yt.computed.fields.apply(this);return t.code.disabled=!0,t}},methods:{onNameChanges:function(){return!1},open:function(t){var e=this;this.$api.get("languages/"+t).then(function(t){e.language=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.patch("languages/"+this.language.code,{name:this.language.name,direction:this.language.direction,locale:this.language.locale}).then(function(){t.$store.dispatch("languages/load"),t.success({message:t.$t("language.updated"),event:"language.update"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Lt=It,qt=Object(h["a"])(Lt,Tt,jt,!1,null,null,null),Nt=qt.exports,At=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("page.draft.create"),notification:t.notification,size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},Bt=[],Pt={mixins:[k],data:function(){return{notification:null,parent:null,section:null,templates:[],page:{title:"",slug:"",template:null}}},computed:{fields:function(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title"},slug:{label:this.$t("slug"),type:"text",required:!0,counter:!1,icon:"url"},template:{name:"template",label:this.$t("template"),type:"select",disabled:1===this.templates.length,required:!0,icon:"code",empty:!1,options:this.templates}}}},watch:{"page.title":function(t){this.page.slug=ot(t)}},methods:{open:function(t,e,n){var i=this;this.parent=t,this.section=n,this.$api.get(e,{section:n}).then(function(t){i.templates=t.map(function(t){return{value:t.name,text:t.title}}),i.templates[0]&&(i.page.template=i.templates[0].value),i.$refs.dialog.open()}).catch(function(t){i.$store.dispatch("notification/error",t)})},submit:function(){var t=this;if(0===this.page.title.length)return this.$refs.dialog.error("Please enter a title"),!1;var e={template:this.page.template,slug:this.page.slug,content:{title:this.page.title}};this.$api.post(this.parent+"/children",e).then(function(e){t.success({route:t.$api.pages.link(e.id),message:":)",event:"page.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Dt=Pt,Mt=Object(h["a"])(Dt,At,Bt,!1,null,null,null),Rt=Mt.exports,zt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),size:t.hasSubpages?"medium":"small",theme:"negative",icon:"trash"},on:{submit:t.submit}},[t.page.hasChildren||t.page.hasDrafts?[n("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.page.title}))}}),n("div",{staticClass:"k-page-remove-warning"},[n("k-box",{attrs:{theme:"negative"},domProps:{innerHTML:t._s(t.$t("page.delete.confirm.subpages"))}})],1),t.hasSubpages?n("k-form",{attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}}):t._e()]:[n("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.page.title}))},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit(e)}}})]],2)},Ft=[],Ut=(n("a481"),{mixins:[k],data:function(){return{page:{title:null,hasChildren:!1,hasDrafts:!1},model:{check:null}}},computed:{hasSubpages:function(){return this.page.hasChildren||this.page.hasDrafts},fields:function(){return{check:{label:this.$t("page.delete.confirm.title"),type:"text",counter:!1}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:"id, title, hasChildren, hasDrafts, parent"}).then(function(t){e.page=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.hasSubpages&&this.model.check!==this.page.title?this.$refs.dialog.error(this.$t("error.page.delete.confirm")):this.$api.pages.delete(this.page.id,{force:!0}).then(function(){t.$store.dispatch("form/remove","pages/"+t.page.id);var e={message:":)",event:"page.delete"};t.$route.params.path&&t.page.id===t.$route.params.path.replace(/\+/g,"/")&&(t.page.parent?e.route="/pages/"+t.page.parent.id:e.route="/pages"),t.success(e)}).catch(function(e){t.$refs.dialog.error(e.message)})}}}),Ht=Ut,Kt=(n("12fb"),Object(h["a"])(Ht,zt,Ft,!1,null,null,null)),Vt=Kt.exports,Yt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},Gt=[],Wt={mixins:[k],data:function(){return{page:{id:null,title:null}}},computed:{fields:function(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title",preselect:!0}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:["id","title"]}).then(function(t){e.page=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;0!==this.page.title.length?this.$api.pages.title(this.page.id,this.page.title).then(function(){t.success({message:":)",event:"page.changeTitle"})}).catch(function(e){t.$refs.dialog.error(e.message)}):this.$refs.dialog.error(this.$t("error.page.changeTitle.empty"))}}},Jt=Wt,Xt=Object(h["a"])(Jt,Yt,Gt,!1,null,null,null),Zt=Xt.exports,Qt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:t.submit}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.changeStatus},model:{value:t.form,callback:function(e){t.form=e},expression:"form"}})],1)},te=[],ee=(n("ac6a"),n("a4bb")),ne=n.n(ee),ie={mixins:[k],data:function(){return{page:{id:null},isBlocked:!1,isIncomplete:!1,form:{status:null,position:null},states:{}}},computed:{fields:function(){var t=this,e={status:{name:"status",label:this.$t("page.changeStatus.select"),type:"radio",required:!0,options:ne()(this.states).map(function(e){return{value:e,text:t.states[e].label,info:t.states[e].text}})}};return"listed"===this.form.status&&"default"===this.page.blueprint.num&&(e.position={name:"position",label:this.$t("page.changeStatus.position"),type:"select",empty:!1,options:this.sortingOptions()}),e}},methods:{sortingOptions:function(){var t=this,e=[],n=0;return this.page.siblings.forEach(function(i){if(i.id===t.page.id||i.num<1)return!1;n++,e.push({value:n,text:n}),e.push({value:i.id,text:i.title,disabled:!0})}),e.push({value:n+1,text:n+1}),e},open:function(t){var e=this;this.$api.pages.get(t,{select:["id","status","num","errors","siblings","blueprint"]}).then(function(t){return!1===t.blueprint.options.changeStatus?e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.permission")}):"draft"===t.status&&ne()(t.errors).length>0?e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.incomplete"),details:t.errors}):(e.states=t.blueprint.status,e.page=t,e.form.status=t.status,e.form.position=t.num||t.siblings.length+1,void e.$refs.dialog.open())}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){this.$refs.form.submit()},changeStatus:function(){var t=this;this.$api.pages.status(this.page.id,this.form.status,this.form.position||1).then(function(){t.success({message:":)",event:"page.changeStatus"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},se=ie,ae=Object(h["a"])(se,Qt,te,!1,null,null,null),oe=ae.exports,re=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},le=[],ue={mixins:[k],data:function(){return{blueprints:[],page:{id:null,template:null}}},computed:{fields:function(){return{template:{label:this.$t("template"),type:"select",required:!0,empty:!1,options:this.page.blueprints,icon:"template"}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:["id","template","blueprints"]}).then(function(t){if(t.blueprints.length<=1)return e.$store.dispatch("notification/error",{message:e.$t("error.page.changeTemplate.invalid",{slug:t.id})});e.page=t,e.page.blueprints=e.page.blueprints.map(function(t){return{text:t.title,value:t.name}}),e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$events.$emit("keydown.cmd.s"),this.$api.pages.template(this.page.id,this.page.template).then(function(){t.success({message:":)",event:"page.changeTemplate"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},ce=ue,de=Object(h["a"])(ce,re,le,!1,null,null,null),pe=de.exports,fe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",on:{submit:t.submit}},[n("k-text-field",t._b({attrs:{value:t.slug},on:{input:function(e){return t.sluggify(e)}}},"k-text-field",t.field,!1),[n("k-button",{attrs:{slot:"options",icon:"wand","data-options":""},on:{click:function(e){return t.sluggify(t.page.title)}},slot:"options"},[t._v("\n "+t._s(t.$t("page.changeSlug.fromTitle"))+"\n ")])],1)],1)],1)},he=[],me={mixins:[k],data:function(){return{slug:null,url:null,page:{id:null,parent:null,title:null}}},computed:{field:function(){return{name:"slug",label:this.$t("slug"),type:"text",required:!0,icon:"url",help:"/"+this.url,counter:!1,preselect:!0}}},methods:{sluggify:function(t){this.slug=ot(t),this.page.parents?this.url=this.page.parents.map(function(t){return t.slug}).concat([this.slug]).join("/"):this.url=this.slug},open:function(t){var e=this;this.$api.pages.get(t,{view:"panel"}).then(function(t){e.page=t,e.sluggify(e.page.slug),e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;if(this.slug===this.page.slug)return this.$refs.dialog.close(),void this.$store.dispatch("notification/success",":)");0!==this.slug.length?this.$api.pages.slug(this.page.id,this.slug).then(function(e){t.$store.dispatch("form/remove","pages/"+t.page.id);var n={message:":)",event:"page.changeSlug"};t.$route.params.path&&t.page.id===t.$route.params.path.replace(/\+/g,"/")&&(n.route=t.$api.pages.link(e.id)),t.success(n)}).catch(function(e){t.$refs.dialog.error(e.message)}):this.$refs.dialog.error(this.$t("error.page.slug.invalid"))}}},ge=me,ve=Object(h["a"])(ge,fe,he,!1,null,null,null),be=ve.exports,ke=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-pages-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.model?n("header",{staticClass:"k-pages-dialog-navbar"},[n("k-button",{attrs:{disabled:!t.model.id,tooltip:t.$t("back"),icon:"angle-left"},on:{click:t.back}}),n("k-headline",[t._v(t._s(t.model.title))])],1):t._e(),t.pages.length?n("k-list",t._l(t.pages,function(e){return n("k-list-item",{key:e.id,attrs:{text:e.text,info:e.info,image:e.image,icon:e.icon},on:{click:function(n){return t.toggle(e)}}},[n("template",{slot:"options"},[t.isSelected(e)?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"}),t.model?n("k-button",{attrs:{disabled:!e.hasChildren,tooltip:t.$t("open"),icon:"angle-right"},on:{click:function(n){return n.stopPropagation(),t.go(e)}}}):t._e()],1)],2)}),1):n("k-empty",{attrs:{icon:"page"}},[t._v("\n No pages to select\n ")])]],2)},$e=[],_e={data:function(){return{model:{title:null,parent:null},pages:[],issue:null,options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{fetch:function(){var t=this;return this.$api.get(this.options.endpoint,{parent:this.options.parent}).then(function(e){t.model=e.model,t.pages=e.pages}).catch(function(e){t.pages=[],t.issue=e.message})},back:function(){this.options.parent=this.model.parent?this.model.parent.id:null,this.fetch()},submit:function(){this.$emit("submit",this.options.selected),this.$refs.dialog.close()},isSelected:function(t){return this.options.selected.map(function(t){return t.id}).includes(t.id)},toggle:function(t){if(!1===this.options.multiple&&(this.options.selected=[]),!1===this.isSelected(t)){if(this.options.max&&this.options.max<=this.options.selected.length)return;this.options.selected.push(t)}else this.options.selected=this.options.selected.filter(function(e){return e.id!==t.id})},open:function(t){var e=this;this.options=t,this.fetch().then(function(){e.$refs.dialog.open()})},go:function(t){this.options.parent=t.id,this.fetch()}}},ye=_e,xe=(n("ac27"),Object(h["a"])(ye,ke,$e,!1,null,null,null)),we=xe.exports,Oe={extends:Zt,methods:{open:function(){var t=this;this.$api.site.get({select:["title"]}).then(function(e){t.page=e,t.$refs.dialog.open()}).catch(function(e){t.$store.dispatch("notification/error",e)})},submit:function(){var t=this;this.$api.site.title(this.page.title).then(function(){t.$store.dispatch("system/title",t.page.title),t.success({message:":)",event:"site.changeTitle"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Se=Oe,Ce=Object(h["a"])(Se,L,q,!1,null,null,null),Ee=Ce.exports,Te=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("create"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()},close:t.reset}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.create},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},je=[],Ie={mixins:[k],data:function(){return{user:this.emptyUser(),languages:[],roles:[]}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user"},email:{label:this.$t("email"),type:"email",icon:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",icon:"key"},language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1},role:{label:this.$t("role"),type:1===this.roles.length?"hidden":"radio",required:!0,options:this.roles}}}},methods:{create:function(){var t=this;this.$api.users.create(this.user).then(function(){t.success({message:":)",event:"user.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})},emptyUser:function(){return{name:"",email:"",password:"",language:"en",role:"admin"}},open:function(){var t=this;this.$api.roles.options().then(function(e){t.roles=e,t.$api.translations.options().then(function(e){t.languages=e,t.$refs.dialog.open()}).catch(function(e){t.$store.dispatch("notification/error",e)})}).catch(function(e){t.$store.dispatch("notification/error",e)})},reset:function(){this.user=this.emptyUser()}}},Le=Ie,qe=Object(h["a"])(Le,Te,je,!1,null,null,null),Ne=qe.exports,Ae=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},Be=[],Pe={mixins:[k],data:function(){return{user:{id:null,email:null}}},computed:{fields:function(){return{email:{label:this.$t("email"),preselect:!0,required:!0,type:"email"}}}},methods:{open:function(t){var e=this;this.$api.users.get(t,{select:["id","email"]}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeEmail(this.user.id,this.user.email).then(function(e){t.$store.dispatch("form/revert","users/"+t.user.id);var n={message:":)",event:"user.changeEmail"};"User"===t.$route.name&&(n.route=t.$api.users.link(e.id)),t.success(n)}).catch(function(e){t.$refs.dialog.error(e.message)})}}},De=Pe,Me=Object(h["a"])(De,Ae,Be,!1,null,null,null),Re=Me.exports,ze=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),theme:"positive",icon:"check"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},Fe=[],Ue={mixins:[k],data:function(){return{user:{language:"en"},languages:[]}},computed:{fields:function(){return{language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1}}}},created:function(){var t=this;this.$api.translations.options().then(function(e){t.languages=e})},methods:{open:function(t){var e=this;this.$api.users.get(t,{view:"compact"}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeLanguage(this.user.id,this.user.language).then(function(e){t.user=e,t.$store.state.user.current.id===t.user.id&&t.$store.dispatch("user/language",t.user.language),t.success({message:":)",event:"user.changeLanguage"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},He=Ue,Ke=Object(h["a"])(He,ze,Fe,!1,null,null,null),Ve=Ke.exports,Ye=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),theme:"positive",icon:"check"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})],1)},Ge=[],We={mixins:[k],data:function(){return{user:null,values:{password:null,passwordConfirmation:null}}},computed:{fields:function(){return{password:{label:this.$t("user.changePassword.new"),type:"password",icon:"key"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password"}}}},methods:{open:function(t){var e=this;this.$api.users.get(t).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;return this.values.password.length<8?(this.$refs.dialog.error(this.$t("error.user.password.invalid")),!1):this.values.password!==this.values.passwordConfirmation?(this.$refs.dialog.error(this.$t("error.user.password.notSame")),!1):void this.$api.users.changePassword(this.user.id,this.values.password).then(function(){t.success({message:":)",event:"user.changePassword"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Je=We,Xe=Object(h["a"])(Je,Ye,Ge,!1,null,null,null),Ze=Xe.exports,Qe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("user.delete.confirm",{email:t.user.email}))}})],1)},tn=[],en={mixins:[k],data:function(){return{user:{email:null}}},methods:{open:function(t){var e=this;this.$api.users.get(t).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.delete(this.user.id).then(function(){t.$store.dispatch("form/remove","users/"+t.user.id),t.success({message:":)",event:"user.delete"}),"User"===t.$route.name&&t.$router.push("/users")}).catch(function(e){t.$refs.dialog.error(e.message)})}}},nn=en,sn=Object(h["a"])(nn,Qe,tn,!1,null,null,null),an=sn.exports,on=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},rn=[],ln={mixins:[k],data:function(){return{user:{id:null,name:null}}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user",preselect:!0}}}},methods:{open:function(t){var e=this;this.$api.users.get(t,{select:["id","name"]}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeName(this.user.id,this.user.name).then(function(){t.success({message:":)",event:"user.changeName"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},un=ln,cn=Object(h["a"])(un,on,rn,!1,null,null,null),dn=cn.exports,pn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("user.changeRole"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},fn=[],hn={mixins:[k],data:function(){return{roles:[],user:{id:null,role:"visitor"}}},computed:{fields:function(){return{role:{label:this.$t("user.changeRole.select"),type:"radio",required:!0,options:this.roles}}}},methods:{open:function(t){var e=this;this.id=t,this.$api.users.get(t).then(function(t){e.$api.roles.options().then(function(n){e.roles=n,e.user=t,e.user.role=e.user.role.name,e.$refs.dialog.open()})}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeRole(this.user.id,this.user.role).then(function(){t.success({message:":)",event:"user.changeRole"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},mn=hn,gn=Object(h["a"])(mn,pn,fn,!1,null,null,null),vn=gn.exports,bn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-users-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.users.length?n("k-list",t._l(t.users,function(e,i){return n("k-list-item",{key:e.email,attrs:{text:e.username,image:e.avatar?{url:e.avatar.url,back:"pattern",cover:!0}:null,icon:{type:"user",back:"black"}},on:{click:function(e){return t.toggle(i)}}},[e.selected?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)}),1):n("k-empty",{attrs:{icon:"users"}},[t._v("\n No users to select\n ")])]],2)},kn=[],$n={data:function(){return{users:[],issue:null,options:{max:null,multiple:!0,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{fetch:function(){var t=this;return this.users=[],this.$api.get("users").then(function(e){var n=t.options.selected||[];t.users=e.data.map(function(t){return t.selected=-1!==n.indexOf(t.email),t})}).catch(function(e){t.users=[],t.issue=e.message})},selected:function(){return this.users.filter(function(t){return t.selected})},submit:function(){this.$emit("submit",this.selected()),this.$refs.dialog.close()},toggle:function(t){if(!1===this.options.multiple&&(this.users=this.users.map(function(t){return t.selected=!1,t})),this.users[t].selected)this.users[t].selected=!1;else{if(this.options.max&&this.options.max<=this.selected().length)return;this.users[t].selected=!0}},open:function(t){var e=this;this.options=t,this.fetch().then(function(){e.$refs.dialog.open()})}}},_n=$n,yn=(n("7568"),Object(h["a"])(_n,bn,kn,!1,null,null,null)),xn=yn.exports,wn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dropdown",{staticClass:"k-autocomplete"},[t._t("default"),n("k-dropdown-content",t._g({ref:"dropdown",attrs:{autofocus:!0}},t.$listeners),t._l(t.matches,function(e,i){return n("k-dropdown-item",t._b({key:i,on:{click:function(n){return t.onSelect(e)},keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"tab",9,n.key,"Tab")?null:(n.preventDefault(),t.onSelect(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.onSelect(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.close(e))}]}},"k-dropdown-item",e,!1),[t._v("\n "+t._s(e.text)+"\n ")])}),1),t._v("\n "+t._s(t.query)+"\n")],2)},On=[];n("4917"),n("3b2b");RegExp.escape=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};var Sn,Cn,En,Tn,jn,In,Ln={props:{limit:10,skip:{type:Array,default:function(){return[]}},options:Array,query:String},data:function(){return{matches:[],selected:{text:null}}},methods:{close:function(){this.$refs.dropdown.close()},onSelect:function(t){this.$refs.dropdown.close(),this.$emit("select",t)},search:function(t){var e=this;if(!(t.length<1)){var n=new RegExp(RegExp.escape(t),"ig");this.matches=this.options.filter(function(t){return!!t.text&&(-1===e.skip.indexOf(t.value)&&null!==t.text.match(n))}).slice(0,this.limit),this.$emit("search",t,this.matches),this.$refs.dropdown.open()}}}},qn=Ln,Nn=Object(h["a"])(qn,wn,On,!1,null,null,null),An=Nn.exports,Bn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-calendar-input"},[n("nav",[n("k-button",{attrs:{icon:"angle-left"},on:{click:t.prev}}),n("span",{staticClass:"k-calendar-selects"},[n("k-select-input",{attrs:{options:t.months,disabled:t.disabled,empty:!1,required:!0},model:{value:t.month,callback:function(e){t.month=t._n(e)},expression:"month"}}),n("k-select-input",{attrs:{options:t.years,disabled:t.disabled,empty:!1,required:!0},model:{value:t.year,callback:function(e){t.year=t._n(e)},expression:"year"}})],1),n("k-button",{attrs:{icon:"angle-right"},on:{click:t.next}})],1),n("table",{staticClass:"k-calendar-table"},[n("thead",[n("tr",t._l(t.weekdays,function(e){return n("th",{key:"weekday_"+e},[t._v(t._s(e))])}),0)]),n("tbody",t._l(t.numberOfWeeks,function(e){return n("tr",{key:"week_"+e},t._l(t.days(e),function(e,i){return n("td",{key:"day_"+i,staticClass:"k-calendar-day",attrs:{"aria-current":!!t.isToday(e)&&"date","aria-selected":!!t.isCurrent(e)&&"date"}},[e?n("k-button",{on:{click:function(n){return t.select(e)}}},[t._v(t._s(e))]):t._e()],1)}),0)}),0),n("tfoot",[n("tr",[n("td",{staticClass:"k-calendar-today",attrs:{colspan:"7"}},[n("k-button",{on:{click:function(e){return t.go("today")}}},[t._v(t._s(t.$t("today")))])],1)])])])])},Pn=[],Dn=n("5a0c"),Mn=n.n(Dn),Rn=function(t,e){t=String(t);var n="";e=(e||2)-t.length;while(n.length0?t:7},weekdays:function(){return[this.$t("days.mon"),this.$t("days.tue"),this.$t("days.wed"),this.$t("days.thu"),this.$t("days.fri"),this.$t("days.sat"),this.$t("days.sun")]},monthnames:function(){return[this.$t("months.january"),this.$t("months.february"),this.$t("months.march"),this.$t("months.april"),this.$t("months.may"),this.$t("months.june"),this.$t("months.july"),this.$t("months.august"),this.$t("months.september"),this.$t("months.october"),this.$t("months.november"),this.$t("months.december")]},months:function(){var t=[];return this.monthnames.forEach(function(e,n){t.push({value:n,text:e})}),t},years:function(){for(var t=[],e=this.year-10;e<=this.year+10;e++)t.push({value:e,text:Rn(e)});return t}},watch:{value:function(t){var e=Mn()(t);this.day=e.date(),this.month=e.month(),this.year=e.year(),this.current=e}},methods:{days:function(t){for(var e=[],n=7*(t-1)+1,i=n;ithis.numberOfDays?e.push(""):e.push(s)}return e},next:function(){var t=this.date.clone().add(1,"month");this.set(t)},isToday:function(t){return this.month===this.today.month()&&this.year===this.today.year()&&t===this.today.date()},isCurrent:function(t){return this.month===this.current.month()&&this.year===this.current.year()&&t===this.current.date()},prev:function(){var t=this.date.clone().subtract(1,"month");this.set(t)},go:function(t,e){"today"===t&&(t=this.today.year(),e=this.today.month()),this.year=t,this.month=e},set:function(t){this.day=t.date(),this.month=t.month(),this.year=t.year()},select:function(t){t&&(this.day=t);var e=Mn()(new Date(this.year,this.month,this.day,this.current.hour(),this.current.minute()));this.$emit("input",e.toISOString())}}},Fn=zn,Un=(n("ee15"),Object(h["a"])(Fn,Bn,Pn,!1,null,null,null)),Hn=Un.exports,Kn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-counter",attrs:{"data-invalid":!t.valid}},[n("span",[t._v(t._s(t.count))]),t.min&&t.max?n("span",{staticClass:"k-counter-rules"},[t._v("("+t._s(t.min)+"–"+t._s(t.max)+")")]):t.min?n("span",{staticClass:"k-counter-rules"},[t._v("≥ "+t._s(t.min))]):t.max?n("span",{staticClass:"k-counter-rules"},[t._v("≤ "+t._s(t.max))]):t._e()])},Vn=[],Yn=(n("c5f6"),{props:{count:Number,min:Number,max:Number,required:{type:Boolean,default:!1}},computed:{valid:function(){return!1===this.required&&0===this.count||(!0!==this.required||0!==this.count)&&(!(this.min&&this.countthis.max))}}}),Gn=Yn,Wn=(n("fc0f"),Object(h["a"])(Gn,Kn,Vn,!1,null,null,null)),Jn=Wn.exports,Xn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{ref:"form",staticClass:"k-form",attrs:{method:"POST",autocomplete:"off",novalidate:""},on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},[t._t("header"),t._t("default",[n("k-fieldset",t._g({ref:"fields",attrs:{disabled:t.disabled,fields:t.fields,novalidate:t.novalidate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t.listeners))]),t._t("footer"),n("input",{ref:"submitter",staticClass:"k-form-submitter",attrs:{type:"submit"}})],2)},Zn=[],Qn={props:{disabled:Boolean,config:Object,fields:{type:[Array,Object],default:function(){return{}}},novalidate:{type:Boolean,default:!1},value:{type:Object,default:function(){return{}}}},data:function(){return{errors:{},listeners:Object(l["a"])({},this.$listeners,{submit:this.onSubmit})}},methods:{focus:function(t){this.$refs.fields&&this.$refs.fields.focus&&this.$refs.fields.focus(t)},onSubmit:function(){this.$emit("submit",this.value)},submit:function(){this.$refs.submitter.click()}}},ti=Qn,ei=(n("5d33"),Object(h["a"])(ti,Xn,Zn,!1,null,null,null)),ni=ei.exports,ii=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hasChanges?n("nav",{staticClass:"k-form-buttons"},[n("k-view",[n("k-button",{staticClass:"k-form-button",attrs:{icon:"undo"},on:{click:t.reset}},[t._v("\n "+t._s(t.$t("revert"))+"\n ")]),n("k-button",{staticClass:"k-form-button",attrs:{icon:"check"},on:{click:t.save}},[t._v("\n "+t._s(t.$t("save"))+"\n ")])],1)],1):t._e()},si=[],ai={computed:{hasChanges:function(){return this.$store.getters["form/hasChanges"](this.id)},id:function(){return this.$store.state.form.current}},created:function(){this.$events.$on("keydown.cmd.s",this.save)},destroyed:function(){this.$events.$off("keydown.cmd.s",this.save)},methods:{reset:function(){this.$store.dispatch("form/revert",this.id)},save:function(t){var e=this;return!!t&&(t.preventDefault&&t.preventDefault(),!1===this.hasChanges||void this.$store.dispatch("form/save",this.id).then(function(){e.$events.$emit("model.update"),e.$store.dispatch("notification/success",":)")}).catch(function(t){403!==t.code&&(t.details?e.$store.dispatch("notification/error",{message:e.$t("error.form.incomplete"),details:t.details}):e.$store.dispatch("notification/error",{message:e.$t("error.form.notSaved"),details:[{label:"Exception: "+t.exception,message:t.message}]}))}))}}},oi=ai,ri=(n("18dd"),Object(h["a"])(oi,ii,si,!1,null,null,null)),li=ri.exports,ui=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"k-field k-field-name-"+t.name,attrs:{"data-disabled":t.disabled},on:{focusin:function(e){return t.$emit("focus",e)},focusout:function(e){return t.$emit("blur",e)}}},[t._t("header",[n("header",{staticClass:"k-field-header"},[t._t("label",[n("label",{staticClass:"k-field-label",attrs:{for:t.input}},[t._v(t._s(t.labelText)+" "),t.required?n("abbr",{attrs:{title:"This field is required"}},[t._v("*")]):t._e()])]),t._t("options"),t._t("counter",[t.counter?n("k-counter",t._b({staticClass:"k-field-counter",attrs:{required:t.required}},"k-counter",t.counter,!1)):t._e()])],2)]),t._t("default"),t._t("footer",[t.help||t.$slots.help?n("footer",{staticClass:"k-field-footer"},[t._t("help",[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()])],2):t._e()])],2)},ci=[],di={inheritAttrs:!1,props:{counter:[Boolean,Object],disabled:Boolean,endpoints:Object,help:String,input:[String,Number],label:String,name:[String,Number],required:Boolean,type:String},computed:{labelText:function(){return this.label||" "}}},pi=di,fi=(n("a134"),Object(h["a"])(pi,ui,ci,!1,null,null,null)),hi=fi.exports,mi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("fieldset",{staticClass:"k-fieldset"},[n("k-grid",t._l(t.fields,function(e,i){return"hidden"!==e.type&&t.meetsCondition(e)?n("k-column",{key:e.signature,attrs:{width:e.width}},[n("k-error-boundary",[t.hasFieldType(e.type)?n("k-"+e.type+"-field",t._b({ref:i,refInFor:!0,tag:"component",attrs:{name:i,novalidate:t.novalidate,disabled:t.disabled||e.disabled},on:{input:function(n){return t.$emit("input",t.value,e,i)},focus:function(n){return t.$emit("focus",n,e,i)},invalid:function(n,s){return t.onInvalid(n,s,e,i)},submit:function(n){return t.$emit("submit",n,e,i)}},model:{value:t.value[i],callback:function(e){t.$set(t.value,i,e)},expression:"value[fieldName]"}},"component",e,!1)):n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[t._v("\n The field type "),n("strong",[t._v('"'+t._s(i)+'"')]),t._v(" does not exist\n ")])],1)],1)],1):t._e()}),1)],1)},gi=[],vi={props:{config:Object,disabled:Boolean,fields:{type:[Array,Object],default:function(){return[]}},novalidate:{type:Boolean,default:!1},value:{type:Object,default:function(){return{}}}},data:function(){return{errors:{}}},methods:{focus:function(t){if(t)this.hasField(t)&&"function"===typeof this.$refs[t][0].focus&&this.$refs[t][0].focus();else{var e=ne()(this.$refs)[0];this.focus(e)}},hasFieldType:function(t){return A["a"].options.components["k-"+t+"-field"]},hasField:function(t){return this.$refs[t]&&this.$refs[t][0]},meetsCondition:function(t){var e=this;if(!t.when)return!0;var n=!0;return ne()(t.when).forEach(function(i){var s=e.value[i.toLowerCase()],a=t.when[i];s!==a&&(n=!1)}),n},onInvalid:function(t,e,n,i){this.errors[i]=e,this.$emit("invalid",this.errors)},hasErrors:function(){return ne()(this.errors).length}}},bi=vi,ki=(n("862b"),Object(h["a"])(bi,mi,gi,!1,null,null,null)),$i=ki.exports,_i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-input",attrs:{"data-disabled":t.disabled,"data-invalid":!t.novalidate&&t.isInvalid,"data-theme":t.theme,"data-type":t.type}},[t.$slots.before||t.before?n("span",{staticClass:"k-input-before",on:{click:t.focus}},[t._t("before",[t._v(t._s(t.before))])],2):t._e(),n("span",{staticClass:"k-input-element",on:{click:function(e){return e.stopPropagation(),t.focus(e)}}},[t._t("default",[n("k-"+t.type+"-input",t._g(t._b({ref:"input",tag:"component",attrs:{value:t.value}},"component",t.inputProps,!1),t.listeners))])],2),t.$slots.after||t.after?n("span",{staticClass:"k-input-after",on:{click:t.focus}},[t._t("after",[t._v(t._s(t.after))])],2):t._e(),t.$slots.icon||t.icon?n("span",{staticClass:"k-input-icon",on:{click:t.focus}},[t._t("icon",[n("k-icon",{attrs:{type:t.icon}})])],2):t._e()])},yi=[],xi={inheritAttrs:!1,props:{after:String,before:String,disabled:Boolean,type:String,icon:[String,Boolean],invalid:Boolean,theme:String,novalidate:{type:Boolean,default:!1},value:{type:[String,Boolean,Number,Object,Array],default:null}},data:function(){var t=this;return{isInvalid:this.invalid,listeners:Object(l["a"])({},this.$listeners,{invalid:function(e,n){t.isInvalid=e,t.$emit("invalid",e,n)}}),inputProps:Object(l["a"])({},this.$props,this.$attrs)}},methods:{blur:function(t){t.relatedTarget&&!1===this.$el.contains(t.relatedTarget)&&this.$refs.input.blur&&this.$refs.input.blur()},focus:function(t){if(t&&t.target&&"INPUT"===t.target.tagName)t.target.focus();else if(this.$refs.input&&this.$refs.input.focus)this.$refs.input.focus();else{var e=this.$el.querySelector("input, select, textarea");e&&e.focus()}}}},wi=xi,Oi=(n("c7c8"),Object(h["a"])(wi,_i,yi,!1,null,null,null)),Si=Oi.exports,Ci=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-upload"},[n("input",{ref:"input",attrs:{accept:t.options.accept,multiple:t.options.multiple,"aria-hidden":"true",type:"file",tabindex:"-1"},on:{change:t.select}}),n("k-dialog",{ref:"dialog",attrs:{size:"medium"}},[t.errors.length>0?[n("k-headline",[t._v(t._s(t.$t("upload.errors")))]),n("ul",{staticClass:"k-upload-error-list"},t._l(t.errors,function(e,i){return n("li",{key:"error-"+i},[n("p",{staticClass:"k-upload-error-filename"},[t._v(t._s(e.file.name))]),n("p",{staticClass:"k-upload-error-message"},[t._v(t._s(e.message))])])}),0)]:[n("k-headline",[t._v(t._s(t.$t("upload.progress")))]),n("ul",{staticClass:"k-upload-list"},t._l(t.files,function(e,i){return n("li",{key:"file-"+i},[n("k-progress",{ref:e.name,refInFor:!0}),n("p",{staticClass:"k-upload-list-filename"},[t._v(t._s(e.name))]),n("p",[t._v(t._s(t.errors[e.name]))])],1)}),0)],n("template",{slot:"footer"},[t.errors.length>0?[n("k-button-group",[n("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.$refs.dialog.close()}}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],1)]:t._e()],2)],2)],1)},Ei=[],Ti=n("db0c"),ji=n.n(Ti),Ii=n("75fc"),Li=n("5176"),qi=n.n(Li),Ni=function(t,e){var n={url:"/",field:"file",method:"POST",accept:"text",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},i=qi()(n,e),s=new FormData;s.append(i.field,t),i.attributes&&ne()(i.attributes).forEach(function(t){s.append(t,i.attributes[t])});var a=new XMLHttpRequest,o=function(e){if(e.lengthComputable&&i.progress){var n=Math.max(0,Math.min(100,e.loaded/e.total*100));i.progress(a,t,Math.ceil(n))}};a.addEventListener("loadstart",o),a.addEventListener("progress",o),a.addEventListener("load",function(e){var n=null;try{n=JSON.parse(e.target.response)}catch(s){n={status:"error",message:"The file could not be uploaded"}}n.status&&"error"===n.status?i.error(a,t,n):(i.success(a,t,n),i.progress(a,t,100))}),a.addEventListener("error",function(e){var n=JSON.parse(e.target.response);i.error(a,t,n),i.progress(a,t,100)}),a.open("POST",i.url,!0),i.headers&&ne()(i.headers).forEach(function(t){var e=i.headers[t];a.setRequestHeader(t,e)}),a.send(s)},Ai={props:{url:{type:String},accept:{type:String,default:"*"},attributes:{type:Object},multiple:{type:Boolean,default:!0},max:{type:Number}},data:function(){return{options:this.$props,completed:{},errors:[],files:[],total:0}},methods:{open:function(t){var e=this;this.params(t),setTimeout(function(){e.$refs.input.click()},1)},params:function(t){this.options=qi()({},this.$props,t)},select:function(t){this.upload(t.target.files)},drop:function(t,e){this.params(e),this.upload(t)},upload:function(t){var e=this;this.$refs.dialog.open(),this.files=Object(Ii["a"])(t),this.completed={},this.errors=[],this.hasErrors=!1,this.options.max&&(this.files=this.files.slice(0,this.options.max)),this.total=this.files.length,this.files.forEach(function(t){Ni(t,{url:e.options.url,attributes:e.options.attributes,headers:{"X-CSRF":window.panel.csrf},progress:function(t,n,i){e.$refs[n.name]&&e.$refs[n.name][0]&&e.$refs[n.name][0].set(i)},success:function(t,n,i){e.complete(n,i.data)},error:function(t,n,i){e.errors.push({file:n,message:i.message}),e.complete(n)}})})},complete:function(t,e){var n=this;if(this.completed[t.name]=e,ne()(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout(function(){n.$refs.dialog.close(),n.$emit("success",n.files,ji()(n.completed))},250)}}}},Bi=Ai,Pi=(n("5aee"),Object(h["a"])(Bi,Ci,Ei,!1,null,null,null)),Di=Pi.exports,Mi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-checkbox-input"},[n("input",{ref:"input",staticClass:"k-checkbox-input-native",attrs:{disabled:t.disabled,id:t.id,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onChange(e.target.checked)}}}),n("span",{staticClass:"k-checkbox-input-icon",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{width:"12",height:"10",viewBox:"0 0 12 10",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M1 5l3.3 3L11 1","stroke-width":"2",fill:"none","fill-rule":"evenodd"}})])]),n("span",{staticClass:"k-checkbox-input-label",domProps:{innerHTML:t._s(t.label)}})])},Ri=[],zi=n("b5ae"),Fi={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],label:String,required:Boolean,value:Boolean},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onChange:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.focus()}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},Ui=Fi,Hi=(n("42e4"),Object(h["a"])(Ui,Mi,Ri,!1,null,null,null)),Ki=Hi.exports,Vi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-checkboxes-input",style:"--columns:"+t.columns},t._l(t.options,function(e,i){return n("li",{key:i},[n("k-checkbox-input",{attrs:{id:t.id+"-"+i,label:e.text,value:-1!==t.selected.indexOf(e.value)},on:{input:function(n){return t.onInput(e.value,n)}}})],1)}),0)},Yi=[],Gi=(n("28a5"),n("a745")),Wi=n.n(Gi),Ji={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default:function(){return this._uid}},max:Number,min:Number,options:Array,required:Boolean,value:{type:Array,default:function(){return[]}}},data:function(){return{selected:this.valueToArray(this.value)}},watch:{value:function(t){this.selected=this.valueToArray(t)},selected:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$el.querySelector("input").focus()},onInput:function(t,e){if(!0===e)this.selected.push(t);else{var n=this.selected.indexOf(t);-1!==n&&this.selected.splice(n,1)}this.$emit("input",this.selected)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.focus()},valueToArray:function(t){return Wi()(t)?t:String(t).split(",")}},validations:function(){return{selected:{required:!this.required||zi["required"],min:!this.min||Object(zi["minLength"])(this.min),max:!this.max||Object(zi["maxLength"])(this.max)}}}},Xi=Ji,Zi=Object(h["a"])(Xi,Vi,Yi,!1,null,null,null),Qi=Zi.exports,ts=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-date-input"},[n("k-select-input",{ref:"years",attrs:{"aria-label":t.$t("year"),options:t.years,disabled:t.disabled,required:t.required,value:t.year,placeholder:"––––",empty:"––––"},on:{input:t.setYear,invalid:t.onInvalid}}),n("span",{staticClass:"k-date-input-separator"},[t._v("-")]),n("k-select-input",{ref:"months",attrs:{"aria-label":t.$t("month"),options:t.months,disabled:t.disabled,required:t.required,value:t.month,empty:"––",placeholder:"––"},on:{input:t.setMonth,invalid:t.onInvalid}}),n("span",{staticClass:"k-date-input-separator"},[t._v("-")]),n("k-select-input",{ref:"days",attrs:{"aria-label":t.$t("day"),autofocus:t.autofocus,id:t.id,options:t.days,disabled:t.disabled,required:t.required,value:t.day,placeholder:"––",empty:"––"},on:{input:t.setDay,invalid:t.onInvalid}})],1)},es=[],ns=n("e814"),is=n.n(ns),ss={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:String,min:String,required:Boolean,value:String},data:function(){return{date:Mn()(this.value),minDate:this.calculate(this.min,"min"),maxDate:this.calculate(this.max,"max")}},computed:{day:function(){return isNaN(this.date.date())?"":this.date.date()},days:function(){return this.options(1,this.date.daysInMonth()||31,"days")},month:function(){return isNaN(this.date.date())?"":this.date.month()+1},months:function(){return this.options(1,12,"months")},year:function(){return isNaN(this.date.year())?"":this.date.year()},years:function(){var t=this.date.isBefore(this.minDate)?this.date.year():this.minDate.year(),e=this.date.isAfter(this.maxDate)?this.date.year():this.maxDate.year();return this.options(t,e)}},watch:{value:function(t){this.date=Mn()(t)}},methods:{calculate:function(t,e){var n={min:{run:"subtract",take:"startOf"},max:{run:"add",take:"endOf"}}[e],i=t?Mn()(t):null;return i&&!1!==i.isValid()||(i=Mn()()[n.run](10,"year")[n.take]("year")),i},focus:function(){this.$refs.years.focus()},onInput:function(){!1!==this.date.isValid()?this.$emit("input",this.date.toISOString()):this.$emit("input","")},onInvalid:function(t,e){this.$emit("invalid",t,e)},options:function(t,e){for(var n=[],i=t;i<=e;i++)n.push({value:i,text:Rn(i)});return n},set:function(t,e){if(""===e||null===e||!1===e||-1===e)return this.setInvalid(),void this.onInput();if(!1===this.date.isValid())return this.setInitialDate(t,e),void this.onInput();var n=this.date,i=this.date.date();this.date=this.date.set(t,is()(e)),"month"===t&&this.date.date()!==i&&(this.date=n.set("date",1).set("month",e).endOf("month")),this.onInput()},setInvalid:function(){this.date=Mn()("invalid")},setInitialDate:function(t,e){var n=Mn()();return this.date=Mn()().set(t,is()(e)),"date"===t&&n.month()!==this.date.month()&&(this.date=n.endOf("month")),this.date},setDay:function(t){this.set("date",t)},setMonth:function(t){this.set("month",t-1)},setYear:function(t){this.set("year",t)}}},as=ss,os=(n("6ab3"),Object(h["a"])(as,ts,es,!1,null,null,null)),rs=os.exports,ls=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-datetime-input"},[n("k-date-input",{ref:"dateInput",attrs:{autofocus:t.autofocus,required:t.required,id:t.id,disabled:t.disabled,value:t.dateValue},on:{input:t.setDate}}),n("k-time-input",t._b({ref:"timeInput",attrs:{required:t.required,disabled:t.disabled,value:t.timeValue},on:{input:t.setTime}},"k-time-input",t.timeOptions,!1))],1)},us=[],cs={inheritAttrs:!1,props:Object(l["a"])({},rs.props,{time:{type:[Boolean,Object],default:function(){return{}}},value:String}),data:function(){return{dateValue:this.parseDate(this.value),timeValue:this.parseTime(this.value),timeOptions:this.setTimeOptions()}},watch:{value:function(t){this.dateValue=this.parseDate(t),this.timeValue=this.parseTime(t),this.onInvalid()}},mounted:function(){this.onInvalid()},methods:{focus:function(){this.$refs.dateInput.focus()},onInput:function(){if(this.timeValue&&this.dateValue){var t=this.dateValue+"T"+this.timeValue+":00";this.$emit("input",t)}else this.$emit("input","")},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},parseDate:function(t){var e=Mn()(t);return e.isValid()?e.format("YYYY-MM-DD"):null},parseTime:function(t){var e=Mn()(t);return e.isValid()?e.format("HH:mm"):null},setDate:function(t){t&&!this.timeValue&&(this.timeValue=Mn()().format("HH:mm")),t?this.dateValue=this.parseDate(t):(this.dateValue=null,this.timeValue=null),this.onInput()},setTime:function(t){t&&!this.dateValue&&(this.dateValue=Mn()().format("YYYY-MM-DD")),t?this.timeValue=t:(this.dateValue=null,this.timeValue=null),this.onInput()},setTimeOptions:function(){return!0===this.time?{}:this.time}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},ds=cs,ps=(n("4433"),Object(h["a"])(ds,ls,us,!1,null,null,null)),fs=ps.exports,hs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("input",t._g(t._b({ref:"input",staticClass:"k-text-input"},"input",{autocomplete:t.autocomplete,autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,type:t.type,value:t.value},!1),t.listeners))},ms=[],gs={inheritAttrs:!1,class:"k-text-input",props:{autocomplete:{type:[Boolean,String],default:"off"},autofocus:Boolean,disabled:Boolean,id:[Number,String],maxlength:Number,minlength:Number,name:[Number,String],pattern:String,placeholder:String,preselect:Boolean,required:Boolean,spellcheck:{type:[Boolean,String],default:"off"},type:{type:String,default:"text"},value:String},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus:function(){this.$refs.input.focus()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.select()}},validations:function(){return{value:{required:!this.required||zi["required"],minLength:!this.minlength||Object(zi["minLength"])(this.minlength),maxLength:!this.maxlength||Object(zi["maxLength"])(this.maxlength),email:"email"!==this.type||zi["email"],url:"url"!==this.type||zi["url"]}}}},vs=gs,bs=(n("cb8f"),Object(h["a"])(vs,hs,ms,!1,null,null,null)),ks=bs.exports,$s={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"email"},placeholder:{type:String,default:function(){return this.$t("email.placeholder")}},type:{type:String,default:"email"}})},_s=$s,ys=Object(h["a"])(_s,Sn,Cn,!1,null,null,null),xs=ys.exports,ws=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{staticClass:"k-multiselect-input",attrs:{list:t.state,options:t.dragOptions,"data-layout":t.layout,element:"k-dropdown"},on:{end:t.onInput},nativeOn:{click:function(e){return t.$refs.dropdown.toggle(e)}}},[t._l(t.sorted,function(e){return n("k-tag",{key:e.value,ref:e.value,refInFor:!0,attrs:{removable:!0},on:{remove:function(n){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:t.navigate("prev")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:"button"in e&&2!==e.button?null:t.navigate("next")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:t.$refs.dropdown.open(e)}]}},[t._v("\n "+t._s(e.text)+"\n ")])}),n("k-dropdown-content",{ref:"dropdown",attrs:{slot:"footer"},on:{open:t.onOpen,close:function(e){t.q=null}},slot:"footer"},[t.search?n("k-dropdown-item",{staticClass:"k-multiselect-search",attrs:{icon:"search"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"search",domProps:{value:t.q},on:{input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),n("div",{staticClass:"k-multiselect-options"},t._l(t.filtered,function(e){return n("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.addable},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(n){return t.select(e)}},nativeOn:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.select(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:(n.preventDefault(),t.select(e))}]}},[n("span",{domProps:{innerHTML:t._s(e.display)}}),n("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])}),1)],1)],2)},Os=[],Ss=(n("20d6"),n("55dd"),{inheritAttrs:!1,props:{disabled:Boolean,id:[Number,String],max:Number,min:Number,layout:String,options:{type:Array,default:function(){return[]}},required:Boolean,search:Boolean,separator:{type:String,default:","},sort:Boolean,value:{type:Array,required:!0,default:function(){return[]}}},data:function(){return{state:this.value,q:null}},computed:{addable:function(){return!this.max||this.state.length1&&!this.sort},dragOptions:function(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},filtered:function(){if(null===this.q)return this.options.map(function(t){return Object(l["a"])({},t,{display:t.text,info:t.value})});var t=new RegExp("(".concat(RegExp.escape(this.q),")"),"ig");return this.options.filter(function(e){return e.text.match(t)||e.value.match(t)}).map(function(e){return Object(l["a"])({},e,{display:e.text.replace(t,"$1"),info:e.value.replace(t,"$1")})})},sorted:function(){var t=this;if(!1===this.sort)return this.state;var e=this.state,n=function(e){return t.options.findIndex(function(t){return t.value===e.value})};return e.sort(function(t,e){return n(t)-n(e)})}},watch:{value:function(t){this.state=t,this.onInvalid()}},mounted:function(){this.onInvalid(),this.$events.$on("click",this.close),this.$events.$on("keydown.cmd.s",this.close),this.$events.$on("keydown.esc",this.escape)},destroyed:function(){this.$events.$off("click",this.close),this.$events.$off("keydown.cmd.s",this.close),this.$events.$off("keydown.esc",this.escape)},methods:{add:function(t){this.addable&&(this.state.push(t),this.onInput())},blur:function(){this.close()},close:function(){this.$refs.dropdown.close(),this.q=null,this.$el.focus()},escape:function(){this.q?this.q=null:this.close()},focus:function(){this.$refs.dropdown.open()},index:function(t){return this.state.findIndex(function(e){return e.value===t.value})},isSelected:function(t){return-1!==this.index(t)},navigate:function(t){var e=document.activeElement;switch(t){case"prev":e&&e.previousSibling&&e.previousSibling.focus();break;case"next":e&&e.nextSibling&&e.nextSibling.focus();break}},onInput:function(){this.$emit("input",this.sorted)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOpen:function(){var t=this;this.$nextTick(function(){t.$refs.search&&t.$refs.search.focus()})},remove:function(t){this.state.splice(this.index(t),1),this.onInput()},select:function(t){t={text:t.text,value:t.value},this.isSelected(t)?this.remove(t):this.add(t)}},validations:function(){return{state:{required:!this.required||zi["required"],minLength:!this.min||Object(zi["minLength"])(this.min),maxLength:!this.max||Object(zi["maxLength"])(this.max)}}}}),Cs=Ss,Es=(n("11ae"),Object(h["a"])(Cs,ws,Os,!1,null,null,null)),Ts=Es.exports,js=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("input",t._g(t._b({ref:"input",staticClass:"k-number-input",attrs:{type:"number"}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,placeholder:t.placeholder,required:t.required,step:t.step,value:t.value},!1),t.listeners))},Is=[],Ls={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],max:Number,min:Number,name:[Number,String],placeholder:String,preselect:Boolean,required:Boolean,step:Number,value:{type:[Number,String],default:null}},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus:function(){this.$refs.input.focus()},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){null!==t&&""!==t&&"-"!==t&&"-0"!==t&&(t=Number(t)),this.$emit("input",t)},select:function(){this.$refs.input.select()}},validations:function(){return{value:{required:!this.required||zi["required"],min:!this.min||Object(zi["minValue"])(this.min),max:!this.max||Object(zi["maxValue"])(this.max)}}}},qs=Ls,Ns=(n("6018"),Object(h["a"])(qs,js,Is,!1,null,null,null)),As=Ns.exports,Bs={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"new-password"},type:{type:String,default:"password"}})},Ps=Bs,Ds=Object(h["a"])(Ps,En,Tn,!1,null,null,null),Ms=Ds.exports,Rs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-radio-input",style:"--columns:"+t.columns},t._l(t.options,function(e,i){return n("li",{key:i},[n("input",{staticClass:"k-radio-input-native",attrs:{id:t.id+"-"+i,name:t.id,type:"radio"},domProps:{value:e.value,checked:t.value===e.value},on:{change:function(n){return t.onInput(e.value)}}}),n("label",{attrs:{for:t.id+"-"+i}},[e.info?[n("span",{staticClass:"k-radio-input-text"},[t._v(t._s(e.text))]),n("span",{staticClass:"k-radio-input-info"},[t._v(t._s(e.info))])]:[t._v("\n "+t._s(e.text)+"\n ")]],2),e.icon?n("k-icon",{attrs:{type:e.icon}}):t._e()],1)}),0)},zs=[],Fs={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default:function(){return this._uid}},options:Array,required:Boolean,value:[String,Number,Boolean]},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$el.querySelector("input").focus()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.focus()}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},Us=Fs,Hs=(n("893d"),Object(h["a"])(Us,Rs,zs,!1,null,null,null)),Ks=Hs.exports,Vs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-range-input"},[n("input",t._g(t._b({ref:"input",staticClass:"k-range-input-native",style:"--min: "+t.min+"; --max: "+t.max+"; --value: "+t.position,attrs:{type:"range"}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,required:t.required,step:t.step,value:t.value},!1),t.listeners)),t.tooltip?n("span",{staticClass:"k-range-input-tooltip"},[t.tooltip.before?n("span",{staticClass:"k-range-input-tooltip-before"},[t._v(t._s(t.tooltip.before))]):t._e(),n("span",{staticClass:"k-range-input-tooltip-text"},[t._v(t._s(t.label))]),t.tooltip.after?n("span",{staticClass:"k-range-input-tooltip-after"},[t._v(t._s(t.tooltip.after))]):t._e()]):t._e()])},Ys=[],Gs=(n("6b54"),{inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:{type:Number,default:100},min:{type:Number,default:0},name:[String,Number],required:Boolean,step:{type:Number,default:1},tooltip:{type:[Boolean,Object],default:function(){return{before:null,after:null}}},value:[Number,String]},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},computed:{label:function(){return null!==this.value?this.format(this.value):"–"},center:function(){var t=(this.max-this.min)/2+this.min;return Math.ceil(t/this.step)*this.step},position:function(){return null!==this.value?this.value:this.center}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},format:function(t){var e=document.lang?document.lang.replace("_","-"):"en",n=this.step.toString().split("."),i=n.length>1?n[1].length:0;return new Intl.NumberFormat(e,{minimumFractionDigits:i}).format(t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){this.$emit("input",t)}},validations:function(){return{value:{required:!this.required||zi["required"],min:!this.min||Object(zi["minValue"])(this.min),max:!this.max||Object(zi["maxValue"])(this.max)}}}}),Ws=Gs,Js=(n("b5d2"),Object(h["a"])(Ws,Vs,Ys,!1,null,null,null)),Xs=Js.exports,Zs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-select-input",attrs:{"data-disabled":t.disabled,"data-empty":""===t.selected}},[n("select",t._g({directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"selected"}],ref:"input",staticClass:"k-select-input-native",attrs:{autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,id:t.id,name:t.name,required:t.required},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.selected=e.target.multiple?n:n[0]}}},t.listeners),[!1!==t.empty?n("option",{attrs:{value:""}},[t._v(t._s(t.empty))]):t._e(),t._l(t.options,function(e){return n("option",{key:e.value,attrs:{disabled:e.disabled},domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])})],2),t._v("\n "+t._s(t.label)+"\n")])},Qs=[],ta={inheritAttrs:!1,props:{autofocus:Boolean,ariaLabel:String,disabled:Boolean,id:[Number,String],name:[Number,String],placeholder:String,empty:{type:[String,Boolean],default:"—"},options:{type:Array,default:function(){return[]}},required:Boolean,value:{type:[String,Number,Boolean],default:""}},data:function(){var t=this;return{selected:this.value,listeners:Object(l["a"])({},this.$listeners,{click:function(e){return t.onClick(e)},input:function(e){return t.onInput(e.target.value)}})}},computed:{label:function(){var t=this.text(this.selected);return""===this.selected||null===this.selected||null===t?this.placeholder||"—":t}},watch:{value:function(t){this.selected=t,this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onClick:function(t){t.stopPropagation(),this.$emit("click",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){this.selected=t,this.$emit("input",this.selected)},select:function(){this.focus()},text:function(t){var e=null;return this.options.forEach(function(n){n.value==t&&(e=n.text)}),e}},validations:function(){return{selected:{required:!this.required||zi["required"]}}}},ea=ta,na=(n("6a18"),Object(h["a"])(ea,Zs,Qs,!1,null,null,null)),ia=na.exports,sa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{ref:"box",staticClass:"k-tags-input",attrs:{list:t.tags,"data-layout":t.layout,options:t.dragOptions},on:{end:t.onInput}},[t._l(t.tags,function(e,i){return n("k-tag",{key:i,ref:e.value,refInFor:!0,attrs:{removable:!0,name:"tag"},on:{remove:function(n){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},blur:function(e){return t.selectTag(null)},focus:function(n){return t.selectTag(e)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:t.navigate("prev")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:"button"in e&&2!==e.button?null:t.navigate("next")}],dblclick:function(n){return t.edit(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])}),n("span",{staticClass:"k-tags-input-element",attrs:{slot:"footer"},slot:"footer"},[n("k-autocomplete",{ref:"autocomplete",attrs:{options:t.options,skip:t.skip},on:{select:t.addTag,leave:function(e){return t.$refs.input.focus()}}},[n("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.newTag,expression:"newTag",modifiers:{trim:!0}}],ref:"input",attrs:{autofocus:t.autofocus,disabled:t.disabled||t.max&&t.tags.length>=t.max,id:t.id,name:t.name,autocomplete:"off",type:"text"},domProps:{value:t.newTag},on:{input:[function(e){e.target.composing||(t.newTag=e.target.value.trim())},function(e){return t.type(e.target.value)}],blur:[t.blurInput,function(e){return t.$forceUpdate()}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.blurInput(e):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.enter(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.tab(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)}]}})])],1)],2)},aa=[],oa={inheritAttrs:!1,props:{autofocus:Boolean,accept:{type:String,default:"all"},disabled:Boolean,icon:{type:[String,Boolean],default:"tag"},id:[Number,String],layout:String,max:Number,min:Number,name:[Number,String],options:{type:Array,default:function(){return[]}},required:Boolean,separator:{type:String,default:","},value:{type:Array,default:function(){return[]}}},data:function(){return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map(function(t){return t.icon="tag",t})}},computed:{dragOptions:function(){return{delay:1,disabled:!this.draggable,draggable:".k-tag"}},draggable:function(){return this.tags.length>1},skip:function(){return this.tags.map(function(t){return t.value})}},watch:{value:function(t){this.tags=this.prepareTags(t),this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{addString:function(t){var e=this;if(t)if(t=t.trim(),t.includes(this.separator))t.split(this.separator).forEach(function(t){e.addString(t)});else if(0!==t.length)if("options"===this.accept){var n=this.options.filter(function(e){return e.text===t})[0];if(!n)return;this.addTag(n)}else this.addTag({text:t,value:t})},addTag:function(t){this.addTagToIndex(t),this.$refs.autocomplete.close(),this.$refs.input.focus()},addTagToIndex:function(t){if("options"===this.accept){var e=this.options.filter(function(e){return e.value===t.value})[0];if(!e)return}-1===this.index(t)&&(!this.max||this.tags.length0&&(t.preventDefault(),this.addString(this.newTag))},type:function(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations:function(){return{tags:{required:!this.required||zi["required"],minLength:!this.min||Object(zi["minLength"])(this.min),maxLength:!this.max||Object(zi["maxLength"])(this.max)}}}},ra=oa,la=(n("27c1"),Object(h["a"])(ra,sa,aa,!1,null,null,null)),ua=la.exports,ca={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}})},da=ca,pa=Object(h["a"])(da,jn,In,!1,null,null,null),fa=pa.exports,ha=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-textarea-input",attrs:{"data-theme":t.theme,"data-over":t.over}},[n("div",{staticClass:"k-textarea-input-wrapper"},[t.buttons?n("k-toolbar",{ref:"toolbar",attrs:{buttons:t.buttons,uploads:t.uploads},on:{command:t.onCommand},nativeOn:{mousedown:function(t){t.preventDefault()}}}):t._e(),n("textarea",t._b({ref:"input",staticClass:"k-textarea-input-native",attrs:{"data-size":t.size},on:{click:t.onClick,focus:t.onFocus,input:t.onInput,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.metaKey?t.onSubmit(e):null},function(e){return e.metaKey?t.onShortcut(e):null}],dragover:t.onOver,dragleave:t.onOut,drop:t.onDrop}},"textarea",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,value:t.value},!1))],1),n("k-email-dialog",{ref:"emailDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),n("k-link-dialog",{ref:"linkDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),n("k-files-dialog",{ref:"fileDialog",on:{cancel:t.cancel,submit:function(e){return t.insertFile(e)}}}),t.uploads?n("k-upload",{ref:"fileUpload",on:{success:t.insertUpload}}):t._e()],1)},ma=[],ga=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-toolbar"},[n("div",{staticClass:"k-toolbar-buttons"},[t._l(t.layout,function(e,i){return[e.divider?[n("span",{key:i,staticClass:"k-toolbar-divider"})]:e.dropdown?[n("k-dropdown",{key:i},[n("k-button",{key:i,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(e){t.$refs[i+"-dropdown"][0].toggle()}}}),n("k-dropdown-content",{ref:i+"-dropdown",refInFor:!0},t._l(e.dropdown,function(e,i){return n("k-dropdown-item",{key:i,attrs:{icon:e.icon},on:{click:function(n){return t.command(e.command,e.args)}}},[t._v("\n "+t._s(e.label)+"\n ")])}),1)],1)]:[n("k-button",{key:i,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(n){return t.command(e.command,e.args)}}})]]})],2)])},va=[],ba=function(t){this.command("insert",function(e,n){var i=[];return n.split("\n").forEach(function(e,n){var s="ol"===t?n+1+".":"-";i.push(s+" "+e)}),i.join("\n")})},ka={layout:["headlines","bold","italic","|","link","email","file","|","code","ul","ol"],props:{buttons:{type:[Boolean,Array],default:!0},uploads:[Boolean,Object,Array]},data:function(){var t={},e={},n=[],i=this.commands();return!1===this.buttons?t:(Wi()(this.buttons)&&(n=this.buttons),!0!==Wi()(this.buttons)&&(n=this.$options.layout),n.forEach(function(n,s){if("|"===n)t["divider-"+s]={divider:!0};else if(i[n]){var a=i[n];t[n]=a,a.shortcut&&(e[a.shortcut]=n)}}),{layout:t,shortcuts:e})},methods:{command:function(t,e){"function"===typeof t?t.apply(this):this.$emit("command",t,e)},close:function(){var t=this;ne()(this.$refs).forEach(function(e){var n=t.$refs[e][0];n.close&&"function"===typeof n.close&&n.close()})},fileCommandSetup:function(){var t={label:this.$t("toolbar.button.file"),icon:"attachment"};return!1===this.uploads?t.command="selectFile":t.dropdown={select:{label:this.$t("toolbar.button.file.select"),icon:"check",command:"selectFile"},upload:{label:this.$t("toolbar.button.file.upload"),icon:"upload",command:"uploadFile"}},t},commands:function(){return{headlines:{label:this.$t("toolbar.button.headings"),icon:"title",dropdown:{h1:{label:this.$t("toolbar.button.heading.1"),icon:"title",command:"prepend",args:"#"},h2:{label:this.$t("toolbar.button.heading.2"),icon:"title",command:"prepend",args:"##"},h3:{label:this.$t("toolbar.button.heading.3"),icon:"title",command:"prepend",args:"###"}}},bold:{label:this.$t("toolbar.button.bold"),icon:"bold",command:"wrap",args:"**",shortcut:"b"},italic:{label:this.$t("toolbar.button.italic"),icon:"italic",command:"wrap",args:"*",shortcut:"i"},link:{label:this.$t("toolbar.button.link"),icon:"url",shortcut:"l",command:"dialog",args:"link"},email:{label:this.$t("toolbar.button.email"),icon:"email",shortcut:"e",command:"dialog",args:"email"},file:this.fileCommandSetup(),code:{label:this.$t("toolbar.button.code"),icon:"code",command:"wrap",args:"`"},ul:{label:this.$t("toolbar.button.ul"),icon:"list-bullet",command:function(){return ba.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command:function(){return ba.apply(this,["ol"])}}}},shortcut:function(t,e){if(this.shortcuts[t]){var n=this.layout[this.shortcuts[t]];if(!n)return!1;e.preventDefault(),this.command(n.command,n.args)}}}},$a=ka,_a=(n("df0d"),Object(h["a"])($a,ga,va,!1,null,null,null)),ya=_a.exports,xa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},wa=[],Oa={data:function(){return{value:{email:null,text:null},fields:{email:{label:this.$t("email"),type:"email"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext:function(){return this.$store.state.system.info.kirbytext}},methods:{open:function(t,e){this.value.text=e,this.$refs.dialog.open()},cancel:function(){this.$emit("cancel")},createKirbytext:function(){var t=this.value.email||"";return this.value.text&&this.value.text.length>0?"(email: ".concat(t," text: ").concat(this.value.text,")"):"(email: ".concat(t,")")},createMarkdown:function(){var t=this.value.email||"";return this.value.text&&this.value.text.length>0?"[".concat(this.value.text,"](mailto:").concat(t,")"):"<".concat(t,">")},submit:function(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={email:null,text:null},this.$refs.dialog.close()}}},Sa=Oa,Ca=Object(h["a"])(Sa,xa,wa,!1,null,null,null),Ea=Ca.exports,Ta=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},ja=[],Ia={data:function(){return{value:{url:null,text:null},fields:{url:{label:this.$t("link"),type:"text",placeholder:this.$t("url.placeholder"),icon:"url"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext:function(){return this.$store.state.system.info.kirbytext}},methods:{open:function(t,e){this.value.text=e,this.$refs.dialog.open()},cancel:function(){this.$emit("cancel")},createKirbytext:function(){return this.value.text.length>0?"(link: ".concat(this.value.url," text: ").concat(this.value.text,")"):"(link: ".concat(this.value.url,")")},createMarkdown:function(){return this.value.text.length>0?"[".concat(this.value.text,"](").concat(this.value.url,")"):"<".concat(this.value.url,">")},submit:function(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={url:null,text:null},this.$refs.dialog.close()}}},La=Ia,qa=Object(h["a"])(La,Ta,ja,!1,null,null,null),Na=qa.exports,Aa=n("19e9"),Ba=n.n(Aa),Pa={components:{"k-toolbar":ya,"k-email-dialog":Ea,"k-link-dialog":Na},inheritAttrs:!1,props:{autofocus:Boolean,buttons:{type:[Boolean,Array],default:!0},disabled:Boolean,endpoints:Object,id:[Number,String],name:[Number,String],maxlength:Number,minlength:Number,placeholder:String,preselect:Boolean,required:Boolean,size:String,spellcheck:{type:[Boolean,String],default:"off"},theme:String,uploads:[Boolean,Object,Array],value:String},data:function(){return{over:!1}},watch:{value:function(){var t=this;this.onInvalid(),this.$nextTick(function(){t.resize()})}},mounted:function(){var t=this;this.$nextTick(function(){Ba()(t.$refs.input)}),this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{cancel:function(){this.$refs.input.focus()},dialog:function(t){if(!this.$refs[t+"Dialog"])throw"Invalid toolbar dialog";this.$refs[t+"Dialog"].open(this.$refs.input,this.selection())},focus:function(){this.$refs.input.focus()},insert:function(t){var e=this,n=this.$refs.input,i=n.value;setTimeout(function(){if(n.focus(),document.execCommand("insertText",!1,t),n.value===i){var s=n.value.slice(0,n.selectionStart)+t+n.value.slice(n.selectionEnd);n.value=s,e.$emit("input",s)}}),this.resize()},insertFile:function(t){t&&t.length>0&&this.insert(t[0].dragText)},insertUpload:function(t,e){this.insert(e[0].dragText),this.$events.$emit("model.update")},onClick:function(){this.$refs.toolbar&&this.$refs.toolbar.close()},onCommand:function(t,e){"function"===typeof this[t]?"function"===typeof e?this[t](e(this.$refs.input,this.selection())):this[t](e):window.console.warn(t+" is not a valid command")},onDrop:function(t){if(t.dataTransfer&&!0===t.dataTransfer.types.includes("Files"))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:d.api+"/"+this.endpoints.field+"/upload",multiple:!1});var e=this.$store.state.drag;e&&"text"===e.type&&(this.focus(),this.insert(e.data))},onFocus:function(t){this.$emit("focus",t)},onInput:function(t){this.$emit("input",t.target.value)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOut:function(){this.$refs.input.blur(),this.over=!1},onOver:function(t){if(this.uploads&&t.dataTransfer&&!0===t.dataTransfer.types.includes("Files"))return t.dataTransfer.dropEffect="copy",this.focus(),void(this.over=!0);var e=this.$store.state.drag;e&&"text"===e.type&&(t.dataTransfer.dropEffect="copy",this.focus(),this.over=!0)},onShortcut:function(t){!1!==this.buttons&&"Meta"!==t.key&&this.$refs.toolbar&&this.$refs.toolbar.shortcut(t.key,t)},onSubmit:function(t){return this.$emit("submit",t)},prepend:function(t){this.insert(t+" "+this.selection())},resize:function(){Ba.a.update(this.$refs.input)},select:function(){this.$refs.select()},selectFile:function(){var t=this;this.$api.get(this.endpoints.field+"/files").then(function(e){t.$refs.fileDialog.open(e,{multiple:!1})}).catch(function(e){t.$store.dispatch("notification/error",e)})},selection:function(){var t=this.$refs.input,e=t.selectionStart,n=t.selectionEnd;return t.value.substring(e,n)},uploadFile:function(){this.$refs.fileUpload.open({url:d.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap:function(t){this.insert(t+this.selection()+t)}},validations:function(){return{value:{required:!this.required||zi["required"],minLength:!this.minlength||Object(zi["minLength"])(this.minlength),maxLength:!this.maxlength||Object(zi["maxLength"])(this.maxlength)}}}},Da=Pa,Ma=(n("cca8"),Object(h["a"])(Da,ha,ma,!1,null,null,null)),Ra=Ma.exports,za=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-time-input"},[n("k-select-input",{ref:"hour",attrs:{id:t.id,"aria-label":t.$t("hour"),autofocus:t.autofocus,options:t.hours,required:t.required,disabled:t.disabled,placeholder:"––",empty:"––"},on:{input:t.setHour,invalid:t.onInvalid},model:{value:t.hour,callback:function(e){t.hour=e},expression:"hour"}}),n("span",{staticClass:"k-time-input-separator"},[t._v(":")]),n("k-select-input",{ref:"minute",attrs:{"aria-label":t.$t("minutes"),options:t.minutes,required:t.required,disabled:t.disabled,placeholder:"––",empty:"––"},on:{input:t.setMinute,invalid:t.onInvalid},model:{value:t.minute,callback:function(e){t.minute=e},expression:"minute"}}),12===t.notation?n("k-select-input",{ref:"meridiem",staticClass:"k-time-input-meridiem",attrs:{"aria-label":t.$t("meridiem"),empty:!1,options:[{value:"AM",text:"AM"},{value:"PM",text:"PM"}],required:t.required,disabled:t.disabled},on:{input:t.onInput},model:{value:t.meridiem,callback:function(e){t.meridiem=e},expression:"meridiem"}}):t._e()],1)},Fa=[],Ua=n("f906"),Ha=n.n(Ua);Mn.a.extend(Ha.a);var Ka,Va,Ya={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],notation:{type:Number,default:24},required:Boolean,step:{type:Number,default:5},value:{type:String}},data:function(){var t=this.toObject(this.value);return{time:this.value,hour:t.hour,minute:t.minute,meridiem:t.meridiem}},computed:{hours:function(){return this.options(24===this.notation?0:1,24===this.notation?23:12)},minutes:function(){return this.options(0,59,this.step)}},watch:{value:function(t){this.time=t},time:function(t){var e=this.toObject(t);this.hour=e.hour,this.minute=e.minute,this.meridiem=e.meridiem}},methods:{focus:function(){this.$refs.hour.focus()},setHour:function(t){t&&!this.minute&&(this.minute=0),t||(this.minute=null),this.onInput()},setMinute:function(t){t&&!this.hour&&(this.hour=0),t||(this.hour=null),this.onInput()},onInput:function(){if(null!==this.hour&&null!==this.minute){var t=Rn(this.hour||0),e=Rn(this.minute||0),n=String(this.meridiem).toUpperCase()||"AM",i=24===this.notation?"".concat(t,":").concat(e,":00"):"".concat(t,":").concat(e,":00 ").concat(n),s=24===this.notation?"HH:mm:ss":"hh:mm:ss A",a=Mn()("2000-01-01 "+i,"YYYY-MM-DD "+s);this.$emit("input",a.format("HH:mm"))}else this.$emit("input","")},onInvalid:function(t,e){this.$emit("invalid",t,e)},options:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=[],s=t;s<=e;s+=n)i.push({value:s,text:Rn(s)});return i},reset:function(){this.hour=null,this.minute=null,this.meridiem=null},round:function(t){return Math.floor(t/this.step)*this.step},toObject:function(t){var e=Mn()("2001-01-01 "+t+":00","YYYY-MM-DD HH:mm:ss");return t&&!1!==e.isValid()?{hour:e.format(24===this.notation?"H":"h"),minute:this.round(e.format("m")),meridiem:e.format("A")}:{hour:null,minute:null,meridiem:null}}}},Ga=Ya,Wa=(n("50da"),Object(h["a"])(Ga,za,Fa,!1,null,null,null)),Ja=Wa.exports,Xa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-toggle-input"},[n("input",{ref:"input",staticClass:"k-toggle-input-native",attrs:{disabled:t.disabled,id:t.id,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onInput(e.target.checked)}}}),n("span",{staticClass:"k-toggle-input-label",domProps:{innerHTML:t._s(t.label)}})])},Za=[],Qa={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],text:{type:[Array,String],default:function(){return["off","on"]}},required:Boolean,value:Boolean},computed:{label:function(){return Wi()(this.text)?this.value?this.text[1]:this.text[0]:this.text}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onEnter:function(t){"Enter"===t.key&&this.$refs.input.click()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.focus()}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},to=Qa,eo=(n("bb41"),Object(h["a"])(to,Xa,Za,!1,null,null,null)),no=eo.exports,io={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}})},so=io,ao=Object(h["a"])(so,Ka,Va,!1,null,null,null),oo=ao.exports,ro=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-checkboxes-field",attrs:{counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},lo=[],uo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Qi.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Wi()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},co=uo,po=Object(h["a"])(co,ro,lo,!1,null,null,null),fo=po.exports,ho=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:t.inputType,value:t.date,theme:"field"}},"k-input",t.$props,!1),t.listeners),[n("template",{slot:"icon"},[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,tooltip:t.$t("date.select"),tabindex:"-1"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),n("k-dropdown-content",{ref:"dropdown",attrs:{align:"right"}},[n("k-calendar",{attrs:{value:t.date},on:{input:function(e){t.onInput(e),t.$refs.dropdown.close()}}})],1)],1)],1)],2)],1)},mo=[],go={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,fs.props,{icon:{type:String,default:"calendar"}}),data:function(){return{date:this.value,listeners:Object(l["a"])({},this.$listeners,{input:this.onInput})}},computed:{inputType:function(){return!1===this.time?"date":"datetime"}},watch:{value:function(t){this.date=t}},methods:{focus:function(){this.$refs.input.focus()},onInput:function(t){this.date=t,this.$emit("input",t)}}},vo=go,bo=Object(h["a"])(vo,ho,mo,!1,null,null,null),ko=bo.exports,$o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-email-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners),[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:"mailto:"+t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},_o=[],yo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,xs.props,{link:{type:Boolean,default:!0},icon:{type:String,default:"email"}}),methods:{focus:function(){this.$refs.input.focus()}}},xo=yo,wo=Object(h["a"])(xo,$o,_o,!1,null,null,null),Oo=wo.exports,So=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-files-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("k-button",{attrs:{slot:"options",icon:"add"},on:{click:t.open},slot:"options"},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,"data-size":t.size,handle:!0},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.filename,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,link:e.link,info:e.info,image:e.image,icon:e.icon}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",{attrs:{layout:t.layout,icon:"image"},on:{click:t.open}},[t._v("\n "+t._s(t.empty||t.$t("field.files.empty"))+"\n ")]),n("k-files-dialog",{ref:"selector",on:{submit:t.select}})],2)},Co=[],Eo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,{empty:String,layout:String,max:Number,multiple:Boolean,parent:String,size:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{selected:this.value}},computed:{elements:function(){var t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},more:function(){return!this.max||this.max>this.selected.length}},watch:{value:function(t){this.selected=t}},methods:{focus:function(){},onInput:function(){this.$emit("input",this.selected)},remove:function(t){this.selected.splice(t,1),this.onInput()},removeById:function(t){this.selected=this.selected.filter(function(e){return e.id!==t}),this.onInput()},select:function(t){var e=this;this.selected.forEach(function(n,i){0===t.filter(function(t){return t.id===n.id}).length&&e.selected.splice(i,1)}),t.forEach(function(t){0===e.selected.filter(function(e){return t.id===e.id}).length&&e.selected.push(t)}),this.onInput()}}},To={mixins:[Eo],created:function(){this.$events.$on("file.delete",this.removeById)},destroyed:function(){this.$events.$off("file.delete",this.removeById)},methods:{open:function(){var t=this;return this.$api.get(this.endpoints.field).then(function(e){var n=t.selected.map(function(t){return t.id});e=e.map(function(e){return e.selected=-1!==n.indexOf(e.id),e.thumb=t.image||{},e.thumb.url=!1,e.thumbs&&e.thumbs.tiny&&(e.thumb.url=e.thumbs.medium),e}),t.$refs.selector.open(e,{max:t.max,multiple:t.multiple})}).catch(function(){t.$store.dispatch("notification/error","The files query does not seem to be correct")})}}},jo=To,Io=(n("4a4b"),Object(h["a"])(jo,So,Co,!1,null,null,null)),Lo=Io.exports,qo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-headline",{staticClass:"k-headline-field",attrs:{"data-numbered":t.numbered,size:"large"}},[t._v("\n "+t._s(t.label)+"\n")])},No=[],Ao={props:{label:String,numbered:Boolean}},Bo=Ao,Po=(n("19d7"),Object(h["a"])(Bo,qo,No,!1,null,null,null)),Do=Po.exports,Mo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-field k-info-field"},[n("k-headline",[t._v(t._s(t.label))]),n("k-box",{attrs:{theme:t.theme}},[n("k-text",{domProps:{innerHTML:t._s(t.text)}})],1)],1)},Ro=[],zo={props:{label:String,text:String,theme:{type:String,default:"info"}}},Fo=zo,Uo=(n("ddfd"),Object(h["a"])(Fo,Mo,Ro,!1,null,null,null)),Ho=Uo.exports,Ko=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("hr",{staticClass:"k-line-field"})},Vo=[],Yo=(n("718c"),{}),Go=Object(h["a"])(Yo,Ko,Vo,!1,null,null,null),Wo=Go.exports,Jo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-multiselect-field",attrs:{input:t._uid,counter:t.counterOptions},on:{blur:t.blur}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},Xo=[],Zo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ts.props,{counter:{type:Boolean,default:!0},icon:{type:String,default:"angle-down"}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Wi()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{blur:function(t){this.$refs.input.blur(t)},focus:function(){this.$refs.input.focus()}}},Qo=Zo,tr=Object(h["a"])(Qo,Jo,Xo,!1,null,null,null),er=tr.exports,nr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-number-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},ir=[],sr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,As.props),methods:{focus:function(){this.$refs.input.focus()}}},ar=sr,or=Object(h["a"])(ar,nr,ir,!1,null,null,null),rr=or.exports,lr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-pages-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("k-button",{attrs:{slot:"options",icon:"add"},on:{click:t.open},slot:"options"},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,handle:!0,list:t.selected,"data-size":t.size},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.id,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,info:e.info,link:e.link,icon:e.icon,image:e.image}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",{attrs:{layout:t.layout,icon:"page"},on:{click:t.open}},[t._v("\n "+t._s(t.empty||t.$t("field.pages.empty"))+"\n ")]),n("k-pages-dialog",{ref:"selector",on:{submit:t.select}})],2)},ur=[],cr=n("f499"),dr=n.n(cr),pr=function(t){if(void 0!==t)return JSON.parse(dr()(t))},fr={mixins:[Eo],methods:{open:function(){this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,selected:pr(this.selected)})}}},hr=fr,mr=(n("7e85"),Object(h["a"])(hr,lr,ur,!1,null,null,null)),gr=mr.exports,vr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-password-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},br=[],kr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ms.props,{counter:{type:Boolean,default:!0},minlength:{type:Number,default:8},icon:{type:String,default:"key"}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},$r=kr,_r=Object(h["a"])($r,vr,br,!1,null,null,null),yr=_r.exports,xr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-radio-field"},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},wr=[],Or={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ks.props),methods:{focus:function(){this.$refs.input.focus()}}},Sr=Or,Cr=Object(h["a"])(Sr,xr,wr,!1,null,null,null),Er=Cr.exports,Tr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-range-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},jr=[],Ir={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Xs.props),methods:{focus:function(){this.$refs.input.focus()}}},Lr=Ir,qr=Object(h["a"])(Lr,Tr,jr,!1,null,null,null),Nr=qr.exports,Ar=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-select-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},Br=[],Pr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,ia.props,{icon:{type:String,default:"angle-down"}}),methods:{focus:function(){this.$refs.input.focus()}}},Dr=Pr,Mr=Object(h["a"])(Dr,Ar,Br,!1,null,null,null),Rr=Mr.exports,zr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-structure-field",nativeOn:{click:function(t){t.stopPropagation()}}},"k-field",t.$props,!1),[n("template",{slot:"options"},[t.more&&null===t.currentIndex?n("k-button",{ref:"add",attrs:{id:t._uid,icon:"add"},on:{click:t.add}},[t._v("\n "+t._s(t.$t("add"))+"\n ")]):t._e()],1),null!==t.currentIndex?[n("div",{staticClass:"k-structure-backdrop",on:{click:t.escape}}),n("section",{staticClass:"k-structure-form"},[n("k-form",{ref:"form",staticClass:"k-structure-form-fields",attrs:{fields:t.formFields},on:{input:t.onInput,submit:t.submit},model:{value:t.currentModel,callback:function(e){t.currentModel=e},expression:"currentModel"}}),n("footer",{staticClass:"k-structure-form-buttons"},[n("k-button",{staticClass:"k-structure-form-cancel-button",attrs:{icon:"cancel"},on:{click:t.close}},[t._v(t._s(t.$t("cancel")))]),"new"!==t.currentIndex?n("k-pagination",{attrs:{dropdown:!1,total:t.items.length,limit:1,page:t.currentIndex+1,details:!0,validate:t.beforePaginate},on:{paginate:t.paginate}}):t._e(),n("k-button",{staticClass:"k-structure-form-submit-button",attrs:{icon:"check"},on:{click:t.submit}},[t._v(t._s(t.$t("new"!==t.currentIndex?"confirm":"add")))])],1)],1)]:0===t.items.length?n("k-empty",{attrs:{icon:"list-bullet"},on:{click:t.add}},[t._v("\n "+t._s(t.empty||t.$t("field.structure.empty"))+"\n ")]):[n("table",{staticClass:"k-structure-table",attrs:{"data-sortable":t.isSortable}},[n("thead",[n("tr",[n("th",{staticClass:"k-structure-table-index"},[t._v("#")]),t._l(t.columns,function(e,i){return n("th",{key:i+"-header",staticClass:"k-structure-table-column",attrs:{"data-width":e.width,"data-align":e.align}},[t._v("\n "+t._s(e.label)+"\n ")])}),n("th")],2)]),n("k-draggable",{attrs:{list:t.items,"data-disabled":t.disabled,options:t.dragOptions,handle:!0,element:"tbody"},on:{end:t.onInput}},t._l(t.paginatedItems,function(e,i){return n("tr",{key:i,on:{click:function(t){t.stopPropagation()}}},[n("td",{staticClass:"k-structure-table-index"},[t.isSortable?n("k-sort-handle"):t._e(),n("span",{staticClass:"k-structure-table-index-number"},[t._v(t._s(t.indexOf(i)))])],1),t._l(t.columns,function(s,a){return n("td",{key:a,staticClass:"k-structure-table-column",attrs:{title:s.label,"data-width":s.width,"data-align":s.align},on:{click:function(e){return t.jump(i,a)}}},[!1===t.columnIsEmpty(e[a])?[t.previewExists(s.type)?n("k-"+s.type+"-field-preview",{tag:"component",attrs:{value:e[a],column:s,field:t.fields[a]}}):[n("p",{staticClass:"k-structure-table-text"},[t._v("\n "+t._s(s.before)+" "+t._s(t.displayText(t.fields[a],e[a])||"–")+" "+t._s(s.after)+"\n ")])]]:t._e()],2)}),n("td",{staticClass:"k-structure-table-option"},[n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}})],1)],2)}),0)],1),t.limit?n("k-pagination",t._b({on:{paginate:t.paginateItems}},"k-pagination",t.pagination,!1)):t._e(),t.disabled?t._e():n("k-dialog",{ref:"remove",attrs:{button:t.$t("delete"),theme:"negative"},on:{submit:t.remove}},[n("k-text",[t._v(t._s(t.$t("field.structure.delete.confirm")))])],1)]],2)},Fr=[],Ur=n("795b"),Hr=n.n(Ur),Kr=n("7618"),Vr=n("59ad"),Yr=n.n(Vr),Gr=function(t){t=t||{};var e=t.desc?-1:1,n=-e,i=/^0/,s=/\s+/g,a=/^\s+|\s+$/g,o=/[^\x00-\x80]/,r=/^0x[0-9a-f]+$/i,l=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=t.insensitive?function(t){return d(""+t).replace(a,"")}:function(t){return(""+t).replace(a,"")};function d(t){return t.toLocaleLowerCase?t.toLocaleLowerCase():t.toLowerCase()}function p(t){return t.replace(l,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function f(t,e){return(!t.match(i)||1===e)&&Yr()(t)||t.replace(s," ").replace(a,"")||0}return function(t,i){var s=c(t),a=c(i);if(!s&&!a)return 0;if(!s&&a)return n;if(s&&!a)return e;var l=p(s),d=p(a),h=is()(s.match(r),16)||1!==l.length&&Date.parse(s),m=is()(a.match(r),16)||h&&a.match(u)&&Date.parse(a)||null;if(m){if(hm)return e}for(var g=l.length,v=d.length,b=0,k=Math.max(g,v);b0)return e;if(y<0)return n;if(b===k-1)return 0}else{if($<_)return n;if($>_)return e}}return 0}};Array.prototype.sortBy=function(t){var e=Gr(),n=t.split(" "),i=n[0],s=n[1]||"asc";return this.sort(function(t,n){var a=String(t[i]).toLowerCase(),o=String(n[i]).toLowerCase();return"desc"===s?e(o,a):e(a,o)})};var Wr,Jr,Xr,Zr,Qr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,{columns:Object,empty:String,fields:Object,limit:Number,max:Number,min:Number,sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{items:this.makeItems(this.value),currentIndex:null,currentModel:null,trash:null,page:1}},computed:{dragOptions:function(){return{disabled:!this.isSortable,fallbackClass:"k-sortable-row-fallback"}},formFields:function(){var t=this,e={};return ne()(this.fields).forEach(function(n){var i=t.fields[n];i.section=t.name,i.endpoints={field:t.endpoints.field+"+"+n,section:t.endpoints.section,model:t.endpoints.model},e[n]=i}),e},more:function(){return!0!==this.disabled&&!(this.max&&this.items.length>=this.max)},isSortable:function(){return!this.sortBy&&(!this.limit&&(!0!==this.disabled&&(!(this.items.length<=1)&&!1!==this.sortable)))},pagination:function(){var t=0;return this.limit&&(t=(this.page-1)*this.limit),{page:this.page,offset:t,limit:this.limit,total:this.items.length,align:"center",details:!0}},paginatedItems:function(){return this.limit?this.items.slice(this.pagination.offset,this.pagination.offset+this.limit):this.items}},watch:{value:function(t){t!=this.items&&(this.items=this.makeItems(t))}},methods:{add:function(){var t=this;if(!0===this.disabled)return!1;if(null!==this.currentIndex)return this.escape(),!1;var e={};ne()(this.fields).forEach(function(n){var i=t.fields[n];i.default?e[n]=pr(i.default):e[n]=null}),this.currentIndex="new",this.currentModel=e,this.createForm()},close:function(){this.currentIndex=null,this.currentModel=null,this.$events.$off("keydown.esc",this.escape),this.$events.$off("keydown.cmd.s",this.submit),this.$store.dispatch("form/unlock")},columnIsEmpty:function(t){return void 0===t||null===t||""===t||("object"===Object(Kr["a"])(t)&&0===ne()(t).length&&t.constructor===Object||void 0!==t.length&&0===t.length)},confirmRemove:function(t){this.close(),this.trash=t,this.$refs.remove.open()},createForm:function(t){var e=this;this.$events.$on("keydown.esc",this.escape),this.$events.$on("keydown.cmd.s",this.submit),this.$store.dispatch("form/lock"),this.$nextTick(function(){e.$refs.form&&e.$refs.form.focus(t)})},displayText:function(t,e){switch(t.type){case"user":return e.email;case"date":var n=Mn()(e),i=!0===t.time?"YYYY-MM-DD HH:mm":"YYYY-MM-DD";return n.isValid()?n.format(i):"";case"tags":return e.map(function(t){return t.text}).join(", ");case"checkboxes":return e.map(function(e){var n=e;return t.options.forEach(function(t){t.value===e&&(n=t.text)}),n}).join(", ");case"radio":case"select":var s=t.options.filter(function(t){return t.value===e})[0];return s?s.text:null}return"object"===Object(Kr["a"])(e)&&null!==e?"…":e},escape:function(){var t=this;if("new"===this.currentIndex){var e=ji()(this.currentModel),n=!0;if(e.forEach(function(e){!1===t.columnIsEmpty(e)&&(n=!1)}),!0===n)return void this.close()}this.submit()},focus:function(){this.$refs.add.focus()},indexOf:function(t){return this.limit?(this.page-1)*this.limit+t+1:t+1},isActive:function(t){return this.currentIndex===t},jump:function(t,e){this.open(t+this.pagination.offset,e)},makeItems:function(t){return!1===Wi()(t)?[]:this.sort(t)},onInput:function(){this.$emit("input",this.items)},open:function(t,e){this.currentIndex=t,this.currentModel=pr(this.items[t]),this.createForm(e)},beforePaginate:function(){return this.save(this.currentModel)},paginate:function(t){this.open(t.offset)},paginateItems:function(t){this.page=t.page},previewExists:function(t){return void 0!==A["a"].options.components["k-"+t+"-field-preview"]||void 0!==this.$options.components["k-"+t+"-field-preview"]},remove:function(){if(null===this.trash)return!1;this.items.splice(this.trash,1),this.trash=null,this.$refs.remove.close(),this.onInput(),0===this.paginatedItems.length&&this.page>1&&this.page--,this.items=this.sort(this.items)},sort:function(t){return this.sortBy?t.sortBy(this.sortBy):t},save:function(){var t=this;return null!==this.currentIndex&&void 0!==this.currentIndex?this.validate(this.currentModel).then(function(){return"new"===t.currentIndex?t.items.push(t.currentModel):t.items[t.currentIndex]=t.currentModel,t.items=t.sort(t.items),t.onInput(),!0}).catch(function(e){throw t.$store.dispatch("notification/error",{message:t.$t("error.form.incomplete"),details:e}),e}):Hr.a.resolve()},submit:function(){this.save().then(this.close).catch(function(){})},validate:function(t){return this.$api.post(this.endpoints.field+"/validate",t).then(function(t){if(t.length>0)throw t;return!0})}}},tl=Qr,el=(n("088c"),Object(h["a"])(tl,zr,Fr,!1,null,null,null)),nl=el.exports,il=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tags-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},sl=[],al={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,ua.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Wi()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},ol=al,rl=Object(h["a"])(ol,il,sl,!1,null,null,null),ll=rl.exports,ul=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tel-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},cl=[],dl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,fa.props,{icon:{type:String,default:"phone"}}),methods:{focus:function(){this.$refs.input.focus()}}},pl=dl,fl=Object(h["a"])(pl,ul,cl,!1,null,null,null),hl=fl.exports,ml=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-text-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[t._t("options",null,{slot:"options"}),n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],2)},gl=[],vl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,ks.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},bl=vl,kl=(n("b746"),Object(h["a"])(bl,ml,gl,!1,null,null,null)),$l=kl.exports,_l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-textarea-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:"textarea",theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},yl=[],xl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ra.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?this.value.length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},wl=xl,Ol=Object(h["a"])(wl,_l,yl,!1,null,null,null),Sl=Ol.exports,Cl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-time-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},El=[],Tl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ja.props,{icon:{type:String,default:"clock"}}),methods:{focus:function(){this.$refs.input.focus()}}},jl=Tl,Il=Object(h["a"])(jl,Cl,El,!1,null,null,null),Ll=Il.exports,ql=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-toggle-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},Nl=[],Al={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,no.props),methods:{focus:function(){this.$refs.input.focus()}}},Bl=Al,Pl=Object(h["a"])(Bl,ql,Nl,!1,null,null,null),Dl=Pl.exports,Ml=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-url-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners),[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},Rl=[],zl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,oo.props,{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}}),methods:{focus:function(){this.$refs.input.focus()}}},Fl=zl,Ul=Object(h["a"])(Fl,Ml,Rl,!1,null,null,null),Hl=Ul.exports,Kl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-users-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("k-button",{attrs:{slot:"options",icon:"add"},on:{click:t.open},slot:"options"},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,handle:!0},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.email,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.username,link:t.$api.users.link(e.id),image:e.avatar?{url:e.avatar.url,back:"pattern",cover:!0}:null,icon:{type:"user",back:"black"}}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",{attrs:{icon:"users"},on:{click:t.open}},[t._v("\n "+t._s(t.empty||t.$t("field.users.empty"))+"\n ")]),n("k-users-dialog",{ref:"selector",on:{submit:t.select}})],2)},Vl=[],Yl={mixins:[Eo],methods:{open:function(){this.$refs.selector.open({max:this.max,multiple:this.multiple,selected:this.selected.map(function(t){return t.email})})}}},Gl=Yl,Wl=(n("7f6e"),Object(h["a"])(Gl,Kl,Vl,!1,null,null,null)),Jl=Wl.exports,Xl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.value?n("ul",{staticClass:"k-files-field-preview"},t._l(t.value,function(e){return n("li",{key:e.url},[n("k-link",{attrs:{title:e.filename,to:e.link},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-image",t._b({attrs:{src:e.url}},"k-image",t.image,!1))],1)],1)}),0):t._e()},Zl=[],Ql={props:{value:Array,field:Object},computed:{image:function(){var t=this.field.image||{};return Object(l["a"])({back:"pattern",cover:!1},t)}}},tu=Ql,eu=(n("21dc"),Object(h["a"])(tu,Xl,Zl,!1,null,null,null)),nu=eu.exports,iu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"k-url-field-preview"},[t._v("\n "+t._s(t.column.before)+"\n "),n("k-link",{attrs:{to:t.link,target:"_blank"},nativeOn:{click:function(t){t.stopPropagation()}}},[t._v(t._s(t.value))]),t._v("\n "+t._s(t.column.after)+"\n")],1)},su=[],au={props:{column:{type:Object,default:function(){return{}}},value:String},computed:{link:function(){return this.value}}},ou=au,ru=(n("977f"),Object(h["a"])(ou,iu,su,!1,null,null,null)),lu=ru.exports,uu={extends:lu,computed:{link:function(){return"mailto:"+this.value}}},cu=uu,du=Object(h["a"])(cu,Wr,Jr,!1,null,null,null),pu=du.exports,fu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.value?n("ul",{staticClass:"k-pages-field-preview"},t._l(t.value,function(e){return n("li",{key:e.id},[n("figure",[n("k-link",{attrs:{title:e.id,to:t.$api.pages.link(e.id)},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-icon",{staticClass:"k-pages-field-preview-image",attrs:{type:"page",back:"pattern"}}),n("figcaption",[t._v("\n "+t._s(e.text)+"\n ")])],1)],1)])}),0):t._e()},hu=[],mu={props:{value:Array}},gu=mu,vu=(n("d0c1"),Object(h["a"])(gu,fu,hu,!1,null,null,null)),bu=vu.exports,ku=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.value?n("ul",{staticClass:"k-users-field-preview"},t._l(t.value,function(e){return n("li",{key:e.email},[n("figure",[n("k-link",{attrs:{title:e.email,to:t.$api.users.link(e.id)},nativeOn:{click:function(t){t.stopPropagation()}}},[e.avatar?n("k-image",{staticClass:"k-users-field-preview-avatar",attrs:{src:e.avatar.url,back:"pattern"}}):n("k-icon",{staticClass:"k-users-field-preview-avatar",attrs:{type:"user",back:"pattern"}}),n("figcaption",[t._v("\n "+t._s(e.username)+"\n ")])],1)],1)])}),0):t._e()},$u=[],_u={props:{value:Array}},yu=_u,xu=(n("3a85"),Object(h["a"])(yu,ku,$u,!1,null,null,null)),wu=xu.exports,Ou=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-bar"},[t.$slots.left?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"left"}},[t._t("left")],2):t._e(),t.$slots.center?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"center"}},[t._t("center")],2):t._e(),t.$slots.right?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"right"}},[t._t("right")],2):t._e()])},Su=[],Cu=(n("6f7b"),{}),Eu=Object(h["a"])(Cu,Ou,Su,!1,null,null,null),Tu=Eu.exports,ju=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-box",attrs:{"data-theme":t.theme}},t.$listeners),[t._t("default",[n("k-text",{domProps:{innerHTML:t._s(t.text)}})])],2)},Iu=[],Lu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-text",attrs:{"data-align":t.align,"data-size":t.size,"data-theme":t.theme}},[t._t("default")],2)},qu=[],Nu={props:{align:String,size:String,theme:String}},Au=Nu,Bu=(n("b0d6"),Object(h["a"])(Au,Lu,qu,!1,null,null,null)),Pu=Bu.exports,Du={components:{"k-text":Pu},props:{theme:String,text:String}},Mu=Du,Ru=(n("7dc7"),Object(h["a"])(Mu,ju,Iu,!1,null,null,null)),zu=Ru.exports,Fu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("figure",t._g({staticClass:"k-card"},t.$listeners),[t.sortable?n("k-sort-handle"):t._e(),n(t.wrapper,{tag:"component",attrs:{to:t.link,target:t.target}},[t.image&&t.image.url?n("k-image",{staticClass:"k-card-image",attrs:{src:t.image.url,ratio:t.image.ratio||"3/2",back:t.image.back||"black",cover:t.image.cover}}):n("span",{staticClass:"k-card-icon",style:"padding-bottom:"+t.ratioPadding},[n("k-icon",t._b({},"k-icon",t.icon,!1))],1),n("figcaption",{staticClass:"k-card-content"},[n("span",{staticClass:"k-card-text",attrs:{"data-noinfo":!t.info}},[t._v(t._s(t.text))]),t.info?n("span",{staticClass:"k-card-info",domProps:{innerHTML:t._s(t.info)}}):t._e()])],1),n("nav",{staticClass:"k-card-options"},[t.flag?n("k-button",t._b({staticClass:"k-card-options-button",on:{click:t.flag.click}},"k-button",t.flag,!1)):t._e(),t._t("options",[t.options?n("k-button",{staticClass:"k-card-options-button",attrs:{tooltip:t.$t("options"),icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.dropdown.toggle()}}}):t._e(),n("k-dropdown-content",{ref:"dropdown",staticClass:"k-card-options-dropdown",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},Uu=[],Hu=function(t){t=t||"3/2";var e=t.split("/");if(2!==e.length)return"100%";var n=Number(e[0]),i=Number(e[1]),s=100/n*i;return s+"%"},Ku={inheritAttrs:!1,props:{flag:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},image:Object,info:String,link:String,options:[Array,Function],sortable:Boolean,target:String,text:String},computed:{wrapper:function(){return this.link?"k-link":"div"},ratioPadding:function(){return this.icon&&this.icon.ratio?Hu(this.icon.ratio):Hu("3/2")}}},Vu=Ku,Yu=(n("c119"),Object(h["a"])(Vu,Fu,Uu,!1,null,null,null)),Gu=Yu.exports,Wu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-cards"},[t._t("default",t._l(t.cards,function(e,i){return n("k-card",t._g(t._b({key:i},"k-card",e,!1),t.$listeners))}))],2)},Ju=[],Xu={props:{cards:Array}},Zu=Xu,Qu=(n("f56d"),Object(h["a"])(Zu,Wu,Ju,!1,null,null,null)),tc=Qu.exports,ec=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-collection",attrs:{"data-layout":t.layout}},[n("k-draggable",{attrs:{list:t.items,options:t.dragOptions,element:t.elements.list,"data-size":t.size,handle:!0},on:{change:function(e){return t.$emit("change",e)},end:t.onEnd}},t._l(t.items,function(e,i){return n(t.elements.item,t._b({key:i,tag:"component",class:{"k-draggable-item":e.sortable},on:{action:function(n){return t.$emit("action",e,n)},dragstart:function(n){return t.onDragStart(n,e.dragText)}}},"component",e,!1))}),1),t.hasFooter?n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e(),n("div",{staticClass:"k-collection-pagination"},[t.hasPagination?n("k-pagination",t._b({on:{paginate:function(e){return t.$emit("paginate",e)}}},"k-pagination",t.paginationOptions,!1)):t._e()],1)],1):t._e()],1)},nc=[],ic={props:{help:String,items:{type:[Array,Object],default:function(){return[]}},layout:{type:String,default:"list"},size:String,sortable:Boolean,pagination:{type:[Boolean,Object],default:function(){return!1}}},computed:{hasPagination:function(){return!1!==this.pagination&&(!0!==this.paginationOptions.hide&&!(this.pagination.total<=this.pagination.limit))},hasFooter:function(){return!(!this.hasPagination&&!this.help)},dragOptions:function(){return{sort:this.sortable,disabled:!1===this.sortable,draggable:".k-draggable-item"}},elements:function(){var t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},paginationOptions:function(){var t="object"!==Object(Kr["a"])(this.pagination)?{}:this.pagination;return Object(l["a"])({limit:10,details:!0,keys:!1,total:0,hide:!1},t)}},watch:{$props:function(){this.$forceUpdate()}},over:null,methods:{onEnd:function(){this.over&&this.over.removeAttribute("data-over"),this.$emit("sort",this.items)},onDragStart:function(t,e){this.$store.dispatch("drag",{type:"text",data:e})}}},sc=ic,ac=(n("8c28"),Object(h["a"])(sc,ec,nc,!1,null,null,null)),oc=ac.exports,rc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column",attrs:{"data-width":t.width}},[t._t("default")],2)},lc=[],uc={name:"KirbyColumn",props:{width:String}},cc=uc,dc=(n("c9cb"),Object(h["a"])(cc,rc,lc,!1,null,null,null)),pc=dc.exports,fc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-dropzone",attrs:{"data-dragging":t.dragging,"data-over":t.over},on:{dragenter:t.onEnter,dragleave:t.onLeave,dragover:t.onOver,drop:t.onDrop}},[t._t("default")],2)},hc=[],mc={props:{label:{type:String,default:"Drop to upload"},disabled:{type:Boolean,default:!1}},data:function(){return{files:[],dragging:!1,over:!1}},methods:{cancel:function(){this.reset()},reset:function(){this.dragging=!1,this.over=!1},onDrop:function(t){return!0===this.disabled?this.reset():t.dataTransfer.types?!1===t.dataTransfer.types.includes("Files")?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset()):this.reset()},onEnter:function(t){!1===this.disabled&&t.dataTransfer.types&&t.dataTransfer.types.includes("Files")&&(this.dragging=!0)},onLeave:function(){this.reset()},onOver:function(t){!1===this.disabled&&t.dataTransfer.types&&t.dataTransfer.types.includes("Files")&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},gc=mc,vc=(n("414d"),Object(h["a"])(gc,fc,hc,!1,null,null,null)),bc=vc.exports,kc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-empty",attrs:{"data-layout":t.layout}},t.$listeners),[n("k-icon",{attrs:{type:t.icon}}),n("p",[t._t("default")],2)],1)},$c=[],_c={props:{text:String,icon:String,layout:{type:String,default:"list"}}},yc=_c,xc=(n("ba8f"),Object(h["a"])(yc,kc,$c,!1,null,null,null)),wc=xc.exports,Oc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-file-preview"},[n("k-view",{staticClass:"k-file-preview-layout"},[n("div",{staticClass:"k-file-preview-image"},[n("a",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-file-preview-image-link",attrs:{href:t.file.url,title:t.$t("open"),target:"_blank"}},[t.file.panelImage&&t.file.panelImage.url?n("k-image",{attrs:{src:t.file.panelImage.url,back:"none"}}):t.file.panelIcon?n("k-icon",{staticClass:"k-file-preview-icon",style:{color:t.file.panelIcon.color},attrs:{type:t.file.panelIcon.type}}):n("span",{staticClass:"k-file-preview-placeholder"})],1)]),n("div",{staticClass:"k-file-preview-details"},[n("ul",[n("li",[n("h3",[t._v(t._s(t.$t("template")))]),n("p",[t._v(t._s(t.file.template||"—"))])]),n("li",[n("h3",[t._v(t._s(t.$t("mime")))]),n("p",[t._v(t._s(t.file.mime))])]),n("li",[n("h3",[t._v(t._s(t.$t("url")))]),n("p",[n("k-link",{attrs:{to:t.file.url,tabindex:"-1",target:"_blank"}},[t._v("/"+t._s(t.file.id))])],1)]),n("li",[n("h3",[t._v(t._s(t.$t("size")))]),n("p",[t._v(t._s(t.file.niceSize))])]),n("li",[n("h3",[t._v(t._s(t.$t("dimensions")))]),t.file.dimensions?n("p",[t._v(t._s(t.file.dimensions.width)+"×"+t._s(t.file.dimensions.height)+" "+t._s(t.$t("pixel")))]):n("p",[t._v("—")])]),n("li",[n("h3",[t._v(t._s(t.$t("orientation")))]),t.file.dimensions?n("p",[t._v(t._s(t.$t("orientation."+t.file.dimensions.orientation)))]):n("p",[t._v("—")])])])])])],1)},Sc=[],Cc={props:{file:Object}},Ec=Cc,Tc=(n("696b5"),Object(h["a"])(Ec,Oc,Sc,!1,null,null,null)),jc=Tc.exports,Ic=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-grid",attrs:{"data-gutter":t.gutter}},[t._t("default")],2)},Lc=[],qc={props:{gutter:String}},Nc=qc,Ac=(n("5b23"),Object(h["a"])(Nc,Ic,Lc,!1,null,null,null)),Bc=Ac.exports,Pc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("header",{staticClass:"k-header",attrs:{"data-editable":t.editable}},[n("k-headline",{attrs:{tag:"h1",size:"huge"}},[t.editable&&t.$listeners.edit?n("span",{staticClass:"k-headline-editable",on:{click:function(e){return t.$emit("edit")}}},[t._t("default"),n("k-icon",{attrs:{type:"edit"}})],2):t._t("default")],2),t.$slots.left||t.$slots.right?n("k-bar",{staticClass:"k-header-buttons"},[t._t("left",null,{slot:"left"}),t._t("right",null,{slot:"right"})],2):t._e(),t.tabs&&t.tabs.length>1?n("div",{staticClass:"k-header-tabs"},[n("nav",[t._l(t.visibleTabs,function(e,i){return n("k-button",{key:t.$route.fullPath+"-tab-"+i,staticClass:"k-tab-button",attrs:{link:"#"+e.name,current:t.currentTab&&t.currentTab.name===e.name,icon:e.icon,tooltip:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])}),t.invisibleTabs.length?n("k-button",{staticClass:"k-tab-button k-tabs-dropdown-button",attrs:{icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.more.toggle()}}},[t._v("\n "+t._s(t.$t("more"))+"\n ")]):t._e()],2),t.invisibleTabs.length?n("k-dropdown-content",{ref:"more",staticClass:"k-tabs-dropdown",attrs:{align:"right"}},t._l(t.invisibleTabs,function(e,i){return n("k-dropdown-item",{key:"more-"+i,attrs:{link:"#"+e.name,current:t.currentTab&&t.currentTab.name===e.name,icon:e.icon,tooltip:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])}),1):t._e()],1):t._e()],1)},Dc=[],Mc={props:{editable:Boolean,tabs:Array,tab:Object},data:function(){return{size:null,currentTab:this.tab,visibleTabs:this.tabs,invisibleTabs:[]}},watch:{tab:function(){this.currentTab=this.tab},tabs:function(t){this.visibleTabs=t,this.invisibleTabs=[],this.resize(!0)}},created:function(){window.addEventListener("resize",this.resize)},destroyed:function(){window.removeEventListener("resize",this.resize)},methods:{resize:function(t){if(this.tabs&&!(this.tabs.length<=1)){if(this.tabs.length<=3)return this.visibleTabs=this.tabs,void(this.invisibleTabs=[]);if(window.innerWidth>=700){if("large"===this.size&&!t)return;this.visibleTabs=this.tabs,this.invisibleTabs=[],this.size="large"}else{if("small"===this.size&&!t)return;this.visibleTabs=this.tabs.slice(0,2),this.invisibleTabs=this.tabs.slice(2),this.size="small"}}}}},Rc=Mc,zc=(n("53c5"),Object(h["a"])(Rc,Pc,Dc,!1,null,null,null)),Fc=zc.exports,Uc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-list"},[t._t("default",t._l(t.items,function(e,i){return n("k-list-item",t._g(t._b({key:i},"k-list-item",e,!1),t.$listeners))}))],2)},Hc=[],Kc={props:{items:Array}},Vc=Kc,Yc=(n("c857"),Object(h["a"])(Vc,Uc,Hc,!1,null,null,null)),Gc=Yc.exports,Wc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.element,t._g({tag:"component",staticClass:"k-list-item"},t.$listeners),[t.sortable?n("k-sort-handle"):t._e(),n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-list-item-content",attrs:{to:t.link,target:t.target}},[n("span",{staticClass:"k-list-item-image"},[t.image&&t.image.url?n("k-image",{attrs:{src:t.image.url,back:t.image.back||"pattern",cover:t.image.cover}}):n("k-icon",t._b({},"k-icon",t.icon,!1))],1),n("span",{staticClass:"k-list-item-text"},[n("em",[t._v(t._s(t.text))]),t.info?n("small",{domProps:{innerHTML:t._s(t.info)}}):t._e()])]),n("nav",{staticClass:"k-list-item-options"},[t._t("options",[t.flag?n("k-button",t._b({on:{click:t.flag.click}},"k-button",t.flag,!1)):t._e(),t.options?n("k-button",{staticClass:"k-list-item-toggle",attrs:{tooltip:t.$t("options"),icon:"dots",alt:"Options"},on:{click:function(e){return e.stopPropagation(),t.$refs.options.toggle()}}}):t._e(),n("k-dropdown-content",{ref:"options",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},Jc=[],Xc={inheritAttrs:!1,props:{element:{type:String,default:"li"},image:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},sortable:Boolean,text:String,target:String,info:String,link:String,flag:Object,options:[Array,Function]}},Zc=Xc,Qc=(n("fa6a"),Object(h["a"])(Zc,Wc,Jc,!1,null,null,null)),td=Qc.exports,ed=function(){var t=this,e=t.$createElement,n=t._self._c||e;return 0===t.tabs.length?n("k-box",{attrs:{text:"This page has no blueprint setup yet",theme:"info"}}):t.tab?n("k-sections",{attrs:{parent:t.parent,blueprint:t.blueprint,columns:t.tab.columns},on:{submit:function(e){return t.$emit("submit",e)}}}):t._e()},nd=[],id={props:{parent:String,blueprint:String,tabs:Array},data:function(){return{tab:null}},watch:{$route:function(){this.open()},blueprint:function(){this.open()}},mounted:function(){this.open()},methods:{open:function(t){if(0!==this.tabs.length){t||(t=this.$route.hash.replace("#","")),t||(t=this.tabs[0].name);var e=null;this.tabs.forEach(function(n){n.name===t&&(e=n)}),e||(e=this.tabs[0]),this.tab=e,this.$emit("tab",this.tab)}}}},sd=id,ad=Object(h["a"])(sd,ed,nd,!1,null,null,null),od=ad.exports,rd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-view",attrs:{"data-align":t.align}},[t._t("default")],2)},ld=[],ud={props:{align:String}},cd=ud,dd=(n("daa8"),Object(h["a"])(cd,rd,ld,!1,null,null,null)),pd=dd.exports,fd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("draggable",t._g(t._b({staticClass:"k-draggable",attrs:{tag:t.element,list:t.list,move:t.move}},"draggable",t.dragOptions,!1),t.listeners),[t._t("default"),t._t("footer",null,{slot:"footer"})],2)},hd=[],md=n("1980"),gd=n.n(md),vd={components:{draggable:gd.a},props:{element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{start:function(e){t.$store.dispatch("drag",{}),t.$listeners.start&&t.$listeners.start(e)},end:function(e){t.$store.dispatch("drag",null),t.$listeners.end&&t.$listeners.end(e)}})}},computed:{dragOptions:function(){var t=!1;return t=!0===this.handle?".k-sort-handle":this.handle,Object(l["a"])({fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view")},this.options)}}},bd=vd,kd=Object(h["a"])(bd,fd,hd,!1,null,null,null),$d=kd.exports,_d={data:function(){return{error:null}},errorCaptured:function(t){return d.debug&&window.console.error(t),this.error=t,!1},render:function(t){return this.error?this.$slots.error?this.$slots.error[0]:this.$scopedSlots.error?this.$scopedSlots.error({error:this.error}):t("k-box",{attrs:{theme:"negative"}},this.error.message||this.error):this.$slots.default[0]}},yd=_d,xd=Object(h["a"])(yd,Xr,Zr,!1,null,null,null),wd=xd.exports,Od=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,t._g({tag:"component",staticClass:"k-headline",attrs:{"data-theme":t.theme,"data-size":t.size}},t.$listeners),[t.link?n("k-link",{attrs:{to:t.link}},[t._t("default")],2):t._t("default")],2)},Sd=[],Cd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.to&&!t.disabled?n("a",t._g({ref:"link",staticClass:"k-link",attrs:{disabled:t.disabled,href:t.href,rel:t.relAttr,tabindex:t.tabindex,target:t.target,title:t.title}},t.listeners),[t._t("default")],2):n("span",{staticClass:"k-link",attrs:{title:t.title,"data-disabled":""}},[t._t("default")],2)},Ed=[],Td={props:{disabled:Boolean,rel:String,tabindex:String,target:String,title:String,to:String},data:function(){return{relAttr:"_blank"===this.target?"noreferrer noopener":this.rel,listeners:Object(l["a"])({},this.$listeners,{click:this.onClick})}},computed:{href:function(){return void 0===this.$route||"/"!==this.to[0]||this.target?this.to:(this.$router.options.url||"")+this.to}},methods:{isRoutable:function(t){return void 0!==this.$route&&(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&(!t.defaultPrevented&&((void 0===t.button||0===t.button)&&!this.target)))},onClick:function(t){if(!0===this.disabled)return t.preventDefault(),!1;this.isRoutable(t)&&(t.preventDefault(),this.$router.push(this.to)),this.$emit("click",t)},focus:function(){this.$refs.link.focus()}}},jd=Td,Id=Object(h["a"])(jd,Cd,Ed,!1,null,null,null),Ld=Id.exports,qd={components:{"k-link":Ld},props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},Nd=qd,Ad=(n("f8a7"),Object(h["a"])(Nd,Od,Sd,!1,null,null,null)),Bd=Ad.exports,Pd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{class:"k-icon k-icon-"+t.type,attrs:{"aria-label":t.alt,role:t.alt?"img":null,"aria-hidden":!t.alt,"data-back":t.back,"data-size":t.size}},[t.emoji?n("span",{staticClass:"k-icon-emoji"},[t._v(t._s(t.type))]):n("svg",{style:{color:t.color},attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-"+t.type}})])])},Dd=[],Md={props:{alt:String,color:String,back:String,emoji:Boolean,size:String,type:String}},Rd=Md,zd=(n("3342"),Object(h["a"])(Rd,Pd,Dd,!1,null,null,null)),Fd=zd.exports,Ud=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",t._g({staticClass:"k-image",attrs:{"data-ratio":t.ratio,"data-back":t.back,"data-cover":t.cover}},t.$listeners),[n("span",{style:"padding-bottom:"+t.ratioPadding},[t.loaded?n("img",{key:t.src,attrs:{alt:t.alt||"",src:t.src},on:{dragstart:function(t){t.preventDefault()}}}):t._e(),t.loaded||t.error?t._e():n("k-loader",{attrs:{position:"center",theme:"light"}}),!t.loaded&&t.error?n("k-icon",{staticClass:"k-image-error",attrs:{type:"cancel"}}):t._e()],1)])},Hd=[],Kd={props:{src:String,alt:String,ratio:String,back:String,cover:Boolean},data:function(){return{loaded:{type:Boolean,default:!1},error:{type:Boolean,default:!1}}},computed:{ratioPadding:function(){return Hu(this.ratio||"1/1")}},created:function(){var t=this,e=new Image;e.onload=function(){t.loaded=!0,t.$emit("load")},e.onerror=function(){t.error=!0,t.$emit("error")},e.src=this.src}},Vd=Kd,Yd=(n("0d56"),Object(h["a"])(Vd,Ud,Hd,!1,null,null,null)),Gd=Yd.exports,Wd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("progress",{staticClass:"k-progress",attrs:{max:"100"},domProps:{value:t.state}},[t._v("\n "+t._s(t.state)+"%\n")])},Jd=[],Xd={props:{value:{type:Number,default:0}},data:function(){return{state:this.value}},methods:{set:function(t){this.state=t}}},Zd=Xd,Qd=(n("9799"),Object(h["a"])(Zd,Wd,Jd,!1,null,null,null)),tp=Qd.exports,ep=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-sort-handle",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-sort"}})])])},np=[],ip=(n("35cb"),{}),sp=Object(h["a"])(ip,ep,np,!1,null,null,null),ap=sp.exports,op=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.component,t._g({directives:[{name:"tab",rawName:"v-tab"}],ref:"button",tag:"component",staticClass:"k-button",attrs:{"aria-current":t.current,autofocus:t.autofocus,id:t.id,disabled:t.disabled,"data-tabbed":t.tabbed,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link,type:t.link?null:t.type}},t.$listeners),[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)},rp=[],lp={components:{"k-icon":Fd,"k-link":Ld},directives:{tab:E},inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}},data:function(){return{tabbed:!1}},computed:{component:function(){return this.link?"k-link":"button"},imageUrl:function(){return this.image?"object"===Object(Kr["a"])(this.image)?this.image.url:this.image:null}},methods:{focus:function(){this.$refs.button.focus()},tab:function(){this.focus(),this.tabbed=!0},untab:function(){this.tabbed=!1}}},up=lp,cp=(n("3787"),Object(h["a"])(up,op,rp,!1,null,null,null)),dp=cp.exports,pp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-button-group"},[t._t("default")],2)},fp=[],hp=(n("a567"),{}),mp=Object(h["a"])(hp,pp,fp,!1,null,null,null),gp=mp.exports,vp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-dropdown",on:{click:function(t){t.stopPropagation()}}},[t._t("default")],2)},bp=[],kp=(n("f95f"),{}),$p=Object(h["a"])(kp,vp,bp,!1,null,null,null),_p=$p.exports,yp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("div",{staticClass:"k-dropdown-content",attrs:{"data-align":t.align}},[t._t("default",t._l(t.items,function(e,i){return n("k-dropdown-item",t._b({key:t._uid+"-item-"+i,ref:t._uid+"-item-"+i,refInFor:!0,on:{click:function(n){return t.$emit("action",e.click)}}},"k-dropdown-item",e,!1),[t._v("\n "+t._s(e.text)+"\n ")])}))],2):t._e()},xp=[],wp=null,Op={props:{options:[Array,Function],align:String},data:function(){return{items:[],current:-1,isOpen:!1}},methods:{fetchOptions:function(t){if(!this.options)return t(this.items);"string"===typeof this.options?fetch(this.options).then(function(t){return t.json()}).then(function(e){return t(e)}):"function"===typeof this.options?this.options(t):Wi()(this.options)&&t(this.options)},open:function(){var t=this;this.reset(),wp&&wp!==this&&wp.close(),this.fetchOptions(function(e){t.$events.$on("keydown",t.navigate),t.$events.$on("click",t.close),t.items=e,t.isOpen=!0,t.$emit("open"),wp=t})},reset:function(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close:function(){this.reset(),this.isOpen=wp=!1,this.$emit("close")},toggle:function(){this.isOpen?this.close():this.open()},focus:function(t){t=t||0,this.$children[t]&&this.$children[t].focus&&(this.current=t,this.$children[t].focus())},navigate:function(t){switch(t.code){case"Escape":case"ArrowLeft":this.close(),this.$emit("leave",t.code);break;case"ArrowUp":t.preventDefault(),this.current>0?(this.current--,this.focus(this.current)):(this.close(),this.$emit("leave",t.code));break;case"ArrowDown":t.preventDefault(),this.current1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\n ")],2),n("k-dropdown-content",{ref:"dropdown",staticClass:"k-pagination-selector",on:{open:function(e){t.$nextTick(function(){return t.$refs.page.focus()})}}},[n("div",[n("label",{attrs:{for:"k-pagination-input"}},[t._v(t._s(t.pageLabel))]),n("input",{ref:"page",attrs:{id:"k-pagination-input",min:1,max:t.pages,type:"number"},domProps:{value:t.currentPage},on:{keydown:[function(t){t.stopPropagation()},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.goTo(e.target.value)}]}}),n("k-button",{attrs:{icon:"angle-up"},on:{click:function(e){return t.goTo(t.$refs.page.value)}}})],1)])],1)]:[n("span",{staticClass:"k-pagination-details"},[t.total>1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\n ")],2)]]:t._e(),t.show?n("k-button",{attrs:{disabled:!t.hasNext,tooltip:t.nextLabel,icon:"angle-right"},on:{click:t.next}}):t._e()],2):t._e()},Fp=[],Up={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},validate:{type:Function,default:function(){return Hr.a.resolve()}},page:{type:Number,default:1},total:{type:Number,default:0},limit:{type:Number,default:10},keys:{type:Boolean,default:!1},pageLabel:{type:String,default:"Page"},prevLabel:{type:String,default:function(){return this.$t("prev")}},nextLabel:{type:String,default:function(){return this.$t("next")}}},data:function(){return{currentPage:this.page}},computed:{show:function(){return this.pages>1},start:function(){return(this.currentPage-1)*this.limit+1},end:function(){var t=this.start-1+this.limit;return t>this.total?this.total:t},detailsText:function(){return 1===this.limit?this.start+" / ":this.start+"-"+this.end+" / "},pages:function(){return Math.ceil(this.total/this.limit)},hasPrev:function(){return this.start>1},hasNext:function(){return this.endthis.limit},offset:function(){return this.start-1}},watch:{page:function(t){this.currentPage=t}},created:function(){!0===this.keys&&window.addEventListener("keydown",this.navigate,!1)},destroyed:function(){window.removeEventListener("keydown",this.navigate,!1)},methods:{goTo:function(t){var e=this;this.validate(t).then(function(){t<1&&(t=1),t>e.pages&&(t=e.pages),e.currentPage=t,e.$refs.dropdown&&e.$refs.dropdown.close(),e.$emit("paginate",{page:is()(e.currentPage),start:e.start,end:e.end,limit:e.limit,offset:e.offset})}).catch(function(){})},prev:function(){this.goTo(this.currentPage-1)},next:function(){this.goTo(this.currentPage+1)},navigate:function(t){switch(t.code){case"ArrowLeft":this.prev();break;case"ArrowRight":this.next();break}}}},Hp=Up,Kp=(n("a66d"),Object(h["a"])(Hp,zp,Fp,!1,null,null,null)),Vp=Kp.exports,Yp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-button-group",{staticClass:"k-prev-next"},[n("k-button",t._b({attrs:{icon:"angle-left"}},"k-button",t.prev,!1)),n("k-button",t._b({attrs:{icon:"angle-right"}},"k-button",t.next,!1))],1)},Gp=[],Wp={props:{prev:{type:Object,default:function(){return{disabled:!0,link:"#"}}},next:{type:Object,default:function(){return{disabled:!0,link:"#"}}}}},Jp=Wp,Xp=(n("7a7d"),Object(h["a"])(Jp,Yp,Gp,!1,null,null,null)),Zp=Xp.exports,Qp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{ref:"button",staticClass:"k-tag",attrs:{"data-size":t.size,tabindex:"0"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.remove(e))}}},[n("span",{staticClass:"k-tag-text"},[t._t("default")],2),t.removable?n("span",{staticClass:"k-tag-toggle",on:{click:t.remove}},[t._v("×")]):t._e()])},tf=[],ef={props:{removable:Boolean,size:String},methods:{remove:function(){this.removable&&this.$emit("remove")},focus:function(){this.$refs.button.focus()}}},nf=ef,sf=(n("021f"),Object(h["a"])(nf,Qp,tf,!1,null,null,null)),af=sf.exports,of=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.user&&t.view?n("div",{staticClass:"k-topbar"},[n("k-view",[n("div",{staticClass:"k-topbar-wrapper"},[n("k-dropdown",{staticClass:"k-topbar-menu"},[n("k-button",{staticClass:"k-topbar-button k-topbar-menu-button",attrs:{tooltip:t.$t("menu"),icon:"bars"},on:{click:function(e){return t.$refs.menu.toggle()}}},[n("k-icon",{attrs:{type:"angle-down"}})],1),n("k-dropdown-content",{ref:"menu",staticClass:"k-topbar-menu"},[n("ul",[t._l(t.views,function(e,i){return e.menu?n("li",{key:"menu-item-"+i,attrs:{"aria-current":t.$store.state.view===i}},[n("k-dropdown-item",{attrs:{disabled:!1===t.$permissions.access[i],icon:e.icon,link:e.link}},[t._v("\n "+t._s(t.viewTitle(i,e))+"\n ")])],1):t._e()}),n("li",[n("hr")]),n("li",{attrs:{"aria-current":"account"===t.$route.meta.view}},[n("k-dropdown-item",{attrs:{icon:"account",link:"/account"}},[t._v("\n "+t._s(t.$t("view.account"))+"\n ")])],1),n("li",[n("hr")]),n("li",[n("k-dropdown-item",{attrs:{icon:"logout",link:"/logout"}},[t._v("\n "+t._s(t.$t("logout"))+"\n ")])],1)],2)])],1),t.view?n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-topbar-button k-topbar-view-button",attrs:{to:t.view.link}},[n("k-icon",{attrs:{type:t.view.icon}}),t._v(" "+t._s(t.breadcrumbTitle)+"\n ")],1):t._e(),t.$store.state.breadcrumb.length>1?n("k-dropdown",{staticClass:"k-topbar-breadcrumb-menu"},[n("k-button",{staticClass:"k-topbar-button",on:{click:function(e){return t.$refs.crumb.toggle()}}},[t._v("\n …\n "),n("k-icon",{attrs:{type:"angle-down"}})],1),n("k-dropdown-content",{ref:"crumb"},[n("k-dropdown-item",{attrs:{icon:t.view.icon,link:t.view.link}},[t._v("\n "+t._s(t.$t("view."+t.$store.state.view,t.view.label))+"\n ")]),t._l(t.$store.state.breadcrumb,function(e,i){return n("k-dropdown-item",{key:"crumb-"+i+"-dropdown",attrs:{icon:t.view.icon,link:e.link}},[t._v("\n "+t._s(e.label)+"\n ")])})],2)],1):t._e(),n("nav",{staticClass:"k-topbar-crumbs"},t._l(t.$store.state.breadcrumb,function(e,i){return n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],key:"crumb-"+i,attrs:{to:e.link}},[t._v("\n "+t._s(e.label)+"\n ")])}),1),n("div",{staticClass:"k-topbar-signals"},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.$store.state.isLoading,expression:"$store.state.isLoading"}],staticClass:"k-topbar-loader"},[n("svg",{attrs:{viewBox:"0 0 16 18"}},[n("path",{attrs:{fill:"white",d:"M8,0 L16,4.50265232 L16,13.5112142 L8,18.0138665 L0,13.5112142 L0,4.50265232 L8,0 Z M2.10648757,5.69852516 L2.10648757,12.3153414 L8,15.632396 L13.8935124,12.3153414 L13.8935124,5.69852516 L8,2.38147048 L2.10648757,5.69852516 Z"}})])]),t.notification?n("k-button",{staticClass:"k-topbar-notification",attrs:{theme:"positive"},on:{click:function(e){return t.$store.dispatch("notification/close")}}},[t._v("\n "+t._s(t.notification.message)+"\n ")]):[t.unregistered?n("div",{staticClass:"k-registration"},[n("p",[t._v(t._s(t.$t("license.unregistered")))]),n("k-button",{attrs:{responsive:!0,icon:"key"},on:{click:function(e){return t.$emit("register")}}},[t._v(t._s(t.$t("license.register")))]),n("k-button",{attrs:{responsive:!0,link:"https://getkirby.com/buy",target:"_blank",icon:"cart"}},[t._v("\n "+t._s(t.$t("license.buy"))+"\n ")])],1):t._e(),n("k-button",{attrs:{tooltip:t.$t("search"),icon:"search"},on:{click:function(e){return t.$store.dispatch("search",!0)}}})]],2)],1)])],1):t._e()},rf=[],lf=Object(l["a"])({site:{link:"/site",icon:"page",menu:!0},users:{link:"/users",icon:"users",menu:!0},settings:{link:"/settings",icon:"settings",menu:!0},account:{link:"/account",icon:"users",menu:!1}},window.panel.plugins.views),uf={computed:{breadcrumbTitle:function(){var t=this.$t("view.".concat(this.$store.state.view),this.view.label);return"site"===this.$store.state.view&&this.$store.state.system.info.title||t},view:function(){return lf[this.$store.state.view]},views:function(){return lf},user:function(){return this.$store.state.user.current},notification:function(){return this.$store.state.notification.type&&"error"!==this.$store.state.notification.type?this.$store.state.notification:null},unregistered:function(){return!this.$store.state.system.info.license}},methods:{viewTitle:function(t,e){var n=this.$t("view.".concat(t),e.label);return"site"===t&&this.$store.state.system.info.breadcrumbTitle||n}}},cf=uf,df=(n("1e3b"),Object(h["a"])(cf,of,rf,!1,null,null,null)),pf=df.exports,ff=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-grid",{staticClass:"k-sections",attrs:{gutter:"large"}},t._l(t.columns,function(e,i){return n("k-column",{key:t.parent+"-column-"+i,attrs:{width:e.width}},[t._l(e.sections,function(e,s){return[t.exists(e.type)?n("k-"+e.type+"-section",t._b({key:t.parent+"-column-"+i+"-section-"+s+"-"+t.blueprint,tag:"component",class:"k-section k-section-name-"+e.name,attrs:{name:e.name,parent:t.parent,blueprint:t.blueprint},on:{submit:function(e){return t.$emit("submit",e)}}},"component",e,!1)):[n("k-box",{key:t.parent+"-column-"+i+"-section-"+s,attrs:{text:t.$t("error.section.type.invalid",{type:e.type}),theme:"negative"}})]]})],2)}),1)},hf=[],mf={props:{parent:String,blueprint:String,columns:[Array,Object]},methods:{exists:function(t){return A["a"].options.components["k-"+t+"-section"]}}},gf=mf,vf=(n("6bcd"),Object(h["a"])(gf,ff,hf,!1,null,null,null)),bf=vf.exports,kf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"k-info-section"},[n("k-headline",{staticClass:"k-info-section-headline"},[t._v(t._s(t.headline))]),n("k-box",{attrs:{theme:t.theme}},[n("k-text",{domProps:{innerHTML:t._s(t.text)}})],1)],1)},$f=[],_f={props:{blueprint:String,help:String,name:String,parent:String},methods:{load:function(){return this.$api.get(this.parent+"/sections/"+this.name)}}},yf={mixins:[_f],data:function(){return{headline:null,issue:null,text:null,theme:null}},created:function(){var t=this;this.load().then(function(e){t.headline=e.options.headline,t.text=e.options.text,t.theme=e.options.theme||"info"}).catch(function(e){t.issue=e})}},xf=yf,wf=(n("4333"),Object(h["a"])(xf,kf,$f,!1,null,null,null)),Of=wf.exports,Sf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-pages-section"},[n("header",{staticClass:"k-section-header"},[n("k-headline",{attrs:{link:t.options.link}},[t._v("\n "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:"This section is required"}},[t._v("*")]):t._e()]),t.add?n("k-button-group",[n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.action(null,"create")}}},[t._v(t._s(t.$t("add")))])],1):t._e()],1),t.error?[n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[n("strong",[t._v(t._s(t.$t("error.section.notLoaded",{name:t.name}))+":")]),t._v("\n "+t._s(t.error)+"\n ")])],1)]:[t.data.length?n("k-collection",{attrs:{layout:t.options.layout,help:t.help,items:t.data,pagination:t.pagination,sortable:t.options.sortable,size:t.options.size},on:{change:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,icon:"page"},on:{click:function(e){t.add&&t.action(null,"create")}}},[t._v("\n "+t._s(t.options.empty||t.$t("pages.empty"))+"\n ")]),n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)],n("k-page-create-dialog",{ref:"create"}),n("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-page-url-dialog",{ref:"url",on:{success:t.update}}),n("k-page-status-dialog",{ref:"status",on:{success:t.update}}),n("k-page-template-dialog",{ref:"template",on:{success:t.update}}),n("k-page-remove-dialog",{ref:"remove",on:{success:t.update}})]],2):t._e()},Cf=[],Ef={props:{blueprint:String,parent:String,help:String,name:String},data:function(){return{data:[],error:null,isLoading:!1,options:{empty:null,headline:null,layout:"list",link:null,max:null,min:null,size:null,sortable:null},pagination:{page:null}}},computed:{headline:function(){return this.options.headline||" "},language:function(){return this.$store.state.languages.current},paginationId:function(){return"kirby$pagination$"+this.parent+"/"+this.name}},watch:{language:function(){this.reload()}},methods:{items:function(t){return t},load:function(t){var e=this;t||(this.isLoading=!0),null===this.pagination.page&&(this.pagination.page=localStorage.getItem(this.paginationId)||1),this.$api.get(this.parent+"/sections/"+this.name,{page:this.pagination.page}).then(function(t){e.isLoading=!1,e.options=t.options,e.pagination=t.pagination,e.data=e.items(t.data)}).catch(function(t){e.isLoading=!1,e.error=t.message})},paginate:function(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},reload:function(){this.load(!0)}}},Tf={mixins:[Ef],computed:{add:function(){return this.options.add&&this.$permissions.pages.create}},created:function(){this.load(),this.$events.$on("page.changeStatus",this.reload)},destroyed:function(){this.$events.$off("page.changeStatus",this.reload)},methods:{action:function(t,e){var n=this;switch(e){case"create":this.$refs.create.open(this.options.link||this.parent,this.parent+"/children/blueprints",this.name);break;case"preview":var i=window.open("","_blank");i.document.write="...",this.$api.pages.preview(t.id).then(function(t){i.location.href=t}).catch(function(t){n.$store.dispatch("notification/error",t)});break;case"rename":this.$refs.rename.open(t.id);break;case"url":this.$refs.url.open(t.id);break;case"status":this.$refs.status.open(t.id);break;case"template":this.$refs.template.open(t.id);break;case"remove":if(this.data.length<=this.options.min){var s=this.options.min>1?"plural":"singular";this.$store.dispatch("notification/error",{message:this.$t("error.section.pages.min."+s,{section:this.options.headline||this.name,min:this.options.min})});break}this.$refs.remove.open(t.id);break;default:throw new Error("Invalid action")}},items:function(t){var e=this;return t.map(function(t){return t.flag={class:"k-status-flag k-status-flag-"+t.status,tooltip:e.$t("page.status"),icon:!1===t.permissions.changeStatus?"protected":"circle",disabled:!1===t.permissions.changeStatus,click:function(){e.action(t,"status")}},t.options=function(n){e.$api.pages.options(t.id,"list").then(function(t){return n(t)}).catch(function(t){e.$store.dispatch("notification/error",t)})},t.sortable=t.permissions.sort&&e.options.sortable,t})},sort:function(t){var e=this,n=null;if(t.added&&(n="added"),t.moved&&(n="moved"),n){var i=t[n].element,s=t[n].newIndex+1+this.pagination.offset;this.$api.pages.status(i.id,"listed",s).then(function(){e.$store.dispatch("notification/success",":)")}).catch(function(t){e.$store.dispatch("notification/error",{message:t.message,details:t.details}),e.reload()})}},update:function(){this.reload(),this.$events.$emit("model.update")}}},jf=Tf,If=Object(h["a"])(jf,Sf,Cf,!1,null,null,null),Lf=If.exports,qf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-files-section"},[n("header",{staticClass:"k-section-header"},[n("k-headline",[t._v("\n "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:"This section is required"}},[t._v("*")]):t._e()]),t.add?n("k-button-group",[n("k-button",{attrs:{icon:"upload"},on:{click:t.upload}},[t._v(t._s(t.$t("add")))])],1):t._e()],1),t.error?[n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[n("strong",[t._v(t._s(t.$t("error.section.notLoaded",{name:t.name}))+":")]),t._v("\n "+t._s(t.error)+"\n ")])],1)]:[n("k-dropzone",{attrs:{disabled:!1===t.add},on:{drop:t.drop}},[t.data.length?n("k-collection",{attrs:{help:t.help,items:t.data,layout:t.options.layout,pagination:t.pagination,sortable:t.options.sortable,size:t.options.size},on:{sort:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,icon:"image"},on:{click:function(e){t.add&&t.upload()}}},[t._v("\n "+t._s(t.options.empty||t.$t("files.empty"))+"\n ")]),n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)]],2),n("k-file-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-file-remove-dialog",{ref:"remove",on:{success:t.update}}),n("k-upload",{ref:"upload",on:{success:t.uploaded,error:t.reload}})]],2):t._e()},Nf=[],Af={mixins:[Ef],computed:{add:function(){return!(!this.$permissions.files.create||!1===this.options.upload)&&this.options.upload}},created:function(){this.load(),this.$events.$on("model.update",this.reload)},destroyed:function(){this.$events.$off("model.update",this.reload)},methods:{action:function(t,e){switch(e){case"edit":this.$router.push(t.link);break;case"download":window.open(t.url);break;case"rename":this.$refs.rename.open(t.parent,t.filename);break;case"replace":this.replace(t);break;case"remove":if(this.data.length<=this.options.min){var n=this.options.min>1?"plural":"singular";this.$store.dispatch("notification/error",{message:this.$t("error.section.files.min."+n,{section:this.options.headline||this.name,min:this.options.min})});break}this.$refs.remove.open(t.parent,t.filename);break}},drop:function(t){if(!1===this.add)return!1;this.$refs.upload.drop(t,Object(l["a"])({},this.add,{url:d.api+"/"+this.add.api}))},items:function(t){var e=this;return t.map(function(t){return t.options=function(n){e.$api.files.options(t.parent,t.filename,"list").then(function(t){return n(t)}).catch(function(t){e.$store.dispatch("notification/error",t)})},t.sortable=e.options.sortable,t})},replace:function(t){this.$refs.upload.open({url:d.api+"/"+this.$api.files.url(t.parent,t.filename),accept:t.mime,multiple:!1})},sort:function(t){var e=this;if(!1===this.options.sortable)return!1;t=t.map(function(t){return t.id}),this.$api.patch(this.parent+"/files/sort",{files:t,index:this.pagination.offset}).then(function(){e.$store.dispatch("notification/success",":)")}).catch(function(t){e.reload(),e.$store.dispatch("notification/error",t.message)})},update:function(){this.$events.$emit("model.update")},upload:function(){if(!1===this.add)return!1;this.$refs.upload.open(Object(l["a"])({},this.add,{url:d.api+"/"+this.add.api}))},uploaded:function(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}}},Bf=Af,Pf=Object(h["a"])(Bf,qf,Nf,!1,null,null,null),Df=Pf.exports,Mf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isLoading?t._e():n("section",{staticClass:"k-fields-section"},[t.issue?[n("k-headline",{staticClass:"k-fields-issue-headline"},[t._v("Error")]),n("k-box",{attrs:{text:t.issue.message,theme:"negative"}})]:t._e(),n("k-form",{attrs:{fields:t.fields,validate:!0,value:t.values},on:{input:t.input,submit:t.onSubmit}})],2)},Rf=[],zf={mixins:[_f],data:function(){return{fields:{},isLoading:!0,issue:null}},computed:{id:function(){return this.$store.state.form.current},language:function(){return this.$store.state.languages.current},values:function(){return this.$store.getters["form/values"](this.id)}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{input:function(t,e,n){this.$store.dispatch("form/update",[this.id,n,t[n]])},fetch:function(){var t=this;this.$api.get(this.parent+"/sections/"+this.name).then(function(e){t.fields=e.fields,ne()(t.fields).forEach(function(e){t.fields[e].section=t.name,t.fields[e].endpoints={field:t.parent+"/fields/"+e,section:t.parent+"/sections/"+t.name,model:t.parent}}),t.isLoading=!1}).catch(function(e){t.issue=e,t.isLoading=!1})},onSubmit:function(t){this.$events.$emit("keydown.cmd.s",t)}}},Ff=zf,Uf=(n("7d5d"),Object(h["a"])(Ff,Mf,Rf,!1,null,null,null)),Hf=Uf.exports,Kf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-view",{staticClass:"k-error-view"},[n("div",{staticClass:"k-error-view-content"},[n("k-text",[n("p",[n("k-icon",{staticClass:"k-error-view-icon",attrs:{type:"alert"}})],1),n("p",[t._t("default")],2)])],1)])},Vf=[],Yf=(n("d221"),{}),Gf=Object(h["a"])(Yf,Kf,Vf,!1,null,null,null),Wf=Gf.exports;A["a"].component("k-dialog",U),A["a"].component("k-error-dialog",W),A["a"].component("k-file-rename-dialog",ct),A["a"].component("k-file-remove-dialog",et),A["a"].component("k-files-dialog",gt),A["a"].component("k-language-create-dialog",yt),A["a"].component("k-language-remove-dialog",Et),A["a"].component("k-language-update-dialog",Nt),A["a"].component("k-page-create-dialog",Rt),A["a"].component("k-page-rename-dialog",Zt),A["a"].component("k-page-remove-dialog",Vt),A["a"].component("k-page-status-dialog",oe),A["a"].component("k-page-template-dialog",pe),A["a"].component("k-page-url-dialog",be),A["a"].component("k-pages-dialog",we),A["a"].component("k-site-rename-dialog",Ee),A["a"].component("k-user-create-dialog",Ne),A["a"].component("k-user-email-dialog",Re),A["a"].component("k-user-language-dialog",Ve),A["a"].component("k-user-password-dialog",Ze),A["a"].component("k-user-remove-dialog",an),A["a"].component("k-user-rename-dialog",dn),A["a"].component("k-user-role-dialog",vn),A["a"].component("k-users-dialog",xn),A["a"].component("k-calendar",Hn),A["a"].component("k-counter",Jn),A["a"].component("k-autocomplete",An),A["a"].component("k-form",ni),A["a"].component("k-form-buttons",li),A["a"].component("k-field",hi),A["a"].component("k-fieldset",$i),A["a"].component("k-input",Si),A["a"].component("k-upload",Di),A["a"].component("k-checkbox-input",Ki),A["a"].component("k-checkboxes-input",Qi),A["a"].component("k-date-input",rs),A["a"].component("k-datetime-input",fs),A["a"].component("k-email-input",xs),A["a"].component("k-multiselect-input",Ts),A["a"].component("k-number-input",As),A["a"].component("k-password-input",Ms),A["a"].component("k-radio-input",Ks),A["a"].component("k-range-input",Xs),A["a"].component("k-select-input",ia),A["a"].component("k-tags-input",ua),A["a"].component("k-tel-input",fa),A["a"].component("k-text-input",ks),A["a"].component("k-textarea-input",Ra),A["a"].component("k-time-input",Ja),A["a"].component("k-toggle-input",no),A["a"].component("k-url-input",oo),A["a"].component("k-checkboxes-field",fo),A["a"].component("k-date-field",ko),A["a"].component("k-email-field",Oo),A["a"].component("k-files-field",Lo),A["a"].component("k-headline-field",Do),A["a"].component("k-info-field",Ho),A["a"].component("k-line-field",Wo),A["a"].component("k-multiselect-field",er),A["a"].component("k-number-field",rr),A["a"].component("k-pages-field",gr),A["a"].component("k-password-field",yr),A["a"].component("k-radio-field",Er),A["a"].component("k-range-field",Nr),A["a"].component("k-select-field",Rr),A["a"].component("k-structure-field",nl),A["a"].component("k-tags-field",ll),A["a"].component("k-text-field",$l),A["a"].component("k-textarea-field",Sl),A["a"].component("k-tel-field",hl),A["a"].component("k-time-field",Ll),A["a"].component("k-toggle-field",Dl),A["a"].component("k-url-field",Hl),A["a"].component("k-users-field",Jl),A["a"].component("k-email-field-preview",pu),A["a"].component("k-files-field-preview",nu),A["a"].component("k-pages-field-preview",bu),A["a"].component("k-url-field-preview",lu),A["a"].component("k-users-field-preview",wu),A["a"].component("k-bar",Tu),A["a"].component("k-box",zu),A["a"].component("k-card",Gu),A["a"].component("k-cards",tc),A["a"].component("k-collection",oc),A["a"].component("k-column",pc),A["a"].component("k-dropzone",bc),A["a"].component("k-empty",wc),A["a"].component("k-file-preview",jc),A["a"].component("k-grid",Bc),A["a"].component("k-header",Fc),A["a"].component("k-list",Gc),A["a"].component("k-list-item",td),A["a"].component("k-tabs",od),A["a"].component("k-view",pd),A["a"].component("k-draggable",$d),A["a"].component("k-error-boundary",wd),A["a"].component("k-headline",Bd),A["a"].component("k-icon",Fd),A["a"].component("k-image",Gd),A["a"].component("k-progress",tp),A["a"].component("k-sort-handle",ap),A["a"].component("k-text",Pu),A["a"].component("k-button",dp),A["a"].component("k-button-group",gp),A["a"].component("k-dropdown",_p),A["a"].component("k-dropdown-content",Ep),A["a"].component("k-dropdown-item",Np),A["a"].component("k-languages-dropdown",Rp),A["a"].component("k-link",Ld),A["a"].component("k-pagination",Vp),A["a"].component("k-prev-next",Zp),A["a"].component("k-tag",af),A["a"].component("k-topbar",pf),A["a"].component("k-sections",bf),A["a"].component("k-info-section",Of),A["a"].component("k-pages-section",Lf),A["a"].component("k-files-section",Df),A["a"].component("k-fields-section",Hf),A["a"].component("k-error-view",Wf);var Jf={user:function(){return Cm.get("auth")},login:function(t){var e={long:t.remember||!1,email:t.email,password:t.password};return Cm.post("auth/login",e).then(function(t){return t.user})},logout:function(){return Cm.post("auth/logout")}},Xf={get:function(t,e,n){return Cm.get(this.url(t,e),n).then(function(t){return!0===Wi()(t.content)&&(t.content={}),t})},update:function(t,e,n){return Cm.patch(this.url(t,e),n)},rename:function(t,e,n){return Cm.patch(this.url(t,e,"name"),{name:n})},url:function(t,e,n){var i=t+"/files/"+e;return n&&(i+="/"+n),i},link:function(t,e,n){return"/"+this.url(t,e,n)},delete:function(t,e){return Cm.delete(this.url(t,e))},options:function(t,e,n){return Cm.get(this.url(t,e),{select:"options"}).then(function(t){var e=t.options,i=[];return"list"===n&&i.push({icon:"open",text:A["a"].i18n.translate("open"),click:"download"}),i.push({icon:"title",text:A["a"].i18n.translate("rename"),click:"rename",disabled:!e.changeName}),i.push({icon:"upload",text:A["a"].i18n.translate("replace"),click:"replace",disabled:!e.replace}),i.push({icon:"trash",text:A["a"].i18n.translate("delete"),click:"remove",disabled:!e.delete}),i})},breadcrumb:function(t,e){var n=null,i=[];switch(e){case"UserFile":i.push({label:t.parent.username,link:Cm.users.link(t.parent.id)}),n="users/"+t.parent.id;break;case"SiteFile":n="site";break;case"PageFile":i=t.parents.map(function(t){return{label:t.title,link:Cm.pages.link(t.id)}}),n=Cm.pages.url(t.parent.id);break}return i.push({label:t.filename,link:this.link(n,t.filename)}),i}},Zf={create:function(t,e){return null===t||"/"===t?Cm.post("site/children",e):Cm.post(this.url(t,"children"),e)},url:function(t,e){var n=null===t?"pages":"pages/"+t.replace(/\//g,"+");return e&&(n+="/"+e),n},link:function(t){return"/"+this.url(t)},get:function(t,e){return Cm.get(this.url(t),e).then(function(t){return!0===Wi()(t.content)&&(t.content={}),t})},options:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"view";return Cm.get(this.url(t),{select:"options"}).then(function(t){var n=t.options,i=[];return"list"===e&&i.push({click:"preview",icon:"open",text:A["a"].i18n.translate("open"),disabled:!1===n.preview}),i.push({click:"rename",icon:"title",text:A["a"].i18n.translate("rename"),disabled:!n.changeTitle}),i.push({click:"url",icon:"url",text:A["a"].i18n.translate("page.changeSlug"),disabled:!n.changeSlug}),i.push({click:"status",icon:"preview",text:A["a"].i18n.translate("page.changeStatus"),disabled:!n.changeStatus}),i.push({click:"template",icon:"template",text:A["a"].i18n.translate("page.changeTemplate"),disabled:!n.changeTemplate}),i.push({click:"remove",icon:"trash",text:A["a"].i18n.translate("delete"),disabled:!n.delete}),i})},preview:function(t){return this.get(t,{select:"previewUrl"}).then(function(t){return t.previewUrl})},update:function(t,e){return Cm.patch(this.url(t),e)},children:function(t,e){return Cm.post(this.url(t,"children/search"),e)},files:function(t,e){return Cm.post(this.url(t,"files/search"),e)},delete:function(t,e){return Cm.delete(this.url(t),e)},slug:function(t,e){return Cm.patch(this.url(t,"slug"),{slug:e})},title:function(t,e){return Cm.patch(this.url(t,"title"),{title:e})},template:function(t,e){return Cm.patch(this.url(t,"template"),{template:e})},search:function(t,e){return t?Cm.post("pages/"+t.replace("/","+")+"/children/search?select=id,title,hasChildren",e):Cm.post("site/children/search?select=id,title,hasChildren",e)},status:function(t,e,n){return Cm.patch(this.url(t,"status"),{status:e,position:n})},breadcrumb:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.parents.map(function(t){return{label:t.title,link:e.link(t.id)}});return!0===n&&i.push({label:t.title,link:this.link(t.id)}),i}},Qf=n("2f62"),th=(n("f559"),n("768b")),eh={namespaced:!0,state:{models:{},current:null,isLocked:!1},getters:{current:function(t){return t.current},exists:function(t){return function(e){return t.models.hasOwnProperty(e)}},hasChanges:function(t,e){return function(t){return ne()(e.model(t).changes).length>0}},id:function(t,e,n){return function(t){return n.languages.current?t+"/"+n.languages.current.code:t}},isCurrent:function(t){return function(e){return t.current=e}},model:function(t,e){return function(n){return e.exists(n)?t.models[n]:{originals:{},values:{},changes:{},api:null}}},originals:function(t,e){return function(t){return pr(e.model(t).originals)}},values:function(t,e){return function(t){return pr(e.model(t).values)}}},mutations:{CREATE:function(t,e){A["a"].set(t.models,e.id,{api:e.api,originals:pr(e.content),values:pr(e.content),changes:{}})},CURRENT:function(t,e){t.current=e},IS_LOCKED:function(t,e){t.isLocked=e},REMOVE:function(t,e){A["a"].delete(t.models,e),localStorage.removeItem("kirby$form$"+e)},DELETE_CHANGES:function(t,e){A["a"].set(t.models[e],"changes",{}),localStorage.removeItem("kirby$form$"+e)},SET_ORIGINALS:function(t,e){var n=Object(th["a"])(e,2),i=n[0],s=n[1];t.models[i].originals=pr(s)},SET_VALUES:function(t,e){var n=Object(th["a"])(e,2),i=n[0],s=n[1];t.models[i].values=pr(s)},UPDATE:function(t,e){var n=Object(th["a"])(e,3),i=n[0],s=n[1],a=n[2];a=pr(a),A["a"].set(t.models[i].values,s,a);var o=dr()(t.models[i].originals[s]),r=dr()(a);o===r?A["a"].delete(t.models[i].changes,s):A["a"].set(t.models[i].changes,s,!0),localStorage.setItem("kirby$form$"+i,dr()(t.models[i].values))}},actions:{create:function(t,e){t.rootState.languages.current&&t.rootState.languages.current.code&&(e.id=t.getters.id(e.id)),(e.id.startsWith("pages/")||e.id.startsWith("site"))&&delete e.content.title,t.commit("CREATE",e),t.commit("CURRENT",e.id);var n=localStorage.getItem("kirby$form$"+e.id);if(n){var i=JSON.parse(n);ne()(i).forEach(function(n){var s=i[n];t.commit("UPDATE",[e.id,n,s])})}},remove:function(t,e){t.commit("REMOVE",e)},revert:function(t,e){var n=t.getters.model(e);return Cm.get(n.api,{select:"content"}).then(function(n){t.commit("SET_ORIGINALS",[e,n.content]),t.commit("SET_VALUES",[e,n.content]),t.commit("DELETE_CHANGES",e)})},save:function(t,e){e=e||t.state.current;var n=t.getters.model(e);return(!t.getters.isCurrent(e)||!t.state.isLocked)&&Cm.patch(n.api,n.values).then(function(){t.dispatch("revert",e)})},lock:function(t){t.commit("IS_LOCKED",!0)},unlock:function(t){t.commit("IS_LOCKED",!1)},update:function(t,e){var n=Object(th["a"])(e,3),i=n[0],s=n[1],a=n[2];t.commit("UPDATE",[i,s,a])}}},nh={namespaced:!0,state:{all:[],current:null,default:null},mutations:{SET_ALL:function(t,e){t.all=e.map(function(t){return{code:t.code,name:t.name,default:t.default,direction:t.direction}})},SET_CURRENT:function(t,e){t.current=e,e&&e.code&&localStorage.setItem("kirby$language",e.code)},SET_DEFAULT:function(t,e){t.default=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},install:function(t,e){var n=e.filter(function(t){return t.default})[0];t.commit("SET_ALL",e),t.commit("SET_DEFAULT",n);var i=localStorage.getItem("kirby$language");if(i){var s=e.filter(function(t){return t.code===i})[0];if(s)return void t.commit("SET_CURRENT",s)}t.commit("SET_CURRENT",n||e[0])},load:function(t){return Cm.get("languages").then(function(e){t.dispatch("install",e.data)})}}},ih={timer:null,namespaced:!0,state:{type:null,message:null,details:null,timeout:null},mutations:{SET:function(t,e){t.type=e.type,t.message=e.message,t.details=e.details,t.timeout=e.timeout},UNSET:function(t){t.type=null,t.message=null,t.details=null,t.timeout=null}},actions:{close:function(t){clearTimeout(this.timer),t.commit("UNSET")},open:function(t,e){t.dispatch("close"),t.commit("SET",e),e.timeout&&(this.timer=setTimeout(function(){t.dispatch("close")},e.timeout))},success:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(l["a"])({type:"success",timeout:4e3},e))},error:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(l["a"])({type:"error"},e))}}},sh={namespaced:!0,state:{info:{title:null}},mutations:{SET_INFO:function(t,e){t.info=e},SET_LICENSE:function(t,e){t.info.license=e},SET_TITLE:function(t,e){t.info.title=e}},actions:{title:function(t,e){t.commit("SET_TITLE",e)},register:function(t,e){t.commit("SET_LICENSE",e)},load:function(t,e){return!e&&t.state.info.isReady&&t.rootState.user.current?new Hr.a(function(e){e(t.state.info)}):Cm.system.info({view:"panel"}).then(function(e){return t.commit("SET_INFO",Object(l["a"])({isReady:e.isInstalled&&e.isOk},e)),e.languages&&t.dispatch("languages/install",e.languages,{root:!0}),t.dispatch("translation/install",e.translation,{root:!0}),t.dispatch("translation/activate",e.translation.id,{root:!0}),e.user&&t.dispatch("user/current",e.user,{root:!0}),t.state.info}).catch(function(e){t.commit("SET_INFO",{isBroken:!0,error:e.message})})}}},ah={namespaced:!0,state:{current:null,installed:[]},mutations:{SET_CURRENT:function(t,e){t.current=e},INSTALL:function(t,e){t.installed[e.id]=e}},actions:{load:function(t,e){return Cm.translations.get(e)},install:function(t,e){t.commit("INSTALL",e),A["a"].i18n.add(e.id,e.data)},activate:function(t,e){var n=t.state.installed[e];n?(A["a"].i18n.set(e),t.commit("SET_CURRENT",e),document.dir=n.direction,document.documentElement.lang=e):t.dispatch("load",e).then(function(n){t.dispatch("install",n),t.dispatch("activate",e)})}}},oh=n("8c4f"),rh=function(t,e,n){$m.dispatch("system/load").then(function(){var e=$m.state.user.current;if(!e)return $m.dispatch("user/visit",t.path),$m.dispatch("user/logout"),!1;var i=e.permissions.access;return!1===i.panel?(window.location.href=d.site,!1):!1===i[t.meta.view]?($m.dispatch("notification/error",{message:A["a"].i18n.translate("error.access.view")}),n("/")):void n()})},lh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-error-view",{staticClass:"k-browser-view"},[n("p",[t._v("\n We are really sorry, but your browser does not support\n all features required for the Kirby Panel.\n ")]),!1===t.hasFetchSupport?[n("p",[n("strong",[t._v("Fetch")]),n("br"),t._v("\n We use Javascript's new Fetch API. You can find a list of supported browsers for this feature on\n "),n("strong",[n("a",{attrs:{href:"https://caniuse.com/#feat=fetch"}},[t._v("caniuse.com")])])])]:t._e(),!1===t.hasGridSupport?[n("p",[n("strong",[t._v("CSS Grid")]),n("br"),t._v("\n We use CSS Grids for all our layouts. You can find a list of supported browsers for this feature on\n "),n("strong",[n("a",{attrs:{href:"https://caniuse.com/#feat=css-grid"}},[t._v("caniuse.com")])])])]:t._e()],2)},uh=[],ch={grid:function(){return!(!window.CSS||!window.CSS.supports("display","grid"))},fetch:function(){return void 0!==window.fetch},all:function(){return this.fetch()&&this.grid()}},dh={computed:{hasFetchSupport:function(){return ch.fetch()},hasGridSupport:function(){return ch.grid()}},created:function(){ch.all()&&this.$router.push("/")}},ph=dh,fh=(n("d6fc"),Object(h["a"])(ph,lh,uh,!1,null,null,null)),hh=fh.exports,mh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-error-boundary",{key:t.plugin,scopedSlots:t._u([{key:"error",fn:function(e){var i=e.error;return n("k-error-view",{},[t._v("\n "+t._s(i.message||i)+"\n ")])}}])},[n("k-"+t.plugin+"-plugin-view",{tag:"component"})],1)},gh=[],vh={props:{plugin:String},beforeRouteEnter:function(t,e,n){n(function(t){t.$store.dispatch("breadcrumb",[])})},watch:{plugin:function(){this.$store.dispatch("view",this.plugin)}},created:function(){this.$store.dispatch("view",this.plugin)}},bh=vh,kh=Object(h["a"])(bh,mh,gh,!1,null,null,null),$h=kh.exports,_h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("div",{staticClass:"k-file-view"},[n("k-file-preview",{attrs:{file:t.file}}),n("k-view",{staticClass:"k-file-content"},[n("k-header",{attrs:{editable:t.permissions.changeName,tabs:t.tabs,tab:t.tab},on:{edit:function(e){return t.action("rename")}}},[t._v("\n\n "+t._s(t.file.filename)+"\n\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{responsive:!0,icon:"open"},on:{click:function(e){return t.action("download")}}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]),n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.file.id?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.file.id?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:t.$api.files.url(t.path,t.file.filename),tabs:t.tabs,blueprint:t.file.blueprint.name},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-file-rename-dialog",{ref:"rename",on:{success:t.renamed}}),n("k-file-remove-dialog",{ref:"remove",on:{success:t.deleted}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,accept:t.file.mime,multiple:!1},on:{success:t.uploaded}})],1)],1)},yh=[],xh={created:function(){this.fetch(),this.$events.$on("keydown.left",this.toPrev),this.$events.$on("keydown.right",this.toNext)},destroyed:function(){this.$events.$off("keydown.left",this.toPrev),this.$events.$off("keydown.right",this.toNext)},methods:{toPrev:function(t){this.prev&&"body"===t.target.localName&&this.$router.push(this.prev.link)},toNext:function(t){this.next&&"body"===t.target.localName&&this.$router.push(this.next.link)}}},wh={mixins:[xh],props:{path:{type:String},filename:{type:String,required:!0}},data:function(){return{name:"",file:{id:null,parent:null,filename:"",url:"",prev:null,next:null,panelIcon:null,panelImage:null,mime:null,content:{}},permissions:{changeName:!1,delete:!1},issue:null,tabs:[],tab:null,options:null}},computed:{uploadApi:function(){return d.api+"/"+this.path+"/files/"+this.filename},prev:function(){if(this.file.prev)return{link:this.$api.files.link(this.path,this.file.prev.filename),tooltip:this.file.prev.filename}},tabsKey:function(){return"file-"+this.file.id+"-tabs"},language:function(){return this.$store.state.languages.current},next:function(){if(this.file.next)return{link:this.$api.files.link(this.path,this.file.next.filename),tooltip:this.file.next.filename}}},watch:{language:function(){this.fetch()},filename:function(){this.fetch()}},methods:{fetch:function(){var t=this;this.$api.files.get(this.path,this.filename,{view:"panel"}).then(function(e){t.file=e,t.file.next=e.nextWithTemplate,t.file.prev=e.prevWithTemplate,t.file.url=e.url,t.name=e.name,t.tabs=e.blueprint.tabs,t.permissions=e.options,t.options=function(e){t.$api.files.options(t.path,t.file.filename).then(function(t){e(t)})},t.$store.dispatch("breadcrumb",t.$api.files.breadcrumb(t.file,t.$route.name)),t.$store.dispatch("title",t.filename),t.$store.dispatch("form/create",{id:"files/"+e.id,api:t.$api.files.link(t.path,t.filename),content:e.content})}).catch(function(e){window.console.error(e),t.issue=e})},action:function(t){switch(t){case"download":window.open(this.file.url);break;case"rename":this.$refs.rename.open(this.path,this.file.filename);break;case"replace":this.$refs.upload.open({url:d.api+"/"+this.$api.files.url(this.path,this.file.filename),accept:this.file.mime});break;case"remove":this.$refs.remove.open(this.path,this.file.filename);break}},deleted:function(){this.path?this.$router.push("/"+this.path):this.$router.push("/site")},renamed:function(t){this.$router.push(this.$api.files.link(this.path,t.filename))},uploaded:function(){this.fetch(),this.$store.dispatch("notification/success",":)")}}},Oh=wh,Sh=Object(h["a"])(Oh,_h,yh,!1,null,null,null),Ch=Sh.exports,Eh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.system?n("k-view",{staticClass:"k-installation-view",attrs:{align:"center"}},["install"===t.state?n("form",{on:{submit:function(e){return e.preventDefault(),t.install(e)}}},[n("h1",{staticClass:"k-offscreen"},[t._v(t._s(t.$t("installation")))]),n("k-fieldset",{attrs:{fields:t.fields,novalidate:!0},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),n("k-button",{attrs:{type:"submit",icon:"check"}},[t._v(t._s(t.$t("install")))])],1):"completed"===t.state?n("k-text",[n("k-headline",[t._v(t._s(t.$t("installation.completed")))]),n("k-link",{attrs:{to:"/login"}},[t._v(t._s(t.$t("login")))])],1):n("div",[t.system.isInstalled?t._e():n("k-headline",[t._v(t._s(t.$t("installation.issues.headline")))]),n("ul",{staticClass:"k-installation-issues"},[!1===t.system.isInstallable?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.disabled"))}})],1):t._e(),!1===t.requirements.php?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.php"))}})],1):t._e(),!1===t.requirements.server?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.server"))}})],1):t._e(),!1===t.requirements.mbstring?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.mbstring"))}})],1):t._e(),!1===t.requirements.curl?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.curl"))}})],1):t._e(),!1===t.requirements.accounts?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.accounts"))}})],1):t._e(),!1===t.requirements.content?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.content"))}})],1):t._e(),!1===t.requirements.media?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.media"))}})],1):t._e(),!1===t.requirements.sessions?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.sessions"))}})],1):t._e()]),n("k-button",{attrs:{icon:"refresh"},on:{click:t.check}},[n("span",{domProps:{innerHTML:t._s(t.$t("retry"))}})])],1)],1):t._e()},Th=[],jh={data:function(){return{user:{name:"",email:"",language:"en",password:"",role:"admin"},languages:[],system:null}},computed:{state:function(){return this.system.isOk&&this.system.isInstallable&&!this.system.isInstalled?"install":this.system.isOk&&this.system.isInstallable&&this.system.isInstalled?"completed":void 0},translation:function(){return this.$store.state.translation.current},requirements:function(){return this.system&&this.system.requirements?this.system.requirements:{}},fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user",autofocus:!0},email:{label:this.$t("email"),type:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",placeholder:this.$t("password")+" …",required:!0},language:{label:this.$t("language"),type:"select",options:this.languages,icon:"globe",empty:!1,required:!0}}}},watch:{translation:function(t){this.user.language=t},"user.language":function(t){this.$store.dispatch("translation/activate",t)}},created:function(){this.check()},methods:{install:function(){var t=this;this.$api.system.install(this.user).then(function(e){t.$store.dispatch("user/current",e),t.$store.dispatch("notification/success",t.$t("welcome")+"!"),t.$router.push("/")}).catch(function(e){t.$store.dispatch("notification/error",e)})},check:function(){var t=this;this.$store.dispatch("system/load",!0).then(function(e){!0===e.isInstalled&&e.isReady?t.$router.push("/login"):t.$api.translations.options().then(function(n){t.languages=n,t.system=e,t.$store.dispatch("title",t.$t("view.installation"))})})}}},Ih=jh,Lh=(n("146c"),Object(h["a"])(Ih,Eh,Th,!1,null,null,null)),qh=Lh.exports,Nh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-view",{staticClass:"k-settings-view"},[n("k-header",[t._v("\n "+t._s(t.$t("view.settings"))+"\n ")]),n("section",{staticClass:"k-system-info"},[n("header",[n("k-headline",[t._v("Kirby")])],1),n("ul",{staticClass:"k-system-info-box"},[n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("license")))]),n("dd",[t.license?[t._v("\n "+t._s(t.license)+"\n ")]:n("p",[n("strong",{staticClass:"k-system-unregistered"},[t._v(t._s(t.$t("license.unregistered")))])])],2)])]),n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("version")))]),n("dd",[t._v(t._s(t.$store.state.system.info.version))])])])])]),t.multilang?n("section",{staticClass:"k-languages"},[t.languages.length>0?[n("section",{staticClass:"k-languages-section"},[n("header",[n("k-headline",[t._v(t._s(t.$t("languages.default")))])],1),n("k-collection",{attrs:{items:t.defaultLanguage},on:{action:t.action}})],1),n("section",{staticClass:"k-languages-section"},[n("header",[n("k-headline",[t._v(t._s(t.$t("languages.secondary")))]),n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("language.create")))])],1),t.translations.length?n("k-collection",{attrs:{items:t.translations},on:{action:t.action}}):n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("languages.secondary.empty")))])],1)]:0===t.languages.length?[n("header",[n("k-headline",[t._v(t._s(t.$t("languages")))]),n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("language.create")))])],1),n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("languages.empty")))])]:t._e(),n("k-language-create-dialog",{ref:"create",on:{success:t.fetch}}),n("k-language-update-dialog",{ref:"update",on:{success:t.fetch}}),n("k-language-remove-dialog",{ref:"remove",on:{success:t.fetch}})],2):t._e()],1)},Ah=[],Bh={data:function(){return{languages:[]}},computed:{defaultLanguage:function(){return this.languages.filter(function(t){return t.default})},multilang:function(){return this.$store.state.system.info.multilang},license:function(){return this.$store.state.system.info.license},translations:function(){return this.languages.filter(function(t){return!1===t.default})}},created:function(){this.fetch(),this.$store.dispatch("title",this.$t("view.settings")),this.$store.dispatch("breadcrumb",[])},methods:{fetch:function(){var t=this;!1!==this.multilang?this.$api.get("languages").then(function(e){t.languages=e.data.map(function(n){return{id:n.code,default:n.default,icon:{type:"globe",back:"black"},text:n.name,info:n.code,options:[{icon:"edit",text:t.$t("edit"),click:"update"},{icon:"trash",text:t.$t("delete"),disabled:n.default&&1!==e.data.length,click:"remove"}]}})}):this.languages=[]},action:function(t,e){switch(e){case"update":this.$refs.update.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}}}},Ph=Bh,Dh=(n("9bd5"),Object(h["a"])(Ph,Nh,Ah,!1,null,null,null)),Mh=Dh.exports,Rh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):t.ready?n("k-view",{staticClass:"k-login-view",attrs:{align:"center"}},[n("form",{staticClass:"k-login-form",attrs:{"data-invalid":t.invalid},on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[n("h1",{staticClass:"k-offscreen"},[t._v(t._s(t.$t("login")))]),n("k-fieldset",{attrs:{novalidate:!0,fields:t.fields},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),n("div",{staticClass:"k-login-buttons"},[n("span",{staticClass:"k-login-checkbox"},[n("k-checkbox-input",{attrs:{value:t.user.remember,label:t.$t("login.remember")},on:{input:function(e){t.user.remember=e}}})],1),n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v("\n "+t._s(t.$t("login"))+" "),t.isLoading?[t._v("…")]:t._e()],2)],1)],1)]):t._e()},zh=[],Fh={data:function(){return{ready:!1,issue:null,invalid:!1,isLoading:!1,user:{email:"",password:"",remember:!1}}},computed:{fields:function(){return{email:{autofocus:!0,label:this.$t("email"),type:"email",required:!0,link:!1},password:{label:this.$t("password"),type:"password",minLength:8,required:!0,autocomplete:"current-password",counter:!1}}}},created:function(){var t=this;this.$store.dispatch("system/load").then(function(e){e.isReady||t.$router.push("/installation"),e.user&&e.user.id&&t.$router.push("/"),t.ready=!0,t.$store.dispatch("title",t.$t("login"))}).catch(function(e){t.issue=e})},methods:{login:function(){var t=this;this.invalid=!1,this.isLoading=!0,this.$store.dispatch("user/login",this.user).then(function(){t.$store.dispatch("system/load",!0).then(function(){t.$store.dispatch("notification/success",t.$t("welcome")),t.isLoading=!1})}).catch(function(){t.invalid=!0,t.isLoading=!1})}}},Uh=Fh,Hh=(n("24c1"),Object(h["a"])(Uh,Rh,zh,!1,null,null,null)),Kh=Hh.exports,Vh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{staticClass:"k-page-view"},[n("k-header",{attrs:{tabs:t.tabs,tab:t.tab,editable:t.permissions.changeTitle},on:{edit:function(e){return t.action("rename")}}},[t._v("\n "+t._s(t.page.title)+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[t.permissions.preview&&t.page.previewUrl?n("k-button",{attrs:{responsive:!0,link:t.page.previewUrl,target:"_blank",icon:"open"}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]):t._e(),t.status?n("k-button",{class:["k-status-flag","k-status-flag-"+t.page.status],attrs:{disabled:!1===t.permissions.changeStatus,icon:!1===t.permissions.changeStatus?"protected":"circle",responsive:!0},on:{click:function(e){return t.action("status")}}},[t._v("\n "+t._s(t.status.label)+"\n ")]):t._e(),n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.page.id?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.page.id?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:t.$api.pages.url(t.page.id),blueprint:t.blueprint,tabs:t.tabs},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-page-url-dialog",{ref:"url"}),n("k-page-status-dialog",{ref:"status",on:{success:t.update}}),n("k-page-template-dialog",{ref:"template",on:{success:t.update}}),n("k-page-remove-dialog",{ref:"remove"})],1)},Yh=[],Gh={mixins:[xh],props:{path:{type:String,required:!0}},data:function(){return{page:{title:"",id:null,prev:null,next:null,status:null},blueprint:null,preview:!0,permissions:{changeTitle:!1,changeStatus:!1},icon:"page",issue:null,tab:null,tabs:[],options:null}},computed:{prev:function(){if(this.page.prev)return{link:this.$api.pages.link(this.page.prev.id),tooltip:this.page.prev.title}},language:function(){return this.$store.state.languages.current},next:function(){if(this.page.next)return{link:this.$api.pages.link(this.page.next.id),tooltip:this.page.next.title}},status:function(){return null!==this.page.status?this.page.blueprint.status[this.page.status]:null},tabsKey:function(){return"page-"+this.page.id+"-tabs"}},watch:{language:function(){this.fetch()},path:function(){this.fetch()}},methods:{action:function(t){var e=this;switch(t){case"preview":this.$api.pages.preview(this.page.id).then(function(t){window.open(t)}).catch(function(t){e.$store.dispatch("notification/error",t)});break;case"rename":this.$refs.rename.open(this.page.id);break;case"url":this.$refs.url.open(this.page.id);break;case"status":this.$refs.status.open(this.page.id);break;case"template":this.$refs.template.open(this.page.id);break;case"remove":this.$refs.remove.open(this.page.id);break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}},changeLanguage:function(t){this.$store.dispatch("languages/current",t),this.fetch()},fetch:function(){var t=this;this.$api.pages.get(this.path,{view:"panel"}).then(function(e){t.page=e,t.blueprint=e.blueprint.name,t.permissions=e.options,t.tabs=e.blueprint.tabs,t.options=function(e){t.$api.pages.options(t.page.id).then(function(t){e(t)})},t.$store.dispatch("breadcrumb",t.$api.pages.breadcrumb(e)),t.$store.dispatch("title",t.page.title),t.$store.dispatch("form/create",{id:"pages/"+e.id,api:t.$api.pages.link(e.id),content:e.content})}).catch(function(e){t.issue=e})},update:function(){this.fetch(),this.$emit("model.update")}}},Wh=Gh,Jh=(n("202d"),Object(h["a"])(Wh,Vh,Yh,!1,null,null,null)),Xh=Jh.exports,Zh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{key:"site-view",staticClass:"k-site-view"},[n("k-header",{attrs:{tabs:t.tabs,tab:t.tab,editable:t.permissions.changeTitle},on:{edit:function(e){return t.action("rename")}}},[t._v("\n "+t._s(t.site.title)+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{responsive:!0,link:t.site.url,target:"_blank",icon:"open"}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]),n("k-languages-dropdown")],1)],1),t.site.url?n("k-tabs",{ref:"tabs",attrs:{tabs:t.tabs,blueprint:t.site.blueprint.name,parent:"site"},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-site-rename-dialog",{ref:"rename",on:{success:t.fetch}})],1)},Qh=[],tm={data:function(){return{site:{title:null,url:null},issue:null,tab:null,tabs:[],options:null,permissions:{changeTitle:!0}}},computed:{language:function(){return this.$store.state.languages.current}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{fetch:function(){var t=this;this.$api.site.get({view:"panel"}).then(function(e){t.site=e,t.tabs=e.blueprint.tabs,t.permissions=e.options,t.options=function(e){t.$api.site.options().then(function(t){e(t)})},t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("title",null),t.$store.dispatch("form/create",{id:"site",api:"site",content:e.content})}).catch(function(e){t.issue=e})},action:function(t){switch(t){case"languages":this.$refs.languages.open();break;case"rename":this.$refs.rename.open();break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}}}},em=tm,nm=Object(h["a"])(em,Zh,Qh,!1,null,null,null),im=nm.exports,sm=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{staticClass:"k-users-view"},[n("k-header",[t._v("\n "+t._s(t.$t("view.users"))+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{disabled:!1===t.$permissions.users.create,icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("user.create")))])],1),n("k-button-group",{attrs:{slot:"right"},slot:"right"},[n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"funnel"},on:{click:function(e){return t.$refs.roles.toggle()}}},[t._v("\n "+t._s(t.$t("role"))+": "+t._s(t.role?t.role.text:t.$t("role.all"))+"\n ")]),n("k-dropdown-content",{ref:"roles",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"bolt"},on:{click:function(e){return t.filter(!1)}}},[t._v("\n "+t._s(t.$t("role.all"))+"\n ")]),n("hr"),t._l(t.roles,function(e){return n("k-dropdown-item",{key:e.value,attrs:{icon:"bolt"},on:{click:function(n){return t.filter(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])})],2)],1)],1)],1),t.users.length>0?[n("k-collection",{attrs:{items:t.users,pagination:t.pagination},on:{paginate:t.paginate,action:t.action}})]:0===t.total?[n("k-empty",{attrs:{icon:"users"}},[t._v(t._s(t.$t("role.empty")))])]:t._e(),n("k-user-create-dialog",{ref:"create",on:{success:t.fetch}}),n("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),n("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),n("k-user-password-dialog",{ref:"password"}),n("k-user-remove-dialog",{ref:"remove",on:{success:t.fetch}}),n("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),n("k-user-role-dialog",{ref:"role",on:{success:t.fetch}})],2)},am=[],om={data:function(){return{page:1,limit:20,total:null,users:[],roles:[],issue:null}},computed:{pagination:function(){return{page:this.page,limit:this.limit,total:this.total}},role:function(){var t=this,e=null;return this.$route.params.role&&this.roles.forEach(function(n){n.value===t.$route.params.role&&(e=n)}),e}},watch:{$route:function(){this.fetch()}},created:function(){var t=this;this.$api.roles.options().then(function(e){t.roles=e,t.fetch()})},methods:{fetch:function(){var t=this;this.$store.dispatch("title",this.$t("view.users"));var e={paginate:{page:this.page,limit:this.limit}};this.role&&(e.filterBy=[{field:"role",operator:"==",value:this.role.value}]),this.$api.users.list(e).then(function(e){t.users=e.data.map(function(e){var n={id:e.id,icon:{type:"user",back:"black"},text:e.name||e.email,info:e.role.title,link:"/users/"+e.id,options:function(n){t.$api.users.options(e.id,"list").then(function(t){return n(t)}).catch(function(e){t.$store.dispatch("notification/error",e)})},image:null};return e.avatar&&(n.image={url:e.avatar.url,cover:!0}),n}),t.role?t.$store.dispatch("breadcrumb",[{link:"/users/role/"+t.role.value,label:t.$t("role")+": "+t.role.text}]):t.$store.dispatch("breadcrumb",[]),t.total=e.pagination.total}).catch(function(e){t.issue=e})},paginate:function(t){this.page=t.page,this.limit=t.limit,this.fetch()},action:function(t,e){switch(e){case"edit":this.$router.push("/users/"+t.id);break;case"email":this.$refs.email.open(t.id);break;case"role":this.$refs.role.open(t.id);break;case"rename":this.$refs.rename.open(t.id);break;case"password":this.$refs.password.open(t.id);break;case"language":this.$refs.language.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}},filter:function(t){!1===t?this.$router.push("/users"):this.$router.push("/users/role/"+t.value),this.$refs.roles.close()}}},rm=om,lm=Object(h["a"])(rm,sm,am,!1,null,null,null),um=lm.exports,cm=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):t.ready?n("div",{staticClass:"k-user-view"},[n("div",{staticClass:"k-user-profile"},[n("k-view",[t.avatar?[n("k-dropdown",[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar")},on:{click:function(e){return t.$refs.picture.toggle()}}},[t.avatar?n("k-image",{attrs:{cover:!0,src:t.avatar,ratio:"1/1"}}):t._e()],1),n("k-dropdown-content",{ref:"picture"},[n("k-dropdown-item",{attrs:{icon:"upload"},on:{click:function(e){return t.$refs.upload.open()}}},[t._v("\n "+t._s(t.$t("change"))+"\n ")]),n("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.action("picture.delete")}}},[t._v("\n "+t._s(t.$t("delete"))+"\n ")])],1)],1)]:[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar")},on:{click:function(e){return t.$refs.upload.open()}}},[n("k-icon",{attrs:{type:"user"}})],1)],n("k-button-group",[n("k-button",{attrs:{disabled:!t.permissions.changeEmail,icon:"email"},on:{click:function(e){return t.action("email")}}},[t._v(t._s(t.$t("email"))+": "+t._s(t.user.email))]),n("k-button",{attrs:{disabled:!t.permissions.changeRole,icon:"bolt"},on:{click:function(e){return t.action("role")}}},[t._v(t._s(t.$t("role"))+": "+t._s(t.user.role.title))]),n("k-button",{attrs:{disabled:!t.permissions.changeLanguage,icon:"globe"},on:{click:function(e){return t.action("language")}}},[t._v(t._s(t.$t("language"))+": "+t._s(t.user.language))])],1)],2)],1),n("k-view",[n("k-header",{attrs:{editable:t.permissions.changeName,tabs:t.tabs,tab:t.tab},on:{edit:function(e){return t.action("rename")}}},[t.user.name&&0!==t.user.name.length?[t._v(t._s(t.user.name))]:n("span",{staticClass:"k-user-name-placeholder"},[t._v(t._s(t.$t("name"))+" …")]),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-dropdown",[n("k-button",{attrs:{icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.user.id&&"User"===t.$route.name?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],2),t.user&&t.tabs.length?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:"users/"+t.user.id,blueprint:t.user.blueprint.name,tabs:t.tabs},on:{tab:function(e){t.tab=e}}}):t.ready?n("k-box",{attrs:{text:t.$t("user.blueprint",{role:t.user.role.name}),theme:"info"}}):t._e(),n("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),n("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),n("k-user-password-dialog",{ref:"password"}),n("k-user-remove-dialog",{ref:"remove"}),n("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),n("k-user-role-dialog",{ref:"role",on:{success:t.fetch}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,multiple:!1,accept:"image/*"},on:{success:t.uploadedAvatar}})],1)],1):t._e()},dm=[],pm={mixins:[xh],props:{id:{type:String,required:!0}},data:function(){return{tab:null,tabs:[],ready:!1,user:{role:{name:null},name:null,language:null,prev:null,next:null},permissions:{changeEmail:!0,changeName:!0,changeLanguage:!0,changeRole:!0},issue:null,avatar:null,options:null}},computed:{language:function(){return this.$store.state.languages.current},next:function(){if(this.user.next)return{link:this.$api.users.link(this.user.next.id),tooltip:this.user.next.name}},prev:function(){if(this.user.prev)return{link:this.$api.users.link(this.user.prev.id),tooltip:this.user.prev.name}},tabsKey:function(){return"user-"+this.user.id+"-tabs"},uploadApi:function(){return d.api+"/users/"+this.user.id+"/avatar"}},watch:{language:function(){this.fetch()},id:function(){this.fetch()}},methods:{action:function(t){var e=this;switch(t){case"email":this.$refs.email.open(this.user.id);break;case"language":this.$refs.language.open(this.user.id);break;case"password":this.$refs.password.open(this.user.id);break;case"picture.delete":this.$api.users.deleteAvatar(this.id).then(function(){e.$store.dispatch("notification/success",":)"),e.avatar=null});break;case"remove":this.$refs.remove.open(this.user.id);break;case"rename":this.$refs.rename.open(this.user.id);break;case"role":this.$refs.role.open(this.user.id);break;default:this.$store.dispatch("notification/error","Not yet implemented")}},fetch:function(){var t=this;this.$api.users.get(this.id,{view:"panel"}).then(function(e){t.user=e,t.tabs=e.blueprint.tabs,t.ready=!0,t.permissions=e.options,t.options=function(e){t.$api.users.options(t.user.id).then(function(t){e(t)})},e.avatar?t.avatar=e.avatar.url:t.avatar=null,"User"===t.$route.name?t.$store.dispatch("breadcrumb",t.$api.users.breadcrumb(e)):t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("title",t.user.name||t.user.email),t.$store.dispatch("form/create",{id:"users/"+e.id,api:t.$api.users.link(e.id),content:e.content})}).catch(function(e){t.issue=e})},uploadedAvatar:function(){this.$store.dispatch("notification/success",":)"),this.fetch()}}},fm=pm,hm=(n("bd96"),Object(h["a"])(fm,cm,dm,!1,null,null,null)),mm=hm.exports,gm=[{path:"/",name:"Home",redirect:"/site"},{path:"/browser",name:"Browser",component:hh,meta:{outside:!0}},{path:"/login",component:Kh,meta:{outside:!0}},{path:"/logout",beforeEnter:function(){$m.dispatch("user/logout")},meta:{outside:!0}},{path:"/installation",component:qh,meta:{outside:!0}},{path:"/site",name:"Site",meta:{view:"site"},component:im,beforeEnter:rh},{path:"/site/files/:filename",name:"SiteFile",meta:{view:"site"},component:Ch,beforeEnter:rh,props:function(t){return{path:"site",filename:t.params.filename}}},{path:"/pages/:path/files/:filename",name:"PageFile",meta:{view:"site"},component:Ch,beforeEnter:rh,props:function(t){return{path:"pages/"+t.params.path,filename:t.params.filename}}},{path:"/users/:path/files/:filename",name:"UserFile",meta:{view:"users"},component:Ch,beforeEnter:rh,props:function(t){return{path:"users/"+t.params.path,filename:t.params.filename}}},{path:"/pages/:path",name:"Page",meta:{view:"site"},component:Xh,beforeEnter:rh,props:function(t){return{path:t.params.path}}},{path:"/settings",name:"Settings",meta:{view:"settings"},component:Mh,beforeEnter:rh},{path:"/users/role/:role",name:"UsersByRole",meta:{view:"users"},component:um,beforeEnter:rh,props:function(t){return{role:t.params.role}}},{path:"/users",name:"Users",meta:{view:"users"},beforeEnter:rh,component:um},{path:"/users/:id",name:"User",meta:{view:"users"},component:mm,beforeEnter:rh,props:function(t){return{id:t.params.id}}},{path:"/account",name:"Account",meta:{view:"account"},component:mm,beforeEnter:rh,props:function(){return{id:$m.state.user.current?$m.state.user.current.id:null}}},{path:"/plugins/:id",name:"Plugin",meta:{view:"plugin"},props:function(t){return{plugin:t.params.id}},beforeEnter:rh,component:$h},{path:"*",name:"NotFound",beforeEnter:function(t,e,n){n("/")}}];A["a"].use(oh["a"]);var vm=new oh["a"]({mode:"history",routes:gm,url:"/"===d.url?"":d.url});vm.beforeEach(function(t,e,n){"Browser"!==t.name&&!1===ch.all()&&n("/browser"),$m.dispatch("view",t.meta.view),t.meta.outside||$m.dispatch("user/visit",t.path),n()});var bm=vm,km={namespaced:!0,state:{current:null,path:null},mutations:{SET_CURRENT:function(t,e){t.current=e,e&&e.permissions?(A["a"].prototype.$user=e,A["a"].prototype.$permissions=e.permissions):(A["a"].prototype.$user=null,A["a"].prototype.$permissions=null)},SET_PATH:function(t,e){t.path=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},language:function(t,e){t.dispatch("translation/activate",e,{root:!0}),t.commit("SET_CURRENT",Object(l["a"])({language:e},t.state.current))},load:function(t){return Cm.auth.user().then(function(e){return t.commit("SET_CURRENT",e),e})},login:function(t,e){return Cm.auth.login(e).then(function(e){return t.commit("SET_CURRENT",e),t.dispatch("translation/activate",e.language,{root:!0}),bm.push(t.state.path||"/"),e})},logout:function(t,e){t.commit("SET_CURRENT",null),e?window.location.href=(window.panel.url||"")+"/login":Cm.auth.logout().then(function(){bm.push("/login")}).catch(function(){bm.push("/login")})},visit:function(t,e){t.commit("SET_PATH",e)}}};A["a"].use(Qf["a"]);var $m=new Qf["a"].Store({strict:!1,state:{breadcrumb:[],dialog:null,drag:null,isLoading:!1,search:!1,title:null,view:null},mutations:{SET_BREADCRUMB:function(t,e){t.breadcrumb=e},SET_DIALOG:function(t,e){t.dialog=e},SET_DRAG:function(t,e){t.drag=e},SET_SEARCH:function(t,e){!0===e&&(e={}),t.search=e},SET_TITLE:function(t,e){t.title=e},SET_VIEW:function(t,e){t.view=e},START_LOADING:function(t){t.isLoading=!0},STOP_LOADING:function(t){t.isLoading=!1}},actions:{breadcrumb:function(t,e){t.commit("SET_BREADCRUMB",e)},dialog:function(t,e){t.commit("SET_DIALOG",e)},drag:function(t,e){t.commit("SET_DRAG",e)},isLoading:function(t,e){t.commit(!0===e?"START_LOADING":"STOP_LOADING")},search:function(t,e){t.commit("SET_SEARCH",e)},title:function(t,e){t.commit("SET_TITLE",e),document.title=e||"",t.state.system.info.title&&(document.title+=null!==e?" | "+t.state.system.info.title:t.state.system.info.title)},view:function(t,e){t.commit("SET_VIEW",e)}},modules:{form:eh,languages:nh,notification:ih,system:sh,translation:ah,user:km}}),_m={running:0,request:function(t,e){var n=this;e=qi()(e||{},{credentials:"same-origin",headers:Object(l["a"])({"x-requested-with":"xmlhttprequest","content-type":"application/json"},e.headers)}),$m.state.languages.current&&(e.headers["x-language"]=$m.state.languages.current.code),e.headers["x-csrf"]=window.panel.csrf;var i=t+"/"+dr()(e);return Cm.config.onStart(i),this.running++,fetch(Cm.config.endpoint+"/"+t,e).then(function(t){return t.text()}).then(function(t){try{return JSON.parse(t)}catch(e){throw new Error("The JSON response from the API could not be parsed. Please check your API connection.")}}).then(function(t){if(t.status&&"error"===t.status)throw t;var e=t;return t.data&&t.type&&"model"===t.type&&(e=t.data),n.running--,Cm.config.onComplete(i),Cm.config.onSuccess(t),e}).catch(function(t){throw n.running--,Cm.config.onComplete(i),Cm.config.onError(t),t})},get:function(t,e,n){return e&&(t+="?"+ne()(e).map(function(t){return t+"="+e[t]}).join("&")),this.request(t,qi()(n||{},{method:"GET"}))},post:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"POST";return this.request(t,qi()(n||{},{method:i,body:dr()(e)}))},patch:function(t,e,n){return this.post(t,e,n,"PATCH")},delete:function(t,e,n){return this.post(t,e,n,"DELETE")}},ym={list:function(){return Cm.get("roles")},get:function(t){return Cm.get("roles/"+t)},options:function(){return this.list().then(function(t){return t.data.map(function(t){return{info:t.description||"(".concat(A["a"].i18n.translate("role.description.placeholder"),")"),text:t.title,value:t.name}})})}},xm={info:function(t){return Cm.get("system",t)},install:function(t){return Cm.post("system/install",t).then(function(t){return t.user})},register:function(t){return Cm.post("system/register",t)}},wm={get:function(t){return Cm.get("site",t)},update:function(t){return Cm.post("site",t)},title:function(t){return Cm.patch("site/title",{title:t})},options:function(){return Cm.get("site",{select:"options"}).then(function(t){var e=t.options,n=[];return n.push({click:"rename",icon:"title",text:A["a"].i18n.translate("rename"),disabled:!e.changeTitle}),n})},children:function(t){return Cm.post("site/children/search",t)},blueprint:function(){return Cm.get("site/blueprint")},blueprints:function(){return Cm.get("site/blueprints")}},Om={list:function(){return Cm.get("translations")},get:function(t){return Cm.get("translations/"+t)},options:function(){var t=[];return this.list().then(function(e){return t=e.data.map(function(t){return{value:t.id,text:t.name}}),t})}},Sm={create:function(t){return Cm.post(this.url(),t)},list:function(t){return Cm.post(this.url(null,"search"),t)},get:function(t,e){return Cm.get(this.url(t),e)},update:function(t,e){return Cm.patch(this.url(t),e)},delete:function(t){return Cm.delete(this.url(t))},changeEmail:function(t,e){return Cm.patch(this.url(t,"email"),{email:e})},changeLanguage:function(t,e){return Cm.patch(this.url(t,"language"),{language:e})},changeName:function(t,e){return Cm.patch(this.url(t,"name"),{name:e})},changePassword:function(t,e){return Cm.patch(this.url(t,"password"),{password:e})},changeRole:function(t,e){return Cm.patch(this.url(t,"role"),{role:e})},deleteAvatar:function(t){return Cm.delete(this.url(t,"avatar"))},blueprint:function(t){return Cm.get(this.url(t,"blueprint"))},breadcrumb:function(t){return[{link:"/users/"+t.id,label:t.username}]},options:function(t){return Cm.get(this.url(t),{select:"options"}).then(function(t){var e=t.options,n=[];return n.push({click:"rename",icon:"title",text:A["a"].i18n.translate("user.changeName"),disabled:!e.changeName}),n.push({click:"email",icon:"email",text:A["a"].i18n.translate("user.changeEmail"),disabled:!e.changeEmail}),n.push({click:"role",icon:"bolt",text:A["a"].i18n.translate("user.changeRole"),disabled:!e.changeRole}),n.push({click:"password",icon:"key",text:A["a"].i18n.translate("user.changePassword"),disabled:!e.changePassword}),n.push({click:"language",icon:"globe",text:A["a"].i18n.translate("user.changeLanguage"),disabled:!e.changeLanguage}),n.push({click:"remove",icon:"trash",text:A["a"].i18n.translate("user.delete"),disabled:!e.delete}),n})},url:function(t,e){var n=t?"users/"+t:"users";return e&&(n+="/"+e),n},link:function(t,e){return"/"+this.url(t,e)}},Cm=Object(l["a"])({config:{onStart:function(){},onComplete:function(){},onSuccess:function(){},onError:function(t){throw window.console.log(t.message),t}},auth:Jf,files:Xf,pages:Zf,roles:ym,system:xm,site:wm,translations:Om,users:Sm},_m);Cm.config.endpoint=d.api,Cm.requests=[],Cm.config.onStart=function(t){$m.dispatch("isLoading",!0),Cm.requests.push(t)},Cm.config.onComplete=function(t){Cm.requests=Cm.requests.filter(function(e){return e!==t}),0===Cm.requests.length&&$m.dispatch("isLoading",!1)},Cm.config.onError=function(t){d.debug&&window.console.error(t),403===t.code&&$m.dispatch("user/logout",!0)};var Em=setInterval(Cm.auth.user,3e5);Cm.config.onSuccess=function(){clearInterval(Em),Em=setInterval(Cm.auth.user,3e5)},A["a"].prototype.$api=Cm,A["a"].config.errorHandler=function(t){d.debug&&window.console.error(t),$m.dispatch("notification/error",{message:t.message||"An error occurred. Please reload the panel"})},window.panel=window.panel||{},window.panel.error=function(t,e){d.debug&&window.console.error(t+": "+e),$m.dispatch("error",t+". See the console for more information.")};var Tm=n("f2f3");A["a"].use(Tm["a"].plugin,$m);var jm=n("2d1f"),Im=n.n(jm),Lm={};for(var qm in A["a"].options.components)Lm[qm]=A["a"].options.components[qm];var Nm=function(t,e){e.template||e.render||e.extends?(e.extends&&"string"===typeof e.extends&&(e.extends=Lm[e.extends],e.template&&(e.render=null)),e.mixins&&(e.mixins=e.mixins.map(function(t){return"string"===typeof t?Lm[t]:t})),Lm[t]&&window.console.warn('Plugin is replacing "'.concat(t,'"')),A["a"].component(t,e)):$m.dispatch("notification/error",'Neither template or render method provided nor extending a component when loading plugin component "'.concat(t,'". The component has not been registered.'))};Im()(window.panel.plugins.components).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];Nm(n,i)}),Im()(window.panel.plugins.fields).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];Nm(n,i)}),Im()(window.panel.plugins.sections).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];Nm(n,Object(l["a"])({},i,{mixins:[_f].concat(i.mixins||[])}))}),Im()(window.panel.plugins.views).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];if(!i.component)return $m.dispatch("notification/error",'No view component provided when loading view "'.concat(n,'". The view has not been registered.')),void delete window.panel.plugins.views[n];i.link="/plugins/"+n,void 0===i.icon&&(i.icon="page"),void 0===i.menu&&(i.menu=!0),window.panel.plugins.views[n]={link:i.link,icon:i.icon,menu:i.menu},A["a"].component("k-"+n+"-plugin-view",i.component)}),window.panel.plugins.use.forEach(function(t){A["a"].use(t)}),A["a"].use(T),A["a"].use(N),A["a"].use(j),A["a"].use(P.a),A["a"].config.productionTip=!1,A["a"].config.devtools=!0,window.panel.app=new A["a"]({router:bm,store:$m,render:function(t){return t(C)}}).$mount("#app")},5714:function(t,e,n){},"580a":function(t,e,n){"use strict";var i=n("61ab"),s=n.n(i);s.a},"589a":function(t,e,n){},"58e5":function(t,e,n){},"5ab5":function(t,e,n){},"5aee":function(t,e,n){"use strict";var i=n("04b2"),s=n.n(i);s.a},"5b23":function(t,e,n){"use strict";var i=n("9798"),s=n.n(i);s.a},"5c0b":function(t,e,n){"use strict";var i=n("5e27"),s=n.n(i);s.a},"5d33":function(t,e,n){"use strict";var i=n("2246"),s=n.n(i);s.a},"5e27":function(t,e,n){},"5f12":function(t,e,n){},6018:function(t,e,n){"use strict";var i=n("e30b"),s=n.n(i);s.a},"61ab":function(t,e,n){},"64e6":function(t,e,n){},"65a9":function(t,e,n){},"696b5":function(t,e,n){"use strict";var i=n("0cdc"),s=n.n(i);s.a},"6a18":function(t,e,n){"use strict";var i=n("de8a"),s=n.n(i);s.a},"6ab3":function(t,e,n){"use strict";var i=n("784e"),s=n.n(i);s.a},"6ab9":function(t,e,n){},"6b7f":function(t,e,n){},"6bcd":function(t,e,n){"use strict";var i=n("9e0a"),s=n.n(i);s.a},"6f7b":function(t,e,n){"use strict";var i=n("5ab5"),s=n.n(i);s.a},7075:function(t,e,n){},"718c":function(t,e,n){"use strict";var i=n("773d"),s=n.n(i);s.a},7568:function(t,e,n){"use strict";var i=n("4150"),s=n.n(i);s.a},"75cd":function(t,e,n){},7737:function(t,e,n){"use strict";var i=n("ca19"),s=n.n(i);s.a},"773d":function(t,e,n){},"778b":function(t,e,n){},7797:function(t,e,n){},"784e":function(t,e,n){},"7a7d":function(t,e,n){"use strict";var i=n("65a9"),s=n.n(i);s.a},"7d2d":function(t,e,n){},"7d5d":function(t,e,n){"use strict";var i=n("6ab9"),s=n.n(i);s.a},"7dc7":function(t,e,n){"use strict";var i=n("eb17"),s=n.n(i);s.a},"7e0c":function(t,e,n){},"7e85":function(t,e,n){"use strict";var i=n("d1c5"),s=n.n(i);s.a},"7f6e":function(t,e,n){"use strict";var i=n("4364"),s=n.n(i);s.a},"862b":function(t,e,n){"use strict";var i=n("589a"),s=n.n(i);s.a},"893d":function(t,e,n){"use strict";var i=n("abb3"),s=n.n(i);s.a},"8ae6":function(t,e,n){},"8c28":function(t,e,n){"use strict";var i=n("3d5b"),s=n.n(i);s.a},"8e4d":function(t,e,n){},"910b":function(t,e,n){},"957b":function(t,e,n){},9749:function(t,e,n){},"977f":function(t,e,n){"use strict";var i=n("b7f5"),s=n.n(i);s.a},9798:function(t,e,n){},9799:function(t,e,n){"use strict";var i=n("4fe0"),s=n.n(i);s.a},9811:function(t,e,n){},"98a1":function(t,e,n){"use strict";var i=n("f0cb"),s=n.n(i);s.a},"9bd5":function(t,e,n){"use strict";var i=n("64e6"),s=n.n(i);s.a},"9df7":function(t,e,n){},"9e0a":function(t,e,n){},a134:function(t,e,n){"use strict";var i=n("4390"),s=n.n(i);s.a},a567:function(t,e,n){"use strict";var i=n("c0b5"),s=n.n(i);s.a},a5f3:function(t,e,n){"use strict";var i=n("43f4"),s=n.n(i);s.a},a66d:function(t,e,n){"use strict";var i=n("2eb5"),s=n.n(i);s.a},abb3:function(t,e,n){},ac27:function(t,e,n){"use strict";var i=n("3c9d"),s=n.n(i);s.a},b0d6:function(t,e,n){"use strict";var i=n("d31d"),s=n.n(i);s.a},b37e:function(t,e,n){},b3c3:function(t,e,n){},b5d2:function(t,e,n){"use strict";var i=n("ed7b"),s=n.n(i);s.a},b746:function(t,e,n){"use strict";var i=n("7e0c"),s=n.n(i);s.a},b7f5:function(t,e,n){},ba8f:function(t,e,n){"use strict";var i=n("9749"),s=n.n(i);s.a},bb41:function(t,e,n){"use strict";var i=n("ceb4"),s=n.n(i);s.a},bd96:function(t,e,n){"use strict";var i=n("d6a4"),s=n.n(i);s.a},bf53:function(t,e,n){"use strict";var i=n("3c80"),s=n.n(i);s.a},c0b5:function(t,e,n){},c119:function(t,e,n){"use strict";var i=n("4b49"),s=n.n(i);s.a},c7c8:function(t,e,n){"use strict";var i=n("1be2"),s=n.n(i);s.a},c857:function(t,e,n){"use strict";var i=n("7d2d"),s=n.n(i);s.a},c9cb:function(t,e,n){"use strict";var i=n("b37e"),s=n.n(i);s.a},ca19:function(t,e,n){},ca3a:function(t,e,n){},cb8f:function(t,e,n){"use strict";var i=n("8e4d"),s=n.n(i);s.a},cca8:function(t,e,n){"use strict";var i=n("18b7"),s=n.n(i);s.a},ceb4:function(t,e,n){},d0c1:function(t,e,n){"use strict";var i=n("9df7"),s=n.n(i);s.a},d0e7:function(t,e,n){},d1c5:function(t,e,n){},d221:function(t,e,n){"use strict";var i=n("6b7f"),s=n.n(i);s.a},d31d:function(t,e,n){},d6a4:function(t,e,n){},d6c1:function(t,e,n){},d6fc:function(t,e,n){"use strict";var i=n("08ec"),s=n.n(i);s.a},d9c4:function(t,e,n){},daa8:function(t,e,n){"use strict";var i=n("e60b"),s=n.n(i);s.a},db92:function(t,e,n){},ddfd:function(t,e,n){"use strict";var i=n("4dc8"),s=n.n(i);s.a},de8a:function(t,e,n){},df0d:function(t,e,n){"use strict";var i=n("3ab9"),s=n.n(i);s.a},e30b:function(t,e,n){},e60b:function(t,e,n){},e697:function(t,e,n){},eb17:function(t,e,n){},ec72:function(t,e,n){},ed7b:function(t,e,n){},ee15:function(t,e,n){"use strict";var i=n("fd81"),s=n.n(i);s.a},f0cb:function(t,e,n){},f56d:function(t,e,n){"use strict";var i=n("75cd"),s=n.n(i);s.a},f5e3:function(t,e,n){},f8a7:function(t,e,n){"use strict";var i=n("db92"),s=n.n(i);s.a},f95f:function(t,e,n){"use strict";var i=n("5f12"),s=n.n(i);s.a},fa6a:function(t,e,n){"use strict";var i=n("778b"),s=n.n(i);s.a},fb1a:function(t,e,n){},fc0f:function(t,e,n){"use strict";var i=n("424a"),s=n.n(i);s.a},fd81:function(t,e,n){},ff6d:function(t,e,n){},fffc:function(t,e,n){}}); \ No newline at end of file +(function(t){function e(e){for(var i,o,r=e[0],l=e[1],u=e[2],d=0,p=[];d=0&&this.selected--}}},f=p,h=(n("4cb2"),n("2877")),m=Object(h["a"])(f,a,o,!1,null,null,null),g=m.exports,v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("license.register"),size:"medium"},on:{submit:t.submit}},[n("k-form",{attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.registration,callback:function(e){t.registration=e},expression:"registration"}})],1)},b=[],k={methods:{open:function(){this.$refs.dialog.open(),this.$emit("open")},close:function(){this.$refs.dialog.close(),this.$emit("close")},success:function(t){this.$refs.dialog.close(),t.route&&this.$router.push(t.route),t.message&&this.$store.dispatch("notification/success",t.message),t.event&&this.$events.$emit(t.event),this.$emit("success")}}},$={mixins:[k],data:function(){return{registration:{license:null,email:null}}},computed:{fields:function(){return{license:{label:this.$t("license.register.label"),type:"text",required:!0,counter:!1,placeholder:"K3-",help:this.$t("license.register.help")},email:{label:this.$t("email"),type:"email",required:!0,counter:!1}}}},methods:{submit:function(){var t=this;this.$api.system.register(this.registration).then(function(){t.$store.dispatch("system/register",t.registration.license),t.success({message:t.$t("license.register.success")})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},_=$,y=Object(h["a"])(_,v,b,!1,null,null,null),x=y.exports,w={name:"App",components:{"k-registration":x,"k-search":g},data:function(){return{offline:!1,dragging:!1,debug:d.debug}},computed:{inside:function(){return!(this.$route.meta.outside||!this.$store.state.user.current)}},created:function(){this.$events.$on("offline",this.isOffline),this.$events.$on("online",this.isOnline),this.$events.$on("keydown.cmd.shift.f",this.search),this.$events.$on("drop",this.drop)},destroyed:function(){this.$events.$off("offline",this.isOffline),this.$events.$off("online",this.isOnline),this.$events.$off("keydown.cmd.shift.f",this.search),this.$events.$off("drop",this.drop)},methods:{drop:function(){this.$store.dispatch("drag",null)},isOnline:function(){this.offline=!1},isOffline:function(){!1===this.$store.state.system.info.isLocal&&(this.offline=!0)},search:function(t){t.preventDefault(),this.$store.dispatch("search",!0)}}},O=w,S=(n("5c0b"),Object(h["a"])(O,i,s,!1,null,null,null)),C=S.exports,E={inserted:function(t){t.addEventListener("keyup",function(e){9===e.keyCode&&(t.dataset.tabbed=!0)}),t.addEventListener("blur",function(){delete t.dataset.tabbed})}},T={install:function(t){t.directive("tab",E)}},j={install:function(t){t.filter("t",function(t){return t})}};n("6762"),n("2fdb");function I(t){var e=String(t);return e.charAt(0).toLowerCase()+e.substr(1)}var L,q,N={install:function(t){t.prototype.$events=new t({data:function(){return{entered:null}},created:function(){window.addEventListener("online",this.online),window.addEventListener("offline",this.offline),window.addEventListener("dragenter",this.dragenter,!1),window.addEventListener("dragover",this.prevent,!1),window.addEventListener("dragexit",this.prevent,!1),window.addEventListener("dragleave",this.dragleave,!1),window.addEventListener("drop",this.drop,!1),window.addEventListener("keydown",this.keydown,!1),window.addEventListener("keyup",this.keyup,!1),document.addEventListener("click",this.click,!1)},destroyed:function(){window.removeEventListener("online",this.online),window.removeEventListener("offline",this.offline),window.removeEventListener("dragenter",this.dragenter,!1),window.removeEventListener("dragover",this.prevent,!1),window.removeEventListener("dragexit",this.prevent,!1),window.removeEventListener("dragleave",this.dragleave,!1),window.removeEventListener("drop",this.drop,!1),window.removeEventListener("keydown",this.keydown,!1),window.removeEventListener("keyup",this.keyup,!1),document.removeEventListener("click",this.click,!1)},methods:{click:function(t){this.$emit("click",t)},drop:function(t){this.prevent(t),this.$emit("drop",t)},dragenter:function(t){this.entered=t.target,this.prevent(t),this.$emit("dragenter",t)},dragleave:function(t){this.prevent(t),this.entered===t.target&&this.$emit("dragleave",t)},keydown:function(t){var e=["keydown"];(t.metaKey||t.ctrlKey)&&e.push("cmd"),!0===t.altKey&&e.push("alt"),!0===t.shiftKey&&e.push("shift");var n=I(t.key),i={escape:"esc",arrowUp:"up",arrowDown:"down",arrowLeft:"left",arrowRight:"right"};i[n]&&(n=i[n]),!1===["alt","control","shift","meta"].includes(n)&&e.push(n),this.$emit(e.join("."),t),this.$emit("keydown",t)},keyup:function(t){this.$emit("keyup",t)},online:function(t){this.$emit("online",t)},offline:function(t){this.$emit("offline",t)},prevent:function(t){t.stopPropagation(),t.preventDefault()}}})}},A=n("a026"),B=n("1dce"),P=n.n(B),D=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("div",{staticClass:"k-dialog",on:{click:t.cancel}},[n("div",{staticClass:"k-dialog-box",attrs:{"data-size":t.size},on:{click:function(t){t.stopPropagation()}}},[t.notification?n("div",{staticClass:"k-dialog-notification",attrs:{"data-theme":t.notification.type}},[n("p",[t._v(t._s(t.notification.message))]),n("k-button",{attrs:{icon:"cancel"},on:{click:function(e){t.notification=null}}})],1):t._e(),n("div",{staticClass:"k-dialog-body"},[t._t("default")],2),n("footer",{staticClass:"k-dialog-footer"},[t._t("footer",[n("k-button-group",[n("k-button",{staticClass:"k-dialog-button-cancel",attrs:{icon:"cancel"},on:{click:t.cancel}},[t._v("\n "+t._s(t.$t("cancel"))+"\n ")]),n("k-button",{staticClass:"k-dialog-button-submit",attrs:{icon:t.icon,theme:t.theme},on:{click:t.submit}},[t._v("\n "+t._s(t.button||t.$t("confirm"))+"\n ")])],1)])],2)])]):t._e()},M=[],R={props:{button:{type:String,default:"Ok"},icon:{type:String,default:"check"},size:String,theme:String,visible:Boolean},data:function(){return{notification:null,isOpen:this.visible,scrollTop:0}},created:function(){this.$events.$on("keydown.esc",this.close,!1)},destroyed:function(){this.$events.$off("keydown.esc",this.close,!1)},mounted:function(){!0===this.isOpen&&this.$emit("open")},methods:{storeScrollPosition:function(){var t=document.querySelector(".k-panel-view");t&&t.scrollTop?this.scrollTop=t.scrollTop:this.scrollTop=0},restoreScrollPosition:function(){var t=document.querySelector(".k-panel-view");t&&t.scrollTop&&(t.scrollTop=this.scrollTop)},open:function(){var t=this;this.storeScrollPosition(),this.$store.dispatch("dialog",!0),this.notification=null,this.isOpen=!0,this.$emit("open"),this.$events.$on("keydown.esc",this.close),this.$nextTick(function(){t.$el&&(t.focus(),document.body.addEventListener("focus",function(e){!1===t.$el.contains(e.target)&&t.focus()},!0))})},close:function(){this.notification=null,this.isOpen=!1,this.$emit("close"),this.$events.$off("keydown.esc",this.close),this.$store.dispatch("dialog",null),this.restoreScrollPosition()},cancel:function(){this.$emit("cancel"),this.close()},focus:function(){if(this.$el&&this.$el.querySelector){var t=this.$el.querySelector("[autofocus], [data-autofocus], input, textarea, select, .k-dialog-button-submit");if(t||(t=this.$el.querySelector(".k-dialog-button-cancel")),t)return void t.focus()}},error:function(t){this.notification={message:t,type:"error"}},submit:function(){this.$emit("submit")},success:function(t){this.notification={message:t,type:"success"}}}},z=R,F=(n("a5f3"),Object(h["a"])(z,D,M,!1,null,null,null)),U=F.exports,H=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.error?n("k-dialog",{ref:"dialog",staticClass:"k-error-dialog",attrs:{visible:!0},on:{close:t.exit,open:t.enter}},[n("k-text",[t._v(t._s(t.error.message))]),t.error.details&&Object.keys(t.error.details).length?n("dl",{staticClass:"k-error-details"},[t._l(t.error.details,function(e,i){return[n("dt",{key:"detail-label-"+i},[t._v(t._s(e.label))]),n("dd",{key:"detail-message-"+i},["object"===typeof e.message?[n("ul",t._l(e.message,function(e,i){return n("li",{key:i},[t._v("\n "+t._s(e)+"\n ")])}),0)]:[t._v("\n "+t._s(e.message)+"\n ")]],2)]})],2):t._e(),n("k-button-group",{attrs:{slot:"footer"},slot:"footer"},[n("k-button",{attrs:{icon:"check"},on:{click:t.close}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],1)],1):t._e()},K=[],V={mixins:[k],computed:{error:function(){var t=this.$store.state.notification;return"error"===t.type?t:null}},methods:{enter:function(){var t=this;this.$nextTick(function(){t.$el.querySelector(".k-dialog-footer .k-button").focus()})},exit:function(){this.$store.dispatch("notification/close")}}},Y=V,G=(n("7737"),Object(h["a"])(Y,H,K,!1,null,null,null)),W=G.exports,J=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("file.delete.confirm",{filename:t.filename}))}})],1)},X=[],Z={mixins:[k],data:function(){return{id:null,parent:null,filename:null}},methods:{open:function(t,e){var n=this;this.$api.files.get(t,e).then(function(e){n.id=e.id,n.filename=e.filename,n.parent=t,n.$refs.dialog.open()}).catch(function(t){n.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.files.delete(this.parent,this.filename).then(function(){t.$store.dispatch("form/remove","files/"+t.id),t.$store.dispatch("notification/success",":)"),t.$events.$emit("file.delete",t.id),t.$emit("success"),t.$refs.dialog.close()}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Q=Z,tt=Object(h["a"])(Q,J,X,!1,null,null,null),et=tt.exports,nt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit,input:function(e){t.file.name=t.sluggify(t.file.name)}},model:{value:t.file,callback:function(e){t.file=e},expression:"file"}})],1)},it=[],st=n("b747"),at=n.n(st),ot=function(t){return at()(t,{remove:/[$*_+~.,;:()'"`!?§$%\/=#@]/g}).toLowerCase()},rt={mixins:[k],data:function(){return{parent:null,file:{id:null,name:null,filename:null,extension:null}}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",required:!0,icon:"title",after:"."+this.file.extension,preselect:!0}}}},methods:{open:function(t,e){var n=this;this.$api.files.get(t,e,{select:["id","filename","name","extension"]}).then(function(e){n.file=e,n.parent=t,n.$refs.dialog.open()}).catch(function(t){n.$store.dispatch("notification/error",t)})},sluggify:function(t){return ot(t)},submit:function(){var t=this;this.$api.files.rename(this.parent,this.file.filename,this.file.name).then(function(e){t.$store.dispatch("form/revert","files/"+t.file.id),t.$store.dispatch("notification/success",":)"),t.$emit("success",e),t.$events.$emit("file.changeName",e),t.$refs.dialog.close()}).catch(function(e){t.$refs.dialog.error(e.message)})}}},lt=rt,ut=Object(h["a"])(lt,nt,it,!1,null,null,null),ct=ut.exports,dt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-files-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.files.length?n("k-list",t._l(t.files,function(e,i){return n("k-list-item",{key:e.filename,attrs:{text:e.filename,image:e.image,icon:e.icon},on:{click:function(e){return t.toggle(i)}}},[e.selected?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)}),1):n("k-empty",{attrs:{icon:"image"}},[t._v("\n No files to select\n ")])]],2)},pt=[],ft={data:function(){return{files:[],issue:null,options:{max:null,multiple:!0,api:null,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{selected:function(){return this.files.filter(function(t){return t.selected})},submit:function(){this.$emit("submit",this.selected()),this.$refs.dialog.close()},toggle:function(t){if(!1===this.multiple)this.files=this.files.map(function(t){return t.selected=!1,t}),this.files[t].selected=!0;else if(this.files[t].selected)this.files[t].selected=!1;else{if(this.options.max&&this.options.max<=this.selected().length)return;this.files[t].selected=!0}},open:function(t,e){this.files=t,this.options=e,this.$refs.dialog.open()}}},ht=ft,mt=(n("bf53"),Object(h["a"])(ht,dt,pt,!1,null,null,null)),gt=mt.exports,vt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("language.create"),notification:t.notification,theme:"positive",size:"medium"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})],1)},bt=[],kt={mixins:[k],data:function(){return{notification:null,language:{name:"",code:"",direction:"ltr"}}},computed:{fields:function(){return{name:{label:this.$t("language.name"),type:"text",required:!0,icon:"title"},code:{label:this.$t("language.code"),type:"text",required:!0,counter:!1,icon:"globe",width:"1/2"},direction:{label:this.$t("language.direction"),type:"select",required:!0,empty:!1,options:[{value:"ltr",text:this.$t("language.direction.ltr")},{value:"rtl",text:this.$t("language.direction.rtl")}],width:"1/2"},locale:{label:this.$t("language.locale"),type:"text",placeholder:"en_US"}}}},watch:{"language.name":function(t){this.onNameChanges(t)},"language.code":function(t){this.language.code=ot(t)}},methods:{onNameChanges:function(t){this.language.code=ot(t).substr(0,2)},open:function(){this.language={name:"",code:"",direction:"ltr"},this.$refs.dialog.open()},submit:function(){var t=this;this.$api.post("languages",{name:this.language.name,code:this.language.code,direction:this.language.direction,locale:this.language.locale}).then(function(){t.$store.dispatch("languages/load"),t.success({message:":)",event:"language.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},$t=kt,_t=Object(h["a"])($t,vt,bt,!1,null,null,null),yt=_t.exports,xt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("language.delete.confirm",{name:t.language.name}))}})],1)},wt=[],Ot={mixins:[k],data:function(){return{language:{name:null}}},methods:{open:function(t){var e=this;this.$api.get("languages/"+t).then(function(t){e.language=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.delete("languages/"+this.language.code).then(function(){t.$store.dispatch("languages/load"),t.success({message:t.$t("language.deleted"),event:"language.delete"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},St=Ot,Ct=Object(h["a"])(St,xt,wt,!1,null,null,null),Et=Ct.exports,Tt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("save"),notification:t.notification,size:"medium"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})],1)},jt=[],It={mixins:[yt],computed:{fields:function(){var t=yt.computed.fields.apply(this);return t.code.disabled=!0,t}},methods:{onNameChanges:function(){return!1},open:function(t){var e=this;this.$api.get("languages/"+t).then(function(t){e.language=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.patch("languages/"+this.language.code,{name:this.language.name,direction:this.language.direction,locale:this.language.locale}).then(function(){t.$store.dispatch("languages/load"),t.success({message:t.$t("language.updated"),event:"language.update"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Lt=It,qt=Object(h["a"])(Lt,Tt,jt,!1,null,null,null),Nt=qt.exports,At=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("page.draft.create"),notification:t.notification,size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},Bt=[],Pt={mixins:[k],data:function(){return{notification:null,parent:null,section:null,templates:[],page:{title:"",slug:"",template:null}}},computed:{fields:function(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title"},slug:{label:this.$t("slug"),type:"text",required:!0,counter:!1,icon:"url"},template:{name:"template",label:this.$t("template"),type:"select",disabled:1===this.templates.length,required:!0,icon:"code",empty:!1,options:this.templates}}}},watch:{"page.title":function(t){this.page.slug=ot(t)}},methods:{open:function(t,e,n){var i=this;this.parent=t,this.section=n,this.$api.get(e,{section:n}).then(function(t){i.templates=t.map(function(t){return{value:t.name,text:t.title}}),i.templates[0]&&(i.page.template=i.templates[0].value),i.$refs.dialog.open()}).catch(function(t){i.$store.dispatch("notification/error",t)})},submit:function(){var t=this;if(0===this.page.title.length)return this.$refs.dialog.error("Please enter a title"),!1;var e={template:this.page.template,slug:this.page.slug,content:{title:this.page.title}};this.$api.post(this.parent+"/children",e).then(function(e){t.success({route:t.$api.pages.link(e.id),message:":)",event:"page.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Dt=Pt,Mt=Object(h["a"])(Dt,At,Bt,!1,null,null,null),Rt=Mt.exports,zt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),size:t.hasSubpages?"medium":"small",theme:"negative",icon:"trash"},on:{submit:t.submit}},[t.page.hasChildren||t.page.hasDrafts?[n("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.page.title}))}}),n("div",{staticClass:"k-page-remove-warning"},[n("k-box",{attrs:{theme:"negative"},domProps:{innerHTML:t._s(t.$t("page.delete.confirm.subpages"))}})],1),t.hasSubpages?n("k-form",{attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}}):t._e()]:[n("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.page.title}))},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit(e)}}})]],2)},Ft=[],Ut=(n("a481"),{mixins:[k],data:function(){return{page:{title:null,hasChildren:!1,hasDrafts:!1},model:{check:null}}},computed:{hasSubpages:function(){return this.page.hasChildren||this.page.hasDrafts},fields:function(){return{check:{label:this.$t("page.delete.confirm.title"),type:"text",counter:!1}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:"id, title, hasChildren, hasDrafts, parent"}).then(function(t){e.page=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.hasSubpages&&this.model.check!==this.page.title?this.$refs.dialog.error(this.$t("error.page.delete.confirm")):this.$api.pages.delete(this.page.id,{force:!0}).then(function(){t.$store.dispatch("form/remove","pages/"+t.page.id);var e={message:":)",event:"page.delete"};t.$route.params.path&&t.page.id===t.$route.params.path.replace(/\+/g,"/")&&(t.page.parent?e.route="/pages/"+t.page.parent.id:e.route="/pages"),t.success(e)}).catch(function(e){t.$refs.dialog.error(e.message)})}}}),Ht=Ut,Kt=(n("12fb"),Object(h["a"])(Ht,zt,Ft,!1,null,null,null)),Vt=Kt.exports,Yt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},Gt=[],Wt={mixins:[k],data:function(){return{page:{id:null,title:null}}},computed:{fields:function(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title",preselect:!0}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:["id","title"]}).then(function(t){e.page=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;0!==this.page.title.length?this.$api.pages.title(this.page.id,this.page.title).then(function(){t.success({message:":)",event:"page.changeTitle"})}).catch(function(e){t.$refs.dialog.error(e.message)}):this.$refs.dialog.error(this.$t("error.page.changeTitle.empty"))}}},Jt=Wt,Xt=Object(h["a"])(Jt,Yt,Gt,!1,null,null,null),Zt=Xt.exports,Qt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:t.submit}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.changeStatus},model:{value:t.form,callback:function(e){t.form=e},expression:"form"}})],1)},te=[],ee=(n("ac6a"),n("a4bb")),ne=n.n(ee),ie={mixins:[k],data:function(){return{page:{id:null},isBlocked:!1,isIncomplete:!1,form:{status:null,position:null},states:{}}},computed:{fields:function(){var t=this,e={status:{name:"status",label:this.$t("page.changeStatus.select"),type:"radio",required:!0,options:ne()(this.states).map(function(e){return{value:e,text:t.states[e].label,info:t.states[e].text}})}};return"listed"===this.form.status&&"default"===this.page.blueprint.num&&(e.position={name:"position",label:this.$t("page.changeStatus.position"),type:"select",empty:!1,options:this.sortingOptions()}),e}},methods:{sortingOptions:function(){var t=this,e=[],n=0;return this.page.siblings.forEach(function(i){if(i.id===t.page.id||i.num<1)return!1;n++,e.push({value:n,text:n}),e.push({value:i.id,text:i.title,disabled:!0})}),e.push({value:n+1,text:n+1}),e},open:function(t){var e=this;this.$api.pages.get(t,{select:["id","status","num","errors","siblings","blueprint"]}).then(function(t){return!1===t.blueprint.options.changeStatus?e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.permission")}):"draft"===t.status&&ne()(t.errors).length>0?e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.incomplete"),details:t.errors}):(e.states=t.blueprint.status,e.page=t,e.form.status=t.status,e.form.position=t.num||t.siblings.length+1,void e.$refs.dialog.open())}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){this.$refs.form.submit()},changeStatus:function(){var t=this;this.$api.pages.status(this.page.id,this.form.status,this.form.position||1).then(function(){t.success({message:":)",event:"page.changeStatus"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},se=ie,ae=Object(h["a"])(se,Qt,te,!1,null,null,null),oe=ae.exports,re=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},le=[],ue={mixins:[k],data:function(){return{blueprints:[],page:{id:null,template:null}}},computed:{fields:function(){return{template:{label:this.$t("template"),type:"select",required:!0,empty:!1,options:this.page.blueprints,icon:"template"}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:["id","template","blueprints"]}).then(function(t){if(t.blueprints.length<=1)return e.$store.dispatch("notification/error",{message:e.$t("error.page.changeTemplate.invalid",{slug:t.id})});e.page=t,e.page.blueprints=e.page.blueprints.map(function(t){return{text:t.title,value:t.name}}),e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$events.$emit("keydown.cmd.s"),this.$api.pages.template(this.page.id,this.page.template).then(function(){t.success({message:":)",event:"page.changeTemplate"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},ce=ue,de=Object(h["a"])(ce,re,le,!1,null,null,null),pe=de.exports,fe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",on:{submit:t.submit}},[n("k-text-field",t._b({attrs:{value:t.slug},on:{input:function(e){return t.sluggify(e)}}},"k-text-field",t.field,!1),[n("k-button",{attrs:{slot:"options",icon:"wand","data-options":""},on:{click:function(e){return t.sluggify(t.page.title)}},slot:"options"},[t._v("\n "+t._s(t.$t("page.changeSlug.fromTitle"))+"\n ")])],1)],1)],1)},he=[],me={mixins:[k],data:function(){return{slug:null,url:null,page:{id:null,parent:null,title:null}}},computed:{field:function(){return{name:"slug",label:this.$t("slug"),type:"text",required:!0,icon:"url",help:"/"+this.url,counter:!1,preselect:!0}}},methods:{sluggify:function(t){this.slug=ot(t),this.page.parents?this.url=this.page.parents.map(function(t){return t.slug}).concat([this.slug]).join("/"):this.url=this.slug},open:function(t){var e=this;this.$api.pages.get(t,{view:"panel"}).then(function(t){e.page=t,e.sluggify(e.page.slug),e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;if(this.slug===this.page.slug)return this.$refs.dialog.close(),void this.$store.dispatch("notification/success",":)");0!==this.slug.length?this.$api.pages.slug(this.page.id,this.slug).then(function(e){t.$store.dispatch("form/remove","pages/"+t.page.id);var n={message:":)",event:"page.changeSlug"};!t.$route.params.path||t.page.id!==t.$route.params.path.replace(/\+/g,"/")||t.$store.state.languages.current&&!0!==t.$store.state.languages.current.default||(n.route=t.$api.pages.link(e.id),delete n.event),t.success(n)}).catch(function(e){t.$refs.dialog.error(e.message)}):this.$refs.dialog.error(this.$t("error.page.slug.invalid"))}}},ge=me,ve=Object(h["a"])(ge,fe,he,!1,null,null,null),be=ve.exports,ke=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-pages-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.model?n("header",{staticClass:"k-pages-dialog-navbar"},[n("k-button",{attrs:{disabled:!t.model.id,tooltip:t.$t("back"),icon:"angle-left"},on:{click:t.back}}),n("k-headline",[t._v(t._s(t.model.title))])],1):t._e(),t.pages.length?n("k-list",t._l(t.pages,function(e){return n("k-list-item",{key:e.id,attrs:{text:e.text,info:e.info,image:e.image,icon:e.icon},on:{click:function(n){return t.toggle(e)}}},[n("template",{slot:"options"},[t.isSelected(e)?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"}),t.model?n("k-button",{attrs:{disabled:!e.hasChildren,tooltip:t.$t("open"),icon:"angle-right"},on:{click:function(n){return n.stopPropagation(),t.go(e)}}}):t._e()],1)],2)}),1):n("k-empty",{attrs:{icon:"page"}},[t._v("\n No pages to select\n ")])]],2)},$e=[],_e={data:function(){return{model:{title:null,parent:null},pages:[],issue:null,options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{fetch:function(){var t=this;return this.$api.get(this.options.endpoint,{parent:this.options.parent}).then(function(e){t.model=e.model,t.pages=e.pages}).catch(function(e){t.pages=[],t.issue=e.message})},back:function(){this.options.parent=this.model.parent?this.model.parent.id:null,this.fetch()},submit:function(){this.$emit("submit",this.options.selected),this.$refs.dialog.close()},isSelected:function(t){return this.options.selected.map(function(t){return t.id}).includes(t.id)},toggle:function(t){if(!1===this.options.multiple&&(this.options.selected=[]),!1===this.isSelected(t)){if(this.options.max&&this.options.max<=this.options.selected.length)return;this.options.selected.push(t)}else this.options.selected=this.options.selected.filter(function(e){return e.id!==t.id})},open:function(t){var e=this;this.options=t,this.fetch().then(function(){e.$refs.dialog.open()})},go:function(t){this.options.parent=t.id,this.fetch()}}},ye=_e,xe=(n("ac27"),Object(h["a"])(ye,ke,$e,!1,null,null,null)),we=xe.exports,Oe={extends:Zt,methods:{open:function(){var t=this;this.$api.site.get({select:["title"]}).then(function(e){t.page=e,t.$refs.dialog.open()}).catch(function(e){t.$store.dispatch("notification/error",e)})},submit:function(){var t=this;this.$api.site.title(this.page.title).then(function(){t.$store.dispatch("system/title",t.page.title),t.success({message:":)",event:"site.changeTitle"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Se=Oe,Ce=Object(h["a"])(Se,L,q,!1,null,null,null),Ee=Ce.exports,Te=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("create"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()},close:t.reset}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.create},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},je=[],Ie={mixins:[k],data:function(){return{user:this.emptyUser(),languages:[],roles:[]}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user"},email:{label:this.$t("email"),type:"email",icon:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",icon:"key"},language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1},role:{label:this.$t("role"),type:1===this.roles.length?"hidden":"radio",required:!0,options:this.roles}}}},methods:{create:function(){var t=this;this.$api.users.create(this.user).then(function(){t.success({message:":)",event:"user.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})},emptyUser:function(){return{name:"",email:"",password:"",language:"en",role:"admin"}},open:function(){var t=this;this.$api.roles.options().then(function(e){t.roles=e,t.$api.translations.options().then(function(e){t.languages=e,t.$refs.dialog.open()}).catch(function(e){t.$store.dispatch("notification/error",e)})}).catch(function(e){t.$store.dispatch("notification/error",e)})},reset:function(){this.user=this.emptyUser()}}},Le=Ie,qe=Object(h["a"])(Le,Te,je,!1,null,null,null),Ne=qe.exports,Ae=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},Be=[],Pe={mixins:[k],data:function(){return{user:{id:null,email:null}}},computed:{fields:function(){return{email:{label:this.$t("email"),preselect:!0,required:!0,type:"email"}}}},methods:{open:function(t){var e=this;this.$api.users.get(t,{select:["id","email"]}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeEmail(this.user.id,this.user.email).then(function(e){t.$store.dispatch("form/revert","users/"+t.user.id);var n={message:":)",event:"user.changeEmail"};"User"===t.$route.name&&(n.route=t.$api.users.link(e.id)),t.success(n)}).catch(function(e){t.$refs.dialog.error(e.message)})}}},De=Pe,Me=Object(h["a"])(De,Ae,Be,!1,null,null,null),Re=Me.exports,ze=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),theme:"positive",icon:"check"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},Fe=[],Ue={mixins:[k],data:function(){return{user:{language:"en"},languages:[]}},computed:{fields:function(){return{language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1}}}},created:function(){var t=this;this.$api.translations.options().then(function(e){t.languages=e})},methods:{open:function(t){var e=this;this.$api.users.get(t,{view:"compact"}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeLanguage(this.user.id,this.user.language).then(function(e){t.user=e,t.$store.state.user.current.id===t.user.id&&t.$store.dispatch("user/language",t.user.language),t.success({message:":)",event:"user.changeLanguage"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},He=Ue,Ke=Object(h["a"])(He,ze,Fe,!1,null,null,null),Ve=Ke.exports,Ye=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),theme:"positive",icon:"check"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})],1)},Ge=[],We={mixins:[k],data:function(){return{user:null,values:{password:null,passwordConfirmation:null}}},computed:{fields:function(){return{password:{label:this.$t("user.changePassword.new"),type:"password",icon:"key"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password"}}}},methods:{open:function(t){var e=this;this.$api.users.get(t).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;return this.values.password.length<8?(this.$refs.dialog.error(this.$t("error.user.password.invalid")),!1):this.values.password!==this.values.passwordConfirmation?(this.$refs.dialog.error(this.$t("error.user.password.notSame")),!1):void this.$api.users.changePassword(this.user.id,this.values.password).then(function(){t.success({message:":)",event:"user.changePassword"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Je=We,Xe=Object(h["a"])(Je,Ye,Ge,!1,null,null,null),Ze=Xe.exports,Qe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("user.delete.confirm",{email:t.user.email}))}})],1)},tn=[],en={mixins:[k],data:function(){return{user:{email:null}}},methods:{open:function(t){var e=this;this.$api.users.get(t).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.delete(this.user.id).then(function(){t.$store.dispatch("form/remove","users/"+t.user.id),t.success({message:":)",event:"user.delete"}),"User"===t.$route.name&&t.$router.push("/users")}).catch(function(e){t.$refs.dialog.error(e.message)})}}},nn=en,sn=Object(h["a"])(nn,Qe,tn,!1,null,null,null),an=sn.exports,on=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},rn=[],ln={mixins:[k],data:function(){return{user:{id:null,name:null}}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user",preselect:!0}}}},methods:{open:function(t){var e=this;this.$api.users.get(t,{select:["id","name"]}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeName(this.user.id,this.user.name).then(function(){t.success({message:":)",event:"user.changeName"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},un=ln,cn=Object(h["a"])(un,on,rn,!1,null,null,null),dn=cn.exports,pn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("user.changeRole"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},fn=[],hn={mixins:[k],data:function(){return{roles:[],user:{id:null,role:"visitor"}}},computed:{fields:function(){return{role:{label:this.$t("user.changeRole.select"),type:"radio",required:!0,options:this.roles}}}},methods:{open:function(t){var e=this;this.id=t,this.$api.users.get(t).then(function(t){e.$api.roles.options().then(function(n){e.roles=n,e.user=t,e.user.role=e.user.role.name,e.$refs.dialog.open()})}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeRole(this.user.id,this.user.role).then(function(){t.success({message:":)",event:"user.changeRole"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},mn=hn,gn=Object(h["a"])(mn,pn,fn,!1,null,null,null),vn=gn.exports,bn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-users-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.users.length?n("k-list",t._l(t.users,function(e,i){return n("k-list-item",{key:e.email,attrs:{text:e.username,image:e.avatar?{url:e.avatar.url,back:"pattern",cover:!0}:null,icon:{type:"user",back:"black"}},on:{click:function(e){return t.toggle(i)}}},[e.selected?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)}),1):n("k-empty",{attrs:{icon:"users"}},[t._v("\n No users to select\n ")])]],2)},kn=[],$n={data:function(){return{users:[],issue:null,options:{max:null,multiple:!0,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{fetch:function(){var t=this;return this.users=[],this.$api.get("users").then(function(e){var n=t.options.selected||[];t.users=e.data.map(function(t){return t.selected=-1!==n.indexOf(t.email),t})}).catch(function(e){t.users=[],t.issue=e.message})},selected:function(){return this.users.filter(function(t){return t.selected})},submit:function(){this.$emit("submit",this.selected()),this.$refs.dialog.close()},toggle:function(t){if(!1===this.options.multiple&&(this.users=this.users.map(function(t){return t.selected=!1,t})),this.users[t].selected)this.users[t].selected=!1;else{if(this.options.max&&this.options.max<=this.selected().length)return;this.users[t].selected=!0}},open:function(t){var e=this;this.options=t,this.fetch().then(function(){e.$refs.dialog.open()})}}},_n=$n,yn=(n("7568"),Object(h["a"])(_n,bn,kn,!1,null,null,null)),xn=yn.exports,wn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dropdown",{staticClass:"k-autocomplete"},[t._t("default"),n("k-dropdown-content",t._g({ref:"dropdown",attrs:{autofocus:!0}},t.$listeners),t._l(t.matches,function(e,i){return n("k-dropdown-item",t._b({key:i,on:{click:function(n){return t.onSelect(e)},keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"tab",9,n.key,"Tab")?null:(n.preventDefault(),t.onSelect(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.onSelect(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.close(e))}]}},"k-dropdown-item",e,!1),[t._v("\n "+t._s(e.text)+"\n ")])}),1),t._v("\n "+t._s(t.query)+"\n")],2)},On=[];n("4917"),n("3b2b");RegExp.escape=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};var Sn,Cn,En,Tn,jn,In,Ln={props:{limit:10,skip:{type:Array,default:function(){return[]}},options:Array,query:String},data:function(){return{matches:[],selected:{text:null}}},methods:{close:function(){this.$refs.dropdown.close()},onSelect:function(t){this.$refs.dropdown.close(),this.$emit("select",t)},search:function(t){var e=this;if(!(t.length<1)){var n=new RegExp(RegExp.escape(t),"ig");this.matches=this.options.filter(function(t){return!!t.text&&(-1===e.skip.indexOf(t.value)&&null!==t.text.match(n))}).slice(0,this.limit),this.$emit("search",t,this.matches),this.$refs.dropdown.open()}}}},qn=Ln,Nn=Object(h["a"])(qn,wn,On,!1,null,null,null),An=Nn.exports,Bn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-calendar-input"},[n("nav",[n("k-button",{attrs:{icon:"angle-left"},on:{click:t.prev}}),n("span",{staticClass:"k-calendar-selects"},[n("k-select-input",{attrs:{options:t.months,disabled:t.disabled,empty:!1,required:!0},model:{value:t.month,callback:function(e){t.month=t._n(e)},expression:"month"}}),n("k-select-input",{attrs:{options:t.years,disabled:t.disabled,empty:!1,required:!0},model:{value:t.year,callback:function(e){t.year=t._n(e)},expression:"year"}})],1),n("k-button",{attrs:{icon:"angle-right"},on:{click:t.next}})],1),n("table",{staticClass:"k-calendar-table"},[n("thead",[n("tr",t._l(t.weekdays,function(e){return n("th",{key:"weekday_"+e},[t._v(t._s(e))])}),0)]),n("tbody",t._l(t.numberOfWeeks,function(e){return n("tr",{key:"week_"+e},t._l(t.days(e),function(e,i){return n("td",{key:"day_"+i,staticClass:"k-calendar-day",attrs:{"aria-current":!!t.isToday(e)&&"date","aria-selected":!!t.isCurrent(e)&&"date"}},[e?n("k-button",{on:{click:function(n){return t.select(e)}}},[t._v(t._s(e))]):t._e()],1)}),0)}),0),n("tfoot",[n("tr",[n("td",{staticClass:"k-calendar-today",attrs:{colspan:"7"}},[n("k-button",{on:{click:function(e){return t.go("today")}}},[t._v(t._s(t.$t("today")))])],1)])])])])},Pn=[],Dn=n("5a0c"),Mn=n.n(Dn),Rn=function(t,e){t=String(t);var n="";e=(e||2)-t.length;while(n.length0?t:7},weekdays:function(){return[this.$t("days.mon"),this.$t("days.tue"),this.$t("days.wed"),this.$t("days.thu"),this.$t("days.fri"),this.$t("days.sat"),this.$t("days.sun")]},monthnames:function(){return[this.$t("months.january"),this.$t("months.february"),this.$t("months.march"),this.$t("months.april"),this.$t("months.may"),this.$t("months.june"),this.$t("months.july"),this.$t("months.august"),this.$t("months.september"),this.$t("months.october"),this.$t("months.november"),this.$t("months.december")]},months:function(){var t=[];return this.monthnames.forEach(function(e,n){t.push({value:n,text:e})}),t},years:function(){for(var t=[],e=this.year-10;e<=this.year+10;e++)t.push({value:e,text:Rn(e)});return t}},watch:{value:function(t){var e=Mn()(t);this.day=e.date(),this.month=e.month(),this.year=e.year(),this.current=e}},methods:{days:function(t){for(var e=[],n=7*(t-1)+1,i=n;ithis.numberOfDays?e.push(""):e.push(s)}return e},next:function(){var t=this.date.clone().add(1,"month");this.set(t)},isToday:function(t){return this.month===this.today.month()&&this.year===this.today.year()&&t===this.today.date()},isCurrent:function(t){return this.month===this.current.month()&&this.year===this.current.year()&&t===this.current.date()},prev:function(){var t=this.date.clone().subtract(1,"month");this.set(t)},go:function(t,e){"today"===t&&(t=this.today.year(),e=this.today.month()),this.year=t,this.month=e},set:function(t){this.day=t.date(),this.month=t.month(),this.year=t.year()},select:function(t){t&&(this.day=t);var e=Mn()(new Date(this.year,this.month,this.day,this.current.hour(),this.current.minute()));this.$emit("input",e.toISOString())}}},Fn=zn,Un=(n("ee15"),Object(h["a"])(Fn,Bn,Pn,!1,null,null,null)),Hn=Un.exports,Kn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-counter",attrs:{"data-invalid":!t.valid}},[n("span",[t._v(t._s(t.count))]),t.min&&t.max?n("span",{staticClass:"k-counter-rules"},[t._v("("+t._s(t.min)+"–"+t._s(t.max)+")")]):t.min?n("span",{staticClass:"k-counter-rules"},[t._v("≥ "+t._s(t.min))]):t.max?n("span",{staticClass:"k-counter-rules"},[t._v("≤ "+t._s(t.max))]):t._e()])},Vn=[],Yn=(n("c5f6"),{props:{count:Number,min:Number,max:Number,required:{type:Boolean,default:!1}},computed:{valid:function(){return!1===this.required&&0===this.count||(!0!==this.required||0!==this.count)&&(!(this.min&&this.countthis.max))}}}),Gn=Yn,Wn=(n("fc0f"),Object(h["a"])(Gn,Kn,Vn,!1,null,null,null)),Jn=Wn.exports,Xn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{ref:"form",staticClass:"k-form",attrs:{method:"POST",autocomplete:"off",novalidate:""},on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},[t._t("header"),t._t("default",[n("k-fieldset",t._g({ref:"fields",attrs:{disabled:t.disabled,fields:t.fields,novalidate:t.novalidate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t.listeners))]),t._t("footer"),n("input",{ref:"submitter",staticClass:"k-form-submitter",attrs:{type:"submit"}})],2)},Zn=[],Qn={props:{disabled:Boolean,config:Object,fields:{type:[Array,Object],default:function(){return{}}},novalidate:{type:Boolean,default:!1},value:{type:Object,default:function(){return{}}}},data:function(){return{errors:{},listeners:Object(l["a"])({},this.$listeners,{submit:this.onSubmit})}},methods:{focus:function(t){this.$refs.fields&&this.$refs.fields.focus&&this.$refs.fields.focus(t)},onSubmit:function(){this.$emit("submit",this.value)},submit:function(){this.$refs.submitter.click()}}},ti=Qn,ei=(n("5d33"),Object(h["a"])(ti,Xn,Zn,!1,null,null,null)),ni=ei.exports,ii=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hasChanges?n("nav",{staticClass:"k-form-buttons"},[n("k-view",[n("k-button",{staticClass:"k-form-button",attrs:{icon:"undo"},on:{click:t.reset}},[t._v("\n "+t._s(t.$t("revert"))+"\n ")]),n("k-button",{staticClass:"k-form-button",attrs:{icon:"check"},on:{click:t.save}},[t._v("\n "+t._s(t.$t("save"))+"\n ")])],1)],1):t._e()},si=[],ai={computed:{hasChanges:function(){return this.$store.getters["form/hasChanges"](this.id)},id:function(){return this.$store.state.form.current}},created:function(){this.$events.$on("keydown.cmd.s",this.save)},destroyed:function(){this.$events.$off("keydown.cmd.s",this.save)},methods:{reset:function(){this.$store.dispatch("form/revert",this.id)},save:function(t){var e=this;return!!t&&(t.preventDefault&&t.preventDefault(),!1===this.hasChanges||void this.$store.dispatch("form/save",this.id).then(function(){e.$events.$emit("model.update"),e.$store.dispatch("notification/success",":)")}).catch(function(t){403!==t.code&&(t.details?e.$store.dispatch("notification/error",{message:e.$t("error.form.incomplete"),details:t.details}):e.$store.dispatch("notification/error",{message:e.$t("error.form.notSaved"),details:[{label:"Exception: "+t.exception,message:t.message}]}))}))}}},oi=ai,ri=(n("18dd"),Object(h["a"])(oi,ii,si,!1,null,null,null)),li=ri.exports,ui=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"k-field k-field-name-"+t.name,attrs:{"data-disabled":t.disabled},on:{focusin:function(e){return t.$emit("focus",e)},focusout:function(e){return t.$emit("blur",e)}}},[t._t("header",[n("header",{staticClass:"k-field-header"},[t._t("label",[n("label",{staticClass:"k-field-label",attrs:{for:t.input}},[t._v(t._s(t.labelText)+" "),t.required?n("abbr",{attrs:{title:"This field is required"}},[t._v("*")]):t._e()])]),t._t("options"),t._t("counter",[t.counter?n("k-counter",t._b({staticClass:"k-field-counter",attrs:{required:t.required}},"k-counter",t.counter,!1)):t._e()])],2)]),t._t("default"),t._t("footer",[t.help||t.$slots.help?n("footer",{staticClass:"k-field-footer"},[t._t("help",[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()])],2):t._e()])],2)},ci=[],di={inheritAttrs:!1,props:{counter:[Boolean,Object],disabled:Boolean,endpoints:Object,help:String,input:[String,Number],label:String,name:[String,Number],required:Boolean,type:String},computed:{labelText:function(){return this.label||" "}}},pi=di,fi=(n("a134"),Object(h["a"])(pi,ui,ci,!1,null,null,null)),hi=fi.exports,mi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("fieldset",{staticClass:"k-fieldset"},[n("k-grid",t._l(t.fields,function(e,i){return"hidden"!==e.type&&t.meetsCondition(e)?n("k-column",{key:e.signature,attrs:{width:e.width}},[n("k-error-boundary",[t.hasFieldType(e.type)?n("k-"+e.type+"-field",t._b({ref:i,refInFor:!0,tag:"component",attrs:{name:i,novalidate:t.novalidate,disabled:t.disabled||e.disabled},on:{input:function(n){return t.$emit("input",t.value,e,i)},focus:function(n){return t.$emit("focus",n,e,i)},invalid:function(n,s){return t.onInvalid(n,s,e,i)},submit:function(n){return t.$emit("submit",n,e,i)}},model:{value:t.value[i],callback:function(e){t.$set(t.value,i,e)},expression:"value[fieldName]"}},"component",e,!1)):n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[t._v("\n The field type "),n("strong",[t._v('"'+t._s(i)+'"')]),t._v(" does not exist\n ")])],1)],1)],1):t._e()}),1)],1)},gi=[],vi={props:{config:Object,disabled:Boolean,fields:{type:[Array,Object],default:function(){return[]}},novalidate:{type:Boolean,default:!1},value:{type:Object,default:function(){return{}}}},data:function(){return{errors:{}}},methods:{focus:function(t){if(t)this.hasField(t)&&"function"===typeof this.$refs[t][0].focus&&this.$refs[t][0].focus();else{var e=ne()(this.$refs)[0];this.focus(e)}},hasFieldType:function(t){return A["a"].options.components["k-"+t+"-field"]},hasField:function(t){return this.$refs[t]&&this.$refs[t][0]},meetsCondition:function(t){var e=this;if(!t.when)return!0;var n=!0;return ne()(t.when).forEach(function(i){var s=e.value[i.toLowerCase()],a=t.when[i];s!==a&&(n=!1)}),n},onInvalid:function(t,e,n,i){this.errors[i]=e,this.$emit("invalid",this.errors)},hasErrors:function(){return ne()(this.errors).length}}},bi=vi,ki=(n("862b"),Object(h["a"])(bi,mi,gi,!1,null,null,null)),$i=ki.exports,_i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-input",attrs:{"data-disabled":t.disabled,"data-invalid":!t.novalidate&&t.isInvalid,"data-theme":t.theme,"data-type":t.type}},[t.$slots.before||t.before?n("span",{staticClass:"k-input-before",on:{click:t.focus}},[t._t("before",[t._v(t._s(t.before))])],2):t._e(),n("span",{staticClass:"k-input-element",on:{click:function(e){return e.stopPropagation(),t.focus(e)}}},[t._t("default",[n("k-"+t.type+"-input",t._g(t._b({ref:"input",tag:"component",attrs:{value:t.value}},"component",t.inputProps,!1),t.listeners))])],2),t.$slots.after||t.after?n("span",{staticClass:"k-input-after",on:{click:t.focus}},[t._t("after",[t._v(t._s(t.after))])],2):t._e(),t.$slots.icon||t.icon?n("span",{staticClass:"k-input-icon",on:{click:t.focus}},[t._t("icon",[n("k-icon",{attrs:{type:t.icon}})])],2):t._e()])},yi=[],xi={inheritAttrs:!1,props:{after:String,before:String,disabled:Boolean,type:String,icon:[String,Boolean],invalid:Boolean,theme:String,novalidate:{type:Boolean,default:!1},value:{type:[String,Boolean,Number,Object,Array],default:null}},data:function(){var t=this;return{isInvalid:this.invalid,listeners:Object(l["a"])({},this.$listeners,{invalid:function(e,n){t.isInvalid=e,t.$emit("invalid",e,n)}}),inputProps:Object(l["a"])({},this.$props,this.$attrs)}},methods:{blur:function(t){t.relatedTarget&&!1===this.$el.contains(t.relatedTarget)&&this.$refs.input.blur&&this.$refs.input.blur()},focus:function(t){if(t&&t.target&&"INPUT"===t.target.tagName)t.target.focus();else if(this.$refs.input&&this.$refs.input.focus)this.$refs.input.focus();else{var e=this.$el.querySelector("input, select, textarea");e&&e.focus()}}}},wi=xi,Oi=(n("c7c8"),Object(h["a"])(wi,_i,yi,!1,null,null,null)),Si=Oi.exports,Ci=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-upload"},[n("input",{ref:"input",attrs:{accept:t.options.accept,multiple:t.options.multiple,"aria-hidden":"true",type:"file",tabindex:"-1"},on:{change:t.select}}),n("k-dialog",{ref:"dialog",attrs:{size:"medium"}},[t.errors.length>0?[n("k-headline",[t._v(t._s(t.$t("upload.errors")))]),n("ul",{staticClass:"k-upload-error-list"},t._l(t.errors,function(e,i){return n("li",{key:"error-"+i},[n("p",{staticClass:"k-upload-error-filename"},[t._v(t._s(e.file.name))]),n("p",{staticClass:"k-upload-error-message"},[t._v(t._s(e.message))])])}),0)]:[n("k-headline",[t._v(t._s(t.$t("upload.progress")))]),n("ul",{staticClass:"k-upload-list"},t._l(t.files,function(e,i){return n("li",{key:"file-"+i},[n("k-progress",{ref:e.name,refInFor:!0}),n("p",{staticClass:"k-upload-list-filename"},[t._v(t._s(e.name))]),n("p",[t._v(t._s(t.errors[e.name]))])],1)}),0)],n("template",{slot:"footer"},[t.errors.length>0?[n("k-button-group",[n("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.$refs.dialog.close()}}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],1)]:t._e()],2)],2)],1)},Ei=[],Ti=n("db0c"),ji=n.n(Ti),Ii=n("75fc"),Li=n("5176"),qi=n.n(Li),Ni=function(t,e){var n={url:"/",field:"file",method:"POST",accept:"text",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},i=qi()(n,e),s=new FormData;s.append(i.field,t),i.attributes&&ne()(i.attributes).forEach(function(t){s.append(t,i.attributes[t])});var a=new XMLHttpRequest,o=function(e){if(e.lengthComputable&&i.progress){var n=Math.max(0,Math.min(100,e.loaded/e.total*100));i.progress(a,t,Math.ceil(n))}};a.addEventListener("loadstart",o),a.addEventListener("progress",o),a.addEventListener("load",function(e){var n=null;try{n=JSON.parse(e.target.response)}catch(s){n={status:"error",message:"The file could not be uploaded"}}n.status&&"error"===n.status?i.error(a,t,n):(i.success(a,t,n),i.progress(a,t,100))}),a.addEventListener("error",function(e){var n=JSON.parse(e.target.response);i.error(a,t,n),i.progress(a,t,100)}),a.open("POST",i.url,!0),i.headers&&ne()(i.headers).forEach(function(t){var e=i.headers[t];a.setRequestHeader(t,e)}),a.send(s)},Ai={props:{url:{type:String},accept:{type:String,default:"*"},attributes:{type:Object},multiple:{type:Boolean,default:!0},max:{type:Number}},data:function(){return{options:this.$props,completed:{},errors:[],files:[],total:0}},methods:{open:function(t){var e=this;this.params(t),setTimeout(function(){e.$refs.input.click()},1)},params:function(t){this.options=qi()({},this.$props,t)},select:function(t){this.upload(t.target.files)},drop:function(t,e){this.params(e),this.upload(t)},upload:function(t){var e=this;this.$refs.dialog.open(),this.files=Object(Ii["a"])(t),this.completed={},this.errors=[],this.hasErrors=!1,this.options.max&&(this.files=this.files.slice(0,this.options.max)),this.total=this.files.length,this.files.forEach(function(t){Ni(t,{url:e.options.url,attributes:e.options.attributes,headers:{"X-CSRF":window.panel.csrf},progress:function(t,n,i){e.$refs[n.name]&&e.$refs[n.name][0]&&e.$refs[n.name][0].set(i)},success:function(t,n,i){e.complete(n,i.data)},error:function(t,n,i){e.errors.push({file:n,message:i.message}),e.complete(n)}})})},complete:function(t,e){var n=this;if(this.completed[t.name]=e,ne()(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout(function(){n.$refs.dialog.close(),n.$emit("success",n.files,ji()(n.completed))},250)}}}},Bi=Ai,Pi=(n("5aee"),Object(h["a"])(Bi,Ci,Ei,!1,null,null,null)),Di=Pi.exports,Mi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-checkbox-input"},[n("input",{ref:"input",staticClass:"k-checkbox-input-native",attrs:{disabled:t.disabled,id:t.id,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onChange(e.target.checked)}}}),n("span",{staticClass:"k-checkbox-input-icon",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{width:"12",height:"10",viewBox:"0 0 12 10",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M1 5l3.3 3L11 1","stroke-width":"2",fill:"none","fill-rule":"evenodd"}})])]),n("span",{staticClass:"k-checkbox-input-label",domProps:{innerHTML:t._s(t.label)}})])},Ri=[],zi=n("b5ae"),Fi={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],label:String,required:Boolean,value:Boolean},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onChange:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.focus()}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},Ui=Fi,Hi=(n("42e4"),Object(h["a"])(Ui,Mi,Ri,!1,null,null,null)),Ki=Hi.exports,Vi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-checkboxes-input",style:"--columns:"+t.columns},t._l(t.options,function(e,i){return n("li",{key:i},[n("k-checkbox-input",{attrs:{id:t.id+"-"+i,label:e.text,value:-1!==t.selected.indexOf(e.value)},on:{input:function(n){return t.onInput(e.value,n)}}})],1)}),0)},Yi=[],Gi=(n("28a5"),n("a745")),Wi=n.n(Gi),Ji={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default:function(){return this._uid}},max:Number,min:Number,options:Array,required:Boolean,value:{type:Array,default:function(){return[]}}},data:function(){return{selected:this.valueToArray(this.value)}},watch:{value:function(t){this.selected=this.valueToArray(t)},selected:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$el.querySelector("input").focus()},onInput:function(t,e){if(!0===e)this.selected.push(t);else{var n=this.selected.indexOf(t);-1!==n&&this.selected.splice(n,1)}this.$emit("input",this.selected)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.focus()},valueToArray:function(t){return Wi()(t)?t:String(t).split(",")}},validations:function(){return{selected:{required:!this.required||zi["required"],min:!this.min||Object(zi["minLength"])(this.min),max:!this.max||Object(zi["maxLength"])(this.max)}}}},Xi=Ji,Zi=Object(h["a"])(Xi,Vi,Yi,!1,null,null,null),Qi=Zi.exports,ts=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-date-input"},[n("k-select-input",{ref:"years",attrs:{"aria-label":t.$t("year"),options:t.years,disabled:t.disabled,required:t.required,value:t.year,placeholder:"––––",empty:"––––"},on:{input:t.setYear,invalid:t.onInvalid}}),n("span",{staticClass:"k-date-input-separator"},[t._v("-")]),n("k-select-input",{ref:"months",attrs:{"aria-label":t.$t("month"),options:t.months,disabled:t.disabled,required:t.required,value:t.month,empty:"––",placeholder:"––"},on:{input:t.setMonth,invalid:t.onInvalid}}),n("span",{staticClass:"k-date-input-separator"},[t._v("-")]),n("k-select-input",{ref:"days",attrs:{"aria-label":t.$t("day"),autofocus:t.autofocus,id:t.id,options:t.days,disabled:t.disabled,required:t.required,value:t.day,placeholder:"––",empty:"––"},on:{input:t.setDay,invalid:t.onInvalid}})],1)},es=[],ns=n("e814"),is=n.n(ns),ss={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:String,min:String,required:Boolean,value:String},data:function(){return{date:Mn()(this.value),minDate:this.calculate(this.min,"min"),maxDate:this.calculate(this.max,"max")}},computed:{day:function(){return isNaN(this.date.date())?"":this.date.date()},days:function(){return this.options(1,this.date.daysInMonth()||31,"days")},month:function(){return isNaN(this.date.date())?"":this.date.month()+1},months:function(){return this.options(1,12,"months")},year:function(){return isNaN(this.date.year())?"":this.date.year()},years:function(){var t=this.date.isBefore(this.minDate)?this.date.year():this.minDate.year(),e=this.date.isAfter(this.maxDate)?this.date.year():this.maxDate.year();return this.options(t,e)}},watch:{value:function(t){this.date=Mn()(t)}},methods:{calculate:function(t,e){var n={min:{run:"subtract",take:"startOf"},max:{run:"add",take:"endOf"}}[e],i=t?Mn()(t):null;return i&&!1!==i.isValid()||(i=Mn()()[n.run](10,"year")[n.take]("year")),i},focus:function(){this.$refs.years.focus()},onInput:function(){!1!==this.date.isValid()?this.$emit("input",this.date.toISOString()):this.$emit("input","")},onInvalid:function(t,e){this.$emit("invalid",t,e)},options:function(t,e){for(var n=[],i=t;i<=e;i++)n.push({value:i,text:Rn(i)});return n},set:function(t,e){if(""===e||null===e||!1===e||-1===e)return this.setInvalid(),void this.onInput();if(!1===this.date.isValid())return this.setInitialDate(t,e),void this.onInput();var n=this.date,i=this.date.date();this.date=this.date.set(t,is()(e)),"month"===t&&this.date.date()!==i&&(this.date=n.set("date",1).set("month",e).endOf("month")),this.onInput()},setInvalid:function(){this.date=Mn()("invalid")},setInitialDate:function(t,e){var n=Mn()();return this.date=Mn()().set(t,is()(e)),"date"===t&&n.month()!==this.date.month()&&(this.date=n.endOf("month")),this.date},setDay:function(t){this.set("date",t)},setMonth:function(t){this.set("month",t-1)},setYear:function(t){this.set("year",t)}}},as=ss,os=(n("6ab3"),Object(h["a"])(as,ts,es,!1,null,null,null)),rs=os.exports,ls=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-datetime-input"},[n("k-date-input",{ref:"dateInput",attrs:{autofocus:t.autofocus,required:t.required,id:t.id,disabled:t.disabled,value:t.dateValue},on:{input:t.setDate}}),n("k-time-input",t._b({ref:"timeInput",attrs:{required:t.required,disabled:t.disabled,value:t.timeValue},on:{input:t.setTime}},"k-time-input",t.timeOptions,!1))],1)},us=[],cs={inheritAttrs:!1,props:Object(l["a"])({},rs.props,{time:{type:[Boolean,Object],default:function(){return{}}},value:String}),data:function(){return{dateValue:this.parseDate(this.value),timeValue:this.parseTime(this.value),timeOptions:this.setTimeOptions()}},watch:{value:function(t){this.dateValue=this.parseDate(t),this.timeValue=this.parseTime(t),this.onInvalid()}},mounted:function(){this.onInvalid()},methods:{focus:function(){this.$refs.dateInput.focus()},onInput:function(){if(this.timeValue&&this.dateValue){var t=this.dateValue+"T"+this.timeValue+":00";this.$emit("input",t)}else this.$emit("input","")},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},parseDate:function(t){var e=Mn()(t);return e.isValid()?e.format("YYYY-MM-DD"):null},parseTime:function(t){var e=Mn()(t);return e.isValid()?e.format("HH:mm"):null},setDate:function(t){t&&!this.timeValue&&(this.timeValue=Mn()().format("HH:mm")),t?this.dateValue=this.parseDate(t):(this.dateValue=null,this.timeValue=null),this.onInput()},setTime:function(t){t&&!this.dateValue&&(this.dateValue=Mn()().format("YYYY-MM-DD")),t?this.timeValue=t:(this.dateValue=null,this.timeValue=null),this.onInput()},setTimeOptions:function(){return!0===this.time?{}:this.time}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},ds=cs,ps=(n("4433"),Object(h["a"])(ds,ls,us,!1,null,null,null)),fs=ps.exports,hs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("input",t._g(t._b({ref:"input",staticClass:"k-text-input"},"input",{autocomplete:t.autocomplete,autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,type:t.type,value:t.value},!1),t.listeners))},ms=[],gs={inheritAttrs:!1,class:"k-text-input",props:{autocomplete:{type:[Boolean,String],default:"off"},autofocus:Boolean,disabled:Boolean,id:[Number,String],maxlength:Number,minlength:Number,name:[Number,String],pattern:String,placeholder:String,preselect:Boolean,required:Boolean,spellcheck:{type:[Boolean,String],default:"off"},type:{type:String,default:"text"},value:String},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus:function(){this.$refs.input.focus()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.select()}},validations:function(){return{value:{required:!this.required||zi["required"],minLength:!this.minlength||Object(zi["minLength"])(this.minlength),maxLength:!this.maxlength||Object(zi["maxLength"])(this.maxlength),email:"email"!==this.type||zi["email"],url:"url"!==this.type||zi["url"]}}}},vs=gs,bs=(n("cb8f"),Object(h["a"])(vs,hs,ms,!1,null,null,null)),ks=bs.exports,$s={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"email"},placeholder:{type:String,default:function(){return this.$t("email.placeholder")}},type:{type:String,default:"email"}})},_s=$s,ys=Object(h["a"])(_s,Sn,Cn,!1,null,null,null),xs=ys.exports,ws=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{staticClass:"k-multiselect-input",attrs:{list:t.state,options:t.dragOptions,"data-layout":t.layout,element:"k-dropdown"},on:{end:t.onInput},nativeOn:{click:function(e){return t.$refs.dropdown.toggle(e)}}},[t._l(t.sorted,function(e){return n("k-tag",{key:e.value,ref:e.value,refInFor:!0,attrs:{removable:!0},on:{remove:function(n){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:t.navigate("prev")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:"button"in e&&2!==e.button?null:t.navigate("next")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:t.$refs.dropdown.open(e)}]}},[t._v("\n "+t._s(e.text)+"\n ")])}),n("k-dropdown-content",{ref:"dropdown",attrs:{slot:"footer"},on:{open:t.onOpen,close:function(e){t.q=null}},slot:"footer"},[t.search?n("k-dropdown-item",{staticClass:"k-multiselect-search",attrs:{icon:"search"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"search",domProps:{value:t.q},on:{input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),n("div",{staticClass:"k-multiselect-options"},t._l(t.filtered,function(e){return n("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.addable},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(n){return t.select(e)}},nativeOn:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.select(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:(n.preventDefault(),t.select(e))}]}},[n("span",{domProps:{innerHTML:t._s(e.display)}}),n("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])}),1)],1)],2)},Os=[],Ss=(n("20d6"),n("55dd"),{inheritAttrs:!1,props:{disabled:Boolean,id:[Number,String],max:Number,min:Number,layout:String,options:{type:Array,default:function(){return[]}},required:Boolean,search:Boolean,separator:{type:String,default:","},sort:Boolean,value:{type:Array,required:!0,default:function(){return[]}}},data:function(){return{state:this.value,q:null}},computed:{addable:function(){return!this.max||this.state.length1&&!this.sort},dragOptions:function(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},filtered:function(){if(null===this.q)return this.options.map(function(t){return Object(l["a"])({},t,{display:t.text,info:t.value})});var t=new RegExp("(".concat(RegExp.escape(this.q),")"),"ig");return this.options.filter(function(e){return e.text.match(t)||e.value.match(t)}).map(function(e){return Object(l["a"])({},e,{display:e.text.replace(t,"$1"),info:e.value.replace(t,"$1")})})},sorted:function(){var t=this;if(!1===this.sort)return this.state;var e=this.state,n=function(e){return t.options.findIndex(function(t){return t.value===e.value})};return e.sort(function(t,e){return n(t)-n(e)})}},watch:{value:function(t){this.state=t,this.onInvalid()}},mounted:function(){this.onInvalid(),this.$events.$on("click",this.close),this.$events.$on("keydown.cmd.s",this.close),this.$events.$on("keydown.esc",this.escape)},destroyed:function(){this.$events.$off("click",this.close),this.$events.$off("keydown.cmd.s",this.close),this.$events.$off("keydown.esc",this.escape)},methods:{add:function(t){this.addable&&(this.state.push(t),this.onInput())},blur:function(){this.close()},close:function(){this.$refs.dropdown.close(),this.q=null,this.$el.focus()},escape:function(){this.q?this.q=null:this.close()},focus:function(){this.$refs.dropdown.open()},index:function(t){return this.state.findIndex(function(e){return e.value===t.value})},isSelected:function(t){return-1!==this.index(t)},navigate:function(t){var e=document.activeElement;switch(t){case"prev":e&&e.previousSibling&&e.previousSibling.focus();break;case"next":e&&e.nextSibling&&e.nextSibling.focus();break}},onInput:function(){this.$emit("input",this.sorted)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOpen:function(){var t=this;this.$nextTick(function(){t.$refs.search&&t.$refs.search.focus()})},remove:function(t){this.state.splice(this.index(t),1),this.onInput()},select:function(t){t={text:t.text,value:t.value},this.isSelected(t)?this.remove(t):this.add(t)}},validations:function(){return{state:{required:!this.required||zi["required"],minLength:!this.min||Object(zi["minLength"])(this.min),maxLength:!this.max||Object(zi["maxLength"])(this.max)}}}}),Cs=Ss,Es=(n("11ae"),Object(h["a"])(Cs,ws,Os,!1,null,null,null)),Ts=Es.exports,js=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("input",t._g(t._b({ref:"input",staticClass:"k-number-input",attrs:{type:"number"}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,placeholder:t.placeholder,required:t.required,step:t.step,value:t.value},!1),t.listeners))},Is=[],Ls={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],max:Number,min:Number,name:[Number,String],placeholder:String,preselect:Boolean,required:Boolean,step:Number,value:{type:[Number,String],default:null}},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus:function(){this.$refs.input.focus()},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){null!==t&&""!==t&&"-"!==t&&"-0"!==t&&(t=Number(t)),this.$emit("input",t)},select:function(){this.$refs.input.select()}},validations:function(){return{value:{required:!this.required||zi["required"],min:!this.min||Object(zi["minValue"])(this.min),max:!this.max||Object(zi["maxValue"])(this.max)}}}},qs=Ls,Ns=(n("6018"),Object(h["a"])(qs,js,Is,!1,null,null,null)),As=Ns.exports,Bs={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"new-password"},type:{type:String,default:"password"}})},Ps=Bs,Ds=Object(h["a"])(Ps,En,Tn,!1,null,null,null),Ms=Ds.exports,Rs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-radio-input",style:"--columns:"+t.columns},t._l(t.options,function(e,i){return n("li",{key:i},[n("input",{staticClass:"k-radio-input-native",attrs:{id:t.id+"-"+i,name:t.id,type:"radio"},domProps:{value:e.value,checked:t.value===e.value},on:{change:function(n){return t.onInput(e.value)}}}),n("label",{attrs:{for:t.id+"-"+i}},[e.info?[n("span",{staticClass:"k-radio-input-text"},[t._v(t._s(e.text))]),n("span",{staticClass:"k-radio-input-info"},[t._v(t._s(e.info))])]:[t._v("\n "+t._s(e.text)+"\n ")]],2),e.icon?n("k-icon",{attrs:{type:e.icon}}):t._e()],1)}),0)},zs=[],Fs={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default:function(){return this._uid}},options:Array,required:Boolean,value:[String,Number,Boolean]},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$el.querySelector("input").focus()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.focus()}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},Us=Fs,Hs=(n("893d"),Object(h["a"])(Us,Rs,zs,!1,null,null,null)),Ks=Hs.exports,Vs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-range-input"},[n("input",t._g(t._b({ref:"input",staticClass:"k-range-input-native",style:"--min: "+t.min+"; --max: "+t.max+"; --value: "+t.position,attrs:{type:"range"}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,required:t.required,step:t.step,value:t.value},!1),t.listeners)),t.tooltip?n("span",{staticClass:"k-range-input-tooltip"},[t.tooltip.before?n("span",{staticClass:"k-range-input-tooltip-before"},[t._v(t._s(t.tooltip.before))]):t._e(),n("span",{staticClass:"k-range-input-tooltip-text"},[t._v(t._s(t.label))]),t.tooltip.after?n("span",{staticClass:"k-range-input-tooltip-after"},[t._v(t._s(t.tooltip.after))]):t._e()]):t._e()])},Ys=[],Gs=(n("6b54"),{inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:{type:Number,default:100},min:{type:Number,default:0},name:[String,Number],required:Boolean,step:{type:Number,default:1},tooltip:{type:[Boolean,Object],default:function(){return{before:null,after:null}}},value:[Number,String]},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},computed:{label:function(){return null!==this.value?this.format(this.value):"–"},center:function(){var t=(this.max-this.min)/2+this.min;return Math.ceil(t/this.step)*this.step},position:function(){return null!==this.value?this.value:this.center}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},format:function(t){var e=document.lang?document.lang.replace("_","-"):"en",n=this.step.toString().split("."),i=n.length>1?n[1].length:0;return new Intl.NumberFormat(e,{minimumFractionDigits:i}).format(t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){this.$emit("input",t)}},validations:function(){return{value:{required:!this.required||zi["required"],min:!this.min||Object(zi["minValue"])(this.min),max:!this.max||Object(zi["maxValue"])(this.max)}}}}),Ws=Gs,Js=(n("b5d2"),Object(h["a"])(Ws,Vs,Ys,!1,null,null,null)),Xs=Js.exports,Zs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-select-input",attrs:{"data-disabled":t.disabled,"data-empty":""===t.selected}},[n("select",t._g({directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"selected"}],ref:"input",staticClass:"k-select-input-native",attrs:{autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,id:t.id,name:t.name,required:t.required},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.selected=e.target.multiple?n:n[0]}}},t.listeners),[!1!==t.empty?n("option",{attrs:{value:""}},[t._v(t._s(t.empty))]):t._e(),t._l(t.options,function(e){return n("option",{key:e.value,attrs:{disabled:e.disabled},domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])})],2),t._v("\n "+t._s(t.label)+"\n")])},Qs=[],ta={inheritAttrs:!1,props:{autofocus:Boolean,ariaLabel:String,disabled:Boolean,id:[Number,String],name:[Number,String],placeholder:String,empty:{type:[String,Boolean],default:"—"},options:{type:Array,default:function(){return[]}},required:Boolean,value:{type:[String,Number,Boolean],default:""}},data:function(){var t=this;return{selected:this.value,listeners:Object(l["a"])({},this.$listeners,{click:function(e){return t.onClick(e)},input:function(e){return t.onInput(e.target.value)}})}},computed:{label:function(){var t=this.text(this.selected);return""===this.selected||null===this.selected||null===t?this.placeholder||"—":t}},watch:{value:function(t){this.selected=t,this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onClick:function(t){t.stopPropagation(),this.$emit("click",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){this.selected=t,this.$emit("input",this.selected)},select:function(){this.focus()},text:function(t){var e=null;return this.options.forEach(function(n){n.value==t&&(e=n.text)}),e}},validations:function(){return{selected:{required:!this.required||zi["required"]}}}},ea=ta,na=(n("6a18"),Object(h["a"])(ea,Zs,Qs,!1,null,null,null)),ia=na.exports,sa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{ref:"box",staticClass:"k-tags-input",attrs:{list:t.tags,"data-layout":t.layout,options:t.dragOptions},on:{end:t.onInput}},[t._l(t.tags,function(e,i){return n("k-tag",{key:i,ref:e.value,refInFor:!0,attrs:{removable:!0,name:"tag"},on:{remove:function(n){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},blur:function(e){return t.selectTag(null)},focus:function(n){return t.selectTag(e)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:t.navigate("prev")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:"button"in e&&2!==e.button?null:t.navigate("next")}],dblclick:function(n){return t.edit(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])}),n("span",{staticClass:"k-tags-input-element",attrs:{slot:"footer"},slot:"footer"},[n("k-autocomplete",{ref:"autocomplete",attrs:{options:t.options,skip:t.skip},on:{select:t.addTag,leave:function(e){return t.$refs.input.focus()}}},[n("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.newTag,expression:"newTag",modifiers:{trim:!0}}],ref:"input",attrs:{autofocus:t.autofocus,disabled:t.disabled||t.max&&t.tags.length>=t.max,id:t.id,name:t.name,autocomplete:"off",type:"text"},domProps:{value:t.newTag},on:{input:[function(e){e.target.composing||(t.newTag=e.target.value.trim())},function(e){return t.type(e.target.value)}],blur:[t.blurInput,function(e){return t.$forceUpdate()}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.blurInput(e):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.enter(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.tab(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)}]}})])],1)],2)},aa=[],oa={inheritAttrs:!1,props:{autofocus:Boolean,accept:{type:String,default:"all"},disabled:Boolean,icon:{type:[String,Boolean],default:"tag"},id:[Number,String],layout:String,max:Number,min:Number,name:[Number,String],options:{type:Array,default:function(){return[]}},required:Boolean,separator:{type:String,default:","},value:{type:Array,default:function(){return[]}}},data:function(){return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map(function(t){return t.icon="tag",t})}},computed:{dragOptions:function(){return{delay:1,disabled:!this.draggable,draggable:".k-tag"}},draggable:function(){return this.tags.length>1},skip:function(){return this.tags.map(function(t){return t.value})}},watch:{value:function(t){this.tags=this.prepareTags(t),this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{addString:function(t){var e=this;if(t)if(t=t.trim(),t.includes(this.separator))t.split(this.separator).forEach(function(t){e.addString(t)});else if(0!==t.length)if("options"===this.accept){var n=this.options.filter(function(e){return e.text===t})[0];if(!n)return;this.addTag(n)}else this.addTag({text:t,value:t})},addTag:function(t){this.addTagToIndex(t),this.$refs.autocomplete.close(),this.$refs.input.focus()},addTagToIndex:function(t){if("options"===this.accept){var e=this.options.filter(function(e){return e.value===t.value})[0];if(!e)return}-1===this.index(t)&&(!this.max||this.tags.length0&&(t.preventDefault(),this.addString(this.newTag))},type:function(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations:function(){return{tags:{required:!this.required||zi["required"],minLength:!this.min||Object(zi["minLength"])(this.min),maxLength:!this.max||Object(zi["maxLength"])(this.max)}}}},ra=oa,la=(n("27c1"),Object(h["a"])(ra,sa,aa,!1,null,null,null)),ua=la.exports,ca={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}})},da=ca,pa=Object(h["a"])(da,jn,In,!1,null,null,null),fa=pa.exports,ha=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-textarea-input",attrs:{"data-theme":t.theme,"data-over":t.over}},[n("div",{staticClass:"k-textarea-input-wrapper"},[t.buttons?n("k-toolbar",{ref:"toolbar",attrs:{buttons:t.buttons,uploads:t.uploads},on:{command:t.onCommand},nativeOn:{mousedown:function(t){t.preventDefault()}}}):t._e(),n("textarea",t._b({ref:"input",staticClass:"k-textarea-input-native",attrs:{"data-size":t.size},on:{click:t.onClick,focus:t.onFocus,input:t.onInput,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.metaKey?t.onSubmit(e):null},function(e){return e.metaKey?t.onShortcut(e):null}],dragover:t.onOver,dragleave:t.onOut,drop:t.onDrop}},"textarea",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,value:t.value},!1))],1),n("k-email-dialog",{ref:"emailDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),n("k-link-dialog",{ref:"linkDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),n("k-files-dialog",{ref:"fileDialog",on:{cancel:t.cancel,submit:function(e){return t.insertFile(e)}}}),t.uploads?n("k-upload",{ref:"fileUpload",on:{success:t.insertUpload}}):t._e()],1)},ma=[],ga=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-toolbar"},[n("div",{staticClass:"k-toolbar-buttons"},[t._l(t.layout,function(e,i){return[e.divider?[n("span",{key:i,staticClass:"k-toolbar-divider"})]:e.dropdown?[n("k-dropdown",{key:i},[n("k-button",{key:i,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(e){t.$refs[i+"-dropdown"][0].toggle()}}}),n("k-dropdown-content",{ref:i+"-dropdown",refInFor:!0},t._l(e.dropdown,function(e,i){return n("k-dropdown-item",{key:i,attrs:{icon:e.icon},on:{click:function(n){return t.command(e.command,e.args)}}},[t._v("\n "+t._s(e.label)+"\n ")])}),1)],1)]:[n("k-button",{key:i,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(n){return t.command(e.command,e.args)}}})]]})],2)])},va=[],ba=function(t){this.command("insert",function(e,n){var i=[];return n.split("\n").forEach(function(e,n){var s="ol"===t?n+1+".":"-";i.push(s+" "+e)}),i.join("\n")})},ka={layout:["headlines","bold","italic","|","link","email","file","|","code","ul","ol"],props:{buttons:{type:[Boolean,Array],default:!0},uploads:[Boolean,Object,Array]},data:function(){var t={},e={},n=[],i=this.commands();return!1===this.buttons?t:(Wi()(this.buttons)&&(n=this.buttons),!0!==Wi()(this.buttons)&&(n=this.$options.layout),n.forEach(function(n,s){if("|"===n)t["divider-"+s]={divider:!0};else if(i[n]){var a=i[n];t[n]=a,a.shortcut&&(e[a.shortcut]=n)}}),{layout:t,shortcuts:e})},methods:{command:function(t,e){"function"===typeof t?t.apply(this):this.$emit("command",t,e)},close:function(){var t=this;ne()(this.$refs).forEach(function(e){var n=t.$refs[e][0];n.close&&"function"===typeof n.close&&n.close()})},fileCommandSetup:function(){var t={label:this.$t("toolbar.button.file"),icon:"attachment"};return!1===this.uploads?t.command="selectFile":t.dropdown={select:{label:this.$t("toolbar.button.file.select"),icon:"check",command:"selectFile"},upload:{label:this.$t("toolbar.button.file.upload"),icon:"upload",command:"uploadFile"}},t},commands:function(){return{headlines:{label:this.$t("toolbar.button.headings"),icon:"title",dropdown:{h1:{label:this.$t("toolbar.button.heading.1"),icon:"title",command:"prepend",args:"#"},h2:{label:this.$t("toolbar.button.heading.2"),icon:"title",command:"prepend",args:"##"},h3:{label:this.$t("toolbar.button.heading.3"),icon:"title",command:"prepend",args:"###"}}},bold:{label:this.$t("toolbar.button.bold"),icon:"bold",command:"wrap",args:"**",shortcut:"b"},italic:{label:this.$t("toolbar.button.italic"),icon:"italic",command:"wrap",args:"*",shortcut:"i"},link:{label:this.$t("toolbar.button.link"),icon:"url",shortcut:"l",command:"dialog",args:"link"},email:{label:this.$t("toolbar.button.email"),icon:"email",shortcut:"e",command:"dialog",args:"email"},file:this.fileCommandSetup(),code:{label:this.$t("toolbar.button.code"),icon:"code",command:"wrap",args:"`"},ul:{label:this.$t("toolbar.button.ul"),icon:"list-bullet",command:function(){return ba.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command:function(){return ba.apply(this,["ol"])}}}},shortcut:function(t,e){if(this.shortcuts[t]){var n=this.layout[this.shortcuts[t]];if(!n)return!1;e.preventDefault(),this.command(n.command,n.args)}}}},$a=ka,_a=(n("df0d"),Object(h["a"])($a,ga,va,!1,null,null,null)),ya=_a.exports,xa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},wa=[],Oa={data:function(){return{value:{email:null,text:null},fields:{email:{label:this.$t("email"),type:"email"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext:function(){return this.$store.state.system.info.kirbytext}},methods:{open:function(t,e){this.value.text=e,this.$refs.dialog.open()},cancel:function(){this.$emit("cancel")},createKirbytext:function(){var t=this.value.email||"";return this.value.text&&this.value.text.length>0?"(email: ".concat(t," text: ").concat(this.value.text,")"):"(email: ".concat(t,")")},createMarkdown:function(){var t=this.value.email||"";return this.value.text&&this.value.text.length>0?"[".concat(this.value.text,"](mailto:").concat(t,")"):"<".concat(t,">")},submit:function(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={email:null,text:null},this.$refs.dialog.close()}}},Sa=Oa,Ca=Object(h["a"])(Sa,xa,wa,!1,null,null,null),Ea=Ca.exports,Ta=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},ja=[],Ia={data:function(){return{value:{url:null,text:null},fields:{url:{label:this.$t("link"),type:"text",placeholder:this.$t("url.placeholder"),icon:"url"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext:function(){return this.$store.state.system.info.kirbytext}},methods:{open:function(t,e){this.value.text=e,this.$refs.dialog.open()},cancel:function(){this.$emit("cancel")},createKirbytext:function(){return this.value.text.length>0?"(link: ".concat(this.value.url," text: ").concat(this.value.text,")"):"(link: ".concat(this.value.url,")")},createMarkdown:function(){return this.value.text.length>0?"[".concat(this.value.text,"](").concat(this.value.url,")"):"<".concat(this.value.url,">")},submit:function(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={url:null,text:null},this.$refs.dialog.close()}}},La=Ia,qa=Object(h["a"])(La,Ta,ja,!1,null,null,null),Na=qa.exports,Aa=n("19e9"),Ba=n.n(Aa),Pa={components:{"k-toolbar":ya,"k-email-dialog":Ea,"k-link-dialog":Na},inheritAttrs:!1,props:{autofocus:Boolean,buttons:{type:[Boolean,Array],default:!0},disabled:Boolean,endpoints:Object,id:[Number,String],name:[Number,String],maxlength:Number,minlength:Number,placeholder:String,preselect:Boolean,required:Boolean,size:String,spellcheck:{type:[Boolean,String],default:"off"},theme:String,uploads:[Boolean,Object,Array],value:String},data:function(){return{over:!1}},watch:{value:function(){var t=this;this.onInvalid(),this.$nextTick(function(){t.resize()})}},mounted:function(){var t=this;this.$nextTick(function(){Ba()(t.$refs.input)}),this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{cancel:function(){this.$refs.input.focus()},dialog:function(t){if(!this.$refs[t+"Dialog"])throw"Invalid toolbar dialog";this.$refs[t+"Dialog"].open(this.$refs.input,this.selection())},focus:function(){this.$refs.input.focus()},insert:function(t){var e=this,n=this.$refs.input,i=n.value;setTimeout(function(){if(n.focus(),document.execCommand("insertText",!1,t),n.value===i){var s=n.value.slice(0,n.selectionStart)+t+n.value.slice(n.selectionEnd);n.value=s,e.$emit("input",s)}}),this.resize()},insertFile:function(t){t&&t.length>0&&this.insert(t[0].dragText)},insertUpload:function(t,e){this.insert(e[0].dragText),this.$events.$emit("model.update")},onClick:function(){this.$refs.toolbar&&this.$refs.toolbar.close()},onCommand:function(t,e){"function"===typeof this[t]?"function"===typeof e?this[t](e(this.$refs.input,this.selection())):this[t](e):window.console.warn(t+" is not a valid command")},onDrop:function(t){if(t.dataTransfer&&!0===t.dataTransfer.types.includes("Files"))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:d.api+"/"+this.endpoints.field+"/upload",multiple:!1});var e=this.$store.state.drag;e&&"text"===e.type&&(this.focus(),this.insert(e.data))},onFocus:function(t){this.$emit("focus",t)},onInput:function(t){this.$emit("input",t.target.value)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOut:function(){this.$refs.input.blur(),this.over=!1},onOver:function(t){if(this.uploads&&t.dataTransfer&&!0===t.dataTransfer.types.includes("Files"))return t.dataTransfer.dropEffect="copy",this.focus(),void(this.over=!0);var e=this.$store.state.drag;e&&"text"===e.type&&(t.dataTransfer.dropEffect="copy",this.focus(),this.over=!0)},onShortcut:function(t){!1!==this.buttons&&"Meta"!==t.key&&this.$refs.toolbar&&this.$refs.toolbar.shortcut(t.key,t)},onSubmit:function(t){return this.$emit("submit",t)},prepend:function(t){this.insert(t+" "+this.selection())},resize:function(){Ba.a.update(this.$refs.input)},select:function(){this.$refs.select()},selectFile:function(){var t=this;this.$api.get(this.endpoints.field+"/files").then(function(e){t.$refs.fileDialog.open(e,{multiple:!1})}).catch(function(e){t.$store.dispatch("notification/error",e)})},selection:function(){var t=this.$refs.input,e=t.selectionStart,n=t.selectionEnd;return t.value.substring(e,n)},uploadFile:function(){this.$refs.fileUpload.open({url:d.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap:function(t){this.insert(t+this.selection()+t)}},validations:function(){return{value:{required:!this.required||zi["required"],minLength:!this.minlength||Object(zi["minLength"])(this.minlength),maxLength:!this.maxlength||Object(zi["maxLength"])(this.maxlength)}}}},Da=Pa,Ma=(n("cca8"),Object(h["a"])(Da,ha,ma,!1,null,null,null)),Ra=Ma.exports,za=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-time-input"},[n("k-select-input",{ref:"hour",attrs:{id:t.id,"aria-label":t.$t("hour"),autofocus:t.autofocus,options:t.hours,required:t.required,disabled:t.disabled,placeholder:"––",empty:"––"},on:{input:t.setHour,invalid:t.onInvalid},model:{value:t.hour,callback:function(e){t.hour=e},expression:"hour"}}),n("span",{staticClass:"k-time-input-separator"},[t._v(":")]),n("k-select-input",{ref:"minute",attrs:{"aria-label":t.$t("minutes"),options:t.minutes,required:t.required,disabled:t.disabled,placeholder:"––",empty:"––"},on:{input:t.setMinute,invalid:t.onInvalid},model:{value:t.minute,callback:function(e){t.minute=e},expression:"minute"}}),12===t.notation?n("k-select-input",{ref:"meridiem",staticClass:"k-time-input-meridiem",attrs:{"aria-label":t.$t("meridiem"),empty:!1,options:[{value:"AM",text:"AM"},{value:"PM",text:"PM"}],required:t.required,disabled:t.disabled},on:{input:t.onInput},model:{value:t.meridiem,callback:function(e){t.meridiem=e},expression:"meridiem"}}):t._e()],1)},Fa=[],Ua=n("f906"),Ha=n.n(Ua);Mn.a.extend(Ha.a);var Ka,Va,Ya={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],notation:{type:Number,default:24},required:Boolean,step:{type:Number,default:5},value:{type:String}},data:function(){var t=this.toObject(this.value);return{time:this.value,hour:t.hour,minute:t.minute,meridiem:t.meridiem}},computed:{hours:function(){return this.options(24===this.notation?0:1,24===this.notation?23:12)},minutes:function(){return this.options(0,59,this.step)}},watch:{value:function(t){this.time=t},time:function(t){var e=this.toObject(t);this.hour=e.hour,this.minute=e.minute,this.meridiem=e.meridiem}},methods:{focus:function(){this.$refs.hour.focus()},setHour:function(t){t&&!this.minute&&(this.minute=0),t||(this.minute=null),this.onInput()},setMinute:function(t){t&&!this.hour&&(this.hour=0),t||(this.hour=null),this.onInput()},onInput:function(){if(null!==this.hour&&null!==this.minute){var t=Rn(this.hour||0),e=Rn(this.minute||0),n=String(this.meridiem).toUpperCase()||"AM",i=24===this.notation?"".concat(t,":").concat(e,":00"):"".concat(t,":").concat(e,":00 ").concat(n),s=24===this.notation?"HH:mm:ss":"hh:mm:ss A",a=Mn()("2000-01-01 "+i,"YYYY-MM-DD "+s);this.$emit("input",a.format("HH:mm"))}else this.$emit("input","")},onInvalid:function(t,e){this.$emit("invalid",t,e)},options:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=[],s=t;s<=e;s+=n)i.push({value:s,text:Rn(s)});return i},reset:function(){this.hour=null,this.minute=null,this.meridiem=null},round:function(t){return Math.floor(t/this.step)*this.step},toObject:function(t){var e=Mn()("2001-01-01 "+t+":00","YYYY-MM-DD HH:mm:ss");return t&&!1!==e.isValid()?{hour:e.format(24===this.notation?"H":"h"),minute:this.round(e.format("m")),meridiem:e.format("A")}:{hour:null,minute:null,meridiem:null}}}},Ga=Ya,Wa=(n("50da"),Object(h["a"])(Ga,za,Fa,!1,null,null,null)),Ja=Wa.exports,Xa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-toggle-input"},[n("input",{ref:"input",staticClass:"k-toggle-input-native",attrs:{disabled:t.disabled,id:t.id,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onInput(e.target.checked)}}}),n("span",{staticClass:"k-toggle-input-label",domProps:{innerHTML:t._s(t.label)}})])},Za=[],Qa={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],text:{type:[Array,String],default:function(){return["off","on"]}},required:Boolean,value:Boolean},computed:{label:function(){return Wi()(this.text)?this.value?this.text[1]:this.text[0]:this.text}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onEnter:function(t){"Enter"===t.key&&this.$refs.input.click()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.focus()}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},to=Qa,eo=(n("bb41"),Object(h["a"])(to,Xa,Za,!1,null,null,null)),no=eo.exports,io={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}})},so=io,ao=Object(h["a"])(so,Ka,Va,!1,null,null,null),oo=ao.exports,ro=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-checkboxes-field",attrs:{counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},lo=[],uo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Qi.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Wi()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},co=uo,po=Object(h["a"])(co,ro,lo,!1,null,null,null),fo=po.exports,ho=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:t.inputType,value:t.date,theme:"field"}},"k-input",t.$props,!1),t.listeners),[n("template",{slot:"icon"},[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,tooltip:t.$t("date.select"),tabindex:"-1"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),n("k-dropdown-content",{ref:"dropdown",attrs:{align:"right"}},[n("k-calendar",{attrs:{value:t.date},on:{input:function(e){t.onInput(e),t.$refs.dropdown.close()}}})],1)],1)],1)],2)],1)},mo=[],go={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,fs.props,{icon:{type:String,default:"calendar"}}),data:function(){return{date:this.value,listeners:Object(l["a"])({},this.$listeners,{input:this.onInput})}},computed:{inputType:function(){return!1===this.time?"date":"datetime"}},watch:{value:function(t){this.date=t}},methods:{focus:function(){this.$refs.input.focus()},onInput:function(t){this.date=t,this.$emit("input",t)}}},vo=go,bo=Object(h["a"])(vo,ho,mo,!1,null,null,null),ko=bo.exports,$o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-email-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners),[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:"mailto:"+t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},_o=[],yo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,xs.props,{link:{type:Boolean,default:!0},icon:{type:String,default:"email"}}),methods:{focus:function(){this.$refs.input.focus()}}},xo=yo,wo=Object(h["a"])(xo,$o,_o,!1,null,null,null),Oo=wo.exports,So=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-files-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("k-button",{attrs:{slot:"options",icon:"add"},on:{click:t.open},slot:"options"},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,"data-size":t.size,handle:!0},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.filename,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,link:e.link,info:e.info,image:e.image,icon:e.icon}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",t._g({attrs:{layout:t.layout,icon:"image"}},{click:t.disabled?null:t.open}),[t._v("\n "+t._s(t.empty||t.$t("field.files.empty"))+"\n ")]),n("k-files-dialog",{ref:"selector",on:{submit:t.select}})],2)},Co=[],Eo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,{empty:String,layout:String,max:Number,multiple:Boolean,parent:String,size:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{selected:this.value}},computed:{elements:function(){var t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},more:function(){return!this.max||this.max>this.selected.length}},watch:{value:function(t){this.selected=t}},methods:{focus:function(){},onInput:function(){this.$emit("input",this.selected)},remove:function(t){this.selected.splice(t,1),this.onInput()},removeById:function(t){this.selected=this.selected.filter(function(e){return e.id!==t}),this.onInput()},select:function(t){var e=this;this.selected.forEach(function(n,i){0===t.filter(function(t){return t.id===n.id}).length&&e.selected.splice(i,1)}),t.forEach(function(t){0===e.selected.filter(function(e){return t.id===e.id}).length&&e.selected.push(t)}),this.onInput()}}},To={mixins:[Eo],created:function(){this.$events.$on("file.delete",this.removeById)},destroyed:function(){this.$events.$off("file.delete",this.removeById)},methods:{open:function(){var t=this;return this.$api.get(this.endpoints.field).then(function(e){var n=t.selected.map(function(t){return t.id});e=e.map(function(e){return e.selected=-1!==n.indexOf(e.id),e.thumb=t.image||{},e.thumb.url=!1,e.thumbs&&e.thumbs.tiny&&(e.thumb.url=e.thumbs.medium),e}),t.$refs.selector.open(e,{max:t.max,multiple:t.multiple})}).catch(function(){t.$store.dispatch("notification/error","The files query does not seem to be correct")})}}},jo=To,Io=(n("4a4b"),Object(h["a"])(jo,So,Co,!1,null,null,null)),Lo=Io.exports,qo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-headline",{staticClass:"k-headline-field",attrs:{"data-numbered":t.numbered,size:"large"}},[t._v("\n "+t._s(t.label)+"\n")])},No=[],Ao={props:{label:String,numbered:Boolean}},Bo=Ao,Po=(n("19d7"),Object(h["a"])(Bo,qo,No,!1,null,null,null)),Do=Po.exports,Mo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-field k-info-field"},[n("k-headline",[t._v(t._s(t.label))]),n("k-box",{attrs:{theme:t.theme}},[n("k-text",{domProps:{innerHTML:t._s(t.text)}})],1)],1)},Ro=[],zo={props:{label:String,text:String,theme:{type:String,default:"info"}}},Fo=zo,Uo=(n("ddfd"),Object(h["a"])(Fo,Mo,Ro,!1,null,null,null)),Ho=Uo.exports,Ko=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("hr",{staticClass:"k-line-field"})},Vo=[],Yo=(n("718c"),{}),Go=Object(h["a"])(Yo,Ko,Vo,!1,null,null,null),Wo=Go.exports,Jo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-multiselect-field",attrs:{input:t._uid,counter:t.counterOptions},on:{blur:t.blur}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},Xo=[],Zo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ts.props,{counter:{type:Boolean,default:!0},icon:{type:String,default:"angle-down"}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Wi()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{blur:function(t){this.$refs.input.blur(t)},focus:function(){this.$refs.input.focus()}}},Qo=Zo,tr=Object(h["a"])(Qo,Jo,Xo,!1,null,null,null),er=tr.exports,nr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-number-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},ir=[],sr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,As.props),methods:{focus:function(){this.$refs.input.focus()}}},ar=sr,or=Object(h["a"])(ar,nr,ir,!1,null,null,null),rr=or.exports,lr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-pages-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("k-button",{attrs:{slot:"options",icon:"add"},on:{click:t.open},slot:"options"},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,handle:!0,list:t.selected,"data-size":t.size},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.id,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,info:e.info,link:e.link,icon:e.icon,image:e.image}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",t._g({attrs:{layout:t.layout,icon:"page"}},{click:t.disabled?null:t.open}),[t._v("\n "+t._s(t.empty||t.$t("field.pages.empty"))+"\n ")]),n("k-pages-dialog",{ref:"selector",on:{submit:t.select}})],2)},ur=[],cr=n("f499"),dr=n.n(cr),pr=function(t){if(void 0!==t)return JSON.parse(dr()(t))},fr={mixins:[Eo],methods:{open:function(){this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,selected:pr(this.selected)})}}},hr=fr,mr=(n("7e85"),Object(h["a"])(hr,lr,ur,!1,null,null,null)),gr=mr.exports,vr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-password-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},br=[],kr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ms.props,{counter:{type:Boolean,default:!0},minlength:{type:Number,default:8},icon:{type:String,default:"key"}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},$r=kr,_r=Object(h["a"])($r,vr,br,!1,null,null,null),yr=_r.exports,xr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-radio-field"},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},wr=[],Or={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ks.props),methods:{focus:function(){this.$refs.input.focus()}}},Sr=Or,Cr=Object(h["a"])(Sr,xr,wr,!1,null,null,null),Er=Cr.exports,Tr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-range-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},jr=[],Ir={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Xs.props),methods:{focus:function(){this.$refs.input.focus()}}},Lr=Ir,qr=Object(h["a"])(Lr,Tr,jr,!1,null,null,null),Nr=qr.exports,Ar=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-select-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},Br=[],Pr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,ia.props,{icon:{type:String,default:"angle-down"}}),methods:{focus:function(){this.$refs.input.focus()}}},Dr=Pr,Mr=Object(h["a"])(Dr,Ar,Br,!1,null,null,null),Rr=Mr.exports,zr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-structure-field",nativeOn:{click:function(t){t.stopPropagation()}}},"k-field",t.$props,!1),[n("template",{slot:"options"},[t.more&&null===t.currentIndex?n("k-button",{ref:"add",attrs:{id:t._uid,icon:"add"},on:{click:t.add}},[t._v("\n "+t._s(t.$t("add"))+"\n ")]):t._e()],1),null!==t.currentIndex?[n("div",{staticClass:"k-structure-backdrop",on:{click:t.escape}}),n("section",{staticClass:"k-structure-form"},[n("k-form",{ref:"form",staticClass:"k-structure-form-fields",attrs:{fields:t.formFields},on:{input:t.onInput,submit:t.submit},model:{value:t.currentModel,callback:function(e){t.currentModel=e},expression:"currentModel"}}),n("footer",{staticClass:"k-structure-form-buttons"},[n("k-button",{staticClass:"k-structure-form-cancel-button",attrs:{icon:"cancel"},on:{click:t.close}},[t._v(t._s(t.$t("cancel")))]),"new"!==t.currentIndex?n("k-pagination",{attrs:{dropdown:!1,total:t.items.length,limit:1,page:t.currentIndex+1,details:!0,validate:t.beforePaginate},on:{paginate:t.paginate}}):t._e(),n("k-button",{staticClass:"k-structure-form-submit-button",attrs:{icon:"check"},on:{click:t.submit}},[t._v(t._s(t.$t("new"!==t.currentIndex?"confirm":"add")))])],1)],1)]:0===t.items.length?n("k-empty",{attrs:{icon:"list-bullet"},on:{click:t.add}},[t._v("\n "+t._s(t.empty||t.$t("field.structure.empty"))+"\n ")]):[n("table",{staticClass:"k-structure-table",attrs:{"data-sortable":t.isSortable}},[n("thead",[n("tr",[n("th",{staticClass:"k-structure-table-index"},[t._v("#")]),t._l(t.columns,function(e,i){return n("th",{key:i+"-header",staticClass:"k-structure-table-column",attrs:{"data-width":e.width,"data-align":e.align}},[t._v("\n "+t._s(e.label)+"\n ")])}),n("th")],2)]),n("k-draggable",{attrs:{list:t.items,"data-disabled":t.disabled,options:t.dragOptions,handle:!0,element:"tbody"},on:{end:t.onInput}},t._l(t.paginatedItems,function(e,i){return n("tr",{key:i,on:{click:function(t){t.stopPropagation()}}},[n("td",{staticClass:"k-structure-table-index"},[t.isSortable?n("k-sort-handle"):t._e(),n("span",{staticClass:"k-structure-table-index-number"},[t._v(t._s(t.indexOf(i)))])],1),t._l(t.columns,function(s,a){return n("td",{key:a,staticClass:"k-structure-table-column",attrs:{title:s.label,"data-width":s.width,"data-align":s.align},on:{click:function(e){return t.jump(i,a)}}},[!1===t.columnIsEmpty(e[a])?[t.previewExists(s.type)?n("k-"+s.type+"-field-preview",{tag:"component",attrs:{value:e[a],column:s,field:t.fields[a]}}):[n("p",{staticClass:"k-structure-table-text"},[t._v("\n "+t._s(s.before)+" "+t._s(t.displayText(t.fields[a],e[a])||"–")+" "+t._s(s.after)+"\n ")])]]:t._e()],2)}),n("td",{staticClass:"k-structure-table-option"},[n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}})],1)],2)}),0)],1),t.limit?n("k-pagination",t._b({on:{paginate:t.paginateItems}},"k-pagination",t.pagination,!1)):t._e(),t.disabled?t._e():n("k-dialog",{ref:"remove",attrs:{button:t.$t("delete"),theme:"negative"},on:{submit:t.remove}},[n("k-text",[t._v(t._s(t.$t("field.structure.delete.confirm")))])],1)]],2)},Fr=[],Ur=n("795b"),Hr=n.n(Ur),Kr=n("7618"),Vr=n("59ad"),Yr=n.n(Vr),Gr=function(t){t=t||{};var e=t.desc?-1:1,n=-e,i=/^0/,s=/\s+/g,a=/^\s+|\s+$/g,o=/[^\x00-\x80]/,r=/^0x[0-9a-f]+$/i,l=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=t.insensitive?function(t){return d(""+t).replace(a,"")}:function(t){return(""+t).replace(a,"")};function d(t){return t.toLocaleLowerCase?t.toLocaleLowerCase():t.toLowerCase()}function p(t){return t.replace(l,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function f(t,e){return(!t.match(i)||1===e)&&Yr()(t)||t.replace(s," ").replace(a,"")||0}return function(t,i){var s=c(t),a=c(i);if(!s&&!a)return 0;if(!s&&a)return n;if(s&&!a)return e;var l=p(s),d=p(a),h=is()(s.match(r),16)||1!==l.length&&Date.parse(s),m=is()(a.match(r),16)||h&&a.match(u)&&Date.parse(a)||null;if(m){if(hm)return e}for(var g=l.length,v=d.length,b=0,k=Math.max(g,v);b0)return e;if(y<0)return n;if(b===k-1)return 0}else{if($<_)return n;if($>_)return e}}return 0}};Array.prototype.sortBy=function(t){var e=Gr(),n=t.split(" "),i=n[0],s=n[1]||"asc";return this.sort(function(t,n){var a=String(t[i]).toLowerCase(),o=String(n[i]).toLowerCase();return"desc"===s?e(o,a):e(a,o)})};var Wr,Jr,Xr,Zr,Qr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,{columns:Object,empty:String,fields:Object,limit:Number,max:Number,min:Number,sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{items:this.makeItems(this.value),currentIndex:null,currentModel:null,trash:null,page:1}},computed:{dragOptions:function(){return{disabled:!this.isSortable,fallbackClass:"k-sortable-row-fallback"}},formFields:function(){var t=this,e={};return ne()(this.fields).forEach(function(n){var i=t.fields[n];i.section=t.name,i.endpoints={field:t.endpoints.field+"+"+n,section:t.endpoints.section,model:t.endpoints.model},e[n]=i}),e},more:function(){return!0!==this.disabled&&!(this.max&&this.items.length>=this.max)},isSortable:function(){return!this.sortBy&&(!this.limit&&(!0!==this.disabled&&(!(this.items.length<=1)&&!1!==this.sortable)))},pagination:function(){var t=0;return this.limit&&(t=(this.page-1)*this.limit),{page:this.page,offset:t,limit:this.limit,total:this.items.length,align:"center",details:!0}},paginatedItems:function(){return this.limit?this.items.slice(this.pagination.offset,this.pagination.offset+this.limit):this.items}},watch:{value:function(t){t!=this.items&&(this.items=this.makeItems(t))}},methods:{add:function(){var t=this;if(!0===this.disabled)return!1;if(null!==this.currentIndex)return this.escape(),!1;var e={};ne()(this.fields).forEach(function(n){var i=t.fields[n];i.default?e[n]=pr(i.default):e[n]=null}),this.currentIndex="new",this.currentModel=e,this.createForm()},close:function(){this.currentIndex=null,this.currentModel=null,this.$events.$off("keydown.esc",this.escape),this.$events.$off("keydown.cmd.s",this.submit),this.$store.dispatch("form/unlock")},columnIsEmpty:function(t){return void 0===t||null===t||""===t||("object"===Object(Kr["a"])(t)&&0===ne()(t).length&&t.constructor===Object||void 0!==t.length&&0===t.length)},confirmRemove:function(t){this.close(),this.trash=t,this.$refs.remove.open()},createForm:function(t){var e=this;this.$events.$on("keydown.esc",this.escape),this.$events.$on("keydown.cmd.s",this.submit),this.$store.dispatch("form/lock"),this.$nextTick(function(){e.$refs.form&&e.$refs.form.focus(t)})},displayText:function(t,e){switch(t.type){case"user":return e.email;case"date":var n=Mn()(e),i=!0===t.time?"YYYY-MM-DD HH:mm":"YYYY-MM-DD";return n.isValid()?n.format(i):"";case"tags":return e.map(function(t){return t.text}).join(", ");case"checkboxes":return e.map(function(e){var n=e;return t.options.forEach(function(t){t.value===e&&(n=t.text)}),n}).join(", ");case"radio":case"select":var s=t.options.filter(function(t){return t.value===e})[0];return s?s.text:null}return"object"===Object(Kr["a"])(e)&&null!==e?"…":e},escape:function(){var t=this;if("new"===this.currentIndex){var e=ji()(this.currentModel),n=!0;if(e.forEach(function(e){!1===t.columnIsEmpty(e)&&(n=!1)}),!0===n)return void this.close()}this.submit()},focus:function(){this.$refs.add.focus()},indexOf:function(t){return this.limit?(this.page-1)*this.limit+t+1:t+1},isActive:function(t){return this.currentIndex===t},jump:function(t,e){this.open(t+this.pagination.offset,e)},makeItems:function(t){return!1===Wi()(t)?[]:this.sort(t)},onInput:function(){this.$emit("input",this.items)},open:function(t,e){this.currentIndex=t,this.currentModel=pr(this.items[t]),this.createForm(e)},beforePaginate:function(){return this.save(this.currentModel)},paginate:function(t){this.open(t.offset)},paginateItems:function(t){this.page=t.page},previewExists:function(t){return void 0!==A["a"].options.components["k-"+t+"-field-preview"]||void 0!==this.$options.components["k-"+t+"-field-preview"]},remove:function(){if(null===this.trash)return!1;this.items.splice(this.trash,1),this.trash=null,this.$refs.remove.close(),this.onInput(),0===this.paginatedItems.length&&this.page>1&&this.page--,this.items=this.sort(this.items)},sort:function(t){return this.sortBy?t.sortBy(this.sortBy):t},save:function(){var t=this;return null!==this.currentIndex&&void 0!==this.currentIndex?this.validate(this.currentModel).then(function(){return"new"===t.currentIndex?t.items.push(t.currentModel):t.items[t.currentIndex]=t.currentModel,t.items=t.sort(t.items),t.onInput(),!0}).catch(function(e){throw t.$store.dispatch("notification/error",{message:t.$t("error.form.incomplete"),details:e}),e}):Hr.a.resolve()},submit:function(){this.save().then(this.close).catch(function(){})},validate:function(t){return this.$api.post(this.endpoints.field+"/validate",t).then(function(t){if(t.length>0)throw t;return!0})}}},tl=Qr,el=(n("088c"),Object(h["a"])(tl,zr,Fr,!1,null,null,null)),nl=el.exports,il=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tags-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},sl=[],al={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,ua.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Wi()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},ol=al,rl=Object(h["a"])(ol,il,sl,!1,null,null,null),ll=rl.exports,ul=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tel-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},cl=[],dl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,fa.props,{icon:{type:String,default:"phone"}}),methods:{focus:function(){this.$refs.input.focus()}}},pl=dl,fl=Object(h["a"])(pl,ul,cl,!1,null,null,null),hl=fl.exports,ml=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-text-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[t._t("options",null,{slot:"options"}),n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],2)},gl=[],vl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,ks.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},bl=vl,kl=(n("b746"),Object(h["a"])(bl,ml,gl,!1,null,null,null)),$l=kl.exports,_l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-textarea-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:"textarea",theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},yl=[],xl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ra.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?this.value.length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},wl=xl,Ol=Object(h["a"])(wl,_l,yl,!1,null,null,null),Sl=Ol.exports,Cl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-time-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},El=[],Tl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ja.props,{icon:{type:String,default:"clock"}}),methods:{focus:function(){this.$refs.input.focus()}}},jl=Tl,Il=Object(h["a"])(jl,Cl,El,!1,null,null,null),Ll=Il.exports,ql=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-toggle-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},Nl=[],Al={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,no.props),methods:{focus:function(){this.$refs.input.focus()}}},Bl=Al,Pl=Object(h["a"])(Bl,ql,Nl,!1,null,null,null),Dl=Pl.exports,Ml=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-url-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners),[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},Rl=[],zl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,oo.props,{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}}),methods:{focus:function(){this.$refs.input.focus()}}},Fl=zl,Ul=Object(h["a"])(Fl,Ml,Rl,!1,null,null,null),Hl=Ul.exports,Kl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-users-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("k-button",{attrs:{slot:"options",icon:"add"},on:{click:t.open},slot:"options"},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,handle:!0},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.email,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.username,link:t.$api.users.link(e.id),image:e.avatar?{url:e.avatar.url,back:"pattern",cover:!0}:null,icon:{type:"user",back:"black"}}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",t._g({attrs:{icon:"users"}},{click:t.disabled?null:t.open}),[t._v("\n "+t._s(t.empty||t.$t("field.users.empty"))+"\n ")]),n("k-users-dialog",{ref:"selector",on:{submit:t.select}})],2)},Vl=[],Yl={mixins:[Eo],methods:{open:function(){this.$refs.selector.open({max:this.max,multiple:this.multiple,selected:this.selected.map(function(t){return t.email})})}}},Gl=Yl,Wl=(n("7f6e"),Object(h["a"])(Gl,Kl,Vl,!1,null,null,null)),Jl=Wl.exports,Xl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.value?n("ul",{staticClass:"k-files-field-preview"},t._l(t.value,function(e){return n("li",{key:e.url},[n("k-link",{attrs:{title:e.filename,to:e.link},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-image",t._b({attrs:{src:e.url}},"k-image",t.image,!1))],1)],1)}),0):t._e()},Zl=[],Ql={props:{value:Array,field:Object},computed:{image:function(){var t=this.field.image||{};return Object(l["a"])({back:"pattern",cover:!1},t)}}},tu=Ql,eu=(n("21dc"),Object(h["a"])(tu,Xl,Zl,!1,null,null,null)),nu=eu.exports,iu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"k-url-field-preview"},[t._v("\n "+t._s(t.column.before)+"\n "),n("k-link",{attrs:{to:t.link,target:"_blank"},nativeOn:{click:function(t){t.stopPropagation()}}},[t._v(t._s(t.value))]),t._v("\n "+t._s(t.column.after)+"\n")],1)},su=[],au={props:{column:{type:Object,default:function(){return{}}},value:String},computed:{link:function(){return this.value}}},ou=au,ru=(n("977f"),Object(h["a"])(ou,iu,su,!1,null,null,null)),lu=ru.exports,uu={extends:lu,computed:{link:function(){return"mailto:"+this.value}}},cu=uu,du=Object(h["a"])(cu,Wr,Jr,!1,null,null,null),pu=du.exports,fu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.value?n("ul",{staticClass:"k-pages-field-preview"},t._l(t.value,function(e){return n("li",{key:e.id},[n("figure",[n("k-link",{attrs:{title:e.id,to:t.$api.pages.link(e.id)},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-icon",{staticClass:"k-pages-field-preview-image",attrs:{type:"page",back:"pattern"}}),n("figcaption",[t._v("\n "+t._s(e.text)+"\n ")])],1)],1)])}),0):t._e()},hu=[],mu={props:{value:Array}},gu=mu,vu=(n("d0c1"),Object(h["a"])(gu,fu,hu,!1,null,null,null)),bu=vu.exports,ku=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.value?n("ul",{staticClass:"k-users-field-preview"},t._l(t.value,function(e){return n("li",{key:e.email},[n("figure",[n("k-link",{attrs:{title:e.email,to:t.$api.users.link(e.id)},nativeOn:{click:function(t){t.stopPropagation()}}},[e.avatar?n("k-image",{staticClass:"k-users-field-preview-avatar",attrs:{src:e.avatar.url,back:"pattern"}}):n("k-icon",{staticClass:"k-users-field-preview-avatar",attrs:{type:"user",back:"pattern"}}),n("figcaption",[t._v("\n "+t._s(e.username)+"\n ")])],1)],1)])}),0):t._e()},$u=[],_u={props:{value:Array}},yu=_u,xu=(n("3a85"),Object(h["a"])(yu,ku,$u,!1,null,null,null)),wu=xu.exports,Ou=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-bar"},[t.$slots.left?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"left"}},[t._t("left")],2):t._e(),t.$slots.center?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"center"}},[t._t("center")],2):t._e(),t.$slots.right?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"right"}},[t._t("right")],2):t._e()])},Su=[],Cu=(n("6f7b"),{}),Eu=Object(h["a"])(Cu,Ou,Su,!1,null,null,null),Tu=Eu.exports,ju=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-box",attrs:{"data-theme":t.theme}},t.$listeners),[t._t("default",[n("k-text",{domProps:{innerHTML:t._s(t.text)}})])],2)},Iu=[],Lu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-text",attrs:{"data-align":t.align,"data-size":t.size,"data-theme":t.theme}},[t._t("default")],2)},qu=[],Nu={props:{align:String,size:String,theme:String}},Au=Nu,Bu=(n("b0d6"),Object(h["a"])(Au,Lu,qu,!1,null,null,null)),Pu=Bu.exports,Du={components:{"k-text":Pu},props:{theme:String,text:String}},Mu=Du,Ru=(n("7dc7"),Object(h["a"])(Mu,ju,Iu,!1,null,null,null)),zu=Ru.exports,Fu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("figure",t._g({staticClass:"k-card"},t.$listeners),[t.sortable?n("k-sort-handle"):t._e(),n(t.wrapper,{tag:"component",attrs:{to:t.link,target:t.target}},[t.image&&t.image.url?n("k-image",{staticClass:"k-card-image",attrs:{src:t.image.url,ratio:t.image.ratio||"3/2",back:t.image.back||"black",cover:t.image.cover}}):n("span",{staticClass:"k-card-icon",style:"padding-bottom:"+t.ratioPadding},[n("k-icon",t._b({},"k-icon",t.icon,!1))],1),n("figcaption",{staticClass:"k-card-content"},[n("span",{staticClass:"k-card-text",attrs:{"data-noinfo":!t.info}},[t._v(t._s(t.text))]),t.info?n("span",{staticClass:"k-card-info",domProps:{innerHTML:t._s(t.info)}}):t._e()])],1),n("nav",{staticClass:"k-card-options"},[t.flag?n("k-button",t._b({staticClass:"k-card-options-button",on:{click:t.flag.click}},"k-button",t.flag,!1)):t._e(),t._t("options",[t.options?n("k-button",{staticClass:"k-card-options-button",attrs:{tooltip:t.$t("options"),icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.dropdown.toggle()}}}):t._e(),n("k-dropdown-content",{ref:"dropdown",staticClass:"k-card-options-dropdown",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},Uu=[],Hu=function(t){t=t||"3/2";var e=t.split("/");if(2!==e.length)return"100%";var n=Number(e[0]),i=Number(e[1]),s=100/n*i;return s+"%"},Ku={inheritAttrs:!1,props:{flag:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},image:Object,info:String,link:String,options:[Array,Function],sortable:Boolean,target:String,text:String},computed:{wrapper:function(){return this.link?"k-link":"div"},ratioPadding:function(){return this.icon&&this.icon.ratio?Hu(this.icon.ratio):Hu("3/2")}}},Vu=Ku,Yu=(n("c119"),Object(h["a"])(Vu,Fu,Uu,!1,null,null,null)),Gu=Yu.exports,Wu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-cards"},[t._t("default",t._l(t.cards,function(e,i){return n("k-card",t._g(t._b({key:i},"k-card",e,!1),t.$listeners))}))],2)},Ju=[],Xu={props:{cards:Array}},Zu=Xu,Qu=(n("f56d"),Object(h["a"])(Zu,Wu,Ju,!1,null,null,null)),tc=Qu.exports,ec=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-collection",attrs:{"data-layout":t.layout}},[n("k-draggable",{attrs:{list:t.items,options:t.dragOptions,element:t.elements.list,"data-size":t.size,handle:!0},on:{change:function(e){return t.$emit("change",e)},end:t.onEnd}},t._l(t.items,function(e,i){return n(t.elements.item,t._b({key:i,tag:"component",class:{"k-draggable-item":e.sortable},on:{action:function(n){return t.$emit("action",e,n)},dragstart:function(n){return t.onDragStart(n,e.dragText)}}},"component",e,!1))}),1),t.hasFooter?n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e(),n("div",{staticClass:"k-collection-pagination"},[t.hasPagination?n("k-pagination",t._b({on:{paginate:function(e){return t.$emit("paginate",e)}}},"k-pagination",t.paginationOptions,!1)):t._e()],1)],1):t._e()],1)},nc=[],ic={props:{help:String,items:{type:[Array,Object],default:function(){return[]}},layout:{type:String,default:"list"},size:String,sortable:Boolean,pagination:{type:[Boolean,Object],default:function(){return!1}}},computed:{hasPagination:function(){return!1!==this.pagination&&(!0!==this.paginationOptions.hide&&!(this.pagination.total<=this.pagination.limit))},hasFooter:function(){return!(!this.hasPagination&&!this.help)},dragOptions:function(){return{sort:this.sortable,disabled:!1===this.sortable,draggable:".k-draggable-item"}},elements:function(){var t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},paginationOptions:function(){var t="object"!==Object(Kr["a"])(this.pagination)?{}:this.pagination;return Object(l["a"])({limit:10,details:!0,keys:!1,total:0,hide:!1},t)}},watch:{$props:function(){this.$forceUpdate()}},over:null,methods:{onEnd:function(){this.over&&this.over.removeAttribute("data-over"),this.$emit("sort",this.items)},onDragStart:function(t,e){this.$store.dispatch("drag",{type:"text",data:e})}}},sc=ic,ac=(n("8c28"),Object(h["a"])(sc,ec,nc,!1,null,null,null)),oc=ac.exports,rc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column",attrs:{"data-width":t.width}},[t._t("default")],2)},lc=[],uc={name:"KirbyColumn",props:{width:String}},cc=uc,dc=(n("c9cb"),Object(h["a"])(cc,rc,lc,!1,null,null,null)),pc=dc.exports,fc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-dropzone",attrs:{"data-dragging":t.dragging,"data-over":t.over},on:{dragenter:t.onEnter,dragleave:t.onLeave,dragover:t.onOver,drop:t.onDrop}},[t._t("default")],2)},hc=[],mc={props:{label:{type:String,default:"Drop to upload"},disabled:{type:Boolean,default:!1}},data:function(){return{files:[],dragging:!1,over:!1}},methods:{cancel:function(){this.reset()},reset:function(){this.dragging=!1,this.over=!1},onDrop:function(t){return!0===this.disabled?this.reset():t.dataTransfer.types?!1===t.dataTransfer.types.includes("Files")?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset()):this.reset()},onEnter:function(t){!1===this.disabled&&t.dataTransfer.types&&t.dataTransfer.types.includes("Files")&&(this.dragging=!0)},onLeave:function(){this.reset()},onOver:function(t){!1===this.disabled&&t.dataTransfer.types&&t.dataTransfer.types.includes("Files")&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},gc=mc,vc=(n("414d"),Object(h["a"])(gc,fc,hc,!1,null,null,null)),bc=vc.exports,kc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-empty",attrs:{"data-layout":t.layout}},t.$listeners),[n("k-icon",{attrs:{type:t.icon}}),n("p",[t._t("default")],2)],1)},$c=[],_c={props:{text:String,icon:String,layout:{type:String,default:"list"}}},yc=_c,xc=(n("ba8f"),Object(h["a"])(yc,kc,$c,!1,null,null,null)),wc=xc.exports,Oc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-file-preview"},[n("k-view",{staticClass:"k-file-preview-layout"},[n("div",{staticClass:"k-file-preview-image"},[n("a",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-file-preview-image-link",attrs:{href:t.file.url,title:t.$t("open"),target:"_blank"}},[t.file.panelImage&&t.file.panelImage.url?n("k-image",{attrs:{src:t.file.panelImage.url,back:"none"}}):t.file.panelIcon?n("k-icon",{staticClass:"k-file-preview-icon",style:{color:t.file.panelIcon.color},attrs:{type:t.file.panelIcon.type}}):n("span",{staticClass:"k-file-preview-placeholder"})],1)]),n("div",{staticClass:"k-file-preview-details"},[n("ul",[n("li",[n("h3",[t._v(t._s(t.$t("template")))]),n("p",[t._v(t._s(t.file.template||"—"))])]),n("li",[n("h3",[t._v(t._s(t.$t("mime")))]),n("p",[t._v(t._s(t.file.mime))])]),n("li",[n("h3",[t._v(t._s(t.$t("url")))]),n("p",[n("k-link",{attrs:{to:t.file.url,tabindex:"-1",target:"_blank"}},[t._v("/"+t._s(t.file.id))])],1)]),n("li",[n("h3",[t._v(t._s(t.$t("size")))]),n("p",[t._v(t._s(t.file.niceSize))])]),n("li",[n("h3",[t._v(t._s(t.$t("dimensions")))]),t.file.dimensions?n("p",[t._v(t._s(t.file.dimensions.width)+"×"+t._s(t.file.dimensions.height)+" "+t._s(t.$t("pixel")))]):n("p",[t._v("—")])]),n("li",[n("h3",[t._v(t._s(t.$t("orientation")))]),t.file.dimensions?n("p",[t._v(t._s(t.$t("orientation."+t.file.dimensions.orientation)))]):n("p",[t._v("—")])])])])])],1)},Sc=[],Cc={props:{file:Object}},Ec=Cc,Tc=(n("696b5"),Object(h["a"])(Ec,Oc,Sc,!1,null,null,null)),jc=Tc.exports,Ic=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-grid",attrs:{"data-gutter":t.gutter}},[t._t("default")],2)},Lc=[],qc={props:{gutter:String}},Nc=qc,Ac=(n("5b23"),Object(h["a"])(Nc,Ic,Lc,!1,null,null,null)),Bc=Ac.exports,Pc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("header",{staticClass:"k-header",attrs:{"data-editable":t.editable}},[n("k-headline",{attrs:{tag:"h1",size:"huge"}},[t.editable&&t.$listeners.edit?n("span",{staticClass:"k-headline-editable",on:{click:function(e){return t.$emit("edit")}}},[t._t("default"),n("k-icon",{attrs:{type:"edit"}})],2):t._t("default")],2),t.$slots.left||t.$slots.right?n("k-bar",{staticClass:"k-header-buttons"},[t._t("left",null,{slot:"left"}),t._t("right",null,{slot:"right"})],2):t._e(),t.tabs&&t.tabs.length>1?n("div",{staticClass:"k-header-tabs"},[n("nav",[t._l(t.visibleTabs,function(e,i){return n("k-button",{key:t.$route.fullPath+"-tab-"+i,staticClass:"k-tab-button",attrs:{link:"#"+e.name,current:t.currentTab&&t.currentTab.name===e.name,icon:e.icon,tooltip:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])}),t.invisibleTabs.length?n("k-button",{staticClass:"k-tab-button k-tabs-dropdown-button",attrs:{icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.more.toggle()}}},[t._v("\n "+t._s(t.$t("more"))+"\n ")]):t._e()],2),t.invisibleTabs.length?n("k-dropdown-content",{ref:"more",staticClass:"k-tabs-dropdown",attrs:{align:"right"}},t._l(t.invisibleTabs,function(e,i){return n("k-dropdown-item",{key:"more-"+i,attrs:{link:"#"+e.name,current:t.currentTab&&t.currentTab.name===e.name,icon:e.icon,tooltip:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])}),1):t._e()],1):t._e()],1)},Dc=[],Mc={props:{editable:Boolean,tabs:Array,tab:Object},data:function(){return{size:null,currentTab:this.tab,visibleTabs:this.tabs,invisibleTabs:[]}},watch:{tab:function(){this.currentTab=this.tab},tabs:function(t){this.visibleTabs=t,this.invisibleTabs=[],this.resize(!0)}},created:function(){window.addEventListener("resize",this.resize)},destroyed:function(){window.removeEventListener("resize",this.resize)},methods:{resize:function(t){if(this.tabs&&!(this.tabs.length<=1)){if(this.tabs.length<=3)return this.visibleTabs=this.tabs,void(this.invisibleTabs=[]);if(window.innerWidth>=700){if("large"===this.size&&!t)return;this.visibleTabs=this.tabs,this.invisibleTabs=[],this.size="large"}else{if("small"===this.size&&!t)return;this.visibleTabs=this.tabs.slice(0,2),this.invisibleTabs=this.tabs.slice(2),this.size="small"}}}}},Rc=Mc,zc=(n("53c5"),Object(h["a"])(Rc,Pc,Dc,!1,null,null,null)),Fc=zc.exports,Uc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-list"},[t._t("default",t._l(t.items,function(e,i){return n("k-list-item",t._g(t._b({key:i},"k-list-item",e,!1),t.$listeners))}))],2)},Hc=[],Kc={props:{items:Array}},Vc=Kc,Yc=(n("c857"),Object(h["a"])(Vc,Uc,Hc,!1,null,null,null)),Gc=Yc.exports,Wc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.element,t._g({tag:"component",staticClass:"k-list-item"},t.$listeners),[t.sortable?n("k-sort-handle"):t._e(),n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-list-item-content",attrs:{to:t.link,target:t.target}},[n("span",{staticClass:"k-list-item-image"},[t.image&&t.image.url?n("k-image",{attrs:{src:t.image.url,back:t.image.back||"pattern",cover:t.image.cover}}):n("k-icon",t._b({},"k-icon",t.icon,!1))],1),n("span",{staticClass:"k-list-item-text"},[n("em",[t._v(t._s(t.text))]),t.info?n("small",{domProps:{innerHTML:t._s(t.info)}}):t._e()])]),n("nav",{staticClass:"k-list-item-options"},[t._t("options",[t.flag?n("k-button",t._b({on:{click:t.flag.click}},"k-button",t.flag,!1)):t._e(),t.options?n("k-button",{staticClass:"k-list-item-toggle",attrs:{tooltip:t.$t("options"),icon:"dots",alt:"Options"},on:{click:function(e){return e.stopPropagation(),t.$refs.options.toggle()}}}):t._e(),n("k-dropdown-content",{ref:"options",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},Jc=[],Xc={inheritAttrs:!1,props:{element:{type:String,default:"li"},image:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},sortable:Boolean,text:String,target:String,info:String,link:String,flag:Object,options:[Array,Function]}},Zc=Xc,Qc=(n("fa6a"),Object(h["a"])(Zc,Wc,Jc,!1,null,null,null)),td=Qc.exports,ed=function(){var t=this,e=t.$createElement,n=t._self._c||e;return 0===t.tabs.length?n("k-box",{attrs:{text:"This page has no blueprint setup yet",theme:"info"}}):t.tab?n("k-sections",{attrs:{parent:t.parent,blueprint:t.blueprint,columns:t.tab.columns},on:{submit:function(e){return t.$emit("submit",e)}}}):t._e()},nd=[],id={props:{parent:String,blueprint:String,tabs:Array},data:function(){return{tab:null}},watch:{$route:function(){this.open()},blueprint:function(){this.open()}},mounted:function(){this.open()},methods:{open:function(t){if(0!==this.tabs.length){t||(t=this.$route.hash.replace("#","")),t||(t=this.tabs[0].name);var e=null;this.tabs.forEach(function(n){n.name===t&&(e=n)}),e||(e=this.tabs[0]),this.tab=e,this.$emit("tab",this.tab)}}}},sd=id,ad=Object(h["a"])(sd,ed,nd,!1,null,null,null),od=ad.exports,rd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-view",attrs:{"data-align":t.align}},[t._t("default")],2)},ld=[],ud={props:{align:String}},cd=ud,dd=(n("daa8"),Object(h["a"])(cd,rd,ld,!1,null,null,null)),pd=dd.exports,fd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("draggable",t._g(t._b({staticClass:"k-draggable",attrs:{tag:t.element,list:t.list,move:t.move}},"draggable",t.dragOptions,!1),t.listeners),[t._t("default"),t._t("footer",null,{slot:"footer"})],2)},hd=[],md=n("1980"),gd=n.n(md),vd={components:{draggable:gd.a},props:{element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{start:function(e){t.$store.dispatch("drag",{}),t.$listeners.start&&t.$listeners.start(e)},end:function(e){t.$store.dispatch("drag",null),t.$listeners.end&&t.$listeners.end(e)}})}},computed:{dragOptions:function(){var t=!1;return t=!0===this.handle?".k-sort-handle":this.handle,Object(l["a"])({fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view")},this.options)}}},bd=vd,kd=Object(h["a"])(bd,fd,hd,!1,null,null,null),$d=kd.exports,_d={data:function(){return{error:null}},errorCaptured:function(t){return d.debug&&window.console.error(t),this.error=t,!1},render:function(t){return this.error?this.$slots.error?this.$slots.error[0]:this.$scopedSlots.error?this.$scopedSlots.error({error:this.error}):t("k-box",{attrs:{theme:"negative"}},this.error.message||this.error):this.$slots.default[0]}},yd=_d,xd=Object(h["a"])(yd,Xr,Zr,!1,null,null,null),wd=xd.exports,Od=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,t._g({tag:"component",staticClass:"k-headline",attrs:{"data-theme":t.theme,"data-size":t.size}},t.$listeners),[t.link?n("k-link",{attrs:{to:t.link}},[t._t("default")],2):t._t("default")],2)},Sd=[],Cd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.to&&!t.disabled?n("a",t._g({ref:"link",staticClass:"k-link",attrs:{disabled:t.disabled,href:t.href,rel:t.relAttr,tabindex:t.tabindex,target:t.target,title:t.title}},t.listeners),[t._t("default")],2):n("span",{staticClass:"k-link",attrs:{title:t.title,"data-disabled":""}},[t._t("default")],2)},Ed=[],Td={props:{disabled:Boolean,rel:String,tabindex:String,target:String,title:String,to:String},data:function(){return{relAttr:"_blank"===this.target?"noreferrer noopener":this.rel,listeners:Object(l["a"])({},this.$listeners,{click:this.onClick})}},computed:{href:function(){return void 0===this.$route||"/"!==this.to[0]||this.target?this.to:(this.$router.options.url||"")+this.to}},methods:{isRoutable:function(t){return void 0!==this.$route&&(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&(!t.defaultPrevented&&((void 0===t.button||0===t.button)&&!this.target)))},onClick:function(t){if(!0===this.disabled)return t.preventDefault(),!1;this.isRoutable(t)&&(t.preventDefault(),this.$router.push(this.to)),this.$emit("click",t)},focus:function(){this.$refs.link.focus()}}},jd=Td,Id=Object(h["a"])(jd,Cd,Ed,!1,null,null,null),Ld=Id.exports,qd={components:{"k-link":Ld},props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},Nd=qd,Ad=(n("f8a7"),Object(h["a"])(Nd,Od,Sd,!1,null,null,null)),Bd=Ad.exports,Pd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{class:"k-icon k-icon-"+t.type,attrs:{"aria-label":t.alt,role:t.alt?"img":null,"aria-hidden":!t.alt,"data-back":t.back,"data-size":t.size}},[t.emoji?n("span",{staticClass:"k-icon-emoji"},[t._v(t._s(t.type))]):n("svg",{style:{color:t.color},attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-"+t.type}})])])},Dd=[],Md={props:{alt:String,color:String,back:String,emoji:Boolean,size:String,type:String}},Rd=Md,zd=(n("3342"),Object(h["a"])(Rd,Pd,Dd,!1,null,null,null)),Fd=zd.exports,Ud=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",t._g({staticClass:"k-image",attrs:{"data-ratio":t.ratio,"data-back":t.back,"data-cover":t.cover}},t.$listeners),[n("span",{style:"padding-bottom:"+t.ratioPadding},[t.loaded?n("img",{key:t.src,attrs:{alt:t.alt||"",src:t.src},on:{dragstart:function(t){t.preventDefault()}}}):t._e(),t.loaded||t.error?t._e():n("k-loader",{attrs:{position:"center",theme:"light"}}),!t.loaded&&t.error?n("k-icon",{staticClass:"k-image-error",attrs:{type:"cancel"}}):t._e()],1)])},Hd=[],Kd={props:{src:String,alt:String,ratio:String,back:String,cover:Boolean},data:function(){return{loaded:{type:Boolean,default:!1},error:{type:Boolean,default:!1}}},computed:{ratioPadding:function(){return Hu(this.ratio||"1/1")}},created:function(){var t=this,e=new Image;e.onload=function(){t.loaded=!0,t.$emit("load")},e.onerror=function(){t.error=!0,t.$emit("error")},e.src=this.src}},Vd=Kd,Yd=(n("0d56"),Object(h["a"])(Vd,Ud,Hd,!1,null,null,null)),Gd=Yd.exports,Wd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("progress",{staticClass:"k-progress",attrs:{max:"100"},domProps:{value:t.state}},[t._v("\n "+t._s(t.state)+"%\n")])},Jd=[],Xd={props:{value:{type:Number,default:0}},data:function(){return{state:this.value}},methods:{set:function(t){this.state=t}}},Zd=Xd,Qd=(n("9799"),Object(h["a"])(Zd,Wd,Jd,!1,null,null,null)),tp=Qd.exports,ep=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-sort-handle",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-sort"}})])])},np=[],ip=(n("35cb"),{}),sp=Object(h["a"])(ip,ep,np,!1,null,null,null),ap=sp.exports,op=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.component,t._g({directives:[{name:"tab",rawName:"v-tab"}],ref:"button",tag:"component",staticClass:"k-button",attrs:{"aria-current":t.current,autofocus:t.autofocus,id:t.id,disabled:t.disabled,"data-tabbed":t.tabbed,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link,type:t.link?null:t.type}},t.$listeners),[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)},rp=[],lp={components:{"k-icon":Fd,"k-link":Ld},directives:{tab:E},inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}},data:function(){return{tabbed:!1}},computed:{component:function(){return this.link?"k-link":"button"},imageUrl:function(){return this.image?"object"===Object(Kr["a"])(this.image)?this.image.url:this.image:null}},methods:{focus:function(){this.$refs.button.focus()},tab:function(){this.focus(),this.tabbed=!0},untab:function(){this.tabbed=!1}}},up=lp,cp=(n("3787"),Object(h["a"])(up,op,rp,!1,null,null,null)),dp=cp.exports,pp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-button-group"},[t._t("default")],2)},fp=[],hp=(n("a567"),{}),mp=Object(h["a"])(hp,pp,fp,!1,null,null,null),gp=mp.exports,vp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-dropdown",on:{click:function(t){t.stopPropagation()}}},[t._t("default")],2)},bp=[],kp=(n("f95f"),{}),$p=Object(h["a"])(kp,vp,bp,!1,null,null,null),_p=$p.exports,yp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("div",{staticClass:"k-dropdown-content",attrs:{"data-align":t.align}},[t._t("default",t._l(t.items,function(e,i){return n("k-dropdown-item",t._b({key:t._uid+"-item-"+i,ref:t._uid+"-item-"+i,refInFor:!0,on:{click:function(n){return t.$emit("action",e.click)}}},"k-dropdown-item",e,!1),[t._v("\n "+t._s(e.text)+"\n ")])}))],2):t._e()},xp=[],wp=null,Op={props:{options:[Array,Function],align:String},data:function(){return{items:[],current:-1,isOpen:!1}},methods:{fetchOptions:function(t){if(!this.options)return t(this.items);"string"===typeof this.options?fetch(this.options).then(function(t){return t.json()}).then(function(e){return t(e)}):"function"===typeof this.options?this.options(t):Wi()(this.options)&&t(this.options)},open:function(){var t=this;this.reset(),wp&&wp!==this&&wp.close(),this.fetchOptions(function(e){t.$events.$on("keydown",t.navigate),t.$events.$on("click",t.close),t.items=e,t.isOpen=!0,t.$emit("open"),wp=t})},reset:function(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close:function(){this.reset(),this.isOpen=wp=!1,this.$emit("close")},toggle:function(){this.isOpen?this.close():this.open()},focus:function(t){t=t||0,this.$children[t]&&this.$children[t].focus&&(this.current=t,this.$children[t].focus())},navigate:function(t){switch(t.code){case"Escape":case"ArrowLeft":this.close(),this.$emit("leave",t.code);break;case"ArrowUp":t.preventDefault(),this.current>0?(this.current--,this.focus(this.current)):(this.close(),this.$emit("leave",t.code));break;case"ArrowDown":t.preventDefault(),this.current1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\n ")],2),n("k-dropdown-content",{ref:"dropdown",staticClass:"k-pagination-selector",on:{open:function(e){t.$nextTick(function(){return t.$refs.page.focus()})}}},[n("div",[n("label",{attrs:{for:"k-pagination-input"}},[t._v(t._s(t.pageLabel))]),n("input",{ref:"page",attrs:{id:"k-pagination-input",min:1,max:t.pages,type:"number"},domProps:{value:t.currentPage},on:{keydown:[function(t){t.stopPropagation()},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.goTo(e.target.value)}]}}),n("k-button",{attrs:{icon:"angle-up"},on:{click:function(e){return t.goTo(t.$refs.page.value)}}})],1)])],1)]:[n("span",{staticClass:"k-pagination-details"},[t.total>1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\n ")],2)]]:t._e(),t.show?n("k-button",{attrs:{disabled:!t.hasNext,tooltip:t.nextLabel,icon:"angle-right"},on:{click:t.next}}):t._e()],2):t._e()},Fp=[],Up={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},validate:{type:Function,default:function(){return Hr.a.resolve()}},page:{type:Number,default:1},total:{type:Number,default:0},limit:{type:Number,default:10},keys:{type:Boolean,default:!1},pageLabel:{type:String,default:"Page"},prevLabel:{type:String,default:function(){return this.$t("prev")}},nextLabel:{type:String,default:function(){return this.$t("next")}}},data:function(){return{currentPage:this.page}},computed:{show:function(){return this.pages>1},start:function(){return(this.currentPage-1)*this.limit+1},end:function(){var t=this.start-1+this.limit;return t>this.total?this.total:t},detailsText:function(){return 1===this.limit?this.start+" / ":this.start+"-"+this.end+" / "},pages:function(){return Math.ceil(this.total/this.limit)},hasPrev:function(){return this.start>1},hasNext:function(){return this.endthis.limit},offset:function(){return this.start-1}},watch:{page:function(t){this.currentPage=t}},created:function(){!0===this.keys&&window.addEventListener("keydown",this.navigate,!1)},destroyed:function(){window.removeEventListener("keydown",this.navigate,!1)},methods:{goTo:function(t){var e=this;this.validate(t).then(function(){t<1&&(t=1),t>e.pages&&(t=e.pages),e.currentPage=t,e.$refs.dropdown&&e.$refs.dropdown.close(),e.$emit("paginate",{page:is()(e.currentPage),start:e.start,end:e.end,limit:e.limit,offset:e.offset})}).catch(function(){})},prev:function(){this.goTo(this.currentPage-1)},next:function(){this.goTo(this.currentPage+1)},navigate:function(t){switch(t.code){case"ArrowLeft":this.prev();break;case"ArrowRight":this.next();break}}}},Hp=Up,Kp=(n("a66d"),Object(h["a"])(Hp,zp,Fp,!1,null,null,null)),Vp=Kp.exports,Yp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-button-group",{staticClass:"k-prev-next"},[n("k-button",t._b({attrs:{icon:"angle-left"}},"k-button",t.prev,!1)),n("k-button",t._b({attrs:{icon:"angle-right"}},"k-button",t.next,!1))],1)},Gp=[],Wp={props:{prev:{type:Object,default:function(){return{disabled:!0,link:"#"}}},next:{type:Object,default:function(){return{disabled:!0,link:"#"}}}}},Jp=Wp,Xp=(n("7a7d"),Object(h["a"])(Jp,Yp,Gp,!1,null,null,null)),Zp=Xp.exports,Qp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{ref:"button",staticClass:"k-tag",attrs:{"data-size":t.size,tabindex:"0"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.remove(e))}}},[n("span",{staticClass:"k-tag-text"},[t._t("default")],2),t.removable?n("span",{staticClass:"k-tag-toggle",on:{click:t.remove}},[t._v("×")]):t._e()])},tf=[],ef={props:{removable:Boolean,size:String},methods:{remove:function(){this.removable&&this.$emit("remove")},focus:function(){this.$refs.button.focus()}}},nf=ef,sf=(n("021f"),Object(h["a"])(nf,Qp,tf,!1,null,null,null)),af=sf.exports,of=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.user&&t.view?n("div",{staticClass:"k-topbar"},[n("k-view",[n("div",{staticClass:"k-topbar-wrapper"},[n("k-dropdown",{staticClass:"k-topbar-menu"},[n("k-button",{staticClass:"k-topbar-button k-topbar-menu-button",attrs:{tooltip:t.$t("menu"),icon:"bars"},on:{click:function(e){return t.$refs.menu.toggle()}}},[n("k-icon",{attrs:{type:"angle-down"}})],1),n("k-dropdown-content",{ref:"menu",staticClass:"k-topbar-menu"},[n("ul",[t._l(t.views,function(e,i){return e.menu?n("li",{key:"menu-item-"+i,attrs:{"aria-current":t.$store.state.view===i}},[n("k-dropdown-item",{attrs:{disabled:!1===t.$permissions.access[i],icon:e.icon,link:e.link}},[t._v("\n "+t._s(t.$t("view."+i,e.label))+"\n ")])],1):t._e()}),n("li",[n("hr")]),n("li",{attrs:{"aria-current":"account"===t.$route.meta.view}},[n("k-dropdown-item",{attrs:{icon:"account",link:"/account"}},[t._v("\n "+t._s(t.$t("view.account"))+"\n ")])],1),n("li",[n("hr")]),n("li",[n("k-dropdown-item",{attrs:{icon:"logout",link:"/logout"}},[t._v("\n "+t._s(t.$t("logout"))+"\n ")])],1)],2)])],1),t.view?n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-topbar-button k-topbar-view-button",attrs:{to:t.view.link}},[n("k-icon",{attrs:{type:t.view.icon}}),t._v(" "+t._s(t.breadcrumbTitle)+"\n ")],1):t._e(),t.$store.state.breadcrumb.length>1?n("k-dropdown",{staticClass:"k-topbar-breadcrumb-menu"},[n("k-button",{staticClass:"k-topbar-button",on:{click:function(e){return t.$refs.crumb.toggle()}}},[t._v("\n …\n "),n("k-icon",{attrs:{type:"angle-down"}})],1),n("k-dropdown-content",{ref:"crumb"},[n("k-dropdown-item",{attrs:{icon:t.view.icon,link:t.view.link}},[t._v("\n "+t._s(t.$t("view."+t.$store.state.view,t.view.label))+"\n ")]),t._l(t.$store.state.breadcrumb,function(e,i){return n("k-dropdown-item",{key:"crumb-"+i+"-dropdown",attrs:{icon:t.view.icon,link:e.link}},[t._v("\n "+t._s(e.label)+"\n ")])})],2)],1):t._e(),n("nav",{staticClass:"k-topbar-crumbs"},t._l(t.$store.state.breadcrumb,function(e,i){return n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],key:"crumb-"+i,attrs:{to:e.link}},[t._v("\n "+t._s(e.label)+"\n ")])}),1),n("div",{staticClass:"k-topbar-signals"},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.$store.state.isLoading,expression:"$store.state.isLoading"}],staticClass:"k-topbar-loader"},[n("svg",{attrs:{viewBox:"0 0 16 18"}},[n("path",{attrs:{fill:"white",d:"M8,0 L16,4.50265232 L16,13.5112142 L8,18.0138665 L0,13.5112142 L0,4.50265232 L8,0 Z M2.10648757,5.69852516 L2.10648757,12.3153414 L8,15.632396 L13.8935124,12.3153414 L13.8935124,5.69852516 L8,2.38147048 L2.10648757,5.69852516 Z"}})])]),t.notification?n("k-button",{staticClass:"k-topbar-notification",attrs:{theme:"positive"},on:{click:function(e){return t.$store.dispatch("notification/close")}}},[t._v("\n "+t._s(t.notification.message)+"\n ")]):[t.unregistered?n("div",{staticClass:"k-registration"},[n("p",[t._v(t._s(t.$t("license.unregistered")))]),n("k-button",{attrs:{responsive:!0,icon:"key"},on:{click:function(e){return t.$emit("register")}}},[t._v(t._s(t.$t("license.register")))]),n("k-button",{attrs:{responsive:!0,link:"https://getkirby.com/buy",target:"_blank",icon:"cart"}},[t._v("\n "+t._s(t.$t("license.buy"))+"\n ")])],1):t._e(),n("k-button",{attrs:{tooltip:t.$t("search"),icon:"search"},on:{click:function(e){return t.$store.dispatch("search",!0)}}})]],2)],1)])],1):t._e()},rf=[],lf=Object(l["a"])({site:{link:"/site",icon:"page",menu:!0},users:{link:"/users",icon:"users",menu:!0},settings:{link:"/settings",icon:"settings",menu:!0},account:{link:"/account",icon:"users",menu:!1}},window.panel.plugins.views),uf={computed:{breadcrumbTitle:function(){var t=this.$t("view.".concat(this.$store.state.view),this.view.label);return"site"===this.$store.state.view&&this.$store.state.system.info.title||t},view:function(){return lf[this.$store.state.view]},views:function(){return lf},user:function(){return this.$store.state.user.current},notification:function(){return this.$store.state.notification.type&&"error"!==this.$store.state.notification.type?this.$store.state.notification:null},unregistered:function(){return!this.$store.state.system.info.license}}},cf=uf,df=(n("1e3b"),Object(h["a"])(cf,of,rf,!1,null,null,null)),pf=df.exports,ff=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-grid",{staticClass:"k-sections",attrs:{gutter:"large"}},t._l(t.columns,function(e,i){return n("k-column",{key:t.parent+"-column-"+i,attrs:{width:e.width}},[t._l(e.sections,function(e,s){return[t.exists(e.type)?n("k-"+e.type+"-section",t._b({key:t.parent+"-column-"+i+"-section-"+s+"-"+t.blueprint,tag:"component",class:"k-section k-section-name-"+e.name,attrs:{name:e.name,parent:t.parent,blueprint:t.blueprint},on:{submit:function(e){return t.$emit("submit",e)}}},"component",e,!1)):[n("k-box",{key:t.parent+"-column-"+i+"-section-"+s,attrs:{text:t.$t("error.section.type.invalid",{type:e.type}),theme:"negative"}})]]})],2)}),1)},hf=[],mf={props:{parent:String,blueprint:String,columns:[Array,Object]},methods:{exists:function(t){return A["a"].options.components["k-"+t+"-section"]}}},gf=mf,vf=(n("6bcd"),Object(h["a"])(gf,ff,hf,!1,null,null,null)),bf=vf.exports,kf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"k-info-section"},[n("k-headline",{staticClass:"k-info-section-headline"},[t._v(t._s(t.headline))]),n("k-box",{attrs:{theme:t.theme}},[n("k-text",{domProps:{innerHTML:t._s(t.text)}})],1)],1)},$f=[],_f={props:{blueprint:String,help:String,name:String,parent:String},methods:{load:function(){return this.$api.get(this.parent+"/sections/"+this.name)}}},yf={mixins:[_f],data:function(){return{headline:null,issue:null,text:null,theme:null}},created:function(){var t=this;this.load().then(function(e){t.headline=e.options.headline,t.text=e.options.text,t.theme=e.options.theme||"info"}).catch(function(e){t.issue=e})}},xf=yf,wf=(n("4333"),Object(h["a"])(xf,kf,$f,!1,null,null,null)),Of=wf.exports,Sf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-pages-section"},[n("header",{staticClass:"k-section-header"},[n("k-headline",{attrs:{link:t.options.link}},[t._v("\n "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:"This section is required"}},[t._v("*")]):t._e()]),t.add?n("k-button-group",[n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.action(null,"create")}}},[t._v(t._s(t.$t("add")))])],1):t._e()],1),t.error?[n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[n("strong",[t._v(t._s(t.$t("error.section.notLoaded",{name:t.name}))+":")]),t._v("\n "+t._s(t.error)+"\n ")])],1)]:[t.data.length?n("k-collection",{attrs:{layout:t.options.layout,help:t.help,items:t.data,pagination:t.pagination,sortable:t.options.sortable,size:t.options.size},on:{change:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,icon:"page"},on:{click:function(e){t.add&&t.action(null,"create")}}},[t._v("\n "+t._s(t.options.empty||t.$t("pages.empty"))+"\n ")]),n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)],n("k-page-create-dialog",{ref:"create"}),n("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-page-url-dialog",{ref:"url",on:{success:t.update}}),n("k-page-status-dialog",{ref:"status",on:{success:t.update}}),n("k-page-template-dialog",{ref:"template",on:{success:t.update}}),n("k-page-remove-dialog",{ref:"remove",on:{success:t.update}})]],2):t._e()},Cf=[],Ef={props:{blueprint:String,parent:String,help:String,name:String},data:function(){return{data:[],error:null,isLoading:!1,options:{empty:null,headline:null,layout:"list",link:null,max:null,min:null,size:null,sortable:null},pagination:{page:null}}},computed:{headline:function(){return this.options.headline||" "},language:function(){return this.$store.state.languages.current},paginationId:function(){return"kirby$pagination$"+this.parent+"/"+this.name}},watch:{language:function(){this.reload()}},methods:{items:function(t){return t},load:function(t){var e=this;t||(this.isLoading=!0),null===this.pagination.page&&(this.pagination.page=localStorage.getItem(this.paginationId)||1),this.$api.get(this.parent+"/sections/"+this.name,{page:this.pagination.page}).then(function(t){e.isLoading=!1,e.options=t.options,e.pagination=t.pagination,e.data=e.items(t.data)}).catch(function(t){e.isLoading=!1,e.error=t.message})},paginate:function(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},reload:function(){this.load(!0)}}},Tf={mixins:[Ef],computed:{add:function(){return this.options.add&&this.$permissions.pages.create}},created:function(){this.load(),this.$events.$on("page.changeStatus",this.reload)},destroyed:function(){this.$events.$off("page.changeStatus",this.reload)},methods:{action:function(t,e){var n=this;switch(e){case"create":this.$refs.create.open(this.options.link||this.parent,this.parent+"/children/blueprints",this.name);break;case"preview":var i=window.open("","_blank");i.document.write="...",this.$api.pages.preview(t.id).then(function(t){i.location.href=t}).catch(function(t){n.$store.dispatch("notification/error",t)});break;case"rename":this.$refs.rename.open(t.id);break;case"url":this.$refs.url.open(t.id);break;case"status":this.$refs.status.open(t.id);break;case"template":this.$refs.template.open(t.id);break;case"remove":if(this.data.length<=this.options.min){var s=this.options.min>1?"plural":"singular";this.$store.dispatch("notification/error",{message:this.$t("error.section.pages.min."+s,{section:this.options.headline||this.name,min:this.options.min})});break}this.$refs.remove.open(t.id);break;default:throw new Error("Invalid action")}},items:function(t){var e=this;return t.map(function(t){return t.flag={class:"k-status-flag k-status-flag-"+t.status,tooltip:e.$t("page.status"),icon:!1===t.permissions.changeStatus?"protected":"circle",disabled:!1===t.permissions.changeStatus,click:function(){e.action(t,"status")}},t.options=function(n){e.$api.pages.options(t.id,"list").then(function(t){return n(t)}).catch(function(t){e.$store.dispatch("notification/error",t)})},t.sortable=t.permissions.sort&&e.options.sortable,t})},sort:function(t){var e=this,n=null;if(t.added&&(n="added"),t.moved&&(n="moved"),n){var i=t[n].element,s=t[n].newIndex+1+this.pagination.offset;this.$api.pages.status(i.id,"listed",s).then(function(){e.$store.dispatch("notification/success",":)")}).catch(function(t){e.$store.dispatch("notification/error",{message:t.message,details:t.details}),e.reload()})}},update:function(){this.reload(),this.$events.$emit("model.update")}}},jf=Tf,If=Object(h["a"])(jf,Sf,Cf,!1,null,null,null),Lf=If.exports,qf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-files-section"},[n("header",{staticClass:"k-section-header"},[n("k-headline",[t._v("\n "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:"This section is required"}},[t._v("*")]):t._e()]),t.add?n("k-button-group",[n("k-button",{attrs:{icon:"upload"},on:{click:t.upload}},[t._v(t._s(t.$t("add")))])],1):t._e()],1),t.error?[n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[n("strong",[t._v(t._s(t.$t("error.section.notLoaded",{name:t.name}))+":")]),t._v("\n "+t._s(t.error)+"\n ")])],1)]:[n("k-dropzone",{attrs:{disabled:!1===t.add},on:{drop:t.drop}},[t.data.length?n("k-collection",{attrs:{help:t.help,items:t.data,layout:t.options.layout,pagination:t.pagination,sortable:t.options.sortable,size:t.options.size},on:{sort:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,icon:"image"},on:{click:function(e){t.add&&t.upload()}}},[t._v("\n "+t._s(t.options.empty||t.$t("files.empty"))+"\n ")]),n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)]],2),n("k-file-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-file-remove-dialog",{ref:"remove",on:{success:t.update}}),n("k-upload",{ref:"upload",on:{success:t.uploaded,error:t.reload}})]],2):t._e()},Nf=[],Af={mixins:[Ef],computed:{add:function(){return!(!this.$permissions.files.create||!1===this.options.upload)&&this.options.upload}},created:function(){this.load(),this.$events.$on("model.update",this.reload)},destroyed:function(){this.$events.$off("model.update",this.reload)},methods:{action:function(t,e){switch(e){case"edit":this.$router.push(t.link);break;case"download":window.open(t.url);break;case"rename":this.$refs.rename.open(t.parent,t.filename);break;case"replace":this.replace(t);break;case"remove":if(this.data.length<=this.options.min){var n=this.options.min>1?"plural":"singular";this.$store.dispatch("notification/error",{message:this.$t("error.section.files.min."+n,{section:this.options.headline||this.name,min:this.options.min})});break}this.$refs.remove.open(t.parent,t.filename);break}},drop:function(t){if(!1===this.add)return!1;this.$refs.upload.drop(t,Object(l["a"])({},this.add,{url:d.api+"/"+this.add.api}))},items:function(t){var e=this;return t.map(function(t){return t.options=function(n){e.$api.files.options(t.parent,t.filename,"list").then(function(t){return n(t)}).catch(function(t){e.$store.dispatch("notification/error",t)})},t.sortable=e.options.sortable,t})},replace:function(t){this.$refs.upload.open({url:d.api+"/"+this.$api.files.url(t.parent,t.filename),accept:t.mime,multiple:!1})},sort:function(t){var e=this;if(!1===this.options.sortable)return!1;t=t.map(function(t){return t.id}),this.$api.patch(this.parent+"/files/sort",{files:t,index:this.pagination.offset}).then(function(){e.$store.dispatch("notification/success",":)")}).catch(function(t){e.reload(),e.$store.dispatch("notification/error",t.message)})},update:function(){this.$events.$emit("model.update")},upload:function(){if(!1===this.add)return!1;this.$refs.upload.open(Object(l["a"])({},this.add,{url:d.api+"/"+this.add.api}))},uploaded:function(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}}},Bf=Af,Pf=Object(h["a"])(Bf,qf,Nf,!1,null,null,null),Df=Pf.exports,Mf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isLoading?t._e():n("section",{staticClass:"k-fields-section"},[t.issue?[n("k-headline",{staticClass:"k-fields-issue-headline"},[t._v("Error")]),n("k-box",{attrs:{text:t.issue.message,theme:"negative"}})]:t._e(),n("k-form",{attrs:{fields:t.fields,validate:!0,value:t.values},on:{input:t.input,submit:t.onSubmit}})],2)},Rf=[],zf={mixins:[_f],data:function(){return{fields:{},isLoading:!0,issue:null}},computed:{id:function(){return this.$store.state.form.current},language:function(){return this.$store.state.languages.current},values:function(){return this.$store.getters["form/values"](this.id)}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{input:function(t,e,n){this.$store.dispatch("form/update",[this.id,n,t[n]])},fetch:function(){var t=this;this.$api.get(this.parent+"/sections/"+this.name).then(function(e){t.fields=e.fields,ne()(t.fields).forEach(function(e){t.fields[e].section=t.name,t.fields[e].endpoints={field:t.parent+"/fields/"+e,section:t.parent+"/sections/"+t.name,model:t.parent}}),t.isLoading=!1}).catch(function(e){t.issue=e,t.isLoading=!1})},onSubmit:function(t){this.$events.$emit("keydown.cmd.s",t)}}},Ff=zf,Uf=(n("7d5d"),Object(h["a"])(Ff,Mf,Rf,!1,null,null,null)),Hf=Uf.exports,Kf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-view",{staticClass:"k-error-view"},[n("div",{staticClass:"k-error-view-content"},[n("k-text",[n("p",[n("k-icon",{staticClass:"k-error-view-icon",attrs:{type:"alert"}})],1),n("p",[t._t("default")],2)])],1)])},Vf=[],Yf=(n("d221"),{}),Gf=Object(h["a"])(Yf,Kf,Vf,!1,null,null,null),Wf=Gf.exports;A["a"].component("k-dialog",U),A["a"].component("k-error-dialog",W),A["a"].component("k-file-rename-dialog",ct),A["a"].component("k-file-remove-dialog",et),A["a"].component("k-files-dialog",gt),A["a"].component("k-language-create-dialog",yt),A["a"].component("k-language-remove-dialog",Et),A["a"].component("k-language-update-dialog",Nt),A["a"].component("k-page-create-dialog",Rt),A["a"].component("k-page-rename-dialog",Zt),A["a"].component("k-page-remove-dialog",Vt),A["a"].component("k-page-status-dialog",oe),A["a"].component("k-page-template-dialog",pe),A["a"].component("k-page-url-dialog",be),A["a"].component("k-pages-dialog",we),A["a"].component("k-site-rename-dialog",Ee),A["a"].component("k-user-create-dialog",Ne),A["a"].component("k-user-email-dialog",Re),A["a"].component("k-user-language-dialog",Ve),A["a"].component("k-user-password-dialog",Ze),A["a"].component("k-user-remove-dialog",an),A["a"].component("k-user-rename-dialog",dn),A["a"].component("k-user-role-dialog",vn),A["a"].component("k-users-dialog",xn),A["a"].component("k-calendar",Hn),A["a"].component("k-counter",Jn),A["a"].component("k-autocomplete",An),A["a"].component("k-form",ni),A["a"].component("k-form-buttons",li),A["a"].component("k-field",hi),A["a"].component("k-fieldset",$i),A["a"].component("k-input",Si),A["a"].component("k-upload",Di),A["a"].component("k-checkbox-input",Ki),A["a"].component("k-checkboxes-input",Qi),A["a"].component("k-date-input",rs),A["a"].component("k-datetime-input",fs),A["a"].component("k-email-input",xs),A["a"].component("k-multiselect-input",Ts),A["a"].component("k-number-input",As),A["a"].component("k-password-input",Ms),A["a"].component("k-radio-input",Ks),A["a"].component("k-range-input",Xs),A["a"].component("k-select-input",ia),A["a"].component("k-tags-input",ua),A["a"].component("k-tel-input",fa),A["a"].component("k-text-input",ks),A["a"].component("k-textarea-input",Ra),A["a"].component("k-time-input",Ja),A["a"].component("k-toggle-input",no),A["a"].component("k-url-input",oo),A["a"].component("k-checkboxes-field",fo),A["a"].component("k-date-field",ko),A["a"].component("k-email-field",Oo),A["a"].component("k-files-field",Lo),A["a"].component("k-headline-field",Do),A["a"].component("k-info-field",Ho),A["a"].component("k-line-field",Wo),A["a"].component("k-multiselect-field",er),A["a"].component("k-number-field",rr),A["a"].component("k-pages-field",gr),A["a"].component("k-password-field",yr),A["a"].component("k-radio-field",Er),A["a"].component("k-range-field",Nr),A["a"].component("k-select-field",Rr),A["a"].component("k-structure-field",nl),A["a"].component("k-tags-field",ll),A["a"].component("k-text-field",$l),A["a"].component("k-textarea-field",Sl),A["a"].component("k-tel-field",hl),A["a"].component("k-time-field",Ll),A["a"].component("k-toggle-field",Dl),A["a"].component("k-url-field",Hl),A["a"].component("k-users-field",Jl),A["a"].component("k-email-field-preview",pu),A["a"].component("k-files-field-preview",nu),A["a"].component("k-pages-field-preview",bu),A["a"].component("k-url-field-preview",lu),A["a"].component("k-users-field-preview",wu),A["a"].component("k-bar",Tu),A["a"].component("k-box",zu),A["a"].component("k-card",Gu),A["a"].component("k-cards",tc),A["a"].component("k-collection",oc),A["a"].component("k-column",pc),A["a"].component("k-dropzone",bc),A["a"].component("k-empty",wc),A["a"].component("k-file-preview",jc),A["a"].component("k-grid",Bc),A["a"].component("k-header",Fc),A["a"].component("k-list",Gc),A["a"].component("k-list-item",td),A["a"].component("k-tabs",od),A["a"].component("k-view",pd),A["a"].component("k-draggable",$d),A["a"].component("k-error-boundary",wd),A["a"].component("k-headline",Bd),A["a"].component("k-icon",Fd),A["a"].component("k-image",Gd),A["a"].component("k-progress",tp),A["a"].component("k-sort-handle",ap),A["a"].component("k-text",Pu),A["a"].component("k-button",dp),A["a"].component("k-button-group",gp),A["a"].component("k-dropdown",_p),A["a"].component("k-dropdown-content",Ep),A["a"].component("k-dropdown-item",Np),A["a"].component("k-languages-dropdown",Rp),A["a"].component("k-link",Ld),A["a"].component("k-pagination",Vp),A["a"].component("k-prev-next",Zp),A["a"].component("k-tag",af),A["a"].component("k-topbar",pf),A["a"].component("k-sections",bf),A["a"].component("k-info-section",Of),A["a"].component("k-pages-section",Lf),A["a"].component("k-files-section",Df),A["a"].component("k-fields-section",Hf),A["a"].component("k-error-view",Wf);var Jf={user:function(){return Cm.get("auth")},login:function(t){var e={long:t.remember||!1,email:t.email,password:t.password};return Cm.post("auth/login",e).then(function(t){return t.user})},logout:function(){return Cm.post("auth/logout")}},Xf={get:function(t,e,n){return Cm.get(this.url(t,e),n).then(function(t){return!0===Wi()(t.content)&&(t.content={}),t})},update:function(t,e,n){return Cm.patch(this.url(t,e),n)},rename:function(t,e,n){return Cm.patch(this.url(t,e,"name"),{name:n})},url:function(t,e,n){var i=t+"/files/"+e;return n&&(i+="/"+n),i},link:function(t,e,n){return"/"+this.url(t,e,n)},delete:function(t,e){return Cm.delete(this.url(t,e))},options:function(t,e,n){return Cm.get(this.url(t,e),{select:"options"}).then(function(t){var e=t.options,i=[];return"list"===n&&i.push({icon:"open",text:A["a"].i18n.translate("open"),click:"download"}),i.push({icon:"title",text:A["a"].i18n.translate("rename"),click:"rename",disabled:!e.changeName}),i.push({icon:"upload",text:A["a"].i18n.translate("replace"),click:"replace",disabled:!e.replace}),i.push({icon:"trash",text:A["a"].i18n.translate("delete"),click:"remove",disabled:!e.delete}),i})},breadcrumb:function(t,e){var n=null,i=[];switch(e){case"UserFile":i.push({label:t.parent.username,link:Cm.users.link(t.parent.id)}),n="users/"+t.parent.id;break;case"SiteFile":n="site";break;case"PageFile":i=t.parents.map(function(t){return{label:t.title,link:Cm.pages.link(t.id)}}),n=Cm.pages.url(t.parent.id);break}return i.push({label:t.filename,link:this.link(n,t.filename)}),i}},Zf={create:function(t,e){return null===t||"/"===t?Cm.post("site/children",e):Cm.post(this.url(t,"children"),e)},url:function(t,e){var n=null===t?"pages":"pages/"+t.replace(/\//g,"+");return e&&(n+="/"+e),n},link:function(t){return"/"+this.url(t)},get:function(t,e){return Cm.get(this.url(t),e).then(function(t){return!0===Wi()(t.content)&&(t.content={}),t})},options:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"view";return Cm.get(this.url(t),{select:"options"}).then(function(t){var n=t.options,i=[];return"list"===e&&i.push({click:"preview",icon:"open",text:A["a"].i18n.translate("open"),disabled:!1===n.preview}),i.push({click:"rename",icon:"title",text:A["a"].i18n.translate("rename"),disabled:!n.changeTitle}),i.push({click:"url",icon:"url",text:A["a"].i18n.translate("page.changeSlug"),disabled:!n.changeSlug}),i.push({click:"status",icon:"preview",text:A["a"].i18n.translate("page.changeStatus"),disabled:!n.changeStatus}),i.push({click:"template",icon:"template",text:A["a"].i18n.translate("page.changeTemplate"),disabled:!n.changeTemplate}),i.push({click:"remove",icon:"trash",text:A["a"].i18n.translate("delete"),disabled:!n.delete}),i})},preview:function(t){return this.get(t,{select:"previewUrl"}).then(function(t){return t.previewUrl})},update:function(t,e){return Cm.patch(this.url(t),e)},children:function(t,e){return Cm.post(this.url(t,"children/search"),e)},files:function(t,e){return Cm.post(this.url(t,"files/search"),e)},delete:function(t,e){return Cm.delete(this.url(t),e)},slug:function(t,e){return Cm.patch(this.url(t,"slug"),{slug:e})},title:function(t,e){return Cm.patch(this.url(t,"title"),{title:e})},template:function(t,e){return Cm.patch(this.url(t,"template"),{template:e})},search:function(t,e){return t?Cm.post("pages/"+t.replace("/","+")+"/children/search?select=id,title,hasChildren",e):Cm.post("site/children/search?select=id,title,hasChildren",e)},status:function(t,e,n){return Cm.patch(this.url(t,"status"),{status:e,position:n})},breadcrumb:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.parents.map(function(t){return{label:t.title,link:e.link(t.id)}});return!0===n&&i.push({label:t.title,link:this.link(t.id)}),i}},Qf=n("2f62"),th=(n("f559"),n("768b")),eh={namespaced:!0,state:{models:{},current:null,isLocked:!1},getters:{current:function(t){return t.current},exists:function(t){return function(e){return t.models.hasOwnProperty(e)}},hasChanges:function(t,e){return function(t){return ne()(e.model(t).changes).length>0}},id:function(t,e,n){return function(t){return n.languages.current?t+"/"+n.languages.current.code:t}},isCurrent:function(t){return function(e){return t.current=e}},model:function(t,e){return function(n){return e.exists(n)?t.models[n]:{originals:{},values:{},changes:{},api:null}}},originals:function(t,e){return function(t){return pr(e.model(t).originals)}},values:function(t,e){return function(t){return pr(e.model(t).values)}}},mutations:{CREATE:function(t,e){A["a"].set(t.models,e.id,{api:e.api,originals:pr(e.content),values:pr(e.content),changes:{}})},CURRENT:function(t,e){t.current=e},IS_LOCKED:function(t,e){t.isLocked=e},REMOVE:function(t,e){A["a"].delete(t.models,e),localStorage.removeItem("kirby$form$"+e)},DELETE_CHANGES:function(t,e){A["a"].set(t.models[e],"changes",{}),localStorage.removeItem("kirby$form$"+e)},SET_ORIGINALS:function(t,e){var n=Object(th["a"])(e,2),i=n[0],s=n[1];t.models[i].originals=pr(s)},SET_VALUES:function(t,e){var n=Object(th["a"])(e,2),i=n[0],s=n[1];t.models[i].values=pr(s)},UPDATE:function(t,e){var n=Object(th["a"])(e,3),i=n[0],s=n[1],a=n[2];a=pr(a),A["a"].set(t.models[i].values,s,a);var o=dr()(t.models[i].originals[s]),r=dr()(a);o===r?A["a"].delete(t.models[i].changes,s):A["a"].set(t.models[i].changes,s,!0),localStorage.setItem("kirby$form$"+i,dr()(t.models[i].values))}},actions:{create:function(t,e){t.rootState.languages.current&&t.rootState.languages.current.code&&(e.id=t.getters.id(e.id)),(e.id.startsWith("pages/")||e.id.startsWith("site"))&&delete e.content.title,t.commit("CREATE",e),t.commit("CURRENT",e.id);var n=localStorage.getItem("kirby$form$"+e.id);if(n){var i=JSON.parse(n);ne()(i).forEach(function(n){var s=i[n];t.commit("UPDATE",[e.id,n,s])})}},remove:function(t,e){t.commit("REMOVE",e)},revert:function(t,e){var n=t.getters.model(e);return Cm.get(n.api,{select:"content"}).then(function(n){(e.startsWith("pages/")||e.startsWith("site"))&&delete n.content.title,t.commit("SET_ORIGINALS",[e,n.content]),t.commit("SET_VALUES",[e,n.content]),t.commit("DELETE_CHANGES",e)})},save:function(t,e){e=e||t.state.current;var n=t.getters.model(e);return(!t.getters.isCurrent(e)||!t.state.isLocked)&&Cm.patch(n.api,n.values).then(function(){t.dispatch("revert",e)})},lock:function(t){t.commit("IS_LOCKED",!0)},unlock:function(t){t.commit("IS_LOCKED",!1)},update:function(t,e){var n=Object(th["a"])(e,3),i=n[0],s=n[1],a=n[2];t.commit("UPDATE",[i,s,a])}}},nh={namespaced:!0,state:{all:[],current:null,default:null},mutations:{SET_ALL:function(t,e){t.all=e.map(function(t){return{code:t.code,name:t.name,default:t.default,direction:t.direction}})},SET_CURRENT:function(t,e){t.current=e,e&&e.code&&localStorage.setItem("kirby$language",e.code)},SET_DEFAULT:function(t,e){t.default=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},install:function(t,e){var n=e.filter(function(t){return t.default})[0];t.commit("SET_ALL",e),t.commit("SET_DEFAULT",n);var i=localStorage.getItem("kirby$language");if(i){var s=e.filter(function(t){return t.code===i})[0];if(s)return void t.commit("SET_CURRENT",s)}t.commit("SET_CURRENT",n||e[0])},load:function(t){return Cm.get("languages").then(function(e){t.dispatch("install",e.data)})}}},ih={timer:null,namespaced:!0,state:{type:null,message:null,details:null,timeout:null},mutations:{SET:function(t,e){t.type=e.type,t.message=e.message,t.details=e.details,t.timeout=e.timeout},UNSET:function(t){t.type=null,t.message=null,t.details=null,t.timeout=null}},actions:{close:function(t){clearTimeout(this.timer),t.commit("UNSET")},open:function(t,e){t.dispatch("close"),t.commit("SET",e),e.timeout&&(this.timer=setTimeout(function(){t.dispatch("close")},e.timeout))},success:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(l["a"])({type:"success",timeout:4e3},e))},error:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(l["a"])({type:"error"},e))}}},sh={namespaced:!0,state:{info:{title:null}},mutations:{SET_INFO:function(t,e){t.info=e},SET_LICENSE:function(t,e){t.info.license=e},SET_TITLE:function(t,e){t.info.title=e}},actions:{title:function(t,e){t.commit("SET_TITLE",e)},register:function(t,e){t.commit("SET_LICENSE",e)},load:function(t,e){return!e&&t.state.info.isReady&&t.rootState.user.current?new Hr.a(function(e){e(t.state.info)}):Cm.system.info({view:"panel"}).then(function(e){return t.commit("SET_INFO",Object(l["a"])({isReady:e.isInstalled&&e.isOk},e)),e.languages&&t.dispatch("languages/install",e.languages,{root:!0}),t.dispatch("translation/install",e.translation,{root:!0}),t.dispatch("translation/activate",e.translation.id,{root:!0}),e.user&&t.dispatch("user/current",e.user,{root:!0}),t.state.info}).catch(function(e){t.commit("SET_INFO",{isBroken:!0,error:e.message})})}}},ah={namespaced:!0,state:{current:null,installed:[]},mutations:{SET_CURRENT:function(t,e){t.current=e},INSTALL:function(t,e){t.installed[e.id]=e}},actions:{load:function(t,e){return Cm.translations.get(e)},install:function(t,e){t.commit("INSTALL",e),A["a"].i18n.add(e.id,e.data)},activate:function(t,e){var n=t.state.installed[e];n?(A["a"].i18n.set(e),t.commit("SET_CURRENT",e),document.dir=n.direction,document.documentElement.lang=e):t.dispatch("load",e).then(function(n){t.dispatch("install",n),t.dispatch("activate",e)})}}},oh=n("8c4f"),rh=function(t,e,n){$m.dispatch("system/load").then(function(){var e=$m.state.user.current;if(!e)return $m.dispatch("user/visit",t.path),$m.dispatch("user/logout"),!1;var i=e.permissions.access;return!1===i.panel?(window.location.href=d.site,!1):!1===i[t.meta.view]?($m.dispatch("notification/error",{message:A["a"].i18n.translate("error.access.view")}),n("/")):void n()})},lh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-error-view",{staticClass:"k-browser-view"},[n("p",[t._v("\n We are really sorry, but your browser does not support\n all features required for the Kirby Panel.\n ")]),!1===t.hasFetchSupport?[n("p",[n("strong",[t._v("Fetch")]),n("br"),t._v("\n We use Javascript's new Fetch API. You can find a list of supported browsers for this feature on\n "),n("strong",[n("a",{attrs:{href:"https://caniuse.com/#feat=fetch"}},[t._v("caniuse.com")])])])]:t._e(),!1===t.hasGridSupport?[n("p",[n("strong",[t._v("CSS Grid")]),n("br"),t._v("\n We use CSS Grids for all our layouts. You can find a list of supported browsers for this feature on\n "),n("strong",[n("a",{attrs:{href:"https://caniuse.com/#feat=css-grid"}},[t._v("caniuse.com")])])])]:t._e()],2)},uh=[],ch={grid:function(){return!(!window.CSS||!window.CSS.supports("display","grid"))},fetch:function(){return void 0!==window.fetch},all:function(){return this.fetch()&&this.grid()}},dh={computed:{hasFetchSupport:function(){return ch.fetch()},hasGridSupport:function(){return ch.grid()}},created:function(){ch.all()&&this.$router.push("/")}},ph=dh,fh=(n("d6fc"),Object(h["a"])(ph,lh,uh,!1,null,null,null)),hh=fh.exports,mh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-error-boundary",{key:t.plugin,scopedSlots:t._u([{key:"error",fn:function(e){var i=e.error;return n("k-error-view",{},[t._v("\n "+t._s(i.message||i)+"\n ")])}}])},[n("k-"+t.plugin+"-plugin-view",{tag:"component"})],1)},gh=[],vh={props:{plugin:String},beforeRouteEnter:function(t,e,n){n(function(t){t.$store.dispatch("breadcrumb",[])})},watch:{plugin:function(){this.$store.dispatch("view",this.plugin)}},created:function(){this.$store.dispatch("view",this.plugin)}},bh=vh,kh=Object(h["a"])(bh,mh,gh,!1,null,null,null),$h=kh.exports,_h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("div",{staticClass:"k-file-view"},[n("k-file-preview",{attrs:{file:t.file}}),n("k-view",{staticClass:"k-file-content"},[n("k-header",{attrs:{editable:t.permissions.changeName,tabs:t.tabs,tab:t.tab},on:{edit:function(e){return t.action("rename")}}},[t._v("\n\n "+t._s(t.file.filename)+"\n\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{responsive:!0,icon:"open"},on:{click:function(e){return t.action("download")}}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]),n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.file.id?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.file.id?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:t.$api.files.url(t.path,t.file.filename),tabs:t.tabs,blueprint:t.file.blueprint.name},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-file-rename-dialog",{ref:"rename",on:{success:t.renamed}}),n("k-file-remove-dialog",{ref:"remove",on:{success:t.deleted}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,accept:t.file.mime,multiple:!1},on:{success:t.uploaded}})],1)],1)},yh=[],xh={created:function(){this.fetch(),this.$events.$on("keydown.left",this.toPrev),this.$events.$on("keydown.right",this.toNext)},destroyed:function(){this.$events.$off("keydown.left",this.toPrev),this.$events.$off("keydown.right",this.toNext)},methods:{toPrev:function(t){this.prev&&"body"===t.target.localName&&this.$router.push(this.prev.link)},toNext:function(t){this.next&&"body"===t.target.localName&&this.$router.push(this.next.link)}}},wh={mixins:[xh],props:{path:{type:String},filename:{type:String,required:!0}},data:function(){return{name:"",file:{id:null,parent:null,filename:"",url:"",prev:null,next:null,panelIcon:null,panelImage:null,mime:null,content:{}},permissions:{changeName:!1,delete:!1},issue:null,tabs:[],tab:null,options:null}},computed:{uploadApi:function(){return d.api+"/"+this.path+"/files/"+this.filename},prev:function(){if(this.file.prev)return{link:this.$api.files.link(this.path,this.file.prev.filename),tooltip:this.file.prev.filename}},tabsKey:function(){return"file-"+this.file.id+"-tabs"},language:function(){return this.$store.state.languages.current},next:function(){if(this.file.next)return{link:this.$api.files.link(this.path,this.file.next.filename),tooltip:this.file.next.filename}}},watch:{language:function(){this.fetch()},filename:function(){this.fetch()}},methods:{fetch:function(){var t=this;this.$api.files.get(this.path,this.filename,{view:"panel"}).then(function(e){t.file=e,t.file.next=e.nextWithTemplate,t.file.prev=e.prevWithTemplate,t.file.url=e.url,t.name=e.name,t.tabs=e.blueprint.tabs,t.permissions=e.options,t.options=function(e){t.$api.files.options(t.path,t.file.filename).then(function(t){e(t)})},t.$store.dispatch("breadcrumb",t.$api.files.breadcrumb(t.file,t.$route.name)),t.$store.dispatch("title",t.filename),t.$store.dispatch("form/create",{id:"files/"+e.id,api:t.$api.files.link(t.path,t.filename),content:e.content})}).catch(function(e){window.console.error(e),t.issue=e})},action:function(t){switch(t){case"download":window.open(this.file.url);break;case"rename":this.$refs.rename.open(this.path,this.file.filename);break;case"replace":this.$refs.upload.open({url:d.api+"/"+this.$api.files.url(this.path,this.file.filename),accept:this.file.mime});break;case"remove":this.$refs.remove.open(this.path,this.file.filename);break}},deleted:function(){this.path?this.$router.push("/"+this.path):this.$router.push("/site")},renamed:function(t){this.$router.push(this.$api.files.link(this.path,t.filename))},uploaded:function(){this.fetch(),this.$store.dispatch("notification/success",":)")}}},Oh=wh,Sh=Object(h["a"])(Oh,_h,yh,!1,null,null,null),Ch=Sh.exports,Eh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.system?n("k-view",{staticClass:"k-installation-view",attrs:{align:"center"}},["install"===t.state?n("form",{on:{submit:function(e){return e.preventDefault(),t.install(e)}}},[n("h1",{staticClass:"k-offscreen"},[t._v(t._s(t.$t("installation")))]),n("k-fieldset",{attrs:{fields:t.fields,novalidate:!0},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),n("k-button",{attrs:{type:"submit",icon:"check"}},[t._v(t._s(t.$t("install")))])],1):"completed"===t.state?n("k-text",[n("k-headline",[t._v(t._s(t.$t("installation.completed")))]),n("k-link",{attrs:{to:"/login"}},[t._v(t._s(t.$t("login")))])],1):n("div",[t.system.isInstalled?t._e():n("k-headline",[t._v(t._s(t.$t("installation.issues.headline")))]),n("ul",{staticClass:"k-installation-issues"},[!1===t.system.isInstallable?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.disabled"))}})],1):t._e(),!1===t.requirements.php?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.php"))}})],1):t._e(),!1===t.requirements.server?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.server"))}})],1):t._e(),!1===t.requirements.mbstring?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.mbstring"))}})],1):t._e(),!1===t.requirements.curl?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.curl"))}})],1):t._e(),!1===t.requirements.accounts?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.accounts"))}})],1):t._e(),!1===t.requirements.content?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.content"))}})],1):t._e(),!1===t.requirements.media?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.media"))}})],1):t._e(),!1===t.requirements.sessions?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.sessions"))}})],1):t._e()]),n("k-button",{attrs:{icon:"refresh"},on:{click:t.check}},[n("span",{domProps:{innerHTML:t._s(t.$t("retry"))}})])],1)],1):t._e()},Th=[],jh={data:function(){return{user:{name:"",email:"",language:"en",password:"",role:"admin"},languages:[],system:null}},computed:{state:function(){return this.system.isOk&&this.system.isInstallable&&!this.system.isInstalled?"install":this.system.isOk&&this.system.isInstallable&&this.system.isInstalled?"completed":void 0},translation:function(){return this.$store.state.translation.current},requirements:function(){return this.system&&this.system.requirements?this.system.requirements:{}},fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user",autofocus:!0},email:{label:this.$t("email"),type:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",placeholder:this.$t("password")+" …",required:!0},language:{label:this.$t("language"),type:"select",options:this.languages,icon:"globe",empty:!1,required:!0}}}},watch:{translation:function(t){this.user.language=t},"user.language":function(t){this.$store.dispatch("translation/activate",t)}},created:function(){this.check()},methods:{install:function(){var t=this;this.$api.system.install(this.user).then(function(e){t.$store.dispatch("user/current",e),t.$store.dispatch("notification/success",t.$t("welcome")+"!"),t.$router.push("/")}).catch(function(e){t.$store.dispatch("notification/error",e)})},check:function(){var t=this;this.$store.dispatch("system/load",!0).then(function(e){!0===e.isInstalled&&e.isReady?t.$router.push("/login"):t.$api.translations.options().then(function(n){t.languages=n,t.system=e,t.$store.dispatch("title",t.$t("view.installation"))})})}}},Ih=jh,Lh=(n("146c"),Object(h["a"])(Ih,Eh,Th,!1,null,null,null)),qh=Lh.exports,Nh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-view",{staticClass:"k-settings-view"},[n("k-header",[t._v("\n "+t._s(t.$t("view.settings"))+"\n ")]),n("section",{staticClass:"k-system-info"},[n("header",[n("k-headline",[t._v("Kirby")])],1),n("ul",{staticClass:"k-system-info-box"},[n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("license")))]),n("dd",[t.license?[t._v("\n "+t._s(t.license)+"\n ")]:n("p",[n("strong",{staticClass:"k-system-unregistered"},[t._v(t._s(t.$t("license.unregistered")))])])],2)])]),n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("version")))]),n("dd",[t._v(t._s(t.$store.state.system.info.version))])])])])]),t.multilang?n("section",{staticClass:"k-languages"},[t.languages.length>0?[n("section",{staticClass:"k-languages-section"},[n("header",[n("k-headline",[t._v(t._s(t.$t("languages.default")))])],1),n("k-collection",{attrs:{items:t.defaultLanguage},on:{action:t.action}})],1),n("section",{staticClass:"k-languages-section"},[n("header",[n("k-headline",[t._v(t._s(t.$t("languages.secondary")))]),n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("language.create")))])],1),t.translations.length?n("k-collection",{attrs:{items:t.translations},on:{action:t.action}}):n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("languages.secondary.empty")))])],1)]:0===t.languages.length?[n("header",[n("k-headline",[t._v(t._s(t.$t("languages")))]),n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("language.create")))])],1),n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("languages.empty")))])]:t._e(),n("k-language-create-dialog",{ref:"create",on:{success:t.fetch}}),n("k-language-update-dialog",{ref:"update",on:{success:t.fetch}}),n("k-language-remove-dialog",{ref:"remove",on:{success:t.fetch}})],2):t._e()],1)},Ah=[],Bh={data:function(){return{languages:[]}},computed:{defaultLanguage:function(){return this.languages.filter(function(t){return t.default})},multilang:function(){return this.$store.state.system.info.multilang},license:function(){return this.$store.state.system.info.license},translations:function(){return this.languages.filter(function(t){return!1===t.default})}},created:function(){this.fetch(),this.$store.dispatch("title",this.$t("view.settings")),this.$store.dispatch("breadcrumb",[])},methods:{fetch:function(){var t=this;!1!==this.multilang?this.$api.get("languages").then(function(e){t.languages=e.data.map(function(n){return{id:n.code,default:n.default,icon:{type:"globe",back:"black"},text:n.name,info:n.code,options:[{icon:"edit",text:t.$t("edit"),click:"update"},{icon:"trash",text:t.$t("delete"),disabled:n.default&&1!==e.data.length,click:"remove"}]}})}):this.languages=[]},action:function(t,e){switch(e){case"update":this.$refs.update.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}}}},Ph=Bh,Dh=(n("9bd5"),Object(h["a"])(Ph,Nh,Ah,!1,null,null,null)),Mh=Dh.exports,Rh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):t.ready?n("k-view",{staticClass:"k-login-view",attrs:{align:"center"}},[n("form",{staticClass:"k-login-form",attrs:{"data-invalid":t.invalid},on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[n("h1",{staticClass:"k-offscreen"},[t._v(t._s(t.$t("login")))]),n("k-fieldset",{attrs:{novalidate:!0,fields:t.fields},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),n("div",{staticClass:"k-login-buttons"},[n("span",{staticClass:"k-login-checkbox"},[n("k-checkbox-input",{attrs:{value:t.user.remember,label:t.$t("login.remember")},on:{input:function(e){t.user.remember=e}}})],1),n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v("\n "+t._s(t.$t("login"))+" "),t.isLoading?[t._v("…")]:t._e()],2)],1)],1)]):t._e()},zh=[],Fh={data:function(){return{ready:!1,issue:null,invalid:!1,isLoading:!1,user:{email:"",password:"",remember:!1}}},computed:{fields:function(){return{email:{autofocus:!0,label:this.$t("email"),type:"email",required:!0,link:!1},password:{label:this.$t("password"),type:"password",minLength:8,required:!0,autocomplete:"current-password",counter:!1}}}},created:function(){var t=this;this.$store.dispatch("system/load").then(function(e){e.isReady||t.$router.push("/installation"),e.user&&e.user.id&&t.$router.push("/"),t.ready=!0,t.$store.dispatch("title",t.$t("login"))}).catch(function(e){t.issue=e})},methods:{login:function(){var t=this;this.invalid=!1,this.isLoading=!0,this.$store.dispatch("user/login",this.user).then(function(){t.$store.dispatch("system/load",!0).then(function(){t.$store.dispatch("notification/success",t.$t("welcome")),t.isLoading=!1})}).catch(function(){t.invalid=!0,t.isLoading=!1})}}},Uh=Fh,Hh=(n("24c1"),Object(h["a"])(Uh,Rh,zh,!1,null,null,null)),Kh=Hh.exports,Vh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{staticClass:"k-page-view"},[n("k-header",{attrs:{tabs:t.tabs,tab:t.tab,editable:t.permissions.changeTitle},on:{edit:function(e){return t.action("rename")}}},[t._v("\n "+t._s(t.page.title)+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[t.permissions.preview&&t.page.previewUrl?n("k-button",{attrs:{responsive:!0,link:t.page.previewUrl,target:"_blank",icon:"open"}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]):t._e(),t.status?n("k-button",{class:["k-status-flag","k-status-flag-"+t.page.status],attrs:{disabled:!1===t.permissions.changeStatus,icon:!1===t.permissions.changeStatus?"protected":"circle",responsive:!0},on:{click:function(e){return t.action("status")}}},[t._v("\n "+t._s(t.status.label)+"\n ")]):t._e(),n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.page.id?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.page.id?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:t.$api.pages.url(t.page.id),blueprint:t.blueprint,tabs:t.tabs},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-page-url-dialog",{ref:"url"}),n("k-page-status-dialog",{ref:"status",on:{success:t.update}}),n("k-page-template-dialog",{ref:"template",on:{success:t.update}}),n("k-page-remove-dialog",{ref:"remove"})],1)},Yh=[],Gh={mixins:[xh],props:{path:{type:String,required:!0}},data:function(){return{page:{title:"",id:null,prev:null,next:null,status:null},blueprint:null,preview:!0,permissions:{changeTitle:!1,changeStatus:!1},icon:"page",issue:null,tab:null,tabs:[],options:null}},computed:{prev:function(){if(this.page.prev)return{link:this.$api.pages.link(this.page.prev.id),tooltip:this.page.prev.title}},language:function(){return this.$store.state.languages.current},next:function(){if(this.page.next)return{link:this.$api.pages.link(this.page.next.id),tooltip:this.page.next.title}},status:function(){return null!==this.page.status?this.page.blueprint.status[this.page.status]:null},tabsKey:function(){return"page-"+this.page.id+"-tabs"}},created:function(){this.$events.$on("page.changeSlug",this.update)},destroyed:function(){this.$events.$off("page.changeSlug",this.update)},watch:{language:function(){this.fetch()},path:function(){this.fetch()}},methods:{action:function(t){var e=this;switch(t){case"preview":this.$api.pages.preview(this.page.id).then(function(t){window.open(t)}).catch(function(t){e.$store.dispatch("notification/error",t)});break;case"rename":this.$refs.rename.open(this.page.id);break;case"url":this.$refs.url.open(this.page.id);break;case"status":this.$refs.status.open(this.page.id);break;case"template":this.$refs.template.open(this.page.id);break;case"remove":this.$refs.remove.open(this.page.id);break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}},changeLanguage:function(t){this.$store.dispatch("languages/current",t),this.fetch()},fetch:function(){var t=this;this.$api.pages.get(this.path,{view:"panel"}).then(function(e){t.page=e,t.blueprint=e.blueprint.name,t.permissions=e.options,t.tabs=e.blueprint.tabs,t.options=function(e){t.$api.pages.options(t.page.id).then(function(t){e(t)})},t.$store.dispatch("breadcrumb",t.$api.pages.breadcrumb(e)),t.$store.dispatch("title",t.page.title),t.$store.dispatch("form/create",{id:"pages/"+e.id,api:t.$api.pages.link(e.id),content:e.content})}).catch(function(e){t.issue=e})},update:function(){this.fetch(),this.$emit("model.update")}}},Wh=Gh,Jh=(n("202d"),Object(h["a"])(Wh,Vh,Yh,!1,null,null,null)),Xh=Jh.exports,Zh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{key:"site-view",staticClass:"k-site-view"},[n("k-header",{attrs:{tabs:t.tabs,tab:t.tab,editable:t.permissions.changeTitle},on:{edit:function(e){return t.action("rename")}}},[t._v("\n "+t._s(t.site.title)+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{responsive:!0,link:t.site.url,target:"_blank",icon:"open"}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]),n("k-languages-dropdown")],1)],1),t.site.url?n("k-tabs",{ref:"tabs",attrs:{tabs:t.tabs,blueprint:t.site.blueprint.name,parent:"site"},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-site-rename-dialog",{ref:"rename",on:{success:t.fetch}})],1)},Qh=[],tm={data:function(){return{site:{title:null,url:null},issue:null,tab:null,tabs:[],options:null,permissions:{changeTitle:!0}}},computed:{language:function(){return this.$store.state.languages.current}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{fetch:function(){var t=this;this.$api.site.get({view:"panel"}).then(function(e){t.site=e,t.tabs=e.blueprint.tabs,t.permissions=e.options,t.options=function(e){t.$api.site.options().then(function(t){e(t)})},t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("title",null),t.$store.dispatch("form/create",{id:"site",api:"site",content:e.content})}).catch(function(e){t.issue=e})},action:function(t){switch(t){case"languages":this.$refs.languages.open();break;case"rename":this.$refs.rename.open();break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}}}},em=tm,nm=Object(h["a"])(em,Zh,Qh,!1,null,null,null),im=nm.exports,sm=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{staticClass:"k-users-view"},[n("k-header",[t._v("\n "+t._s(t.$t("view.users"))+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{disabled:!1===t.$permissions.users.create,icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("user.create")))])],1),n("k-button-group",{attrs:{slot:"right"},slot:"right"},[n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"funnel"},on:{click:function(e){return t.$refs.roles.toggle()}}},[t._v("\n "+t._s(t.$t("role"))+": "+t._s(t.role?t.role.text:t.$t("role.all"))+"\n ")]),n("k-dropdown-content",{ref:"roles",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"bolt"},on:{click:function(e){return t.filter(!1)}}},[t._v("\n "+t._s(t.$t("role.all"))+"\n ")]),n("hr"),t._l(t.roles,function(e){return n("k-dropdown-item",{key:e.value,attrs:{icon:"bolt"},on:{click:function(n){return t.filter(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])})],2)],1)],1)],1),t.users.length>0?[n("k-collection",{attrs:{items:t.users,pagination:t.pagination},on:{paginate:t.paginate,action:t.action}})]:0===t.total?[n("k-empty",{attrs:{icon:"users"}},[t._v(t._s(t.$t("role.empty")))])]:t._e(),n("k-user-create-dialog",{ref:"create",on:{success:t.fetch}}),n("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),n("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),n("k-user-password-dialog",{ref:"password"}),n("k-user-remove-dialog",{ref:"remove",on:{success:t.fetch}}),n("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),n("k-user-role-dialog",{ref:"role",on:{success:t.fetch}})],2)},am=[],om={data:function(){return{page:1,limit:20,total:null,users:[],roles:[],issue:null}},computed:{pagination:function(){return{page:this.page,limit:this.limit,total:this.total}},role:function(){var t=this,e=null;return this.$route.params.role&&this.roles.forEach(function(n){n.value===t.$route.params.role&&(e=n)}),e}},watch:{$route:function(){this.fetch()}},created:function(){var t=this;this.$api.roles.options().then(function(e){t.roles=e,t.fetch()})},methods:{fetch:function(){var t=this;this.$store.dispatch("title",this.$t("view.users"));var e={paginate:{page:this.page,limit:this.limit}};this.role&&(e.filterBy=[{field:"role",operator:"==",value:this.role.value}]),this.$api.users.list(e).then(function(e){t.users=e.data.map(function(e){var n={id:e.id,icon:{type:"user",back:"black"},text:e.name||e.email,info:e.role.title,link:"/users/"+e.id,options:function(n){t.$api.users.options(e.id,"list").then(function(t){return n(t)}).catch(function(e){t.$store.dispatch("notification/error",e)})},image:null};return e.avatar&&(n.image={url:e.avatar.url,cover:!0}),n}),t.role?t.$store.dispatch("breadcrumb",[{link:"/users/role/"+t.role.value,label:t.$t("role")+": "+t.role.text}]):t.$store.dispatch("breadcrumb",[]),t.total=e.pagination.total}).catch(function(e){t.issue=e})},paginate:function(t){this.page=t.page,this.limit=t.limit,this.fetch()},action:function(t,e){switch(e){case"edit":this.$router.push("/users/"+t.id);break;case"email":this.$refs.email.open(t.id);break;case"role":this.$refs.role.open(t.id);break;case"rename":this.$refs.rename.open(t.id);break;case"password":this.$refs.password.open(t.id);break;case"language":this.$refs.language.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}},filter:function(t){!1===t?this.$router.push("/users"):this.$router.push("/users/role/"+t.value),this.$refs.roles.close()}}},rm=om,lm=Object(h["a"])(rm,sm,am,!1,null,null,null),um=lm.exports,cm=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):t.ready?n("div",{staticClass:"k-user-view"},[n("div",{staticClass:"k-user-profile"},[n("k-view",[t.avatar?[n("k-dropdown",[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar")},on:{click:function(e){return t.$refs.picture.toggle()}}},[t.avatar?n("k-image",{attrs:{cover:!0,src:t.avatar,ratio:"1/1"}}):t._e()],1),n("k-dropdown-content",{ref:"picture"},[n("k-dropdown-item",{attrs:{icon:"upload"},on:{click:function(e){return t.$refs.upload.open()}}},[t._v("\n "+t._s(t.$t("change"))+"\n ")]),n("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.action("picture.delete")}}},[t._v("\n "+t._s(t.$t("delete"))+"\n ")])],1)],1)]:[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar")},on:{click:function(e){return t.$refs.upload.open()}}},[n("k-icon",{attrs:{type:"user"}})],1)],n("k-button-group",[n("k-button",{attrs:{disabled:!t.permissions.changeEmail,icon:"email"},on:{click:function(e){return t.action("email")}}},[t._v(t._s(t.$t("email"))+": "+t._s(t.user.email))]),n("k-button",{attrs:{disabled:!t.permissions.changeRole,icon:"bolt"},on:{click:function(e){return t.action("role")}}},[t._v(t._s(t.$t("role"))+": "+t._s(t.user.role.title))]),n("k-button",{attrs:{disabled:!t.permissions.changeLanguage,icon:"globe"},on:{click:function(e){return t.action("language")}}},[t._v(t._s(t.$t("language"))+": "+t._s(t.user.language))])],1)],2)],1),n("k-view",[n("k-header",{attrs:{editable:t.permissions.changeName,tabs:t.tabs,tab:t.tab},on:{edit:function(e){return t.action("rename")}}},[t.user.name&&0!==t.user.name.length?[t._v(t._s(t.user.name))]:n("span",{staticClass:"k-user-name-placeholder"},[t._v(t._s(t.$t("name"))+" …")]),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-dropdown",[n("k-button",{attrs:{icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.user.id&&"User"===t.$route.name?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],2),t.user&&t.tabs.length?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:"users/"+t.user.id,blueprint:t.user.blueprint.name,tabs:t.tabs},on:{tab:function(e){t.tab=e}}}):t.ready?n("k-box",{attrs:{text:t.$t("user.blueprint",{role:t.user.role.name}),theme:"info"}}):t._e(),n("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),n("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),n("k-user-password-dialog",{ref:"password"}),n("k-user-remove-dialog",{ref:"remove"}),n("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),n("k-user-role-dialog",{ref:"role",on:{success:t.fetch}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,multiple:!1,accept:"image/*"},on:{success:t.uploadedAvatar}})],1)],1):t._e()},dm=[],pm={mixins:[xh],props:{id:{type:String,required:!0}},data:function(){return{tab:null,tabs:[],ready:!1,user:{role:{name:null},name:null,language:null,prev:null,next:null},permissions:{changeEmail:!0,changeName:!0,changeLanguage:!0,changeRole:!0},issue:null,avatar:null,options:null}},computed:{language:function(){return this.$store.state.languages.current},next:function(){if(this.user.next)return{link:this.$api.users.link(this.user.next.id),tooltip:this.user.next.name}},prev:function(){if(this.user.prev)return{link:this.$api.users.link(this.user.prev.id),tooltip:this.user.prev.name}},tabsKey:function(){return"user-"+this.user.id+"-tabs"},uploadApi:function(){return d.api+"/users/"+this.user.id+"/avatar"}},watch:{language:function(){this.fetch()},id:function(){this.fetch()}},methods:{action:function(t){var e=this;switch(t){case"email":this.$refs.email.open(this.user.id);break;case"language":this.$refs.language.open(this.user.id);break;case"password":this.$refs.password.open(this.user.id);break;case"picture.delete":this.$api.users.deleteAvatar(this.id).then(function(){e.$store.dispatch("notification/success",":)"),e.avatar=null});break;case"remove":this.$refs.remove.open(this.user.id);break;case"rename":this.$refs.rename.open(this.user.id);break;case"role":this.$refs.role.open(this.user.id);break;default:this.$store.dispatch("notification/error","Not yet implemented")}},fetch:function(){var t=this;this.$api.users.get(this.id,{view:"panel"}).then(function(e){t.user=e,t.tabs=e.blueprint.tabs,t.ready=!0,t.permissions=e.options,t.options=function(e){t.$api.users.options(t.user.id).then(function(t){e(t)})},e.avatar?t.avatar=e.avatar.url:t.avatar=null,"User"===t.$route.name?t.$store.dispatch("breadcrumb",t.$api.users.breadcrumb(e)):t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("title",t.user.name||t.user.email),t.$store.dispatch("form/create",{id:"users/"+e.id,api:t.$api.users.link(e.id),content:e.content})}).catch(function(e){t.issue=e})},uploadedAvatar:function(){this.$store.dispatch("notification/success",":)"),this.fetch()}}},fm=pm,hm=(n("bd96"),Object(h["a"])(fm,cm,dm,!1,null,null,null)),mm=hm.exports,gm=[{path:"/",name:"Home",redirect:"/site"},{path:"/browser",name:"Browser",component:hh,meta:{outside:!0}},{path:"/login",component:Kh,meta:{outside:!0}},{path:"/logout",beforeEnter:function(){$m.dispatch("user/logout")},meta:{outside:!0}},{path:"/installation",component:qh,meta:{outside:!0}},{path:"/site",name:"Site",meta:{view:"site"},component:im,beforeEnter:rh},{path:"/site/files/:filename",name:"SiteFile",meta:{view:"site"},component:Ch,beforeEnter:rh,props:function(t){return{path:"site",filename:t.params.filename}}},{path:"/pages/:path/files/:filename",name:"PageFile",meta:{view:"site"},component:Ch,beforeEnter:rh,props:function(t){return{path:"pages/"+t.params.path,filename:t.params.filename}}},{path:"/users/:path/files/:filename",name:"UserFile",meta:{view:"users"},component:Ch,beforeEnter:rh,props:function(t){return{path:"users/"+t.params.path,filename:t.params.filename}}},{path:"/pages/:path",name:"Page",meta:{view:"site"},component:Xh,beforeEnter:rh,props:function(t){return{path:t.params.path}}},{path:"/settings",name:"Settings",meta:{view:"settings"},component:Mh,beforeEnter:rh},{path:"/users/role/:role",name:"UsersByRole",meta:{view:"users"},component:um,beforeEnter:rh,props:function(t){return{role:t.params.role}}},{path:"/users",name:"Users",meta:{view:"users"},beforeEnter:rh,component:um},{path:"/users/:id",name:"User",meta:{view:"users"},component:mm,beforeEnter:rh,props:function(t){return{id:t.params.id}}},{path:"/account",name:"Account",meta:{view:"account"},component:mm,beforeEnter:rh,props:function(){return{id:$m.state.user.current?$m.state.user.current.id:null}}},{path:"/plugins/:id",name:"Plugin",meta:{view:"plugin"},props:function(t){return{plugin:t.params.id}},beforeEnter:rh,component:$h},{path:"*",name:"NotFound",beforeEnter:function(t,e,n){n("/")}}];A["a"].use(oh["a"]);var vm=new oh["a"]({mode:"history",routes:gm,url:"/"===d.url?"":d.url});vm.beforeEach(function(t,e,n){"Browser"!==t.name&&!1===ch.all()&&n("/browser"),$m.dispatch("view",t.meta.view),t.meta.outside||$m.dispatch("user/visit",t.path),n()});var bm=vm,km={namespaced:!0,state:{current:null,path:null},mutations:{SET_CURRENT:function(t,e){t.current=e,e&&e.permissions?(A["a"].prototype.$user=e,A["a"].prototype.$permissions=e.permissions):(A["a"].prototype.$user=null,A["a"].prototype.$permissions=null)},SET_PATH:function(t,e){t.path=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},language:function(t,e){t.dispatch("translation/activate",e,{root:!0}),t.commit("SET_CURRENT",Object(l["a"])({language:e},t.state.current))},load:function(t){return Cm.auth.user().then(function(e){return t.commit("SET_CURRENT",e),e})},login:function(t,e){return Cm.auth.login(e).then(function(e){return t.commit("SET_CURRENT",e),t.dispatch("translation/activate",e.language,{root:!0}),bm.push(t.state.path||"/"),e})},logout:function(t,e){t.commit("SET_CURRENT",null),e?window.location.href=(window.panel.url||"")+"/login":Cm.auth.logout().then(function(){bm.push("/login")}).catch(function(){bm.push("/login")})},visit:function(t,e){t.commit("SET_PATH",e)}}};A["a"].use(Qf["a"]);var $m=new Qf["a"].Store({strict:!1,state:{breadcrumb:[],dialog:null,drag:null,isLoading:!1,search:!1,title:null,view:null},mutations:{SET_BREADCRUMB:function(t,e){t.breadcrumb=e},SET_DIALOG:function(t,e){t.dialog=e},SET_DRAG:function(t,e){t.drag=e},SET_SEARCH:function(t,e){!0===e&&(e={}),t.search=e},SET_TITLE:function(t,e){t.title=e},SET_VIEW:function(t,e){t.view=e},START_LOADING:function(t){t.isLoading=!0},STOP_LOADING:function(t){t.isLoading=!1}},actions:{breadcrumb:function(t,e){t.commit("SET_BREADCRUMB",e)},dialog:function(t,e){t.commit("SET_DIALOG",e)},drag:function(t,e){t.commit("SET_DRAG",e)},isLoading:function(t,e){t.commit(!0===e?"START_LOADING":"STOP_LOADING")},search:function(t,e){t.commit("SET_SEARCH",e)},title:function(t,e){t.commit("SET_TITLE",e),document.title=e||"",t.state.system.info.title&&(document.title+=null!==e?" | "+t.state.system.info.title:t.state.system.info.title)},view:function(t,e){t.commit("SET_VIEW",e)}},modules:{form:eh,languages:nh,notification:ih,system:sh,translation:ah,user:km}}),_m={running:0,request:function(t,e){var n=this;e=qi()(e||{},{credentials:"same-origin",cache:"no-cache",headers:Object(l["a"])({"x-requested-with":"xmlhttprequest","content-type":"application/json"},e.headers)}),$m.state.languages.current&&(e.headers["x-language"]=$m.state.languages.current.code),e.headers["x-csrf"]=window.panel.csrf;var i=t+"/"+dr()(e);return Cm.config.onStart(i),this.running++,fetch(Cm.config.endpoint+"/"+t,e).then(function(t){return t.text()}).then(function(t){try{return JSON.parse(t)}catch(e){throw new Error("The JSON response from the API could not be parsed. Please check your API connection.")}}).then(function(t){if(t.status&&"error"===t.status)throw t;var e=t;return t.data&&t.type&&"model"===t.type&&(e=t.data),n.running--,Cm.config.onComplete(i),Cm.config.onSuccess(t),e}).catch(function(t){throw n.running--,Cm.config.onComplete(i),Cm.config.onError(t),t})},get:function(t,e,n){return e&&(t+="?"+ne()(e).map(function(t){return t+"="+e[t]}).join("&")),this.request(t,qi()(n||{},{method:"GET"}))},post:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"POST";return this.request(t,qi()(n||{},{method:i,body:dr()(e)}))},patch:function(t,e,n){return this.post(t,e,n,"PATCH")},delete:function(t,e,n){return this.post(t,e,n,"DELETE")}},ym={list:function(){return Cm.get("roles")},get:function(t){return Cm.get("roles/"+t)},options:function(){return this.list().then(function(t){return t.data.map(function(t){return{info:t.description||"(".concat(A["a"].i18n.translate("role.description.placeholder"),")"),text:t.title,value:t.name}})})}},xm={info:function(t){return Cm.get("system",t)},install:function(t){return Cm.post("system/install",t).then(function(t){return t.user})},register:function(t){return Cm.post("system/register",t)}},wm={get:function(t){return Cm.get("site",t)},update:function(t){return Cm.post("site",t)},title:function(t){return Cm.patch("site/title",{title:t})},options:function(){return Cm.get("site",{select:"options"}).then(function(t){var e=t.options,n=[];return n.push({click:"rename",icon:"title",text:A["a"].i18n.translate("rename"),disabled:!e.changeTitle}),n})},children:function(t){return Cm.post("site/children/search",t)},blueprint:function(){return Cm.get("site/blueprint")},blueprints:function(){return Cm.get("site/blueprints")}},Om={list:function(){return Cm.get("translations")},get:function(t){return Cm.get("translations/"+t)},options:function(){var t=[];return this.list().then(function(e){return t=e.data.map(function(t){return{value:t.id,text:t.name}}),t})}},Sm={create:function(t){return Cm.post(this.url(),t)},list:function(t){return Cm.post(this.url(null,"search"),t)},get:function(t,e){return Cm.get(this.url(t),e)},update:function(t,e){return Cm.patch(this.url(t),e)},delete:function(t){return Cm.delete(this.url(t))},changeEmail:function(t,e){return Cm.patch(this.url(t,"email"),{email:e})},changeLanguage:function(t,e){return Cm.patch(this.url(t,"language"),{language:e})},changeName:function(t,e){return Cm.patch(this.url(t,"name"),{name:e})},changePassword:function(t,e){return Cm.patch(this.url(t,"password"),{password:e})},changeRole:function(t,e){return Cm.patch(this.url(t,"role"),{role:e})},deleteAvatar:function(t){return Cm.delete(this.url(t,"avatar"))},blueprint:function(t){return Cm.get(this.url(t,"blueprint"))},breadcrumb:function(t){return[{link:"/users/"+t.id,label:t.username}]},options:function(t){return Cm.get(this.url(t),{select:"options"}).then(function(t){var e=t.options,n=[];return n.push({click:"rename",icon:"title",text:A["a"].i18n.translate("user.changeName"),disabled:!e.changeName}),n.push({click:"email",icon:"email",text:A["a"].i18n.translate("user.changeEmail"),disabled:!e.changeEmail}),n.push({click:"role",icon:"bolt",text:A["a"].i18n.translate("user.changeRole"),disabled:!e.changeRole}),n.push({click:"password",icon:"key",text:A["a"].i18n.translate("user.changePassword"),disabled:!e.changePassword}),n.push({click:"language",icon:"globe",text:A["a"].i18n.translate("user.changeLanguage"),disabled:!e.changeLanguage}),n.push({click:"remove",icon:"trash",text:A["a"].i18n.translate("user.delete"),disabled:!e.delete}),n})},url:function(t,e){var n=t?"users/"+t:"users";return e&&(n+="/"+e),n},link:function(t,e){return"/"+this.url(t,e)}},Cm=Object(l["a"])({config:{onStart:function(){},onComplete:function(){},onSuccess:function(){},onError:function(t){throw window.console.log(t.message),t}},auth:Jf,files:Xf,pages:Zf,roles:ym,system:xm,site:wm,translations:Om,users:Sm},_m);Cm.config.endpoint=d.api,Cm.requests=[],Cm.config.onStart=function(t){$m.dispatch("isLoading",!0),Cm.requests.push(t)},Cm.config.onComplete=function(t){Cm.requests=Cm.requests.filter(function(e){return e!==t}),0===Cm.requests.length&&$m.dispatch("isLoading",!1)},Cm.config.onError=function(t){d.debug&&window.console.error(t),403===t.code&&$m.dispatch("user/logout",!0)};var Em=setInterval(Cm.auth.user,3e5);Cm.config.onSuccess=function(){clearInterval(Em),Em=setInterval(Cm.auth.user,3e5)},A["a"].prototype.$api=Cm,A["a"].config.errorHandler=function(t){d.debug&&window.console.error(t),$m.dispatch("notification/error",{message:t.message||"An error occurred. Please reload the panel"})},window.panel=window.panel||{},window.panel.error=function(t,e){d.debug&&window.console.error(t+": "+e),$m.dispatch("error",t+". See the console for more information.")};var Tm=n("f2f3");A["a"].use(Tm["a"].plugin,$m);var jm=n("2d1f"),Im=n.n(jm),Lm={};for(var qm in A["a"].options.components)Lm[qm]=A["a"].options.components[qm];var Nm=function(t,e){e.template||e.render||e.extends?(e.extends&&"string"===typeof e.extends&&(e.extends=Lm[e.extends],e.template&&(e.render=null)),e.mixins&&(e.mixins=e.mixins.map(function(t){return"string"===typeof t?Lm[t]:t})),Lm[t]&&window.console.warn('Plugin is replacing "'.concat(t,'"')),A["a"].component(t,e)):$m.dispatch("notification/error",'Neither template or render method provided nor extending a component when loading plugin component "'.concat(t,'". The component has not been registered.'))};Im()(window.panel.plugins.components).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];Nm(n,i)}),Im()(window.panel.plugins.fields).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];Nm(n,i)}),Im()(window.panel.plugins.sections).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];Nm(n,Object(l["a"])({},i,{mixins:[_f].concat(i.mixins||[])}))}),Im()(window.panel.plugins.views).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];if(!i.component)return $m.dispatch("notification/error",'No view component provided when loading view "'.concat(n,'". The view has not been registered.')),void delete window.panel.plugins.views[n];i.link="/plugins/"+n,void 0===i.icon&&(i.icon="page"),void 0===i.menu&&(i.menu=!0),window.panel.plugins.views[n]={link:i.link,icon:i.icon,menu:i.menu},A["a"].component("k-"+n+"-plugin-view",i.component)}),window.panel.plugins.use.forEach(function(t){A["a"].use(t)}),A["a"].use(T),A["a"].use(N),A["a"].use(j),A["a"].use(P.a),A["a"].config.productionTip=!1,A["a"].config.devtools=!0,window.panel.app=new A["a"]({router:bm,store:$m,render:function(t){return t(C)}}).$mount("#app")},5714:function(t,e,n){},"580a":function(t,e,n){"use strict";var i=n("61ab"),s=n.n(i);s.a},"589a":function(t,e,n){},"58e5":function(t,e,n){},"5ab5":function(t,e,n){},"5aee":function(t,e,n){"use strict";var i=n("04b2"),s=n.n(i);s.a},"5b23":function(t,e,n){"use strict";var i=n("9798"),s=n.n(i);s.a},"5c0b":function(t,e,n){"use strict";var i=n("5e27"),s=n.n(i);s.a},"5d33":function(t,e,n){"use strict";var i=n("2246"),s=n.n(i);s.a},"5e27":function(t,e,n){},"5f12":function(t,e,n){},6018:function(t,e,n){"use strict";var i=n("e30b"),s=n.n(i);s.a},"61ab":function(t,e,n){},"64e6":function(t,e,n){},"65a9":function(t,e,n){},"696b5":function(t,e,n){"use strict";var i=n("0cdc"),s=n.n(i);s.a},"6a18":function(t,e,n){"use strict";var i=n("de8a"),s=n.n(i);s.a},"6ab3":function(t,e,n){"use strict";var i=n("784e"),s=n.n(i);s.a},"6ab9":function(t,e,n){},"6b7f":function(t,e,n){},"6bcd":function(t,e,n){"use strict";var i=n("9e0a"),s=n.n(i);s.a},"6f7b":function(t,e,n){"use strict";var i=n("5ab5"),s=n.n(i);s.a},7075:function(t,e,n){},"718c":function(t,e,n){"use strict";var i=n("773d"),s=n.n(i);s.a},7568:function(t,e,n){"use strict";var i=n("4150"),s=n.n(i);s.a},"75cd":function(t,e,n){},7737:function(t,e,n){"use strict";var i=n("ca19"),s=n.n(i);s.a},"773d":function(t,e,n){},"778b":function(t,e,n){},7797:function(t,e,n){},"784e":function(t,e,n){},"7a7d":function(t,e,n){"use strict";var i=n("65a9"),s=n.n(i);s.a},"7d2d":function(t,e,n){},"7d5d":function(t,e,n){"use strict";var i=n("6ab9"),s=n.n(i);s.a},"7dc7":function(t,e,n){"use strict";var i=n("eb17"),s=n.n(i);s.a},"7e0c":function(t,e,n){},"7e85":function(t,e,n){"use strict";var i=n("d1c5"),s=n.n(i);s.a},"7f6e":function(t,e,n){"use strict";var i=n("4364"),s=n.n(i);s.a},"862b":function(t,e,n){"use strict";var i=n("589a"),s=n.n(i);s.a},"893d":function(t,e,n){"use strict";var i=n("abb3"),s=n.n(i);s.a},"8ae6":function(t,e,n){},"8c28":function(t,e,n){"use strict";var i=n("3d5b"),s=n.n(i);s.a},"8e4d":function(t,e,n){},"910b":function(t,e,n){},"957b":function(t,e,n){},9749:function(t,e,n){},"977f":function(t,e,n){"use strict";var i=n("b7f5"),s=n.n(i);s.a},9798:function(t,e,n){},9799:function(t,e,n){"use strict";var i=n("4fe0"),s=n.n(i);s.a},9811:function(t,e,n){},"98a1":function(t,e,n){"use strict";var i=n("f0cb"),s=n.n(i);s.a},"9bd5":function(t,e,n){"use strict";var i=n("64e6"),s=n.n(i);s.a},"9df7":function(t,e,n){},"9e0a":function(t,e,n){},a134:function(t,e,n){"use strict";var i=n("4390"),s=n.n(i);s.a},a567:function(t,e,n){"use strict";var i=n("c0b5"),s=n.n(i);s.a},a5f3:function(t,e,n){"use strict";var i=n("43f4"),s=n.n(i);s.a},a66d:function(t,e,n){"use strict";var i=n("2eb5"),s=n.n(i);s.a},abb3:function(t,e,n){},ac27:function(t,e,n){"use strict";var i=n("3c9d"),s=n.n(i);s.a},b0d6:function(t,e,n){"use strict";var i=n("d31d"),s=n.n(i);s.a},b37e:function(t,e,n){},b3c3:function(t,e,n){},b5d2:function(t,e,n){"use strict";var i=n("ed7b"),s=n.n(i);s.a},b746:function(t,e,n){"use strict";var i=n("7e0c"),s=n.n(i);s.a},b7f5:function(t,e,n){},ba8f:function(t,e,n){"use strict";var i=n("9749"),s=n.n(i);s.a},bb41:function(t,e,n){"use strict";var i=n("ceb4"),s=n.n(i);s.a},bd96:function(t,e,n){"use strict";var i=n("d6a4"),s=n.n(i);s.a},bf53:function(t,e,n){"use strict";var i=n("3c80"),s=n.n(i);s.a},c0b5:function(t,e,n){},c119:function(t,e,n){"use strict";var i=n("4b49"),s=n.n(i);s.a},c7c8:function(t,e,n){"use strict";var i=n("1be2"),s=n.n(i);s.a},c857:function(t,e,n){"use strict";var i=n("7d2d"),s=n.n(i);s.a},c9cb:function(t,e,n){"use strict";var i=n("b37e"),s=n.n(i);s.a},ca19:function(t,e,n){},ca3a:function(t,e,n){},cb8f:function(t,e,n){"use strict";var i=n("8e4d"),s=n.n(i);s.a},cca8:function(t,e,n){"use strict";var i=n("18b7"),s=n.n(i);s.a},ceb4:function(t,e,n){},d0c1:function(t,e,n){"use strict";var i=n("9df7"),s=n.n(i);s.a},d0e7:function(t,e,n){},d1c5:function(t,e,n){},d221:function(t,e,n){"use strict";var i=n("6b7f"),s=n.n(i);s.a},d31d:function(t,e,n){},d6a4:function(t,e,n){},d6c1:function(t,e,n){},d6fc:function(t,e,n){"use strict";var i=n("08ec"),s=n.n(i);s.a},d9c4:function(t,e,n){},daa8:function(t,e,n){"use strict";var i=n("e60b"),s=n.n(i);s.a},db92:function(t,e,n){},ddfd:function(t,e,n){"use strict";var i=n("4dc8"),s=n.n(i);s.a},de8a:function(t,e,n){},df0d:function(t,e,n){"use strict";var i=n("3ab9"),s=n.n(i);s.a},e30b:function(t,e,n){},e60b:function(t,e,n){},e697:function(t,e,n){},eb17:function(t,e,n){},ec72:function(t,e,n){},ed7b:function(t,e,n){},ee15:function(t,e,n){"use strict";var i=n("fd81"),s=n.n(i);s.a},f0cb:function(t,e,n){},f56d:function(t,e,n){"use strict";var i=n("75cd"),s=n.n(i);s.a},f5e3:function(t,e,n){},f8a7:function(t,e,n){"use strict";var i=n("db92"),s=n.n(i);s.a},f95f:function(t,e,n){"use strict";var i=n("5f12"),s=n.n(i);s.a},fa6a:function(t,e,n){"use strict";var i=n("778b"),s=n.n(i);s.a},fb1a:function(t,e,n){},fc0f:function(t,e,n){"use strict";var i=n("424a"),s=n.n(i);s.a},fd81:function(t,e,n){},ff6d:function(t,e,n){},fffc:function(t,e,n){}}); \ No newline at end of file diff --git a/kirby/src/Cms/App.php b/kirby/src/Cms/App.php index aa9cdf1..5b0a301 100755 --- a/kirby/src/Cms/App.php +++ b/kirby/src/Cms/App.php @@ -650,6 +650,11 @@ class App $text = $this->apply('kirbytext:before', $text); $text = $this->kirbytags($text, $data); $text = $this->markdown($text, $inline); + + if ($this->option('smartypants', false) !== false) { + $text = $this->smartypants($text); + } + $text = $this->apply('kirbytext:after', $text); return $text; @@ -700,7 +705,11 @@ class App */ public function languages(): Languages { - return $this->languages = $this->languages ?? Languages::load(); + if ($this->languages !== null) { + return clone $this->languages; + } + + return $this->languages = Languages::load(); } /** @@ -1122,7 +1131,13 @@ class App */ public function smartypants(string $text = null): string { - return $this->component('smartypants')($this, $text, $this->options['smartypants'] ?? []); + $options = $this->option('smartypants', []); + + if ($options === true) { + $options = []; + } + + return $this->component('smartypants')($this, $text, $options); } /** diff --git a/kirby/src/Cms/Collection.php b/kirby/src/Cms/Collection.php index ac392b4..158e66c 100755 --- a/kirby/src/Cms/Collection.php +++ b/kirby/src/Cms/Collection.php @@ -3,6 +3,7 @@ namespace Kirby\Cms; use Closure; +use Exception; use Kirby\Exception\InvalidArgumentException; use Kirby\Toolkit\Collection as BaseCollection; use Kirby\Toolkit\Str; @@ -125,8 +126,12 @@ class Collection extends BaseCollection * @param bool $i (ignore upper/lowercase for group names) * @return Collection A collection with an item for each group and a Collection for each group */ - public function groupBy(string $field, bool $i = true) + public function groupBy($field, bool $i = true) { + if (is_string($field) === false) { + throw new Exception('Cannot group by non-string values. Did you mean to call group()?'); + } + $groups = new Collection([], $this->parent()); foreach ($this->data as $key => $item) { diff --git a/kirby/src/Cms/Collections.php b/kirby/src/Cms/Collections.php index aacaf3f..9a3222b 100755 --- a/kirby/src/Cms/Collections.php +++ b/kirby/src/Cms/Collections.php @@ -67,17 +67,23 @@ class Collections } // if not yet cached - if (isset($this->cache[$name]) === false) { + if ( + isset($this->cache[$name]) === false || + $this->cache[$name]['data'] !== $data + ) { $controller = new Controller($this->collections[$name]); - $this->cache[$name] = $controller->call(null, $data); + $this->cache[$name] = [ + 'result' => $controller->call(null, $data), + 'data' => $data + ]; } // return cloned object - if (is_object($this->cache[$name]) === true) { - return clone $this->cache[$name]; + if (is_object($this->cache[$name]['result']) === true) { + return clone $this->cache[$name]['result']; } - return $this->cache[$name]; + return $this->cache[$name]['result']; } /** diff --git a/kirby/src/Cms/Language.php b/kirby/src/Cms/Language.php index 56fb82d..84738c8 100755 --- a/kirby/src/Cms/Language.php +++ b/kirby/src/Cms/Language.php @@ -132,6 +132,11 @@ class Language extends Model $kirby = App::instance(); $site = $kirby->site(); + // convert site + foreach ($site->files() as $file) { + F::move($file->contentFile($from, true), $file->contentFile($to, true)); + } + F::move($site->contentFile($from, true), $site->contentFile($to, true)); // convert all pages @@ -489,7 +494,7 @@ class Language extends Model */ public function url(): string { - return Url::to($this->pattern()); + return Url::makeAbsolute($this->pattern(), $this->kirby()->url()); } /** diff --git a/kirby/src/Cms/Nest.php b/kirby/src/Cms/Nest.php index a48d3df..182c568 100755 --- a/kirby/src/Cms/Nest.php +++ b/kirby/src/Cms/Nest.php @@ -25,7 +25,7 @@ class Nest foreach ($data as $key => $value) { if (is_array($value) === true) { $result[$key] = static::create($value, $parent); - } elseif (is_string($value) === true) { + } elseif (is_scalar($value) === true) { $result[$key] = new Field($parent, $key, $value); } } diff --git a/kirby/src/Cms/Page.php b/kirby/src/Cms/Page.php index 3e70b58..f6d1b91 100755 --- a/kirby/src/Cms/Page.php +++ b/kirby/src/Cms/Page.php @@ -247,9 +247,13 @@ class Page extends ModelWithContent } $blueprints = []; - $templates = $this->blueprint()->options()['changeTemplate'] ?? false; + $templates = $this->blueprint()->options()['changeTemplate'] ?? []; $currentTemplate = $this->intendedTemplate()->name(); + if (is_array($templates) === false) { + $templates = []; + } + // add the current template to the array $templates[] = $currentTemplate; diff --git a/kirby/src/Cms/PanelPlugins.php b/kirby/src/Cms/PanelPlugins.php index 20ee443..d937760 100755 --- a/kirby/src/Cms/PanelPlugins.php +++ b/kirby/src/Cms/PanelPlugins.php @@ -133,7 +133,7 @@ class PanelPlugins */ public function id(): string { - return crc32(implode(array_values($this->files()))); + return hash('crc32', implode(array_values($this->files()))); } /** diff --git a/kirby/src/Cms/StructureObject.php b/kirby/src/Cms/StructureObject.php index f446683..666d0ca 100755 --- a/kirby/src/Cms/StructureObject.php +++ b/kirby/src/Cms/StructureObject.php @@ -101,6 +101,21 @@ class StructureObject extends Model return $this->id; } + /** + * Compares the current object with the given structure object + * + * @param mixed $structure + * @return bool + */ + public function is($structure): bool + { + if (is_a($structure, StructureObject::class) === false) { + return false; + } + + return $this === $structure; + } + /** * Returns the parent Model object * diff --git a/kirby/src/Cms/User.php b/kirby/src/Cms/User.php index 8327323..0ee37a0 100755 --- a/kirby/src/Cms/User.php +++ b/kirby/src/Cms/User.php @@ -372,6 +372,8 @@ class User extends ModelWithContent * @param string $password * @param Session|array $session Session options or session object to set the user in * @return bool + * + * @throws PermissionException If the password is not valid */ public function login(string $password, $session = null): bool { @@ -783,6 +785,10 @@ class User extends ModelWithContent * * @param string $password * @return boolean + * + * @throws NotFoundException If the user has no password + * @throws InvalidArgumentException If the entered password is not valid + * @throws InvalidArgumentException If the entered password does not match the user password */ public function validatePassword(string $password = null): bool { diff --git a/kirby/src/Toolkit/Collection.php b/kirby/src/Toolkit/Collection.php index a6c463f..54c611d 100755 --- a/kirby/src/Toolkit/Collection.php +++ b/kirby/src/Toolkit/Collection.php @@ -132,7 +132,7 @@ class Collection extends Iterator implements Countable * @return Collection A new collection with an element for each chunk and * a sub collection in each chunk */ - public function chunk(int $size): self + public function chunk(int $size) { // create a multidimensional array that is chunked with the given // chunk size keep keys of the elements @@ -219,7 +219,7 @@ class Collection extends Iterator implements Countable * @param Closure $filter * @return self */ - public function filter($filter): self + public function filter($filter) { if (is_callable($filter) === true) { $collection = clone $this; @@ -246,7 +246,7 @@ class Collection extends Iterator implements Countable * @param string $field * @return self */ - public function filterBy(string $field, ...$args): self + public function filterBy(string $field, ...$args) { $operator = '=='; $test = $args[0] ?? null; @@ -405,7 +405,7 @@ class Collection extends Iterator implements Countable * * @return Collection */ - public function flip(): self + public function flip() { $collection = clone $this; $collection->data = array_reverse($this->data, true); @@ -433,14 +433,19 @@ class Collection extends Iterator implements Countable * @param array|object $item * @param string $attribute * @param boolean $split + * @param mixed $related * @return mixed */ - public function getAttribute($item, string $attribute, $split = false) + public function getAttribute($item, string $attribute, $split = false, $related = null) { $value = $this->{'getAttributeFrom' . gettype($item)}($item, $attribute); if ($split !== false) { - $value = Str::split($value, $split === true ? ',' : $split); + return Str::split($value, $split === true ? ',' : $split); + } + + if ($related !== null) { + return Str::toType((string)$value, $related); } return $value; @@ -516,7 +521,7 @@ class Collection extends Iterator implements Countable * @param bool $i * @return Collection A new collection with an element for each group and a subcollection in each group */ - public function groupBy(string $field, bool $i = true) + public function groupBy($field, bool $i = true) { if (is_string($field) === false) { throw new Exception('Cannot group by non-string values. Did you mean to call group()?'); @@ -587,7 +592,7 @@ class Collection extends Iterator implements Countable * @param int $limit The number of elements to return * @return Collection */ - public function limit(int $limit): self + public function limit(int $limit) { return $this->slice(0, $limit); } @@ -598,7 +603,7 @@ class Collection extends Iterator implements Countable * @param callable $callback * @return Collection */ - public function map(callable $callback): self + public function map(callable $callback) { $this->data = array_map($callback, $this->data); return $this; @@ -625,7 +630,7 @@ class Collection extends Iterator implements Countable { $collection = clone $this; foreach ($keys as $key) { - unset($collection->$key); + unset($collection->data[$key]); } return $collection; } @@ -636,7 +641,7 @@ class Collection extends Iterator implements Countable * @param int $offset The index to start from * @return Collection */ - public function offset(int $offset): self + public function offset(int $offset) { return $this->slice($offset); } @@ -798,7 +803,7 @@ class Collection extends Iterator implements Countable * * @return Collection */ - public function shuffle(): self + public function shuffle() { $data = $this->data; $keys = $this->keys(); @@ -821,7 +826,7 @@ class Collection extends Iterator implements Countable * @param int $limit The optional number of elements to return * @return Collection */ - public function slice(int $offset = 0, int $limit = null): self + public function slice(int $offset = 0, int $limit = null) { if ($offset === 0 && $limit === null) { return $this; @@ -840,7 +845,7 @@ class Collection extends Iterator implements Countable * @param $method int The sort flag, SORT_REGULAR, SORT_NUMERIC etc. * @return Collection */ - public function sortBy(): self + public function sortBy() { // there is no need to sort empty collections if (empty($this->data) === true) { @@ -983,13 +988,13 @@ class Collection extends Iterator implements Countable */ Collection::$filters['=='] = function ($collection, $field, $test, $split = false) { foreach ($collection->data as $key => $item) { - $value = $collection->getAttribute($item, $field, $split); + $value = $collection->getAttribute($item, $field, $split, $test); if ($split !== false) { if (in_array($test, $value) === false) { unset($collection->data[$key]); } - } elseif ($value != $test) { + } elseif ($value !== $test) { unset($collection->data[$key]); } } @@ -1002,13 +1007,13 @@ Collection::$filters['=='] = function ($collection, $field, $test, $split = fals */ Collection::$filters['!='] = function ($collection, $field, $test, $split = false) { foreach ($collection->data as $key => $item) { - $value = $collection->getAttribute($item, $field, $split); + $value = $collection->getAttribute($item, $field, $split, $test); if ($split !== false) { if (in_array($test, $value) === true) { unset($collection->data[$key]); } - } elseif ($value == $test) { + } elseif ((string)$value == $test) { unset($collection->data[$key]); } } diff --git a/kirby/src/Toolkit/Html.php b/kirby/src/Toolkit/Html.php index 87fce22..83820ec 100755 --- a/kirby/src/Toolkit/Html.php +++ b/kirby/src/Toolkit/Html.php @@ -54,8 +54,8 @@ class Html /** * Generates an a tag * - * @param string $href The url for the a tag - * @param mixed $text The optional text. If null, the url will be used as text + * @param string $href The url for the `a` tag + * @param mixed $text The optional text. If `null`, the url will be used as text * @param array $attr Additional attributes for the tag * @return string the generated html */ @@ -64,7 +64,7 @@ class Html $attr = array_merge(['href' => $href], $attr); if (empty($text) === true) { - $text = $href; + $text = $attr['href']; } if (is_string($text) === true && Str::isUrl($text) === true) { @@ -160,7 +160,7 @@ class Html } /** - * Generates an "a mailto" tag + * Generates an `a` tag with `mailto:` * * @param string $email The url for the a tag * @param mixed $text The optional text. If null, the url will be used as text @@ -328,7 +328,7 @@ class Html } /** - * Add noopeener noreferrer to rels when target is _blank + * Add noopeener noreferrer to rels when target is `_blank` * * @param string $rel * @param string $target @@ -352,8 +352,8 @@ class Html /** * Generates an Html tag with optional content and attributes * - * @param string $name The name of the tag, i.e. "a" - * @param mixed $content The content if availble. Pass null to generate a self-closing tag, Pass an empty string to generate empty content + * @param string $name The name of the tag, i.e. `a` + * @param mixed $content The content if availble. Pass `null` to generate a self-closing tag, Pass an empty string to generate empty content * @param array $attr An associative array with additional attributes for the tag * @return string The generated Html */ @@ -383,10 +383,10 @@ class Html /** - * Generates an a tag for a phone number + * Generates an `a` tag for a phone number * * @param string $tel The phone number - * @param mixed $text The optional text. If null, the number will be used as text + * @param mixed $text The optional text. If `null`, the number will be used as text * @param array $attr Additional attributes for the tag * @return string the generated html */ @@ -404,7 +404,7 @@ class Html /** * Creates a video embed via iframe for Youtube or Vimeo * videos. The embed Urls are automatically detected from - * the given Url. + * the given URL. * * @param string $url * @param array $options diff --git a/kirby/src/Toolkit/Mime.php b/kirby/src/Toolkit/Mime.php index 9caba1c..a66e144 100755 --- a/kirby/src/Toolkit/Mime.php +++ b/kirby/src/Toolkit/Mime.php @@ -124,8 +124,9 @@ class Mime 'svg' => [Mime::class, 'fromSvg'], ], 'text/plain' => [ - 'css' => 'text/css', - 'svg' => [Mime::class, 'fromSvg'], + 'css' => 'text/css', + 'json' => 'application/json', + 'svg' => [Mime::class, 'fromSvg'], ], 'text/x-asm' => [ 'css' => 'text/css' diff --git a/kirby/src/Toolkit/Str.php b/kirby/src/Toolkit/Str.php index 61c5086..9efef66 100755 --- a/kirby/src/Toolkit/Str.php +++ b/kirby/src/Toolkit/Str.php @@ -870,6 +870,36 @@ class Str }, $string); } + /** + * Convert the string to the given type + * + * @param string $string + * @param mixed $type + * @return mixed + */ + public static function toType($string = null, $type) + { + if (is_string($type) === false) { + $type = gettype($type); + } + + switch ($type) { + case 'array': + return (array)$string; + case 'bool': + case 'boolean': + return filter_var($string, FILTER_VALIDATE_BOOLEAN); + case 'double': + case 'float': + return floatval($string); + case 'int': + case 'integer': + return intval($string); + } + + return (string)$string; + } + /** * Safe trim alternative * diff --git a/kirby/translations/cs.json b/kirby/translations/cs.json index 0689846..b5118f0 100755 --- a/kirby/translations/cs.json +++ b/kirby/translations/cs.json @@ -104,18 +104,18 @@ "error.section.files.max.singular": "Sekce \"{section}\" může obsahovat nejvýše jeden soubor", "error.section.files.min.plural": - "The \"{section}\" section requires at least {min} files", + "Sekce \"{section}\" vyžaduje nejméně {min} souborů", "error.section.files.min.singular": - "The \"{section}\" section requires at least one file", + "Sekce \"{section}\" vyžaduje alespoň jeden soubor", "error.section.pages.max.plural": "Sekce \"{section}\" nesmí obsahovat více jak {max} stránek", "error.section.pages.max.singular": "Sekce \"{section}\" může obsahovat nejvýše jednu stránku", "error.section.pages.min.plural": - "The \"{section}\" section requires at least {min} pages", + "Sekce \"{section}\" vyžaduje alespoň {min} stránek", "error.section.pages.min.singular": - "The \"{section}\" section requires at least one page", + "Sekce \"{section}\" vyžaduje alespoň jednu stránku", "error.section.notLoaded": "Nelze načíst sekci \"{name}\"", "error.section.type.invalid": "Typ sekce \"{type}\" není platný", @@ -324,7 +324,7 @@ "page.status.listed": "Veřejná", "page.status.listed.description": "Stránka je zveřejněná pro všechny", "page.status.unlisted": "Neveřejná", - "page.status.unlisted.description": "Tato stránka je dostupná pouze přes adresu URL", + "page.status.unlisted.description": "Tato stránka je dostupná pouze přes URL.", "pages": "Stránky", "pages.empty": "Zatím žádné stránky", @@ -366,8 +366,8 @@ "toolbar.button.heading.3": "Nadpis 3", "toolbar.button.italic": "Kurz\u00edva", "toolbar.button.file": "Soubor", - "toolbar.button.file.select": "Select a file", - "toolbar.button.file.upload": "Upload a file", + "toolbar.button.file.select": "Vyberte soubor", + "toolbar.button.file.upload": "Nahrajte soubor", "toolbar.button.link": "Odkaz", "toolbar.button.ol": "Řazený seznam", "toolbar.button.ul": "Odrážkový seznam", diff --git a/kirby/translations/de.json b/kirby/translations/de.json index 072084f..a665cac 100755 --- a/kirby/translations/de.json +++ b/kirby/translations/de.json @@ -35,9 +35,9 @@ "error.avatar.create.fail": "Das Profilbild konnte nicht hochgeladen werden", "error.avatar.delete.fail": "Das Profilbild konnte nicht gel\u00f6scht werden", "error.avatar.dimensions.invalid": - "Bitte lade ein Profilbild hoch, das nicht größer als 3000 Pixel in der Breite und Höhe ist.", + "Bitte lade ein Profilbild hoch, das nicht breiter oder höher als 3000 Pixel ist.", "error.avatar.mime.forbidden": - "Verbotener Medientyp", + "Das Profilbild muss vom Format JPEG oder PNG sein", "error.blueprint.notFound": "Das Blueprint \"{name}\" konnte nicht geladen werden.", @@ -46,7 +46,7 @@ "error.field.converter.invalid": "Ungültiger Konverter: \"{converter}\"", "error.file.changeName.permission": - "Du kannst den Dateinamen von \"{filename}\" nicht ändern", + "Du darfst den Dateinamen von \"{filename}\" nicht ändern", "error.file.duplicate": "Eine Datei mit dem Dateinamen \"{filename}\" besteht bereits", "error.file.extension.forbidden": "Verbotene Dateiendung \"{extension}\"", @@ -66,7 +66,7 @@ "error.form.notSaved": "Das Formular konnte nicht gespeichert werden", "error.page.changeSlug.permission": - "Du kannst die URL der Seite \"{slug}\" nicht ändern", + "Du darfst die URL der Seite \"{slug}\" nicht ändern", "error.page.changeStatus.incomplete": "Die Seite ist nicht vollständig und kann daher nicht veröffentlicht werden", "error.page.changeStatus.permission": @@ -122,7 +122,7 @@ "error.site.changeTitle.permission": "Du kannst den Titel der Seite nicht ändern", - "error.site.update.permission": "Du kannst die Seite nicht editieren", + "error.site.update.permission": "Du darfst die Seite nicht editieren", "error.template.default.notFound": "Die \"Default\"-Vorlage existiert nicht", @@ -156,7 +156,7 @@ "error.user.role.invalid": "Bitte gib eine gültige Rolle an", "error.user.undefined": "Der Benutzer wurde nicht gefunden", "error.user.update.permission": - "Du kannst den den Benutzer \"{name}\" nicht editieren", + "Du darfst den den Benutzer \"{name}\" nicht editieren", "error.validation.accepted": "Bitte bestätige", "error.validation.alpha": "Bitte gib nur Zeichen zwischen A und Z ein", @@ -218,11 +218,11 @@ "installation": "Installation", "installation.completed": "Das Panel wurde installiert", - "installation.disabled": "Die Panel Installation ist auf öffentlichen Servern automatisch deaktiviert. Bitte installiere das Panel auf einem lokalen Server oder aktiviere die Installation gezielt mit der panel.install Option. ", + "installation.disabled": "Die Panel-Installation ist auf öffentlichen Servern automatisch deaktiviert. Bitte installiere das Panel auf einem lokalen Server oder aktiviere die Installation gezielt mit der panel.install Option. ", "installation.issues.accounts": "/site/accounts ist nicht beschreibbar", "installation.issues.content": - "/content und alle Inhalte müssen beschreibbar sein", + "/content existiert nicht oder ist nicht beschreibbar", "installation.issues.curl": "Die CURL Erweiterung wird benötigt", "installation.issues.headline": "Das Panel kann nicht installiert werden", "installation.issues.mbstring": @@ -232,7 +232,7 @@ "installation.issues.php": "Bitte verwende PHP 7+", "installation.issues.server": "Kirby benötigt Apache, Nginx or Caddy", - "installation.issues.sessions": "Der /site/sessions Ordner ist nicht beschreibbar", + "installation.issues.sessions": "/site/sessions ist nicht beschreibbar", "language": "Sprache", "language.code": "Code", @@ -260,7 +260,7 @@ "license.buy": "Kaufe eine Lizenz", "license.register": "Registrieren", "license.register.help": - "Der Lizenzcode steht in deiner Kaufbestätigungsmail. Bitte kopiere ihn und füge ihn ein, um Kirby zu registrieren.", + "Den Lizenzcode findest du in der Bestätigungsmai zu deinem Kauf. Bitte kopiere und füge ihn ein, um Kirby zu registrieren.", "license.register.label": "Bitte gib deinen Lizenzcode ein", "license.register.success": "Vielen Dank für deine Unterstützung", "license.unregistered": "Dies ist eine unregistrierte Kirby-Demo", diff --git a/kirby/translations/fa.json b/kirby/translations/fa.json index bd854e5..1d02ee2 100755 --- a/kirby/translations/fa.json +++ b/kirby/translations/fa.json @@ -373,7 +373,7 @@ "toolbar.button.ul": "لیست معمولی", "translation.author": "تیم کربی", - "translation.direction": "ltr", + "translation.direction": "rtl", "translation.name": "انگلیسی", "upload": "بارگذاری", diff --git a/kirby/translations/it.json b/kirby/translations/it.json index 0176467..27580c6 100755 --- a/kirby/translations/it.json +++ b/kirby/translations/it.json @@ -104,18 +104,18 @@ "error.section.files.max.singular": "Non puoi aggiungere più di un file alla sezione \"{section}\"", "error.section.files.min.plural": - "The \"{section}\" section requires at least {min} files", + "La sezione \"{section}\" richiede almeno {min} file", "error.section.files.min.singular": - "The \"{section}\" section requires at least one file", + "La sezione \"{section}\" richiede almeno un file", "error.section.pages.max.plural": "Non puoi aggiungere più di {max} pagine alla sezione \"{section}\"", "error.section.pages.max.singular": "Non puoi aggiungere più di una pagina alla sezione \"{section}\"", "error.section.pages.min.plural": - "The \"{section}\" section requires at least {min} pages", + "La sezione \"{section}\" richiede almeno {min} pagine", "error.section.pages.min.singular": - "The \"{section}\" section requires at least one page", + "La sezione \"{section}\" richiede almeno una pagina", "error.section.notLoaded": "Non è stato possibile caricare la sezione \"{name}\"", "error.section.type.invalid": "Il tipo di sezione \"{type}\" non è valido", @@ -366,8 +366,8 @@ "toolbar.button.heading.3": "Titolo 3", "toolbar.button.italic": "Corsivo", "toolbar.button.file": "File", - "toolbar.button.file.select": "Select a file", - "toolbar.button.file.upload": "Upload a file", + "toolbar.button.file.select": "Seleziona un file", + "toolbar.button.file.upload": "Carica un file", "toolbar.button.link": "Link", "toolbar.button.ol": "Elenco numerato", "toolbar.button.ul": "Elenco puntato", diff --git a/kirby/vendor/composer/autoload_classmap.php b/kirby/vendor/composer/autoload_classmap.php index 1cdaae0..d6f57f7 100755 --- a/kirby/vendor/composer/autoload_classmap.php +++ b/kirby/vendor/composer/autoload_classmap.php @@ -68,6 +68,7 @@ return array( 'Kirby\\Cms\\Pages' => $baseDir . '/src/Cms/Pages.php', 'Kirby\\Cms\\Pagination' => $baseDir . '/src/Cms/Pagination.php', 'Kirby\\Cms\\Panel' => $baseDir . '/src/Cms/Panel.php', + 'Kirby\\Cms\\PanelPlugins' => $baseDir . '/src/Cms/PanelPlugins.php', 'Kirby\\Cms\\Permissions' => $baseDir . '/src/Cms/Permissions.php', 'Kirby\\Cms\\Plugin' => $baseDir . '/src/Cms/Plugin.php', 'Kirby\\Cms\\PluginAssets' => $baseDir . '/src/Cms/PluginAssets.php', diff --git a/kirby/vendor/composer/autoload_static.php b/kirby/vendor/composer/autoload_static.php index 6c1e64e..bed5ef6 100755 --- a/kirby/vendor/composer/autoload_static.php +++ b/kirby/vendor/composer/autoload_static.php @@ -158,6 +158,7 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7 'Kirby\\Cms\\Pages' => __DIR__ . '/../..' . '/src/Cms/Pages.php', 'Kirby\\Cms\\Pagination' => __DIR__ . '/../..' . '/src/Cms/Pagination.php', 'Kirby\\Cms\\Panel' => __DIR__ . '/../..' . '/src/Cms/Panel.php', + 'Kirby\\Cms\\PanelPlugins' => __DIR__ . '/../..' . '/src/Cms/PanelPlugins.php', 'Kirby\\Cms\\Permissions' => __DIR__ . '/../..' . '/src/Cms/Permissions.php', 'Kirby\\Cms\\Plugin' => __DIR__ . '/../..' . '/src/Cms/Plugin.php', 'Kirby\\Cms\\PluginAssets' => __DIR__ . '/../..' . '/src/Cms/PluginAssets.php',