From bc1313fa61e62a0fec74b8fdf43e06dd8bdcda72 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Tue, 3 Dec 2019 14:41:44 +0100 Subject: [PATCH] - datetime picker as vue component - delete bounding box via leaflet button --- app/Models/Coverage.php | 6 +++--- package-lock.json | 5 +++++ package.json | 3 ++- public/backend/ckeditor.js | 2 +- public/backend/publish/approveDataset.js | 2 +- public/backend/publish/datasetPublish.js | 2 +- public/backend/publish/releaseDataset.js | 2 +- public/js/app.js | 2 +- public/js/lib.js | 2 +- public/js/scripts.js | 2 +- public/js/search/main.js | 2 +- resources/js/components/LocationsMap.ts | 2 +- resources/js/datasetPublish.js | 3 ++- .../views/publish/create-step1.blade.php | 19 ++++++++++--------- 14 files changed, 31 insertions(+), 23 deletions(-) diff --git a/app/Models/Coverage.php b/app/Models/Coverage.php index dc79df9..7258513 100644 --- a/app/Models/Coverage.php +++ b/app/Models/Coverage.php @@ -37,15 +37,15 @@ class Coverage extends Model public function setTimeAbsolutAttribute($value) { - $this->attributes['time_absolut'] = \Illuminate\Support\Carbon::createFromFormat('d.m.Y H:i:s', $value); + $this->attributes['time_absolut'] = \Illuminate\Support\Carbon::createFromFormat('d-m-Y H:i:s', $value); } public function setTimeMinAttribute($value) { - $this->attributes['time_min'] = \Illuminate\Support\Carbon::createFromFormat('d.m.Y H:i:s', $value); + $this->attributes['time_min'] = \Illuminate\Support\Carbon::createFromFormat('d-m-Y H:i:s', $value); } public function setTimeMaxAttribute($value) { - $this->attributes['time_max'] = \Illuminate\Support\Carbon::createFromFormat('d.m.Y H:i:s', $value); + $this->attributes['time_max'] = \Illuminate\Support\Carbon::createFromFormat('d-m-Y H:i:s', $value); } /** diff --git a/package-lock.json b/package-lock.json index ecb6fe6..63621fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10346,6 +10346,11 @@ "integrity": "sha512-G9152NzUkz0i0xTfhk0Afc8vzdXxDR1pfN4dTwE72cskkgJtdXfrKBkMfGvDuxUh35U500g5Ve4xL8PEGdWeHg==", "dev": true }, + "vue-datetime-picker": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vue-datetime-picker/-/vue-datetime-picker-0.2.1.tgz", + "integrity": "sha1-e3JN3jty1TFkWifWWXWJ1tiCrTs=" + }, "vue-events": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/vue-events/-/vue-events-3.1.0.tgz", diff --git a/package.json b/package.json index 434302c..8388244 100755 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "datatables.net": "^1.10.19", "datatables.net-buttons": "^1.5.6", "easytimer": "^1.1.1", - "single-page-nav": "^1.0.0" + "single-page-nav": "^1.0.0", + "vue-datetime-picker": "^0.2.1" } } diff --git a/public/backend/ckeditor.js b/public/backend/ckeditor.js index 964dcfb..52630b8 100644 --- a/public/backend/ckeditor.js +++ b/public/backend/ckeditor.js @@ -1 +1 @@ -!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=144)}({144:function(t,e,n){t.exports=n(145)},145:function(t,e,n){"use strict";n.r(e);for(var i=n(72),o=n.n(i),r=document.querySelectorAll(".ckeditor"),s=0;s:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}"},function(t,e,n){var i=n(21);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(t,e,n){var i=n(23);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}"},function(t,e,n){var i=n(25);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row wrap;align-items:center}.ck.ck-toolbar.ck-toolbar_vertical{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating{flex-wrap:nowrap}.ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar__newline{display:block;width:100%}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar>*{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-toolbar>*{margin-left:var(--ck-spacing-small);margin-right:0}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck{width:100%;margin:0;border-radius:0;border:0}[dir=ltr] .ck.ck-toolbar>:last-child{margin-right:0}[dir=rtl] .ck.ck-toolbar>:last-child{margin-left:0}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar__separator{align-self:stretch;width:1px;margin-top:0;margin-bottom:0;background:var(--ck-color-toolbar-border)}.ck.ck-toolbar__newline{margin:0}"},function(t,e,n){var i=n(27);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}"},function(t,e,n){var i=n(29);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}"},function(t,e,n){var i=n(31);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck-tooltip .ck-tooltip__text{display:inline-block}.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:var(--ck-color-tooltip-background);border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{border-style:solid;left:50%}.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}'},function(t,e,n){var i=n(33);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button .ck-button__label,.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button .ck-button__label,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid transparent;transition:box-shadow .2s ease-in-out;-webkit-appearance:none}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;border-color:transparent}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-1*var(--ck-spacing-small));margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-right:calc(-1*var(--ck-spacing-small));margin-left:var(--ck-spacing-small)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{font-size:inherit;font-weight:inherit;color:inherit;cursor:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}"},function(t,e,n){var i=n(35);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:5px solid #ccc}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}"},function(t,e,n){var i=n(37);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-resizer-size:10px;--ck-resizer-border-width:1px;--ck-resizer-border-radius:2px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-tooltip-offset:10px;--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2}.ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0;outline:1px solid var(--ck-color-resizer)}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all;width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nesw-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nesw-resize}.ck .ck-widget.ck-widget_with-selection-handler{position:relative}.ck .ck-widget.ck-widget_with-selection-handler:hover .ck-widget__selection-handler{visibility:visible}.ck .ck-widget.ck-widget_with-selection-handler .ck-widget__selection-handler{position:absolute}.ck .ck-widget.ck-widget_with-selection-handler .ck-widget__selection-handler .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handler.ck-widget_selected .ck-widget__selection-handler{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck-editor__editable>.ck-widget.ck-widget_with-selection-handler:first-child,.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handler:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}.ck .ck-widget.ck-widget_with-selection-handler .ck-widget__selection-handler{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_with-selection-handler .ck-widget__selection-handler:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handler .ck-widget__selection-handler .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.ck .ck-widget.ck-widget_with-selection-handler .ck-widget__selection-handler .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handler.ck-widget_selected .ck-widget__selection-handler,.ck .ck-widget.ck-widget_with-selection-handler.ck-widget_selected:hover .ck-widget__selection-handler{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handler.ck-widget_selected .ck-widget__selection-handler .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handler.ck-widget_selected:hover .ck-widget__selection-handler .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handler:hover .ck-widget__selection-handler{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handler .ck-widget__selection-handler{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected .ck-widget__selection-handler,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected .ck-widget__selection-handler:hover,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover .ck-widget__selection-handler,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover .ck-widget__selection-handler:hover{background:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-read-only .ck-widget{--ck-widget-outline-thickness:0}"},function(t,e,n){var i=n(39);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-labeled-input .ck-labeled-input__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-input .ck-labeled-input__status_error{color:var(--ck-color-base-error)}"},function(t,e,n){var i=n(41);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{box-shadow:var(--ck-inner-shadow),0 0;background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition-property:box-shadow,border;transition:.2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),var(--ck-inner-shadow)}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}"},function(t,e,n){var i=n(43);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-input{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-input{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}[dir=ltr] .ck.ck-text-alternative-form>:not(:first-child),[dir=rtl] .ck.ck-text-alternative-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-text-alternative-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-text-alternative-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-text-alternative-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-text-alternative-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-text-alternative-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-text-alternative-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(t,e,n){var i=n(45);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}'},function(t,e,n){var i=n(47);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}"},function(t,e,n){var i=n(49);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}"},function(t,e,n){var i=n(51);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image>img{display:block;margin:0 auto;max-width:100%;min-width:50px}"},function(t,e,n){var i=n(53);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}"},function(t,e,n){var i=n(55);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20px;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}'},function(t,e,n){var i=n(57);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports='.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}'},function(t,e,n){var i=n(59);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block;will-change:transform}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{transform:translate3d(0,100%,0)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}:root{--ck-dropdown-arrow-size:calc(0.5*var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}"},function(t,e,n){var i=n(61);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;border:0;padding:calc(0.2*var(--ck-line-height-base)*var(--ck-font-size-base)) calc(0.4*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(1.2*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:hover:not(ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(t,e,n){var i=n(63);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:1.3846153847em}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(2*var(--ck-spacing-large))}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(2*var(--ck-spacing-large))}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(0.5*var(--ck-border-radius))}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var(--ck-switch-button-translation))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(-1*var(--ck-switch-button-translation)))}"},function(t,e,n){var i=n(65);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-toolbar-dropdown .ck-toolbar{flex-wrap:nowrap}.ck.ck-toolbar-dropdown .ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}"},function(t,e,n){var i=n(67);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}"},function(t,e){t.exports=".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}"},function(t,e,n){var i=n(70);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}"},function(t,e,n){var i=n(72);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-image-style-spacing:1.5em}.ck-content .image-style-align-center:not(.image_resized),.ck-content .image-style-align-left:not(.image_resized),.ck-content .image-style-align-right:not(.image_resized),.ck-content .image-style-side:not(.image_resized){max-width:50%}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}"},function(t,e,n){var i=n(74);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}"},function(t,e,n){var i=n(76);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-input{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}[dir=ltr] .ck.ck-link-form>:not(:first-child),[dir=rtl] .ck.ck-link-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin-left:0}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}"},function(t,e,n){var i=n(78);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions{padding:var(--ck-spacing-standard)}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions:focus{outline:none}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{min-width:0;max-width:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(t,e,n){var i=n(80);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports='.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(3*var(--ck-spacing-standard));background:var(--ck-color-base-foreground)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{min-width:var(--ck-media-embed-placeholder-icon-size);height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);background-position:50%;background-size:cover}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{width:100%;height:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);white-space:nowrap;text-align:center;font-style:italic;text-overflow:ellipsis}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-width:300px;max-height:380px}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMDAzLjc4IDEuNjFoNDkuNjIxYzEuNjk0IDAgMy4xOS0uNzk4IDQuMTQ2LTIuMDM3eiIgZmlsbD0iIzVjODhjNSIvPjxwYXRoIGQ9Ik0yMjYuNzQyIDIyMi45ODhjLTkuMjY2IDAtMTYuNzc3IDcuMTctMTYuNzc3IDE2LjAxNC4wMDcgMi43NjIuNjYzIDUuNDc0IDIuMDkzIDcuODc1LjQzLjcwMy44MyAxLjQwOCAxLjE5IDIuMTA3LjMzMy41MDIuNjUgMS4wMDUuOTUgMS41MDguMzQzLjQ3Ny42NzMuOTU3Ljk4OCAxLjQ0IDEuMzEgMS43NjkgMi41IDMuNTAyIDMuNjM3IDUuMTY4Ljc5MyAxLjI3NSAxLjY4MyAyLjY0IDIuNDY2IDMuOTkgMi4zNjMgNC4wOTQgNC4wMDcgOC4wOTIgNC42IDEzLjkxNHYuMDEyYy4xODIuNDEyLjUxNi42NjYuODc5LjY2Ny40MDMtLjAwMS43NjgtLjMxNC45My0uNzk5LjYwMy01Ljc1NiAyLjIzOC05LjcyOSA0LjU4NS0xMy43OTQuNzgyLTEuMzUgMS42NzMtMi43MTUgMi40NjUtMy45OSAxLjEzNy0xLjY2NiAyLjMyOC0zLjQgMy42MzgtNS4xNjkuMzE1LS40ODIuNjQ1LS45NjIuOTg4LTEuNDM5LjMtLjUwMy42MTctMS4wMDYuOTUtMS41MDguMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0eiIgZmlsbD0iI2RkNGIzZSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48ZWxsaXBzZSByeT0iNS41NjQiIHJ4PSI1LjgyOCIgY3k9IjIzOS4wMDIiIGN4PSIyMjYuNzQyIiBmaWxsPSIjODAyZDI3IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0xOTAuMzAxIDIzNy4yODNjLTQuNjcgMC04LjQ1NyAzLjg1My04LjQ1NyA4LjYwNnMzLjc4NiA4LjYwNyA4LjQ1NyA4LjYwN2MzLjA0MyAwIDQuODA2LS45NTggNi4zMzctMi41MTYgMS41My0xLjU1NyAyLjA4Ny0zLjkxMyAyLjA4Ny02LjI5IDAtLjM2Mi0uMDIzLS43MjItLjA2NC0xLjA3OWgtOC4yNTd2My4wNDNoNC44NWMtLjE5Ny43NTktLjUzMSAxLjQ1LTEuMDU4IDEuOTg2LS45NDIuOTU4LTIuMDI4IDEuNTQ4LTMuOTAxIDEuNTQ4LTIuODc2IDAtNS4yMDgtMi4zNzItNS4yMDgtNS4yOTkgMC0yLjkyNiAyLjMzMi01LjI5OSA1LjIwOC01LjI5OSAxLjM5OSAwIDIuNjE4LjQwNyAzLjU4NCAxLjI5M2wyLjM4MS0yLjM4YzAtLjAwMi0uMDAzLS4wMDQtLjAwNC0uMDA1LTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTV6bTQuNDMgNS42NmwuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxNS4xODQgMjUxLjkyOWwtNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMjMzIDUuMjMzIDAgMDAuNDQ5LTIuMTIzdi0zMS4xNjVjLS40NjkuNjc1LS45MzQgMS4zNDktMS4zODIgMi4wMDUtLjc5MiAxLjI3NS0xLjY4MiAyLjY0LTIuNDY1IDMuOTktMi4zNDcgNC4wNjUtMy45ODIgOC4wMzgtNC41ODUgMTMuNzk0LS4xNjIuNDg1LS41MjcuNzk4LS45My43OTktLjM2My0uMDAxLS42OTctLjI1NS0uODc5LS42Njd2LS4wMTJjLS41OTMtNS44MjItMi4yMzctOS44Mi00LjYtMTMuOTE0LS43ODMtMS4zNS0xLjY3My0yLjcxNS0yLjQ2Ni0zLjk5LTEuMTM3LTEuNjY2LTIuMzI3LTMuNC0zLjYzNy01LjE2OWwtLjAwMi0uMDAzeiIgZmlsbD0iI2MzYzNjMyIvPjxwYXRoIGQ9Ik0yMTIuOTgzIDI0OC40OTVsLTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAwNS4yMzggNS4yMzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYuMjc1IDEzNi4yNzUgMCAwMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAwLS45ODktMS40NCAzNS4xMjcgMzUuMTI3IDAgMDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OXoiIGZpbGw9IiNmZGRjNGYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxMS45OTggMjYxLjA4M2wtNi4xNTIgNi4xNTEgMjQuMjY0IDI0LjI2NGguNzgxYTUuMjI3IDUuMjI3IDAgMDA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c8,#b900b4,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OXptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OXoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzN6bTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1ek00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}'},function(t,e,n){var i=n(82);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-input{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-input{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}.ck.ck-media-form{padding:var(--ck-spacing-standard)}.ck.ck-media-form:focus{outline:none}[dir=ltr] .ck.ck-media-form>:not(:first-child),[dir=rtl] .ck.ck-media-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-media-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-media-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-media-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-media-form .ck-labeled-input .ck-labeled-input__error{white-space:normal}.ck.ck-media-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-media-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-media-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-media-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-media-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(t,e,n){var i=n(84);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}"},function(t,e,n){var i=n(86);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-color-table-focused-cell-background:#f5fafe}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}"},function(t,e,n){var i=n(88);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px;--ck-insert-table-dropdown-box-border-color:#bfbfbf;--ck-insert-table-dropdown-box-border-active-color:#53a0e4;--ck-insert-table-dropdown-box-active-background:#c7e5ff}.ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2);padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{width:var(--ck-insert-table-dropdown-box-width);height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);border:1px solid var(--ck-insert-table-dropdown-box-border-color);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-insert-table-dropdown-box-border-active-color);background:var(--ck-insert-table-dropdown-box-active-background)}"},function(t,e,n){var i=n(90);"string"==typeof i&&(i=[[t.i,i,""]]),n(1)(i,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border-color:#d9d9d9}.ck-content .table table th{font-weight:700;background:#fafafa}"},function(t,e,n){"use strict";n.r(e);var i=n(3),o=i.a.Symbol,r=Object.prototype,s=r.hasOwnProperty,a=r.toString,c=o?o.toStringTag:void 0,l=Object.prototype.toString,d=o?o.toStringTag:void 0,h=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":d&&d in Object(t)?function(t){var e=s.call(t,c),n=t[c];try{t[c]=void 0;var i=!0}catch(t){}var o=a.call(t);return i&&(e?t[c]=n:delete t[c]),o}(t):function(t){return l.call(t)}(t)},u=function(t,e){return function(n){return t(e(n))}},f=u(Object.getPrototypeOf,Object),g=function(t){return null!=t&&"object"==typeof t},m=Function.prototype,p=Object.prototype,b=m.toString,w=p.hasOwnProperty,k=b.call(Object),_=function(t){if(!g(t)||"[object Object]"!=h(t))return!1;var e=f(t);if(null===e)return!0;var n=w.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&b.call(n)==k},v=function(t,e){return t===e||t!=t&&e!=e},y=function(t,e){for(var n=t.length;n--;)if(v(t[n][0],e))return n;return-1},x=Array.prototype.splice;function A(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1},A.prototype.set=function(t,e){var n=this.__data__,i=y(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};var T=A,C=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},P=function(t){if(!C(t))return!1;var e=h(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},S=i.a["__core-js_shared__"],M=function(){var t=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),E=Function.prototype.toString,I=function(t){if(null!=t){try{return E.call(t)}catch(t){}try{return t+""}catch(t){}}return""},N=/^\[object .+?Constructor\]$/,O=Function.prototype,R=Object.prototype,D=O.toString,L=R.hasOwnProperty,j=RegExp("^"+D.call(L).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=function(t){return!(!C(t)||function(t){return!!M&&M in t}(t))&&(P(t)?j:N).test(I(t))},z=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return V(n)?n:void 0},B=z(i.a,"Map"),F=z(Object,"create"),U=Object.prototype.hasOwnProperty,H=Object.prototype.hasOwnProperty;function q(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991},ut={};ut["[object Float32Array]"]=ut["[object Float64Array]"]=ut["[object Int8Array]"]=ut["[object Int16Array]"]=ut["[object Int32Array]"]=ut["[object Uint8Array]"]=ut["[object Uint8ClampedArray]"]=ut["[object Uint16Array]"]=ut["[object Uint32Array]"]=!0,ut["[object Arguments]"]=ut["[object Array]"]=ut["[object ArrayBuffer]"]=ut["[object Boolean]"]=ut["[object DataView]"]=ut["[object Date]"]=ut["[object Error]"]=ut["[object Function]"]=ut["[object Map]"]=ut["[object Number]"]=ut["[object Object]"]=ut["[object RegExp]"]=ut["[object Set]"]=ut["[object String]"]=ut["[object WeakMap]"]=!1;var ft=function(t){return function(e){return t(e)}},gt=n(4),mt=gt.a&>.a.isTypedArray,pt=mt?ft(mt):function(t){return g(t)&&ht(t.length)&&!!ut[h(t)]},bt=Object.prototype.hasOwnProperty,wt=function(t,e){var n=at(t),i=!n&&st(t),o=!n&&!i&&Object(ct.a)(t),r=!n&&!i&&!o&&pt(t),s=n||i||o||r,a=s?function(t,e){for(var n=-1,i=Array(t);++n{this._setToTarget(t,i,e[i],n)})}}function pe(t){return ge(t)?t:void 0}var be=n(0),we=function(){return function t(){t.called=!0}};class ke{constructor(t,e){this.source=t,this.name=e,this.path=[],this.stop=we(),this.off=we()}}function _e(){let t="e";for(let e=0;e<8;e++)t+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return t}var ve={get(t){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};n(6);const ye=Symbol("listeningTo"),xe=Symbol("emitterId");var Ae={on(t,e,n={}){this.listenTo(this,t,e,n)},once(t,e,n){let i=!1;this.listenTo(this,t,(function(t,...n){i||(i=!0,t.off(),e.call(this,t,...n))}),n)},off(t,e){this.stopListening(this,t,e)},listenTo(t,e,n,i={}){let o,r;this[ye]||(this[ye]={});const s=this[ye];Ce(t)||Te(t);const a=Ce(t);(o=s[a])||(o=s[a]={emitter:t,callbacks:{}}),(r=o.callbacks[e])||(r=o.callbacks[e]=[]),r.push(n),function(t,e){const n=Pe(t);if(n[e])return;let i=e,o=null;const r=[];for(;""!==i&&!n[i];)n[i]={callbacks:[],childEvents:[]},r.push(n[i]),o&&n[i].childEvents.push(o),o=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){for(const t of r)t.callbacks=n[i].callbacks.slice();n[i].childEvents.push(o)}}(t,e);const c=Se(t,e),l=ve.get(i.priority),d={callback:n,priority:l};for(const t of c){let e=!1;for(let n=0;n-1?t(e,n.substr(0,n.lastIndexOf(":"))):null}(this,i);if(n.path.push(this),o){const t=[n,...e];o=Array.from(o);for(let e=0;e{this._delegations||(this._delegations=new Map),t.forEach(t=>{const i=this._delegations.get(t);i?i.set(e,n):this._delegations.set(t,new Map([[e,n]]))})}}},stopDelegating(t,e){if(this._delegations)if(t)if(e){const n=this._delegations.get(t);n&&n.delete(e)}else this._delegations.delete(t);else this._delegations.clear()}};function Te(t,e){t[xe]||(t[xe]=e||_e())}function Ce(t){return t[xe]}function Pe(t){return t._events||Object.defineProperty(t,"_events",{value:{}}),t._events}function Se(t,e){const n=Pe(t)[e];if(!n)return[];let i=[n.callbacks];for(let e=0;e{Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)).forEach(n=>{if(n in t.prototype)return;const i=Object.getOwnPropertyDescriptor(e,n);i.enumerable=!1,Object.defineProperty(t.prototype,n,i)})})}function Ne(t,e){const n=Math.min(t.length,e.length);for(let i=0;it.data.length)throw new be.b("view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(n<0||e+n>t.data.length)throw new be.b("view-textproxy-wrong-length: Given length value is incorrect.",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(t){return"textProxy"==t||"view:textProxy"==t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this.textNode:this.parent;for(;null!==n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}}function je(t){const e=new Map;for(const n in t)e.set(n,t[n]);return e}function Ve(t){return!(!t||!t[Symbol.iterator])}class ze{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let e of t)("string"==typeof e||e instanceof RegExp)&&(e={name:e}),e.classes&&("string"==typeof e.classes||e.classes instanceof RegExp)&&(e.classes=[e.classes]),this._patterns.push(e)}match(...t){for(const e of t)for(const t of this._patterns){const n=Be(e,t);if(n)return{element:e,pattern:t,match:n}}return null}matchAll(...t){const e=[];for(const n of t)for(const t of this._patterns){const i=Be(n,t);i&&e.push({element:n,pattern:t,match:i})}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const t=this._patterns[0],e=t.name;return"function"==typeof t||!e||e instanceof RegExp?null:e}}function Be(t,e){if("function"==typeof e)return e(t);const n={};return e.name&&(n.name=function(t,e){return t instanceof RegExp?t.test(e):t===e}(e.name,t.name),!n.name)?null:e.attributes&&(n.attributes=function(t,e){const n=[];for(const i in t){const o=t[i];if(!e.hasAttribute(i))return null;{const t=e.getAttribute(i);if(!0===o)n.push(i);else if(o instanceof RegExp){if(!o.test(t))return null;n.push(i)}else{if(t!==o)return null;n.push(i)}}}return n}(e.attributes,t),!n.attributes)?null:!(e.classes&&(n.classes=function(t,e){const n=[];for(const i of t)if(i instanceof RegExp){const t=e.getClassNames();for(const e of t)i.test(e)&&n.push(e);if(0===n.length)return null}else{if(!e.hasClass(i))return null;n.push(i)}return n}(e.classes,t),!n.classes))&&!(e.styles&&(n.styles=function(t,e){const n=[];for(const i in t){const o=t[i];if(!e.hasStyle(i))return null;{const t=e.getStyle(i);if(o instanceof RegExp){if(!o.test(t))return null;n.push(i)}else{if(t!==o)return null;n.push(i)}}}return n}(e.styles,t),!n.styles))&&n}class Fe extends Re{constructor(t,e,n){if(super(),this.name=t,this._attrs=function(t){t=_(t)?je(t):new Map(t);for(const[e,n]of t)null===n?t.delete(e):"string"!=typeof n&&t.set(e,String(n));return t}(e),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");He(this._classes,t),this._attrs.delete("class")}this._styles=new Map,this._attrs.has("style")&&(Ue(this._styles,this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(t,e=null){const n=t.replace(/^view:/,"");return e?"element"==n&&e==this.name:"element"==n||n==this.name||super.is(t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.size>0&&(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.size>0&&(yield["style",this.getAttribute("style")])}getAttribute(t){if("class"==t)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"!=t)return this._attrs.get(t);if(this._styles.size>0){let t="";for(const[e,n]of this._styles)t+=`${e}:${n};`;return t}}hasAttribute(t){return"class"==t?this._classes.size>0:"style"==t?this._styles.size>0:this._attrs.has(t)}isSimilar(t){if(!(t instanceof Fe))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,n]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==n)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const[e,n]of this._styles)if(!t._styles.has(e)||t._styles.get(e)!==n)return!1;return!0}hasClass(...t){for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.get(t)}getStyleNames(){return this._styles.keys()}hasStyle(...t){for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(...t){const e=new ze(...t);let n=this.parent;for(;n;){if(e.match(n))return n;n=n.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(","),e=Array.from(this._styles).map(t=>`${t[0]}:${t[1]}`).sort().join(";"),n=Array.from(this._attrs).map(t=>`${t[0]}="${t[1]}"`).sort().join(" ");return this.name+(""==t?"":` class="${t}"`)+(""==e?"":` style="${e}"`)+(""==n?"":` ${n}`)}_clone(t=!1){const e=[];if(t)for(const n of this.getChildren())e.push(n._clone(t));const n=new this.constructor(this.name,this._attrs,e);return n._classes=new Set(this._classes),n._styles=new Map(this._styles),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let n=0;const i=function(t){return"string"==typeof t?[new De(t)]:(Ve(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new De(t):t instanceof Le?new De(t.data):t))}(e);for(const e of i)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n0&&(this._classes.clear(),!0):"style"==t?this._styles.size>0&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._classes.add(t))}_removeClass(t){this._fireChange("attributes",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._classes.delete(t))}_setStyle(t,e){if(this._fireChange("attributes",this),_(t)){const e=Object.keys(t);for(const n of e)this._styles.set(n,t[n])}else this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._styles.delete(t))}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function Ue(t,e){let n=null,i=0,o=0,r=null;if(t.clear(),""!==e){";"!=e.charAt(e.length-1)&&(e+=";");for(let s=0;st.add(e))}class qe extends Fe{constructor(t,e,n){super(t,e,n),this.getFillerOffset=We}is(t,e=null){const n=t&&t.replace(/^view:/,"");return e?"containerElement"==n&&e==this.name||super.is(t,e):"containerElement"==n||super.is(t)}}function We(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const e of t)if(!e.is("uiElement"))return null;return this.childCount}var Ye=function(t){return t},$e=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},Ge=Math.max,Qe=function(t){return function(){return t}},Ke=J?function(t,e){return J(t,"toString",{configurable:!0,enumerable:!1,value:Qe(e),writable:!0})}:Ye,Je=Date.now,Ze=function(t){var e=0,n=0;return function(){var i=Je(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Ke),Xe=function(t,e){return Ze(function(t,e,n){return e=Ge(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,r=Ge(i.length-e,0),s=Array(r);++o1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(o--,r):void 0,s&&function(t,e,n){if(!C(n))return!1;var i=typeof e;return!!("number"==i?xt(n)&&dt(e,n.length):"string"==i&&e in n)&&v(n[e],t)}(n[0],n[1],s)&&(r=o<3?void 0:r,o=1),e=Object(e);++i{this.set(e,t[e])},this);an(this);const n=this[en];if(t in this&&!n.has(t))throw new be.b("observable-set-cannot-override: Cannot override an existing property.",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>n.get(t),set(e){const i=n.get(t);let o=this.fire("set:"+t,t,e,i);void 0===o&&(o=e),i===o&&n.has(t)||(n.set(t,o),this.fire("change:"+t,t,o,i))}}),this[t]=e},bind(...t){if(!t.length||!dn(t))throw new be.b("observable-bind-wrong-properties: All properties must be strings.",this);if(new Set(t).size!==t.length)throw new be.b("observable-bind-duplicate-properties: Properties must be unique.",this);an(this);const e=this[on];t.forEach(t=>{if(e.has(t))throw new be.b("observable-bind-rebind: Cannot bind the same property more that once.",this)});const n=new Map;return t.forEach(t=>{const i={property:t,to:[]};e.set(t,i),n.set(t,i)}),{to:cn,toMany:ln,_observable:this,_bindProperties:t,_to:[],_bindings:n}},unbind(...t){if(!(en in this))return;const e=this[on],n=this[nn];if(t.length){if(!dn(t))throw new be.b("observable-unbind-wrong-properties: Properties must be strings.",this);t.forEach(t=>{const i=e.get(t);if(!i)return;let o,r,s,a;i.to.forEach(t=>{o=t[0],r=t[1],s=n.get(o),(a=s[r]).delete(i),a.size||delete s[r],Object.keys(s).length||(n.delete(o),this.stopListening(o,"change"))}),e.delete(t)})}else n.forEach((t,e)=>{this.stopListening(e,"change")}),n.clear(),e.clear()},decorate(t){const e=this[t];if(!e)throw new be.b("observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.",this,{object:this,methodName:t});this.on(t,(t,n)=>{t.return=e.apply(this,n)}),this[t]=function(...e){return this.fire(t,e)}}};tn(rn,Ae);var sn=rn;function an(t){en in t||(Object.defineProperty(t,en,{value:new Map}),Object.defineProperty(t,nn,{value:new Map}),Object.defineProperty(t,on,{value:new Map}))}function cn(...t){const e=function(...t){if(!t.length)throw new be.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);const e={to:[]};let n;return"function"==typeof t[t.length-1]&&(e.callback=t.pop()),t.forEach(t=>{if("string"==typeof t)n.properties.push(t);else{if("object"!=typeof t)throw new be.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);n={observable:t,properties:[]},e.to.push(n)}}),e}(...t),n=Array.from(this._bindings.keys()),i=n.length;if(!e.callback&&e.to.length>1)throw new be.b("observable-bind-to-no-callback: Binding multiple observables only possible with callback.",this);if(i>1&&e.callback)throw new be.b("observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.",this);e.to.forEach(t=>{if(t.properties.length&&t.properties.length!==i)throw new be.b("observable-bind-to-properties-length: The number of properties must match.",this);t.properties.length||(t.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(n[0]).callback=e.callback),function(t,e){e.forEach(e=>{const n=t[nn];let i;n.get(e.observable)||t.listenTo(e.observable,"change",(o,r)=>{(i=n.get(e.observable)[r])&&i.forEach(e=>{hn(t,e.property)})})})}(this._observable,this._to),function(t){let e;t._bindings.forEach((n,i)=>{t._to.forEach(o=>{e=o.properties[n.callback?0:t._bindProperties.indexOf(i)],n.to.push([o.observable,e]),function(t,e,n,i){const o=t[nn],r=o.get(n),s=r||{};s[i]||(s[i]=new Set),s[i].add(e),r||o.set(n,s)}(t._observable,n,o.observable,e)})})}(this),this._bindProperties.forEach(t=>{hn(this._observable,t)})}function ln(t,e,n){if(this._bindings.size>1)throw new be.b("observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",this);this.to(...function(t,e){const n=t.map(t=>[t,e]);return Array.prototype.concat.apply([],n)}(t,e),n)}function dn(t){return t.every(t=>"string"==typeof t)}function hn(t,e){const n=t[on].get(e);let i;i=n.callback?n.callback.apply(t,n.to.map(t=>t[0][t[1]])):(i=n.to[0])[0][i[1]],t.hasOwnProperty(e)?t[e]=i:t.set(e,i)}const un=Symbol("document");class fn extends qe{constructor(t,e,n){super(t,e,n),this.set("isReadOnly",!1),this.set("isFocused",!1)}is(t,e=null){const n=t&&t.replace(/^view:/,"");return e?"editableElement"==n&&e==this.name||super.is(t,e):"editableElement"==n||super.is(t)}destroy(){this.stopListening()}get document(){return this.getCustomProperty(un)}set _document(t){if(this.getCustomProperty(un))throw new be.b("view-editableelement-document-already-set: View document is already set.",this);this._setCustomProperty(un,t),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",e=>e&&t.selection.editableElement==this),this.listenTo(t.selection,"change",()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this})}}Ie(fn,sn);const gn=Symbol("rootName");class mn extends fn{constructor(t){super(t),this.rootName="main"}is(t,e=null){const n=t.replace(/^view:/,"");return e?"rootElement"==n&&e==this.name||super.is(t,e):"rootElement"==n||super.is(t)}get rootName(){return this.getCustomProperty(gn)}set rootName(t){this._setCustomProperty(gn,t)}set _name(t){this.name=t}}class pn{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new be.b("view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new be.b("view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=bn._createAt(t.startPosition):this.position=bn._createAt(t.boundaries["backward"==t.direction?"end":"start"]),this.direction=t.direction||"forward",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(t){let e,n,i;do{i=this.position,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&t.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};let i;if(n instanceof De){if(t.isAtEnd)return this.position=bn._createAfter(n),this._next();i=n.data[t.offset]}else i=n.getChild(t.offset);if(i instanceof Fe)return this.shallow?t.offset++:t=new bn(i,0),this.position=t,this._formatReturnValue("elementStart",i,e,t,1);if(i instanceof De){if(this.singleCharacters)return t=new bn(i,0),this.position=t,this._next();{let n,o=i.data.length;return i==this._boundaryEndParent?(o=this.boundaries.end.offset,n=new Le(i,0,o),t=bn._createAfter(n)):(n=new Le(i,0,i.data.length),t.offset++),this.position=t,this._formatReturnValue("text",n,e,t,o)}}if("string"==typeof i){let i;i=this.singleCharacters?1:(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-t.offset;const o=new Le(n,t.offset,i);return t.offset+=i,this.position=t,this._formatReturnValue("text",o,e,t,i)}return t=bn._createAfter(n),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,e,t)}_previous(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&0===t.offset)return{done:!0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};let i;if(n instanceof De){if(t.isAtStart)return this.position=bn._createBefore(n),this._previous();i=n.data[t.offset-1]}else i=n.getChild(t.offset-1);if(i instanceof Fe)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue("elementStart",i,e,t,1)):(t=new bn(i,i.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",i,e,t));if(i instanceof De){if(this.singleCharacters)return t=new bn(i,i.data.length),this.position=t,this._previous();{let n,o=i.data.length;if(i==this._boundaryStartParent){const e=this.boundaries.start.offset;o=(n=new Le(i,e,i.data.length-e)).data.length,t=bn._createBefore(n)}else n=new Le(i,0,i.data.length),t.offset--;return this.position=t,this._formatReturnValue("text",n,e,t,o)}}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{const e=n===this._boundaryStartParent?this.boundaries.start.offset:0;i=t.offset-e}t.offset-=i;const o=new Le(n,t.offset,i);return this.position=t,this._formatReturnValue("text",o,e,t,i)}return t=bn._createBefore(n),this.position=t,this._formatReturnValue("elementStart",n,e,t,1)}_formatReturnValue(t,e,n,i,o){return e instanceof Le&&(e.offsetInText+e.data.length==e.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=bn._createAfter(e.textNode):(i=bn._createAfter(e.textNode),this.position=i)),0===e.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=bn._createBefore(e.textNode):(i=bn._createBefore(e.textNode),this.position=i))),{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:i,length:o}}}}class bn{constructor(t,e){this.parent=t,this.offset=e}get nodeAfter(){return this.parent.is("text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const t=this.parent.is("text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof fn);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=bn._createAt(this),n=e.offset+t;return e.offset=n<0?0:n,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new pn(e);return n.skip(t),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let i=0;for(;e[i]==n[i]&&e[i];)i++;return 0===i?null:e[i-1]}is(t){return"position"==t||"view:position"==t}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return"before"==this.compareWith(t)}isAfter(t){return"after"==this.compareWith(t)}compareWith(t){if(this.root!==t.root)return"different";if(this.isEqual(t))return"same";const e=this.parent.is("node")?this.parent.getPath():[],n=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset),n.push(t.offset);const i=Ne(e,n);switch(i){case"prefix":return"before";case"extension":return"after";default:return e[i]0?new this(n,i):new this(i,n)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is("textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(bn._createBefore(t),e)}}function kn(t){return!(!t.item.is("attributeElement")&&!t.item.is("uiElement"))}function _n(t){let e=0;for(const n of t)e++;return e}class vn{constructor(t=null,e,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(t,e,n)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel)return!1;if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const i of t._ranges)if(e.isEqual(i)){n=!0;break}if(!n)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=_n(this.getRanges());if(e!=_n(t.getRanges()))return!1;if(0==e)return!0;for(let e of this.getRanges()){e=e.getTrimmed();let n=!1;for(let i of t.getRanges())if(i=i.getTrimmed(),e.start.isEqual(i.start)&&e.end.isEqual(i.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){if(1!==this.rangeCount)return null;const t=this.getFirstRange();let e=t.start.nodeAfter,n=t.end.nodeBefore;return t.start.parent.is("text")&&t.start.isAtEnd&&t.start.parent.nextSibling&&(e=t.start.parent.nextSibling),t.end.parent.is("text")&&t.end.isAtStart&&t.end.parent.previousSibling&&(n=t.end.parent.previousSibling),e instanceof Fe&&e==n?e:null}setTo(t,e,n){if(null===t)this._setRanges([]),this._setFakeOptions(e);else if(t instanceof vn||t instanceof yn)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof wn)this._setRanges([t],e&&e.backward),this._setFakeOptions(e);else if(t instanceof bn)this._setRanges([new wn(t)]),this._setFakeOptions(e);else if(t instanceof Re){const i=!!n&&!!n.backward;let o;if(void 0===e)throw new be.b("view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",this);o="in"==e?wn._createIn(t):"on"==e?wn._createOn(t):new wn(bn._createAt(t,e)),this._setRanges([o],i),this._setFakeOptions(n)}else{if(!Ve(t))throw new be.b("view-selection-setTo-not-selectable: Cannot set selection to given place.",this);this._setRanges(t,e&&e.backward),this._setFakeOptions(e)}this.fire("change")}setFocus(t,e){if(null===this.anchor)throw new be.b("view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",this);const n=bn._createAt(t,e);if("same"==n.compareWith(this.focus))return;const i=this.anchor;this._ranges.pop(),"before"==n.compareWith(i)?this._addRange(new wn(n,i),!0):this._addRange(new wn(i,n)),this.fire("change")}is(t){return"selection"==t||"view:selection"==t}_setRanges(t,e=!1){t=Array.from(t),this._ranges=[];for(const e of t)this._addRange(e);this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||""}_addRange(t,e=!1){if(!(t instanceof wn))throw new be.b("view-selection-add-range-not-range: Selection range set to an object that is not an instance of view.Range",this);this._pushRange(t),this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges)if(t.isIntersecting(e))throw new be.b("view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",this,{addedRange:t,intersectingRange:e});this._ranges.push(new wn(t.start,t.end))}}Ie(vn,Ae);class yn{constructor(t=null,e,n){this._selection=new vn,this._selection.delegate("change").to(this),this._selection.setTo(t,e,n)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}is(t){return"selection"==t||"documentSelection"==t||"view:selection"==t||"view:documentSelection"==t}_setTo(t,e,n){this._selection.setTo(t,e,n)}_setFocus(t,e){this._selection.setFocus(t,e)}}Ie(yn,Ae);class xn{constructor(t={}){this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[]}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,e){let n;const i=this._idProperty;if(i in t){if("string"!=typeof(n=t[i]))throw new be.b("collection-add-invalid-id",this);if(this.get(n))throw new be.b("collection-add-item-already-exists",this)}else t[i]=n=_e();if(void 0===e)e=this._items.length;else if(e>this._items.length||e<0)throw new be.b("collection-add-item-invalid-index",this);return this._items.splice(e,0,t),this._itemMap.set(n,t),this.fire("add",t,e),this}get(t){let e;if("string"==typeof t)e=this._itemMap.get(t);else{if("number"!=typeof t)throw new be.b("collection-get-invalid-arg: Index or id must be given.",this);e=this._items[t]}return e||null}has(t){if("string"==typeof t)return this._itemMap.has(t);{const e=t[this._idProperty];return this._itemMap.has(e)}}getIndex(t){let e;return e="string"==typeof t?this._itemMap.get(t):t,this._items.indexOf(e)}remove(t){let e,n,i,o=!1;const r=this._idProperty;if("string"==typeof t?(n=t,o=!(i=this._itemMap.get(n)),i&&(e=this._items.indexOf(i))):"number"==typeof t?(e=t,o=!(i=this._items[e]),i&&(n=i[r])):(n=(i=t)[r],o=-1==(e=this._items.indexOf(i))||!this._itemMap.get(n)),o)throw new be.b("collection-remove-404: Item not found.",this);this._items.splice(e,1),this._itemMap.delete(n);const s=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(s),this.fire("remove",i,e),i}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(t){if(this._bindToCollection)throw new be.b("collection-bind-to-rebind: The collection cannot be bound more than once.",this);return this._bindToCollection=t,{as:t=>{this._setUpBindToBinding(e=>new t(e))},using:t=>{"function"==typeof t?this._setUpBindToBinding(e=>t(e)):this._setUpBindToBinding(e=>e[t])}}}_setUpBindToBinding(t){const e=this._bindToCollection,n=(n,i,o)=>{const r=e._bindToCollection==this,s=e._bindToInternalToExternalMap.get(i);if(r&&s)this._bindToExternalToInternalMap.set(i,s),this._bindToInternalToExternalMap.set(s,i);else{const n=t(i);if(!n)return void this._skippedIndexesFromExternal.push(o);let r=o;for(const t of this._skippedIndexesFromExternal)o>t&&r--;for(const t of e._skippedIndexesFromExternal)r>=t&&r++;this._bindToExternalToInternalMap.set(i,n),this._bindToInternalToExternalMap.set(n,i),this.add(n,r);for(let t=0;t{const i=this._bindToExternalToInternalMap.get(e);i&&this.remove(i),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((t,e)=>(ne&&t.push(e),t),[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}Ie(xn,Ae);class An{constructor(){this.selection=new yn,this.roots=new xn({idProperty:"rootName"}),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map(t=>t.destroy()),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(e=n(t))break}while(e)}}Ie(An,sn);const Tn=10;class Cn extends Fe{constructor(t,e,n){super(t,e,n),this.getFillerOffset=Pn,this._priority=Tn,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new be.b("attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.",this);return new Set(this._clonesGroup)}is(t,e=null){const n=t&&t.replace(/^view:/,"");return e?"attributeElement"==n&&e==this.name||super.is(t,e):"attributeElement"==n||super.is(t)}isSimilar(t){return null!==this.id||null!==t.id?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t){const e=super._clone(t);return e._priority=this._priority,e._id=this._id,e}}function Pn(){if(Sn(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(Sn(t)>1)return null;t=t.parent}return!t||Sn(t)>1?null:this.childCount}function Sn(t){return Array.from(t.getChildren()).filter(t=>!t.is("uiElement")).length}Cn.DEFAULT_PRIORITY=Tn;class Mn extends Fe{constructor(t,e,n){super(t,e,n),this.getFillerOffset=En}is(t,e=null){const n=t.replace(/^view:/,"");return e?"emptyElement"==n&&e==this.name||super.is(t,e):"emptyElement"==n||super.is(t)}_insertChild(t,e){if(e&&(e instanceof Re||Array.from(e).length>0))throw new be.b("view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.",[this,e])}}function En(){return null}const In=navigator.userAgent.toLowerCase();var Nn={isMac:function(t){return t.indexOf("macintosh")>-1}(In),isEdge:function(t){return!!t.match(/edge\/(\d+.?\d*)/)}(In),isGecko:function(t){return!!t.match(/gecko\/\d+/)}(In),isSafari:function(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}(In),isAndroid:function(t){return t.indexOf("android")>-1}(In),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}()}};const On={"⌘":"ctrl","⇧":"shift","⌥":"alt"},Rn={ctrl:"⌘",shift:"⇧",alt:"⌥"},Dn=function(){const t={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let e=65;e<=90;e++)t[String.fromCharCode(e).toLowerCase()]=e;for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;return t}();function Ln(t){let e;if("string"==typeof t){if(!(e=Dn[t.toLowerCase()]))throw new be.b("keyboard-unknown-key: Unknown key name.",null,{key:t})}else e=t.keyCode+(t.altKey?Dn.alt:0)+(t.ctrlKey?Dn.ctrl:0)+(t.shiftKey?Dn.shift:0);return e}function jn(t){return"string"==typeof t&&(t=Vn(t)),t.map(t=>"string"==typeof t?Ln(t):t).reduce((t,e)=>e+t,0)}function Vn(t){return t.split(/\s*\+\s*/)}class zn extends Fe{constructor(t,e,n){super(t,e,n),this.getFillerOffset=Bn}is(t,e=null){const n=t.replace(/^view:/,"");return e?"uiElement"==n&&e==this.name||super.is(t,e):"uiElement"==n||super.is(t)}_insertChild(t,e){if(e&&(e instanceof Re||Array.from(e).length>0))throw new be.b("view-uielement-cannot-add: Cannot add child nodes to UIElement instance.",this)}render(t){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys())e.setAttribute(t,this.getAttribute(t));return e}}function Bn(){return null}class Fn{constructor(t){this._children=[],t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(t){return"documentFragment"==t||"view:documentFragment"==t}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange("children",this);let n=0;const i=function(t){return"string"==typeof t?[new De(t)]:(Ve(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new De(t):t instanceof Le?new De(t.data):t))}(e);for(const e of i)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;ni instanceof t))throw new be.b("view-writer-insert-invalid-node",n);i.is("text")||t(i.getChildren(),n)}}(e=Ve(e)?[...e]:[e],this.document);const n=Hn(t);if(!n)throw new be.b("view-writer-invalid-position-container",this.document);const i=this._breakAttributes(t,!0),o=n._insertChild(i.offset,e);for(const t of e)this._addToClonedElementsGroup(t);const r=i.getShiftedBy(o),s=this.mergeAttributes(i);if(0===o)return new wn(s,s);{s.isEqual(i)||r.offset--;const t=this.mergeAttributes(r);return new wn(s,t)}}remove(t){const e=t instanceof wn?t:wn._createOn(t);if(Kn(e,this.document),e.isCollapsed)return new Fn;const{start:n,end:i}=this._breakAttributesRange(e,!0),o=n.parent,r=i.offset-n.offset,s=o._removeChildren(n.offset,r);for(const t of s)this._removeFromClonedElementsGroup(t);const a=this.mergeAttributes(n);return e.start=a,e.end=a.clone(),new Fn(s)}clear(t,e){Kn(t,this.document);const n=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const i of n){const n=i.item;let o;if(n.is("element")&&e.isSimilar(n))o=wn._createOn(n);else if(!i.nextPosition.isAfter(t.start)&&n.is("textProxy")){const t=n.getAncestors().find(t=>t.is("element")&&e.isSimilar(t));t&&(o=wn._createIn(t))}o&&(o.end.isAfter(t.end)&&(o.end=t.end),o.start.isBefore(t.start)&&(o.start=t.start),this.remove(o))}}move(t,e){let n;if(e.isAfter(t.end)){const i=(e=this._breakAttributes(e,!0)).parent,o=i.childCount;t=this._breakAttributesRange(t,!0),n=this.remove(t),e.offset+=i.childCount-o}else n=this.remove(t);return this.insert(e,n)}wrap(t,e){if(!(e instanceof Cn))throw new be.b("view-writer-wrap-invalid-attribute",this.document);if(Kn(t,this.document),t.isCollapsed){let n=t.start;n.parent.is("element")&&!function(t){return Array.from(t.getChildren()).some(t=>!t.is("uiElement"))}(n.parent)&&(n=n.getLastMatchingPosition(t=>t.item.is("uiElement"))),n=this._wrapPosition(n,e);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(t.start)&&this.setSelection(n),new wn(n)}return this._wrapRange(t,e)}unwrap(t,e){if(!(e instanceof Cn))throw new be.b("view-writer-unwrap-invalid-attribute",this.document);if(Kn(t,this.document),t.isCollapsed)return t;const{start:n,end:i}=this._breakAttributesRange(t,!0),o=n.parent,r=this._unwrapChildren(o,n.offset,i.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new wn(s,a)}rename(t,e){const n=new qe(t,e.getAttributes());return this.insert(bn._createAfter(e),n),this.move(wn._createIn(e),bn._createAt(n,0)),this.remove(wn._createOn(e)),n}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return bn._createAt(t,e)}createPositionAfter(t){return bn._createAfter(t)}createPositionBefore(t){return bn._createBefore(t)}createRange(t,e){return new wn(t,e)}createRangeOn(t){return wn._createOn(t)}createRangeIn(t){return wn._createIn(t)}createSelection(t,e,n){return new vn(t,e,n)}_wrapChildren(t,e,n,i){let o=e;const r=[];for(;o!1,t.parent._insertChild(t.offset,n);const i=new wn(t,t.getShiftedBy(1));this.wrap(i,e);const o=new bn(n.parent,n.index);n._remove();const r=o.nodeBefore,s=o.nodeAfter;return r instanceof De&&s instanceof De?$n(r,s):Wn(o)}_wrapAttributeElement(t,e){if(!Jn(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&e.hasAttribute(n)&&e.getAttribute(n)!==t.getAttribute(n))return!1;for(const n of t.getStyleNames())if(e.hasStyle(n)&&e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&(e.hasAttribute(n)||this.setAttribute(n,t.getAttribute(n),e));for(const n of t.getStyleNames())e.hasStyle(n)||this.setStyle(n,t.getStyle(n),e);for(const n of t.getClassNames())e.hasClass(n)||this.addClass(n,e);return!0}_unwrapAttributeElement(t,e){if(!Jn(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&(!e.hasAttribute(n)||e.getAttribute(n)!==t.getAttribute(n)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const n of t.getStyleNames())if(!e.hasStyle(n)||e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const n=t.start,i=t.end;if(Kn(t,this.document),t.isCollapsed){const n=this._breakAttributes(t.start,e);return new wn(n,n)}const o=this._breakAttributes(i,e),r=o.parent.childCount,s=this._breakAttributes(n,e);return o.offset+=o.parent.childCount-r,new wn(s,o)}_breakAttributes(t,e=!1){const n=t.offset,i=t.parent;if(t.parent.is("emptyElement"))throw new be.b("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new be.b("view-writer-cannot-break-ui-element",this.document);if(!e&&i.is("text")&&Qn(i.parent))return t.clone();if(Qn(i))return t.clone();if(i.is("text"))return this._breakAttributes(Yn(t),e);if(n==i.childCount){const t=new bn(i.parent,i.index+1);return this._breakAttributes(t,e)}if(0===n){const t=new bn(i.parent,i.index);return this._breakAttributes(t,e)}{const t=i.index+1,o=i._clone();i.parent._insertChild(t,o),this._addToClonedElementsGroup(o);const r=i.childCount-n,s=i._removeChildren(n,r);o._appendChild(s);const a=new bn(i.parent,t);return this._breakAttributes(a,e)}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement"))return;if(t.is("element"))for(const e of t.getChildren())this._addToClonedElementsGroup(e);const e=t.id;if(!e)return;let n=this._cloneGroups.get(e);n||(n=new Set,this._cloneGroups.set(e,n)),n.add(t),t._clonesGroup=n}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const e of t.getChildren())this._removeFromClonedElementsGroup(e);const e=t.id;if(!e)return;const n=this._cloneGroups.get(e);n&&n.delete(t)}}function Hn(t){let e=t.parent;for(;!Qn(e);){if(!e)return;e=e.parent}return e}function qn(t,e){return t.prioritye.priority)&&t.getIdentity(){const e=t.createElement("br");return e.dataset.ckeFiller=!0,e},ti=t=>t.createTextNode(" "),ei=7;let ni="";for(let t=0;t0&&(r=r.concat(Array(n).fill("equal"))),o-n>0&&(r=r.concat(Array(o-n).fill("insert"))),i-n>0&&(r=r.concat(Array(i-n).fill("delete"))),o0&&n.push({index:i,type:"insert",values:t.slice(i,r)}),o-i>0&&n.push({index:i+(r-i),type:"delete",howMany:o-i}),n}(e,o)}function di(t,e,n){for(let i=0;i200||o>200||i+o>300)return ui.fastDiff(t,e,n,!0);let r,s;if(ol?-1:1;d[i+u]&&(d[i]=d[i+u].slice(0)),d[i]||(d[i]=[]),d[i].push(o>l?r:s);let f=Math.max(o,l),g=f-i;for(;gl;f--)h[f]=u(f);h[l]=u(l),g++}while(h[l]!==c);return d[l].slice(1)}function fi(t,e,n){t.insertBefore(n,t.childNodes[e]||null)}function gi(t){const e=t.parentNode;e&&e.removeChild(t)}function mi(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}ui.fastDiff=li;class pi{constructor(t,e){this.domDocuments=new Set,this.domConverter=t,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=e,this.isFocused=!1,this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(t,e){if("text"===t)this.domConverter.mapViewToDom(e.parent)&&this.markedTexts.add(e);else{if(!this.domConverter.mapViewToDom(e))return;if("attributes"===t)this.markedAttributes.add(e);else{if("children"!==t)throw new be.b("view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.",this);this.markedChildren.add(e)}}}render(){let t;for(const t of this.markedChildren)this._updateChildrenMappings(t);this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent));for(const t of this.markedAttributes)this._updateAttrs(t);for(const e of this.markedChildren)this._updateChildren(e,{inlineFillerPosition:t});for(const e of this.markedTexts)!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)&&this._updateText(e,{inlineFillerPosition:t});if(t){const e=this.domConverter.viewPositionToDom(t),n=e.parent.ownerDocument;ii(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=bi(n,e.parent,e.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=this.domConverter.mapViewToDom(t).childNodes,i=Array.from(this.domConverter.viewChildrenToDom(t,e.ownerDocument,{withChildren:!1})),o=this._diffNodeLists(n,i),r=this._findReplaceActions(o,n,i);if(-1!==r.indexOf("replace")){const e={equal:0,insert:0,delete:0};for(const o of r)if("replace"===o){const o=e.equal+e.insert,r=e.equal+e.delete,s=t.getChild(o);s&&!s.is("uiElement")&&this._updateElementMappings(s,n[r]),gi(i[o]),e.equal++}else e[o]++}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e),this.domConverter.bindElements(e,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is("text")?bn._createBefore(this.selection.getFirstPosition().parent):t}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=this.domConverter.viewPositionToDom(t);return!!(e&&Zn(e.parent)&&ii(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!ii(t))throw new be.b("view-renderer-filler-was-lost: The inline filler node was lost.",this);oi(t)?t.parentNode.removeChild(t):t.data=t.data.substr(ei),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,n=t.offset;if(!this.domConverter.mapViewToDom(e.root))return!1;if(!e.is("element"))return!1;if(!function(t){if("false"==t.getAttribute("contenteditable"))return!1;const e=t.findAncestor(t=>t.hasAttribute("contenteditable"));return!e||"true"==e.getAttribute("contenteditable")}(e))return!1;if(n===e.getFillerOffset())return!1;const i=t.nodeBefore,o=t.nodeAfter;return!(i instanceof De||o instanceof De)}_updateText(t,e){const n=this.domConverter.findCorrespondingDomText(t),i=this.domConverter.viewToDom(t,n.ownerDocument),o=n.data;let r=i.data;const s=e.inlineFillerPosition;if(s&&s.parent==t.parent&&s.offset==t.index&&(r=ni+r),o!=r){const t=li(o,r);for(const e of t)"insert"===e.type?n.insertData(e.index,e.values.join("")):n.deleteData(e.index,e.howMany)}}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(e.attributes).map(t=>t.name),i=t.getAttributeKeys();for(const n of i)e.setAttribute(n,t.getAttribute(n));for(const i of n)t.hasAttribute(i)||e.removeAttribute(i)}_updateChildren(t,e){const n=this.domConverter.mapViewToDom(t);if(!n)return;const i=e.inlineFillerPosition,o=this.domConverter.mapViewToDom(t).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(t,n.ownerDocument,{bind:!0,inlineFillerPosition:i}));i&&i.parent===t&&bi(n.ownerDocument,r,i.offset);const s=this._diffNodeLists(o,r);let a=0;const c=new Set;for(const t of s)"insert"===t?(fi(n,a,r[a]),a++):"delete"===t?(c.add(o[a]),gi(o[a])):(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(const t of c)t.parentNode||this.domConverter.unbindDomElement(t)}_diffNodeLists(t,e){return ui(t=function(t,e){const n=Array.from(t);return 0!=n.length&&e?(n[n.length-1]==e&&n.pop(),n):n}(t,this._fakeSelectionContainer),e,function(t,e,n){return e===n||(Zn(e)&&Zn(n)?e.data===n.data:!(!ai(e,t)||!ai(n,t)))}.bind(null,this.domConverter.blockFiller))}_findReplaceActions(t,e,n){if(-1===t.indexOf("insert")||-1===t.indexOf("delete"))return t;let i=[],o=[],r=[];const s={equal:0,insert:0,delete:0};for(const a of t)"insert"===a?r.push(n[s.equal+s.insert]):"delete"===a?o.push(e[s.equal+s.delete]):((i=i.concat(ui(o,r,wi).map(t=>"equal"===t?"replace":t))).push("equal"),o=[],r=[]),s[a]++;return i.concat(ui(o,r,wi).map(t=>"equal"===t?"replace":t))}_markDescendantTextToSync(t){if(t)if(t.is("text"))this.markedTexts.add(t);else if(t.is("element"))for(const e of t.getChildren())this._markDescendantTextToSync(e)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):(this._removeFakeSelection(),this._updateDomSelection(t)))}_updateFakeSelection(t){const e=t.ownerDocument;let n=this._fakeSelectionContainer;n||(this._fakeSelectionContainer=n=e.createElement("div"),Object.assign(n.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),n.textContent=" "),n.parentElement&&n.parentElement==t||t.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const i=e.getSelection(),o=e.createRange();i.removeAllRanges(),o.selectNodeContents(n),i.addRange(o),this.domConverter.bindFakeSelection(n,this.selection)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);t.focus(),e.collapse(n.parent,n.offset),e.extend(i.parent,i.offset),Nn.isGecko&&function(t,e){const n=t.parent;if(n.nodeType!=Node.ELEMENT_NODE||t.offset!=n.childNodes.length-1)return;const i=n.childNodes[t.offset];i&&"BR"==i.tagName&&e.addRange(e.getRangeAt(0))}(i,e)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const e=t&&this.domConverter.domSelectionToView(t);return!(e&&this.selection.isEqual(e)||!this.selection.isCollapsed&&this.selection.isSimilar(e))}_removeDomSelection(){for(const t of this.domDocuments)if(t.getSelection().rangeCount){const e=t.activeElement,n=this.domConverter.mapDomToView(e);e&&n&&t.getSelection().removeAllRanges()}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function bi(t,e,n){const i=e instanceof Array?e:e.childNodes,o=i[n];if(Zn(o))return o.data=ni+o.data,o;{const o=t.createTextNode(ni);return Array.isArray(e)?i.splice(n,0,o):fi(e,n,o),o}}function wi(t,e){return mi(t)&&mi(e)&&!Zn(t)&&!Zn(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}Ie(pi,sn);var ki={window:window,document:document};function _i(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function vi(t){const e=[];for(;t&&t.nodeType!=Node.DOCUMENT_NODE;)e.unshift(t),t=t.parentNode;return e}class yi{constructor(t={}){this.blockFiller=t.blockFiller||Xn,this.preElements=["pre"],this.blockElements=["p","div","h1","h2","h3","h4","h5","h6"],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new vn(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(e);for(const e of Array.from(t.childNodes))this.unbindDomElement(e)}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}viewToDom(t,e,n={}){if(t.is("text")){const n=this._processDataFromViewText(t);return e.createTextNode(n)}{if(this.mapViewToDom(t))return this.mapViewToDom(t);let i;if(t.is("documentFragment"))i=e.createDocumentFragment(),n.bind&&this.bindDocumentFragments(i,t);else{if(t.is("uiElement"))return i=t.render(e),n.bind&&this.bindElements(i,t),i;i=e.createElement(t.name),n.bind&&this.bindElements(i,t);for(const e of t.getAttributeKeys())i.setAttribute(e,t.getAttribute(e))}if(n.withChildren||void 0===n.withChildren)for(const o of this.viewChildrenToDom(t,e,n))i.appendChild(o);return i}}*viewChildrenToDom(t,e,n={}){const i=t.getFillerOffset&&t.getFillerOffset();let o=0;for(const r of t.getChildren())i===o&&(yield this.blockFiller(e)),yield this.viewToDom(r,e,n),o++;i===o&&(yield this.blockFiller(e))}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),n=this.viewPositionToDom(t.end),i=document.createRange();return i.setStart(e.parent,e.offset),i.setEnd(n.parent,n.offset),i}viewPositionToDom(t){const e=t.parent;if(e.is("text")){const n=this.findCorrespondingDomText(e);if(!n)return null;let i=t.offset;return ii(n)&&(i+=ei),{parent:n,offset:i}}{let n,i,o;if(0===t.offset){if(!(n=this.mapViewToDom(e)))return null;o=n.childNodes[0]}else{const e=t.nodeBefore;if(!(i=e.is("text")?this.findCorrespondingDomText(e):this.mapViewToDom(t.nodeBefore)))return null;n=i.parentNode,o=i.nextSibling}return Zn(o)&&ii(o)?{parent:o,offset:ei}:{parent:n,offset:i?_i(i)+1:0}}}domToView(t,e={}){if(ai(t,this.blockFiller))return null;const n=this.getParentUIElement(t,this._domToViewMapping);if(n)return n;if(Zn(t)){if(oi(t))return null;{const e=this._processDataFromDomText(t);return""===e?null:new De(e)}}if(this.isComment(t))return null;{if(this.mapDomToView(t))return this.mapDomToView(t);let n;if(this.isDocumentFragment(t))n=new Fn,e.bind&&this.bindDocumentFragments(t,n);else{const i=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();n=new Fe(i),e.bind&&this.bindElements(t,n);const o=t.attributes;for(let t=o.length-1;t>=0;t--)n._setAttribute(o[t].name,o[t].value)}if(e.withChildren||void 0===e.withChildren)for(const i of this.domChildrenToView(t,e))n._appendChild(i);return n}}*domChildrenToView(t,e={}){for(let n=0;n{const{scrollLeft:e,scrollTop:n}=t;i.push([e,n])}),e.focus(),Ai(e,t=>{const[e,n]=i.shift();t.scrollLeft=e,t.scrollTop=n}),ki.window.scrollTo(t,n)}}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(t){return t&&t.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);const n=e.collapsed;return e.detach(),n}getParentUIElement(t){const e=vi(t);for(e.pop();e.length;){const t=e.pop(),n=this._domToViewMapping.get(t);if(n&&n.is("uiElement"))return n}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}_isDomSelectionPositionCorrect(t,e){if(Zn(t)&&ii(t)&&ethis.preElements.includes(t.name)))return e;if(" "==e.charAt(0)){const n=this._getTouchingViewTextNode(t,!1);(!n||!this._nodeEndsWithSpace(n))&&n||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const n=this._getTouchingViewTextNode(t,!0);" "!=e.charAt(e.length-2)&&n&&" "!=n.data.charAt(0)||(e=e.substr(0,e.length-1)+" ")}return e.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(t){if(t.getAncestors().some(t=>this.preElements.includes(t.name)))return!1;const e=this._processDataFromViewText(t);return" "==e.charAt(e.length-1)}_processDataFromDomText(t){let e=t.data;if(xi(t,this.preElements))return ri(t);e=e.replace(/[ \n\t\r]{1,}/g," ");const n=this._getTouchingInlineDomNode(t,!1),i=this._getTouchingInlineDomNode(t,!0),o=this._checkShouldLeftTrimDomText(n),r=this._checkShouldRightTrimDomText(t,i);return o&&(e=e.replace(/^ /,"")),r&&(e=e.replace(/ $/,"")),e=(e=ri(new Text(e))).replace(/ \u00A0/g," "),(/( |\u00A0)\u00A0$/.test(e)||!i||i.data&&" "==i.data.charAt(0))&&(e=e.replace(/\u00A0$/," ")),o&&(e=e.replace(/^\u00A0/," ")),e}_checkShouldLeftTrimDomText(t){return!t||!!ge(t)||/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1))}_checkShouldRightTrimDomText(t,e){return!e&&!ii(t)}_getTouchingViewTextNode(t,e){const n=new pn({startPosition:e?bn._createAfter(t):bn._createBefore(t),direction:e?"forward":"backward"});for(const t of n){if(t.item.is("containerElement"))return null;if(t.item.is("br"))return null;if(t.item.is("textProxy"))return t.item}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode)return null;const n=e?"nextNode":"previousNode",i=t.ownerDocument,o=vi(t)[0],r=i.createTreeWalker(o,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:t=>Zn(t)?NodeFilter.FILTER_ACCEPT:"BR"==t.tagName?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});r.currentNode=t;const s=r[n]();if(null!==s){const e=function(t,e){const n=vi(t),i=vi(e);let o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}(t,s);if(e&&!xi(t,this.blockElements,e)&&!xi(s,this.blockElements,e))return s}return null}}function xi(t,e,n){let i=vi(t);return n&&(i=i.slice(i.indexOf(n)+1)),i.some(t=>t.tagName&&e.includes(t.tagName.toLowerCase()))}function Ai(t,e){for(;t&&t!=ki.document;)e(t),t=t.parentNode}function Ti(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}var Ci=tn({},Ae,{listenTo(t,...e){if(mi(t)||Ti(t)){const n=this._getProxyEmitter(t)||new Pi(t);n.attach(...e),t=n}Ae.listenTo.call(this,t,...e)},stopListening(t,e,n){if(mi(t)||Ti(t)){const e=this._getProxyEmitter(t);if(!e)return;t=e}Ae.stopListening.call(this,t,e,n),t instanceof Pi&&t.detach(e)},_getProxyEmitter(t){return function(t,e){return t[ye]&&t[ye][e]?t[ye][e].emitter:null}(this,Si(t))}});class Pi{constructor(t){Te(this,Si(t)),this._domNode=t}}function Si(t){return t["data-ck-expando"]||(t["data-ck-expando"]=_e())}tn(Pi.prototype,Ae,{attach(t,e,n={}){if(this._domListeners&&this._domListeners[t])return;const i=this._createDomListener(t,!!n.useCapture);this._domNode.addEventListener(t,i,!!n.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[t]=i},detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()},_createDomListener(t,e){const n=e=>{this.fire(t,e)};return n.removeListener=()=>{this._domNode.removeEventListener(t,n,e),delete this._domListeners[t]},n}});class Mi{constructor(t){this.view=t,this.document=t.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}function Ei(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new G;++ea))return!1;var l=r.get(t);if(l&&r.get(e))return l==e;var d=-1,h=!0,u=2&n?new Ii:void 0;for(r.set(t,e),r.set(e,t);++d{this.listenTo(t,e,(t,e)=>{this.isEnabled&&this.onDomEvent(e)},{useCapture:this.useCapture})})}fire(t,e,n){this.isEnabled&&this.document.fire(t,new Gi(this.view,e,n))}}class Ki extends Qi{constructor(t){super(t),this.domEventType=["keydown","keyup"]}onDomEvent(t){this.fire(t.type,t,{keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,get keystroke(){return Ln(this)}})}}var Ji=function(){return i.a.Date.now()},Zi=function(t){return"symbol"==typeof t||g(t)&&"[object Symbol]"==h(t)},Xi=/^\s+|\s+$/g,to=/^[-+]0x[0-9a-f]+$/i,eo=/^0b[01]+$/i,no=/^0o[0-7]+$/i,io=parseInt,oo=function(t){if("number"==typeof t)return t;if(Zi(t))return NaN;if(C(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=C(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Xi,"");var n=eo.test(t);return n||no.test(t)?io(t.slice(2),n?2:8):to.test(t)?NaN:+t},ro=Math.max,so=Math.min,ao=function(t,e,n){var i,o,r,s,a,c,l=0,d=!1,h=!1,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=i,r=o;return i=o=void 0,l=e,s=t.apply(r,n)}function g(t){var n=t-c;return void 0===c||n>=e||n<0||h&&t-l>=r}function m(){var t=Ji();if(g(t))return p(t);a=setTimeout(m,function(t){var n=e-(t-c);return h?so(n,r-(t-l)):n}(t))}function p(t){return a=void 0,u&&i?f(t):(i=o=void 0,s)}function b(){var t=Ji(),n=g(t);if(i=arguments,o=this,c=t,n){if(void 0===a)return function(t){return l=t,a=setTimeout(m,e),d?f(t):s}(c);if(h)return clearTimeout(a),a=setTimeout(m,e),f(c)}return void 0===a&&(a=setTimeout(m,e)),s}return e=oo(e)||0,C(n)&&(d=!!n.leading,r=(h="maxWait"in n)?ro(oo(n.maxWait)||0,e):r,u="trailing"in n?!!n.trailing:u),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=o=a=void 0},b.flush=function(){return void 0===a?s:p(Ji())},b};class co extends Mi{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=ao(t=>this.document.fire("selectionChangeDone",t),200)}observe(){const t=this.document;t.on("keydown",(e,n)=>{t.selection.isFake&&function(t){return t==Dn.arrowright||t==Dn.arrowleft||t==Dn.arrowup||t==Dn.arrowdown}(n.keyCode)&&this.isEnabled&&(n.preventDefault(),this._handleSelectionMove(n.keyCode))},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,n=new vn(e.getRanges(),{backward:e.isBackward,fake:!1});t!=Dn.arrowleft&&t!=Dn.arrowup||n.setTo(n.getFirstPosition()),t!=Dn.arrowright&&t!=Dn.arrowdown||n.setTo(n.getLastPosition());const i={oldSelection:e,newSelection:n,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}class lo extends Mi{constructor(t){super(t),this.mutationObserver=t.getObserver($i),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=ao(t=>this.document.fire("selectionChangeDone",t),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument;this._documents.has(e)||(this.listenTo(e,"selectionchange",()=>{this._handleSelectionChange(e)}),this._documents.add(e))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(t){if(!this.isEnabled||!this.document.isFocused&&!this.document.isReadOnly)return;this.mutationObserver.flush();const e=t.defaultView.getSelection(),n=this.domConverter.domSelectionToView(e);if(!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(e)||++this._loopbackCounter>60))if(this.selection.isSimilar(n))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:n,domSelection:e};this.document.fire("selectionChange",t),this._fireSelectionChangeDoneDebounced(t)}}_clearInfiniteLoop(){this._loopbackCounter=0}}class ho extends Qi{constructor(t){super(t),this.domEventType=["focus","blur"],this.useCapture=!0;const e=this.document;e.on("focus",()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout(()=>t.forceRender(),50)}),e.on("blur",(n,i)=>{const o=e.selection.editableElement;null!==o&&o!==i.target||(e.isFocused=!1,t.forceRender())})}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class uo extends Qi{constructor(t){super(t),this.domEventType=["compositionstart","compositionupdate","compositionend"];const e=this.document;e.on("compositionstart",()=>{e.isComposing=!0}),e.on("compositionend",()=>{e.isComposing=!1})}onDomEvent(t){this.fire(t.type,t)}}class fo extends Qi{constructor(t){super(t),this.domEventType=["beforeinput"]}onDomEvent(t){this.fire(t.type,t)}}function go(t){return"[object Range]"==Object.prototype.toString.apply(t)}function mo(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const po=["top","right","bottom","left","width","height"];class bo{constructor(t){const e=go(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),ge(t)||e)wo(this,e?bo.getDomRangeRects(t)[0]:t.getBoundingClientRect());else if(Ti(t)){const{innerWidth:e,innerHeight:n}=t;wo(this,{top:0,right:e,bottom:n,left:0,width:e,height:n})}else wo(this,t)}clone(){return new bo(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left)};return e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0?null:new bo(e)}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(!ko(t)){let n=t.parentNode||t.commonAncestorContainer;for(;n&&!ko(n);){const t=new bo(n),i=e.getIntersection(t);if(!i)return null;i.getArea()Mo(t,i));const s=Mo(t,i);if(vo(i,s,e),i.parent!=i){if(o=i.frameElement,i=i.parent,!o)return}else i=null}}function vo(t,e,n){const i=e.clone().moveBy(0,n),o=e.clone().moveBy(0,-n),r=new bo(t).excludeScrollbarsAndBorders();if(![o,i].every(t=>r.contains(t))){let{scrollX:s,scrollY:a}=t;Ao(o,r)?a-=r.top-e.top+n:xo(i,r)&&(a+=e.bottom-r.bottom+n),To(e,r)?s-=r.left-e.left+n:Co(e,r)&&(s+=e.right-r.right+n),t.scrollTo(s,a)}}function yo(t,e){const n=Po(t);let i,o;for(;t!=n.document.body;)o=e(),(i=new bo(t).excludeScrollbarsAndBorders()).contains(o)||(Ao(o,i)?t.scrollTop-=i.top-o.top:xo(o,i)&&(t.scrollTop+=o.bottom-i.bottom),To(o,i)?t.scrollLeft-=i.left-o.left:Co(o,i)&&(t.scrollLeft+=o.right-i.right)),t=t.parentNode}function xo(t,e){return t.bottom>e.bottom}function Ao(t,e){return t.tope.right}function Po(t){return go(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function So(t){if(go(t)){let e=t.commonAncestorContainer;return Zn(e)&&(e=e.parentNode),e}return t.parentNode}function Mo(t,e){const n=Po(t),i=new bo(t);if(n===e)return i;{let t=n;for(;t!=e;){const e=t.frameElement,n=new bo(e).excludeScrollbarsAndBorders();i.moveBy(n.left,n.top),t=t.parent}}return i}Object.assign({},{scrollViewportToShowTarget:_o,scrollAncestorsToShowTarget:function(t){yo(So(t),()=>new bo(t))}});class Eo{constructor(){this.document=new An,this.domConverter=new yi,this.domRoots=new Map,this.set("isRenderingInProgress",!1),this._renderer=new pi(this.domConverter,this.document.selection),this._renderer.bind("isFocused").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new Un(this.document),this.addObserver($i),this.addObserver(lo),this.addObserver(ho),this.addObserver(Ki),this.addObserver(co),this.addObserver(uo),Nn.isAndroid&&this.addObserver(fo),function(t){t.document.on("keydown",ci)}(this),function(t){t.document.on("keydown",(e,n)=>(function(t,e,n){if(e.keyCode==Dn.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),i=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(i||e.shiftKey){const e=t.focusNode,o=t.focusOffset,r=n.domPositionToView(e,o);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition(t=>(t.item.is("uiElement")&&(s=!0),!(!t.item.is("uiElement")&&!t.item.is("attributeElement"))));if(s){const e=n.viewPositionToDom(a);i?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}})(0,n,t.domConverter))}(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(t,e="main"){const n=this.document.getRoot(e);n._name=t.tagName.toLowerCase();const i={};for(const{name:e,value:o}of Array.from(t.attributes))i[e]=o,"class"===e?this._writer.addClass(o.split(" "),n):this._writer.setAttribute(e,o,n);this._initialDomRootAttributes.set(t,i);const o=()=>{this._writer.setAttribute("contenteditable",!n.isReadOnly,n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};o(),this.domRoots.set(e,t),this.domConverter.bindElements(t,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(t.ownerDocument),n.on("change:children",(t,e)=>this._renderer.markToSync("children",e)),n.on("change:attributes",(t,e)=>this._renderer.markToSync("attributes",e)),n.on("change:text",(t,e)=>this._renderer.markToSync("text",e)),n.on("change:isReadOnly",()=>this.change(o)),n.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const n of this._observers.values())n.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach(({name:t})=>e.removeAttribute(t));const n=this._initialDomRootAttributes.get(e);for(const t in n)e.setAttribute(t,n[t]);this.domRoots.delete(t),this.domConverter.unbindDomElement(e)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e)return e;e=new t(this),this._observers.set(t,e);for(const[t,n]of this.domRoots)e.observe(n,t);return e.enable(),e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection(){const t=this.document.selection.getFirstRange();t&&_o({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new be.b("cannot-change-view-tree: Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. This may cause some unexpected behavior and inconsistency between the DOM and the view.",this);if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const e=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),e}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return bn._createAt(t,e)}createPositionAfter(t){return bn._createAfter(t)}createPositionBefore(t){return bn._createBefore(t)}createRange(t,e){return new wn(t,e)}createRangeOn(t){return wn._createOn(t)}createRangeIn(t){return wn._createIn(t)}createSelection(t,e,n){return new vn(t,e,n)}_disableRendering(t){this._renderingDisabled=t,0==t&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}function Io(t){return _(t)?je(t):new Map(t)}Ie(Eo,sn);class No{constructor(t){this.parent=null,this._attrs=Io(t)}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new be.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return t}get startOffset(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildStartOffset(this)))throw new be.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}get document(){return this.root==this?null:this.root.document||null}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),i=t.getAncestors(e);let o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),i=Ne(e,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return e[i](t[e[0]]=e[1],t),{})),t}is(t){return"node"==t||"model:node"==t}_clone(){return new No(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=Io(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}class Oo extends No{constructor(t,e){super(e),this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}is(t){return"text"==t||"model:text"==t||super.is(t)}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new Oo(this.data,this.getAttributes())}static fromJSON(t){return new Oo(t.data,t.attributes)}}class Ro{constructor(t,e,n){if(this.textNode=t,e<0||e>t.offsetSize)throw new be.b("model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(n<0||e+n>t.offsetSize)throw new be.b("model-textproxy-wrong-length: Given length value is incorrect.",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(t){return"textProxy"==t||"model:textProxy"==t}getPath(){const t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Do{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((t,e)=>t+e.offsetSize,0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return-1==e?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return null===e?null:this._nodes.slice(0,e).reduce((t,e)=>t+e.offsetSize,0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const e=this._nodes[t];if(!e)throw new be.b("model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const n of this._nodes){if(t>=e&&tt.toJSON())}}class Lo extends No{constructor(t,e,n){super(e),this.name=t,this._children=new Do,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(t,e=null){const n=t.replace(/^model:/,"");return e?"element"==n&&e==this.name:"element"==n||n==this.name||super.is(t)}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const e of this._children)t.children.push(e.toJSON())}return t}_clone(t=!1){const e=t?Array.from(this._children).map(t=>t._clone(!0)):null;return new Lo(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){return"string"==typeof t?[new Oo(t)]:(Ve(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new Oo(t):t instanceof Ro?new Oo(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}static fromJSON(t){let e=null;if(t.children){e=[];for(const n of t.children)n.name?e.push(Lo.fromJSON(n)):e.push(Oo.fromJSON(n))}return new Lo(t.name,t.attributes,e)}}class jo{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new be.b("model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);const e=t.direction||"forward";if("forward"!=e&&"backward"!=e)throw new be.b("model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",t,{direction:e});this.direction=e,this.boundaries=t.boundaries||null,t.startPosition?this.position=t.startPosition.clone():this.position=Bo._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(t){let e,n,i,o;do{i=this.position,o=this._visitedParent,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=i,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&e.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};const i=e.textNode?e.textNode:e.nodeAfter;if(i instanceof Lo)return this.shallow?e.offset++:(e.path.push(0),this._visitedParent=i),this.position=e,Vo("elementStart",i,t,e,1);if(i instanceof Oo){let o;if(this.singleCharacters)o=1;else{let t=i.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsett&&(t=this.boundaries.start.offset),o=e.offset-t}const r=e.offset-i.startOffset,s=new Ro(i,r-o,o);return e.offset-=o,this.position=e,Vo("text",s,t,e,o)}return e.path.pop(),this.position=e,this._visitedParent=n.parent,Vo("elementStart",n,t,e,1)}}function Vo(t,e,n,i,o){return{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:i,length:o}}}var zo=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};class Bo{constructor(t,e,n="toNone"){if(!t.is("element")&&!t.is("documentFragment"))throw new be.b("model-position-root-invalid: Position root invalid.",t);if(!(e instanceof Array)||0===e.length)throw new be.b("model-position-path-incorrect-format: Position path must be an array with at least one item.",t,{path:e});e=t.getPath().concat(e),t=t.root,this.root=t,this.path=e,this.stickiness=n}get offset(){return zo(this.path)}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;en.path.length){if(e.offset!==i.maxOffset)return!1;e.path=e.path.slice(0,-1),i=i.parent,e.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}is(t){return"position"==t||"model:position"==t}hasSameParentAs(t){return this.root===t.root&&"same"==Ne(this.getParentPath(),t.getParentPath())}getTransformedByOperation(t){let e;switch(t.type){case"insert":e=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":e=this._getTransformedByMoveOperation(t);break;case"split":e=this._getTransformedBySplitOperation(t);break;case"merge":e=this._getTransformedByMergeOperation(t);break;default:e=Bo._createAt(this)}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;return e.containsPosition(this)||e.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const e=t.movedRange;let n;return e.containsPosition(this)||e.start.isEqual(this)?(n=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(n=n._getTransformedByDeletion(t.deletionPosition,1))):n=this.isEqual(t.deletionPosition)?Bo._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),n}_getTransformedByDeletion(t,e){const n=Bo._createAt(this);if(this.root!=t.root)return n;if("same"==Ne(t.getParentPath(),this.getParentPath())){if(t.offsetthis.offset)return null;n.offset-=e}}else if("prefix"==Ne(t.getParentPath(),this.getParentPath())){const i=t.path.length-1;if(t.offset<=this.path[i]){if(t.offset+e>this.path[i])return null;n.path[i]-=e}}return n}_getTransformedByInsertion(t,e){const n=Bo._createAt(this);if(this.root!=t.root)return n;if("same"==Ne(t.getParentPath(),this.getParentPath()))(t.offsete+1;){const e=i.maxOffset-n.offset;0!==e&&t.push(new Fo(n,n.getShiftedBy(e))),n.path=n.path.slice(0,-1),n.offset++,i=i.parent}for(;n.path.length<=this.end.path.length;){const e=this.end.path[n.path.length-1],i=e-n.offset;0!==i&&t.push(new Fo(n,n.getShiftedBy(i))),n.offset=e,n.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new jo(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new jo(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new jo(t);yield e.position;for(const t of e)yield t.nextPosition}getTransformedByOperation(t){switch(t.type){case"insert":return this._getTransformedByInsertOperation(t);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(t);case"split":return[this._getTransformedBySplitOperation(t)];case"merge":return[this._getTransformedByMergeOperation(t)]}return[new Fo(this.start,this.end)]}getTransformedByOperations(t){const e=[new Fo(this.start,this.end)];for(const n of t)for(let t=0;t0?new this(n,i):new this(i,n)}static _createIn(t){return new this(Bo._createAt(t,0),Bo._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(Bo._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new be.b("range-create-from-ranges-empty-array: At least one range has to be passed.",null);if(1==t.length)return t[0].clone();const e=t[0];t.sort((t,e)=>t.start.isAfter(e.start)?1:-1);const n=t.indexOf(e),i=new this(e.start,e.end);if(n>0)for(let e=n-1;t[e].end.isEqual(i.start);e++)i.start=Bo._createAt(t[e].start);for(let e=n+1;e{if(e.viewPosition)return;const n=this._modelToViewMapping.get(e.modelPosition.parent);e.viewPosition=this._findPositionIn(n,e.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(t,e)=>{if(e.modelPosition)return;const n=this.findMappedViewAncestor(e.viewPosition),i=this._viewToModelMapping.get(n),o=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,n);e.modelPosition=Bo._createAt(i,o)},{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t){const e=this.toModelElement(t);if(this._viewToModelMapping.delete(t),this._elementToMarkerNames.has(t))for(const e of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(e);this._modelToViewMapping.get(e)==t&&this._modelToViewMapping.delete(e)}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const n=this._markerNameToElements.get(e)||new Set;n.add(t);const i=this._elementToMarkerNames.get(t)||new Set;i.add(e),this._markerNameToElements.set(e,n),this._elementToMarkerNames.set(t,i)}unbindElementFromMarkerName(t,e){const n=this._markerNameToElements.get(e);n&&(n.delete(t),0==n.size&&this._markerNameToElements.delete(e));const i=this._elementToMarkerNames.get(t);i&&(i.delete(e),0==i.size&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new Fo(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new wn(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};return this.fire("viewToModelPosition",e),e.modelPosition}toViewPosition(t,e={isPhantom:!1}){const n={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const n=new Set;for(const t of e)if(t.is("attributeElement"))for(const e of t.getElementsWithSameId())n.add(e);else n.add(t);return n}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;for(;!this._viewToModelMapping.has(e);)e=e.parent;return e}_toModelOffset(t,e,n){if(n!=t)return this._toModelOffset(t.parent,t.index,n)+this._toModelOffset(t,e,t);if(t.is("text"))return e;let i=0;for(let n=0;n1?e[0]+":"+e[1]:e[0]}class Wo{constructor(t){this.conversionApi=tn({dispatcher:this},t)}convertChanges(t,e,n){for(const e of t.getMarkersToRemove())this.convertMarkerRemove(e.name,e.range,n);for(const e of t.getChanges())"insert"==e.type?this.convertInsert(Fo._createFromPositionAndShift(e.position,e.length),n):"remove"==e.type?this.convertRemove(e.position,e.length,e.name,n):this.convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,n);for(const t of this.conversionApi.mapper.flushUnboundMarkerNames()){const i=e.get(t).getRange();this.convertMarkerRemove(t,i,n),this.convertMarkerAdd(t,i,n)}for(const e of t.getMarkersToAdd())this.convertMarkerAdd(e.name,e.range,n)}convertInsert(t,e){this.conversionApi.writer=e,this.conversionApi.consumable=this._createInsertConsumable(t);for(const e of t){const t=e.item,n={item:t,range:Fo._createFromPositionAndShift(e.previousPosition,e.length)};this._testAndFire("insert",n);for(const e of t.getAttributeKeys())n.attributeKey=e,n.attributeOldValue=null,n.attributeNewValue=t.getAttribute(e),this._testAndFire(`attribute:${e}`,n)}this._clearConversionApi()}convertRemove(t,e,n,i){this.conversionApi.writer=i,this.fire("remove:"+n,{position:t,length:e},this.conversionApi),this._clearConversionApi()}convertAttribute(t,e,n,i,o){this.conversionApi.writer=o,this.conversionApi.consumable=this._createConsumableForRange(t,`attribute:${e}`);for(const o of t){const t={item:o.item,range:Fo._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:e,attributeOldValue:n,attributeNewValue:i};this._testAndFire(`attribute:${e}`,t)}this._clearConversionApi()}convertSelection(t,e,n){const i=Array.from(e.getMarkersAtPosition(t.getFirstPosition()));if(this.conversionApi.writer=n,this.conversionApi.consumable=this._createSelectionConsumable(t,i),this.fire("selection",{selection:t},this.conversionApi),t.isCollapsed){for(const e of i){const n=e.getRange();if(!Yo(t.getFirstPosition(),e,this.conversionApi.mapper))continue;const i={item:t,markerName:e.name,markerRange:n};this.conversionApi.consumable.test(t,"addMarker:"+e.name)&&this.fire("addMarker:"+e.name,i,this.conversionApi)}for(const e of t.getAttributeKeys()){const n={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};this.conversionApi.consumable.test(t,"attribute:"+n.attributeKey)&&this.fire("attribute:"+n.attributeKey+":$text",n,this.conversionApi)}this._clearConversionApi()}}convertMarkerAdd(t,e,n){if(!e.root.document||"$graveyard"==e.root.rootName)return;this.conversionApi.writer=n;const i="addMarker:"+t,o=new Ho;if(o.add(e,i),this.conversionApi.consumable=o,this.fire(i,{markerName:t,markerRange:e},this.conversionApi),o.test(e,i)){this.conversionApi.consumable=this._createConsumableForRange(e,i);for(const n of e.getItems()){if(!this.conversionApi.consumable.test(n,i))continue;const o={item:n,range:Fo._createOn(n),markerName:t,markerRange:e};this.fire(i,o,this.conversionApi)}this._clearConversionApi()}}convertMarkerRemove(t,e,n){e.root.document&&"$graveyard"!=e.root.rootName&&(this.conversionApi.writer=n,this.fire("removeMarker:"+t,{markerName:t,markerRange:e},this.conversionApi),this._clearConversionApi())}_createInsertConsumable(t){const e=new Ho;for(const n of t){const t=n.item;e.add(t,"insert");for(const n of t.getAttributeKeys())e.add(t,"attribute:"+n)}return e}_createConsumableForRange(t,e){const n=new Ho;for(const i of t.getItems())n.add(i,e);return n}_createSelectionConsumable(t,e){const n=new Ho;n.add(t,"selection");for(const i of e)n.add(t,"addMarker:"+i.name);for(const e of t.getAttributeKeys())n.add(t,"attribute:"+e);return n}_testAndFire(t,e){if(!this.conversionApi.consumable.test(e.item,t))return;const n=e.item.name||"$text";this.fire(t+":"+n,e,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}}function Yo(t,e,n){const i=e.getRange(),o=Array.from(t.getAncestors());return o.shift(),o.reverse(),!o.some(t=>{if(i.containsItem(t))return!!n.toViewElement(t).getCustomProperty("addHighlight")})}Ie(Wo,Ae);class $o{constructor(t,e,n){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,t&&this.setTo(t,e,n)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(t){if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const i of t._ranges)if(e.isEqual(i)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new Fo(t.start,t.end)}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?new Fo(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?new Fo(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(t,e,n){if(null===t)this._setRanges([]);else if(t instanceof $o)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof Fo)this._setRanges([t],!!e&&!!e.backward);else if(t instanceof Bo)this._setRanges([new Fo(t)]);else if(t instanceof No){const i=!!n&&!!n.backward;let o;if("in"==e)o=Fo._createIn(t);else if("on"==e)o=Fo._createOn(t);else{if(void 0===e)throw new be.b("model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",[this,t]);o=new Fo(Bo._createAt(t,e))}this._setRanges([o],i)}else{if(!Ve(t))throw new be.b("model-selection-setTo-not-selectable: Cannot set the selection to the given place.",[this,t]);this._setRanges(t,e&&!!e.backward)}}_setRanges(t,e=!1){const n=(t=Array.from(t)).some(e=>{if(!(e instanceof Fo))throw new be.b("model-selection-set-ranges-not-range: Selection range set to an object that is not an instance of model.Range.",[this,t]);return this._ranges.every(t=>!t.isEqual(e))});if(t.length!==this._ranges.length||n){this._removeAllRanges();for(const e of t)this._pushRange(e);this._lastRangeBackward=!!e,this.fire("change:range",{directChange:!0})}}setFocus(t,e){if(null===this.anchor)throw new be.b("model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",[this,t]);const n=Bo._createAt(t,e);if("same"==n.compareWith(this.focus))return;const i=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(i)?(this._pushRange(new Fo(n,i)),this._lastRangeBackward=!0):(this._pushRange(new Fo(i,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}setAttribute(t,e){this.getAttribute(t)!==e&&(this._attrs.set(t,e),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){if(1!==this.rangeCount)return null;const t=this.getFirstRange(),e=t.start.nodeAfter,n=t.end.nodeBefore;return e instanceof Lo&&e==n?e:null}is(t){return"selection"==t||"model:selection"==t}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const n=Qo(e.start,t);n&&(yield n);for(const n of e.getWalker())"elementEnd"==n.type&&Go(n.item,t)&&(yield n.item);const i=Qo(e.end,t);i&&!e.end.isTouching(Bo._createAt(i,0))&&(yield i)}}*getTopMostBlocks(){const t=Array.from(this.getSelectedBlocks());for(const e of t){const n=Ko(e);n&&t.includes(n)||(yield e)}}containsEntireContent(t=this.anchor.root){const e=Bo._createAt(t,0),n=Bo._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new Fo(t.start,t.end))}_checkRange(t){for(let e=0;e0;)this._popRange()}_popRange(){this._ranges.pop()}}function Go(t,e){return!e.has(t)&&(e.add(t),t.document.model.schema.isBlock(t)&&t.parent)}function Qo(t,e){const n=t.parent.document.model.schema,i=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const r=i.find(t=>!o&&!(o=n.isLimit(t))&&Go(t,e));return i.forEach(t=>e.add(t)),r}function Ko(t){const e=t.document.model.schema;let n=t.parent;for(;n;){if(e.isBlock(n))return n;n=n.parent}}Ie($o,Ae);class Jo extends Fo{constructor(t,e){super(t,e),function(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&function(t){const e=this.getTransformedByOperation(t),n=Fo._createFromRanges(e),i=!n.isEqual(this),o=function(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}(this,t);let r=null;if(i){"$graveyard"==n.root.rootName&&(r="remove"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",e,{deletionPosition:r})}else o&&this.fire("change:content",this.toRange(),{deletionPosition:r})}.call(this,n)},{priority:"low"})}.call(this)}detach(){this.stopListening()}is(t){return"liveRange"==t||"model:liveRange"==t||super.is(t)}toRange(){return new Fo(this.start,this.end)}static fromRange(t){return new Jo(t.start,t.end)}}Ie(Jo,Ae);const Zo="selection:";class Xo{constructor(t){this._selection=new tr(t),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getTopMostBlocks(){return this._selection.getTopMostBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}is(t){return"selection"==t||"model:selection"==t||"documentSelection"==t||"model:documentSelection"==t}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(t,e,n){this._selection.setTo(t,e,n)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return Zo+t}static _isStoreAttributeKey(t){return t.startsWith(Zo)}}Ie(Xo,Ae);class tr extends $o{constructor(t){super(),this.markers=new xn({idProperty:"name"}),this._model=t.model,this._document=t,this._attributePriority=new Map,this._fixGraveyardRangesData=[],this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this.listenTo(this._model,"applyOperation",(t,e)=>{const n=e[0];if(n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type){for(;this._fixGraveyardRangesData.length;){const{liveRange:t,sourcePosition:e}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(t,e)}this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1}))}},{priority:"lowest"}),this.on("change:range",()=>{for(const t of this.getRanges())if(!this._document._validateSelectionRange(t))throw new be.b("document-selection-wrong-position: Range from document selection starts or ends at incorrect position.",this,{range:t})}),this.listenTo(this._model.markers,"update",()=>this._updateMarkers()),this.listenTo(this._document,"change",(t,e)=>{!function(t,e){const n=t.document.differ;for(const i of n.getChanges()){if("insert"!=i.type)continue;const n=i.position.parent;i.length===n.maxOffset&&t.enqueueChange(e,t=>{const e=Array.from(n.getAttributeKeys()).filter(t=>t.startsWith(Zo));for(const i of e)t.removeAttribute(i,n)})}}(this._model,e)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let t=0;t{this._hasChangedRange=!0,e.root==this._document.graveyard&&this._fixGraveyardRangesData.push({liveRange:e,sourcePosition:i.deletionPosition})}),e}_updateMarkers(){const t=[];for(const e of this._model.markers){const n=e.getRange();for(const i of this.getRanges())n.containsRange(i,!i.isCollapsed)&&t.push(e)}for(const e of t)this.markers.has(e)||this.markers.add(e);for(const e of Array.from(this.markers))t.includes(e)||this.markers.remove(e)}_updateAttributes(t){const e=Io(this._getSurroundingAttributes()),n=Io(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[t,e]of this._attributePriority)"low"==e&&(this._attrs.delete(t),this._attributePriority.delete(t));this._setAttributesTo(e);const i=[];for(const[t,e]of this.getAttributes())n.has(t)&&n.get(t)===e||i.push(t);for(const[t]of n)this.hasAttribute(t)||i.push(t);i.length>0&&this.fire("change:attribute",{attributeKeys:i,directChange:!1})}_setAttribute(t,e,n=!0){const i=n?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(t))&&super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,i),!0)}_removeAttribute(t,e=!0){const n=e?"normal":"low";return!("low"==n&&"normal"==this._attributePriority.get(t)||(this._attributePriority.set(t,n),!super.hasAttribute(t)||(this._attrs.delete(t),0)))}_setAttributesTo(t){const e=new Set;for(const[e,n]of this.getAttributes())t.get(e)!==n&&this._removeAttribute(e,!1);for(const[n,i]of t)this._setAttribute(n,i,!1)&&e.add(n);return e}*_getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())e.startsWith(Zo)&&(yield[e.substr(Zo.length),t.getAttribute(e)])}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;let n=null;if(this.isCollapsed){const e=t.textNode?t.textNode:t.nodeBefore,i=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(n=er(e)),n||(n=er(i)),!this.isGravityOverridden&&!n){let t=e;for(;t&&!n;)n=er(t=t.previousSibling)}if(!n){let t=i;for(;t&&!n;)n=er(t=t.nextSibling)}n||(n=this._getStoredAttributes())}else{const t=this.getFirstRange();for(const i of t){if(i.item.is("element")&&e.isObject(i.item))break;if("text"==i.type){n=i.item.getAttributes();break}}}return n}_fixGraveyardSelection(t,e){const n=e.clone(),i=this._model.schema.getNearestSelectionRange(n),o=this._ranges.indexOf(t);if(this._ranges.splice(o,1),t.detach(),i){const t=this._prepareRange(i);this._ranges.splice(o,0,t)}}}function er(t){return t instanceof Ro||t instanceof Oo?t.getAttributes():null}class nr{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}var ir=function(t){return ue(t,5)};class or extends nr{elementToElement(t){return this.add(function(t){return(t=ir(t)).view=sr(t.view,"container"),e=>{e.on("insert:"+t.model,function(t){return(e,n,i)=>{const o=t(n.item,i.writer);if(!o)return;if(!i.consumable.consume(n.item,"insert"))return;const r=i.mapper.toViewPosition(n.range.start);i.mapper.bindElements(n.item,o),i.writer.insert(r,o)}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}attributeToElement(t){return this.add(function(t){let e="attribute:"+((t=ir(t)).model.key?t.model.key:t.model);if(t.model.name&&(e+=":"+t.model.name),t.model.values)for(const e of t.model.values)t.view[e]=sr(t.view[e],"attribute");else t.view=sr(t.view,"attribute");const n=ar(t);return i=>{i.on(e,function(t){return(e,n,i)=>{const o=t(n.attributeOldValue,i.writer),r=t(n.attributeNewValue,i.writer);if(!o&&!r)return;if(!i.consumable.consume(n.item,e.name))return;const s=i.writer,a=s.document.selection;if(n.item instanceof $o||n.item instanceof Xo)s.wrap(a.getFirstRange(),r);else{let t=i.mapper.toViewRange(n.range);null!==n.attributeOldValue&&o&&(t=s.unwrap(t,o)),null!==n.attributeNewValue&&r&&s.wrap(t,r)}}}(n),{priority:t.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(t){let e="attribute:"+((t=ir(t)).model.key?t.model.key:t.model);if(t.model.name&&(e+=":"+t.model.name),t.model.values)for(const e of t.model.values)t.view[e]=cr(t.view[e]);else t.view=cr(t.view);const n=ar(t);return i=>{i.on(e,function(t){return(e,n,i)=>{const o=t(n.attributeOldValue,n),r=t(n.attributeNewValue,n);if(!o&&!r)return;if(!i.consumable.consume(n.item,e.name))return;const s=i.mapper.toViewElement(n.item),a=i.writer;if(!s)throw new be.b("conversion-attribute-to-attribute-on-text: Trying to convert text node's attribute with attribute-to-attribute converter.",[n,i]);if(null!==n.attributeOldValue&&o)if("class"==o.key){const t=Array.isArray(o.value)?o.value:[o.value];for(const e of t)a.removeClass(e,s)}else if("style"==o.key){const t=Object.keys(o.value);for(const e of t)a.removeStyle(e,s)}else a.removeAttribute(o.key,s);if(null!==n.attributeNewValue&&r)if("class"==r.key){const t=Array.isArray(r.value)?r.value:[r.value];for(const e of t)a.addClass(e,s)}else if("style"==r.key){const t=Object.keys(r.value);for(const e of t)a.setStyle(e,r.value[e],s)}else a.setAttribute(r.key,r.value,s)}}(n),{priority:t.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(t){return(t=ir(t)).view=sr(t.view,"ui"),e=>{e.on("addMarker:"+t.model,function(t){return(e,n,i)=>{n.isOpening=!0;const o=t(n,i.writer);n.isOpening=!1;const r=t(n,i.writer);if(!o||!r)return;const s=n.markerRange;if(s.isCollapsed&&!i.consumable.consume(s,e.name))return;for(const t of s)if(!i.consumable.consume(t.item,e.name))return;const a=i.mapper,c=i.writer;c.insert(a.toViewPosition(s.start),o),i.mapper.bindElementToMarker(o,n.markerName),s.isCollapsed||(c.insert(a.toViewPosition(s.end),r),i.mapper.bindElementToMarker(r,n.markerName)),e.stop()}}(t.view),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,(t.view,(t,e,n)=>{const i=n.mapper.markerNameToElements(e.markerName);if(i){for(const t of i)n.mapper.unbindElementFromMarkerName(t,e.markerName),n.writer.clear(n.writer.createRangeOn(t),t);n.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{e.on("addMarker:"+t.model,function(t){return(e,n,i)=>{if(!n.item)return;if(!(n.item instanceof $o||n.item instanceof Xo||n.item.is("textProxy")))return;const o=lr(t,n,i);if(!o)return;if(!i.consumable.consume(n.item,e.name))return;const r=rr(o),s=i.writer,a=s.document.selection;if(n.item instanceof $o||n.item instanceof Xo)s.wrap(a.getFirstRange(),r,a);else{const t=i.mapper.toViewRange(n.range),e=s.wrap(t,r);for(const t of e.getItems())if(t.is("attributeElement")&&t.isSimilar(r)){i.mapper.bindElementToMarker(t,n.markerName);break}}}}(t.view),{priority:t.converterPriority||"normal"}),e.on("addMarker:"+t.model,function(t){return(e,n,i)=>{if(!n.item)return;if(!(n.item instanceof Lo))return;const o=lr(t,n,i);if(!o)return;if(!i.consumable.test(n.item,e.name))return;const r=i.mapper.toViewElement(n.item);if(r&&r.getCustomProperty("addHighlight")){i.consumable.consume(n.item,e.name);for(const t of Fo._createIn(n.item))i.consumable.consume(t.item,e.name);r.getCustomProperty("addHighlight")(r,o,i.writer),i.mapper.bindElementToMarker(r,n.markerName)}}}(t.view),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,function(t){return(e,n,i)=>{if(n.markerRange.isCollapsed)return;const o=lr(t,n,i);if(!o)return;const r=rr(o),s=i.mapper.markerNameToElements(n.markerName);if(s){for(const t of s)i.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("attributeElement")?i.writer.unwrap(i.writer.createRangeOn(t),r):t.getCustomProperty("removeHighlight")(t,o.id,i.writer);i.writer.clearClonedElementsGroup(n.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}}function rr(t){const e=new Cn("span",t.attributes);return t.classes&&e._addClass(t.classes),t.priority&&(e._priority=t.priority),e._id=t.id,e}function sr(t,e){return"function"==typeof t?t:(n,i)=>(function(t,e,n){let i;"string"==typeof t&&(t={name:t});const o=Object.assign({},t.attributes);if("container"==n)i=e.createContainerElement(t.name,o);else if("attribute"==n){const n={priority:t.priority||Cn.DEFAULT_PRIORITY};i=e.createAttributeElement(t.name,o,n)}else i=e.createUIElement(t.name,o);if(t.styles){const n=Object.keys(t.styles);for(const o of n)e.setStyle(o,t.styles[o],i)}if(t.classes){const n=t.classes;if("string"==typeof n)e.addClass(n,i);else for(const t of n)e.addClass(t,i)}return i})(t,i,e)}function ar(t){return t.model.values?(e,n)=>{const i=t.view[e];return i?i(e,n):null}:t.view}function cr(t){return"string"==typeof t?e=>({key:t,value:e}):"object"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function lr(t,e,n){const i="function"==typeof t?t(e,n):t;return i?(i.priority||(i.priority=10),i.id||(i.id=e.markerName),i):null}class dr extends nr{elementToElement(t){return this.add(hr(t))}elementToAttribute(t){return this.add(function(t){fr(t=ir(t));const e=gr(t,!1),n=ur(t),i=n?"element:"+n:"element";return n=>{n.on(i,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){let e=null;("string"==typeof(t=ir(t)).view||t.view.key)&&(e=function(t){"string"==typeof t.view&&(t.view={key:t.view});const e=t.view.key;let n;return n="class"==e||"style"==e?{["class"==e?"classes":"styles"]:t.view.value}:{attributes:{[e]:void 0===t.view.value?/[\s\S]*/:t.view.value}},t.view.name&&(n.name=t.view.name),t.view=n,e}(t)),fr(t,e);const n=gr(t,!0);return e=>{e.on("element",n,{priority:t.converterPriority||"low"})}}(t))}elementToMarker(t){return this.add(function(t){return function(t){const e=t.model;t.model=(t,n)=>{const i="string"==typeof e?e:e(t);return n.createElement("$marker",{"data-name":i})}}(t=ir(t)),hr(t)}(t))}}function hr(t){const e=function(t){const e=t.view?new ze(t.view):null;return(n,i,o)=>{let r={};if(e){const t=e.match(i.viewItem);if(!t)return;r=t.match}r.name=!0;const s=function(t,e,n){return t instanceof Function?t(e,n):n.createElement(t)}(t.model,i.viewItem,o.writer);if(!s)return;if(!o.consumable.test(i.viewItem,r))return;const a=o.splitToAllowedParent(s,i.modelCursor);if(!a)return;o.writer.insert(s,a.position),o.convertChildren(i.viewItem,o.writer.createPositionAt(s,0)),o.consumable.consume(i.viewItem,r);const c=o.getSplitParts(s);i.modelRange=new Fo(o.writer.createPositionBefore(s),o.writer.createPositionAfter(c[c.length-1])),a.cursorParent?i.modelCursor=o.writer.createPositionAt(a.cursorParent,0):i.modelCursor=i.modelRange.end}}(t=ir(t)),n=ur(t),i=n?"element:"+n:"element";return n=>{n.on(i,e,{priority:t.converterPriority||"normal"})}}function ur(t){return"string"==typeof t.view?t.view:"object"==typeof t.view&&"string"==typeof t.view.name?t.view.name:null}function fr(t,e=null){const n=null===e||(t=>t.getAttribute(e)),i="object"!=typeof t.model?t.model:t.model.key,o="object"!=typeof t.model||void 0===t.model.value?n:t.model.value;t.model={key:i,value:o}}function gr(t,e){const n=new ze(t.view);return(i,o,r)=>{const s=n.match(o.viewItem);if(!s)return;const a=t.model.key,c="function"==typeof t.model.value?t.model.value(o.viewItem):t.model.value;null!==c&&(function(t){return!("object"==typeof t.view&&!ur(t)||t.view.classes||t.view.attributes||t.view.styles)}(t)?s.match.name=!0:delete s.match.name,r.consumable.test(o.viewItem,s.match)&&(o.modelRange||(o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor))),function(t,e,n,i){let o=!1;for(const r of Array.from(t.getItems({shallow:n})))i.schema.checkAttribute(r,e.key)&&(i.writer.setAttribute(e.key,e.value,r),o=!0);return o}(o.modelRange,{key:a,value:c},e,r)&&r.consumable.consume(o.viewItem,s.match)))}}class mr{constructor(t){this.model=t,this.view=new Eo,this.mapper=new Uo,this.downcastDispatcher=new Wo({mapper:this.mapper});const e=this.model.document,n=e.selection,i=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(e,"change",()=>{this.view.change(t=>{this.downcastDispatcher.convertChanges(e.differ,i,t),this.downcastDispatcher.convertSelection(n,i,t)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(t,e){return(n,i)=>{const o=i.newSelection,r=new $o,s=[];for(const t of o.getRanges())s.push(e.toModelRange(t));r.setTo(s,{backward:o.isBackward}),r.isEqual(t.document.selection)||t.change(t=>{t.setSelection(r)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(t,e,n)=>{if(!n.consumable.consume(e.item,"insert"))return;const i=n.writer,o=n.mapper.toViewPosition(e.range.start),r=i.createText(e.item.data);i.insert(o,r)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(t,e,n)=>{const i=n.mapper.toViewPosition(e.position),o=e.position.getShiftedBy(e.length),r=n.mapper.toViewPosition(o,{isPhantom:!0}),s=n.writer.createRange(i,r),a=n.writer.remove(s.getTrimmed());for(const t of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(t)},{priority:"low"}),this.downcastDispatcher.on("selection",(t,e,n)=>{const i=n.writer,o=i.document.selection;for(const t of o.getRanges())t.isCollapsed&&t.end.parent.document&&n.writer.mergeAttributes(t.start);i.setSelection(null)},{priority:"low"}),this.downcastDispatcher.on("selection",(t,e,n)=>{const i=e.selection;if(i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=[];for(const t of i.getRanges()){const e=n.mapper.toViewRange(t);o.push(e)}n.writer.setSelection(o,{backward:i.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(t,e,n)=>{const i=e.selection;if(!i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=n.writer,r=i.getFirstPosition(),s=n.mapper.toViewPosition(r),a=o.breakAttributes(s);o.setSelection(a)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(t=>{if("$graveyard"==t.rootName)return null;const e=new mn(t.name);return e.rootName=t.rootName,e._document=this.view.document,this.mapper.bindElements(t,e),e})}destroy(){this.view.destroy(),this.stopListening()}}Ie(mr,sn);class pr{constructor(t,e=[]){this._editor=t,this._availablePlugins=new Map,this._plugins=new Map;for(const t of e)this._availablePlugins.set(t,t),t.pluginName&&this._availablePlugins.set(t.pluginName,t)}*[Symbol.iterator](){for(const t of this._plugins)"function"==typeof t[0]&&(yield t)}get(t){const e=this._plugins.get(t);if(!e){const e="plugincollection-plugin-not-loaded: The requested plugin is not loaded.";let n=t;throw"function"==typeof t&&(n=t.pluginName||t.name),new be.b(e,this._editor,{plugin:n})}return e}has(t){return this._plugins.has(t)}init(t,e=[]){const n=this,i=this._editor,o=new Set,r=[],s=h(t),a=h(e),c=function(t){const e=[];for(const n of t)d(n)||e.push(n);return e.length?e:null}(t);if(c){const t="plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";return console.error(Object(be.a)(t),{plugins:c}),Promise.reject(new be.b(t,this._editor,{plugins:c}))}return Promise.all(s.map((function t(s){if(!a.includes(s)&&!n._plugins.has(s)&&!o.has(s))return function(s){return new Promise(a=>{o.add(s),s.requires&&s.requires.forEach(n=>{const o=d(n);if(e.includes(o))throw new be.b("plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.",i,{plugin:o,requiredBy:s});t(o)});const c=new s(i);n._add(s,c),r.push(c),a()})}(s).catch(t=>{throw console.error(Object(be.a)("plugincollection-load: It was not possible to load the plugin."),{plugin:s}),t})}))).then(()=>l(r,"init")).then(()=>l(r,"afterInit")).then(()=>r);function l(t,e){return t.reduce((t,n)=>n[e]?t.then(n[e].bind(n)):t,Promise.resolve())}function d(t){return"function"==typeof t?t:n._availablePlugins.get(t)}function h(t){return t.map(t=>d(t)).filter(t=>!!t)}}destroy(){const t=Array.from(this).map(([,t])=>t).filter(t=>"function"==typeof t.destroy).map(t=>t.destroy());return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const n=t.pluginName;if(n){if(this._plugins.has(n))throw new be.b("plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:t});this._plugins.set(n,e)}}}Ie(pr,Ae);class br{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const n=this.get(t);if(!n)throw new be.b("commandcollection-command-not-found: Command does not exist.",this,{commandName:t});n.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const wr=["ar","fa","he","ku","ug"];class kr{constructor(t={}){this.uiLanguage=t.uiLanguage||"en",this.contentLanguage=t.contentLanguage||this.uiLanguage,this.uiLanguageDirection=_r(this.uiLanguage),this.contentLanguageDirection=_r(this.contentLanguage),this.t=(...t)=>this._t(...t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(t,e){let n=function(t,e){const n=Object.keys(window.CKEDITOR_TRANSLATIONS).length;return 1===n&&(t=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0!==n&&function(t,e){return t in window.CKEDITOR_TRANSLATIONS&&e in window.CKEDITOR_TRANSLATIONS[t]}(t,e)?window.CKEDITOR_TRANSLATIONS[t][e].replace(/ \[context: [^\]]+\]$/,""):e.replace(/ \[context: [^\]]+\]$/,"")}(this.uiLanguage,t);return e&&(n=n.replace(/%(\d+)/g,(t,n)=>n{e[0]=new Ar(e[0])},{priority:"highest"}),this.on("checkChild",(t,e)=>{e[0]=new Ar(e[0]),e[1]=this.getDefinition(e[1])},{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t])throw new be.b("schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},e)],this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t])throw new be.b("schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},e)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let e;return e="string"==typeof t?t:t.is&&(t.is("text")||t.is("textProxy"))?"$text":t.name,this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!(!e||!e.isBlock)}isLimit(t){const e=this.getDefinition(t);return!(!e||!e.isLimit&&!e.isObject)}isObject(t){const e=this.getDefinition(t);return!(!e||!e.isObject)}isInline(t){const e=this.getDefinition(t);return!(!e||!e.isInline)}checkChild(t,e){return!!e&&this._checkContextMatch(e,t)}checkAttribute(t,e){const n=this.getDefinition(t.last);return!!n&&n.allowAttributes.includes(e)}checkMerge(t,e=null){if(t instanceof Bo){const e=t.nodeBefore,n=t.nodeAfter;if(!(e instanceof Lo))throw new be.b("schema-check-merge-no-element-before: The node before the merge position must be an element.",this);if(!(n instanceof Lo))throw new be.b("schema-check-merge-no-element-after: The node after the merge position must be an element.",this);return this.checkMerge(e,n)}for(const n of e.getChildren())if(!this.checkChild(t,n))return!1;return!0}addChildCheck(t){this.on("checkChild",(e,[n,i])=>{if(!i)return;const o=t(n,i);"boolean"==typeof o&&(e.stop(),e.return=o)},{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",(e,[n,i])=>{const o=t(n,i);"boolean"==typeof o&&(e.stop(),e.return=o)},{priority:"high"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;for(e=t instanceof Bo?t.parent:(t instanceof Fo?[t]:Array.from(t.getRanges())).reduce((t,e)=>{const n=e.getCommonAncestor();return t?t.getCommonAncestor(n,{includeSelf:!0}):n},null);!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const n=[...t.getFirstPosition().getAncestors(),new Oo("",t.getAttributes())];return this.checkAttribute(n,e)}{const n=t.getRanges();for(const t of n)for(const n of t)if(this.checkAttribute(n.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const n of t)yield*this._getValidRangesForRange(n,e)}getNearestSelectionRange(t,e="both"){if(this.checkChild(t,"$text"))return new Fo(t);let n,i;"both"!=e&&"backward"!=e||(n=new jo({startPosition:t,direction:"backward"})),"both"!=e&&"forward"!=e||(i=new jo({startPosition:t}));for(const t of function*(t,e){let n=!1;for(;!n;){if(n=!0,t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}}}(n,i)){const e=t.walker==n?"elementEnd":"elementStart",i=t.value;if(i.type==e&&this.isObject(i.item))return Fo._createOn(i.item);if(this.checkChild(i.nextPosition,"$text"))return new Fo(i.nextPosition)}return null}findAllowedParent(t,e){let n=t.parent;for(;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n))return null;n=n.parent}return null}removeDisallowedAttributes(t,e){for(const n of t){for(const t of n.getAttributeKeys())this.checkAttribute(n,t)||e.removeAttribute(t,n);n.is("element")&&this.removeDisallowedAttributes(n.getChildren(),e)}}createContext(t){return new Ar(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,n=Object.keys(e);for(const i of n)t[i]=Tr(e[i],i);for(const e of n)Cr(t,e);for(const e of n)Pr(t,e);for(const e of n)Sr(t,e),Mr(t,e);for(const e of n)Er(t,e),Ir(t,e);this._compiledDefinitions=t}_checkContextMatch(t,e,n=e.length-1){const i=e.getItem(n);if(t.allowIn.includes(i.name)){if(0==n)return!0;{const t=this.getDefinition(i);return this._checkContextMatch(t,e,n-1)}}return!1}*_getValidRangesForRange(t,e){let n=t.start,i=t.start;for(const o of t.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(Fo._createIn(o),e)),this.checkAttribute(o,e)||(n.isEqual(i)||(yield new Fo(n,i)),n=Bo._createAfter(o)),i=Bo._createAfter(o);n.isEqual(i)||(yield new Fo(n,i))}}Ie(xr,sn);class Ar{constructor(t){if(t instanceof Ar)return t;"string"==typeof t?t=[t]:Array.isArray(t)||(t=t.getAncestors({includeSelf:!0})),t[0]&&"string"!=typeof t[0]&&t[0].is("documentFragment")&&t.shift(),this._items=t.map(Rr)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new Ar([t]);return e._items=[...this._items,...e._items],e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map(t=>t.name)}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}}function Tr(t,e){const n={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return function(t,e){for(const n of t){const t=Object.keys(n).filter(t=>t.startsWith("is"));for(const i of t)e[i]=n[i]}}(t,n),Nr(t,n,"allowIn"),Nr(t,n,"allowContentOf"),Nr(t,n,"allowWhere"),Nr(t,n,"allowAttributes"),Nr(t,n,"allowAttributesOf"),Nr(t,n,"inheritTypesFrom"),function(t,e){for(const n of t){const t=n.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,n),n}function Cr(t,e){for(const n of t[e].allowContentOf)t[n]&&Or(t,n).forEach(t=>{t.allowIn.push(e)});delete t[e].allowContentOf}function Pr(t,e){for(const n of t[e].allowWhere){const i=t[n];if(i){const n=i.allowIn;t[e].allowIn.push(...n)}}delete t[e].allowWhere}function Sr(t,e){for(const n of t[e].allowAttributesOf){const i=t[n];if(i){const n=i.allowAttributes;t[e].allowAttributes.push(...n)}}delete t[e].allowAttributesOf}function Mr(t,e){const n=t[e];for(const e of n.inheritTypesFrom){const i=t[e];if(i){const t=Object.keys(i).filter(t=>t.startsWith("is"));for(const e of t)e in n||(n[e]=i[e])}}delete n.inheritTypesFrom}function Er(t,e){const n=t[e],i=n.allowIn.filter(e=>t[e]);n.allowIn=Array.from(new Set(i))}function Ir(t,e){const n=t[e];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function Nr(t,e,n){for(const i of t)"string"==typeof i[n]?e[n].push(i[n]):Array.isArray(i[n])&&e[n].push(...i[n])}function Or(t,e){const n=t[e];return function(t){return Object.keys(t).map(e=>t[e])}(t).filter(t=>t.allowIn.includes(n.name))}function Rr(t){return"string"==typeof t?{name:t,*getAttributeKeys(){},getAttribute(){}}:{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute:e=>t.getAttribute(e)}}class Dr{constructor(t={}){this._splitParts=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},t),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(t,e,n=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(t,e){let n;for(const i of new Ar(t)){const t={};for(const e of i.getAttributeKeys())t[e]=i.getAttribute(e);const o=e.createElement(i.name,t);n&&e.append(o,n),n=Bo._createAt(o,0)}return n}(n,e),this.conversionApi.writer=e,this.conversionApi.consumable=vr.createFrom(t),this.conversionApi.store={};const{modelRange:i}=this._convertItem(t,this._modelCursor),o=e.createDocumentFragment();if(i){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,o);o.markers=function(t,e){const n=new Set,i=new Map,o=Fo._createIn(t).getItems();for(const t of o)"$marker"==t.name&&n.add(t);for(const t of n){const n=t.getAttribute("data-name"),o=e.createPositionBefore(t);i.has(n)?i.get(n).end=o.clone():i.set(n,new Fo(o.clone())),e.remove(t)}return i}(o,e)}return this._modelCursor=null,this._splitParts.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(t,e){const n=Object.assign({viewItem:t,modelCursor:e,modelRange:null});if(t.is("element")?this.fire("element:"+t.name,n,this.conversionApi):t.is("text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof Fo))throw new be.b("view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(t,e){const n=new Fo(e);let i=e;for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,i);t.modelRange instanceof Fo&&(n.end=t.modelRange.end,i=t.modelCursor)}return{modelRange:n,modelCursor:i}}_splitToAllowedParent(t,e){const n=this.conversionApi.schema.findAllowedParent(e,t);if(!n)return null;if(n===e.parent)return{position:e};if(this._modelCursor.parent.getAncestors().includes(n))return null;const i=this.conversionApi.writer.split(e,n),o=[];for(const t of i.range.getWalker())if("elementEnd"==t.type)o.push(t.item);else{const e=o.pop(),n=t.item;this._registerSplitPair(e,n)}return{position:i.position,cursorParent:i.range.end.parent}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const n=this._splitParts.get(t);this._splitParts.set(e,n),n.push(e)}_getSplitParts(t){return this._splitParts.has(t)?this._splitParts.get(t):[t]}_removeEmptyElements(){let t=!1;for(const e of this._splitParts.keys())e.isEmpty&&(this.conversionApi.writer.remove(e),this._splitParts.delete(e),t=!0);t&&this._removeEmptyElements()}}Ie(Dr,Ae);class Lr{constructor(t,e){this.model=t,this.processor=e,this.mapper=new Uo,this.downcastDispatcher=new Wo({mapper:this.mapper}),this.downcastDispatcher.on("insert:$text",(t,e,n)=>{if(!n.consumable.consume(e.item,"insert"))return;const i=n.writer,o=n.mapper.toViewPosition(e.range.start),r=i.createText(e.item.data);i.insert(o,r)},{priority:"lowest"}),this.upcastDispatcher=new Dr({schema:t.schema}),this.upcastDispatcher.on("text",(t,e,n)=>{if(n.schema.checkChild(e.modelCursor,"$text")&&n.consumable.consume(e.viewItem)){const t=n.writer.createText(e.viewItem.data);n.writer.insert(t,e.modelCursor),e.modelRange=Fo._createFromPositionAndShift(e.modelCursor,t.offsetSize),e.modelCursor=e.modelRange.end}},{priority:"lowest"}),this.upcastDispatcher.on("element",(t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:i}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=i}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:i}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=i}},{priority:"lowest"}),this.decorate("init"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"})}get(t){const{rootName:e="main",trim:n="empty"}=t||{};if(!this._checkIfRootsExists([e]))throw new be.b("datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.",this);const i=this.model.document.getRoot(e);return"empty"!==n||this.model.hasContent(i,{ignoreWhitespaces:!0})?this.stringify(i):""}stringify(t){const e=this.toView(t);return this.processor.toData(e)}toView(t){this.mapper.clearBindings();const e=Fo._createIn(t),n=new Fn,i=new Un(new An);if(this.mapper.bindElements(t,n),this.downcastDispatcher.convertInsert(e,i),!t.is("documentFragment")){const e=function(t){const e=[],n=t.root.document;if(!n)return[];const i=Fo._createIn(t);for(const t of n.model.markers){const n=i.getIntersection(t.getRange());n&&e.push([t.name,n])}return e}(t);for(const[t,n]of e)this.downcastDispatcher.convertMarkerAdd(t,n,i)}return n}init(t){if(this.model.document.version)throw new be.b("datacontroller-init-document-not-empty: Trying to set initial data to not empty document.",this);let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new be.b("datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.",this);return this.model.enqueueChange("transparent",t=>{for(const n of Object.keys(e)){const i=this.model.document.getRoot(n);t.insert(this.parse(e[n],i),i,0)}}),Promise.resolve()}set(t){let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new be.b("datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.",this);this.model.enqueueChange("transparent",t=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const n of Object.keys(e)){const i=this.model.document.getRoot(n);t.remove(t.createRangeIn(i)),t.insert(this.parse(e[n],i),i,0)}})}parse(t,e="$root"){const n=this.processor.toView(t);return this.toModel(n,e)}toModel(t,e="$root"){return this.model.change(n=>this.upcastDispatcher.convert(t,n,e))}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t)if(!this.model.document.getRootNames().includes(e))return!1;return!0}}Ie(Lr,sn);class jr{constructor(t,e){this._helpers=new Map,this._downcast=Array.isArray(t)?t:[t],this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Array.isArray(e)?e:[e],this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const n=this._downcast.includes(e);if(!this._upcast.includes(e)&&!n)throw new be.b("conversion-add-alias-dispatcher-not-registered: Trying to register and alias for a dispatcher that nas not been registered.",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:n})}for(t){if(!this._helpers.has(t))throw new be.b("conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:n}of Vr(t))this.for("upcast").elementToElement({model:e,view:n,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:n}of Vr(t))this.for("upcast").elementToAttribute({view:n,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:n}of Vr(t))this.for("upcast").attributeToAttribute({view:n,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:n}){if(this._helpers.has(t))throw new be.b("conversion-group-exists: Trying to register a group name that has already been registered.",this);const i=n?new or(e):new dr(e);this._helpers.set(t,i)}}function*Vr(t){if(t.model.values)for(const e of t.model.values)yield*zr({key:t.model.key,value:e},t.view[e],t.upcastAlso?t.upcastAlso[e]:void 0);else yield*zr(t.model,t.view,t.upcastAlso)}function*zr(t,e,n){if(yield{model:t,view:e},n){n=Array.isArray(n)?n:[n];for(const e of n)yield{model:t,view:e}}}class Br{constructor(t="default"){this.operations=[],this.type=t}get baseVersion(){for(const t of this.operations)if(null!==t.baseVersion)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}class Fr{constructor(t){this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return"Operation"}static fromJSON(t){return new this(t.baseVersion)}}class Ur{constructor(t){this.markers=new Map,this._children=new Do,t&&this._insertChild(0,t)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(t){return"documentFragment"==t||"model:documentFragment"==t}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children)t.push(e.toJSON());return t}static fromJSON(t){const e=[];for(const n of t)n.name?e.push(Lo.fromJSON(n)):e.push(Oo.fromJSON(n));return new Ur(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){return"string"==typeof t?[new Oo(t)]:(Ve(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new Oo(t):t instanceof Ro?new Oo(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}}function Hr(t,e){const n=(e=Yr(e)).reduce((t,e)=>t+e.offsetSize,0),i=t.parent;Gr(t);const o=t.index;return i._insertChild(o,e),$r(i,o+e.length),$r(i,o),new Fo(t,t.getShiftedBy(n))}function qr(t){if(!t.isFlat)throw new be.b("operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.",this);const e=t.start.parent;Gr(t.start),Gr(t.end);const n=e._removeChildren(t.start.index,t.end.index-t.start.index);return $r(e,t.start.index),n}function Wr(t,e){if(!t.isFlat)throw new be.b("operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.",this);const n=qr(t);return Hr(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),n)}function Yr(t){const e=[];t instanceof Array||(t=[t]);for(let n=0;nt.maxOffset)throw new be.b("move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.",this);if(t===e&&n=n&&this.targetPosition.path[t]t._clone(!0))),e=new ts(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new Bo(t,[0]);return new Xr(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffsett._clone(!0))),Hr(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return"InsertOperation"}static fromJSON(t,e){const n=[];for(const e of t.nodes)e.name?n.push(Lo.fromJSON(e)):n.push(Oo.fromJSON(e));const i=new ts(Bo.fromJSON(t.position,e),n,t.baseVersion);return i.shouldReceiveAttributes=t.shouldReceiveAttributes,i}}class es extends Fr{constructor(t,e,n,i,o,r){super(r),this.name=t,this.oldRange=e?e.clone():null,this.newRange=n?n.clone():null,this.affectsData=o,this._markers=i}get type(){return"marker"}clone(){return new es(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new es(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const t=this.newRange?"_set":"_remove";this._markers[t](this.name,this.newRange,!0,this.affectsData)}toJSON(){const t=super.toJSON();return this.oldRange&&(t.oldRange=this.oldRange.toJSON()),this.newRange&&(t.newRange=this.newRange.toJSON()),delete t._markers,t}static get className(){return"MarkerOperation"}static fromJSON(t,e){return new es(t.name,t.oldRange?Fo.fromJSON(t.oldRange,e):null,t.newRange?Fo.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}class ns extends Fr{constructor(t,e,n,i){super(i),this.position=t,this.position.stickiness="toNext",this.oldName=e,this.newName=n}get type(){return"rename"}clone(){return new ns(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new ns(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof Lo))throw new be.b("rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.",this);if(t.name!==this.oldName)throw new be.b("rename-operation-wrong-name: Element to change has different name than operation's old name.",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t}static get className(){return"RenameOperation"}static fromJSON(t,e){return new ns(Bo.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}class is extends Fr{constructor(t,e,n,i,o){super(o),this.root=t,this.key=e,this.oldValue=n,this.newValue=i}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new is(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new is(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new be.b("rootattribute-operation-not-a-root: The element to change is not a root element.",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new be.b("rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new be.b("rootattribute-operation-attribute-exists: The attribute with given key already exists.",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const t=super.toJSON();return t.root=this.root.toJSON(),t}static get className(){return"RootAttributeOperation"}static fromJSON(t,e){if(!e.getRoot(t.root))throw new be.b("rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.",this,{rootName:t.root});return new is(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class os extends Fr{constructor(t,e,n,i,o){super(o),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=e,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=i.clone()}get type(){return"merge"}get deletionPosition(){return new Bo(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Fo(this.sourcePosition,t)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this),e=this.sourcePosition.path.slice(0,-1),n=new Bo(this.sourcePosition.root,e)._getTransformedByMergeOperation(this),i=new rs(t,this.howMany,this.graveyardPosition,this.baseVersion+1);return i.insertionPosition=n,i}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent;if(!t.parent)throw new be.b("merge-operation-source-position-invalid: Merge source position is invalid.",this);if(!e.parent)throw new be.b("merge-operation-target-position-invalid: Merge target position is invalid.",this);if(this.howMany!=t.maxOffset)throw new be.b("merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.",this)}_execute(){const t=this.sourcePosition.parent;Wr(Fo._createIn(t),this.targetPosition),Wr(Fo._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=t.sourcePosition.toJSON(),t.targetPosition=t.targetPosition.toJSON(),t.graveyardPosition=t.graveyardPosition.toJSON(),t}static get className(){return"MergeOperation"}static fromJSON(t,e){const n=Bo.fromJSON(t.sourcePosition,e),i=Bo.fromJSON(t.targetPosition,e),o=Bo.fromJSON(t.graveyardPosition,e);return new this(n,t.howMany,i,o,t.baseVersion)}}class rs extends Fr{constructor(t,e,n,i){super(i),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=e,this.insertionPosition=rs.getInsertionPosition(t),this.insertionPosition.stickiness="toNone",this.graveyardPosition=n?n.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new Bo(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Fo(this.splitPosition,t)}clone(){const t=new this.constructor(this.splitPosition,this.howMany,this.graveyardPosition,this.baseVersion);return t.insertionPosition=this.insertionPosition,t}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new Bo(t,[0]);return new os(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof Fo)for(const n of t.getItems())e(n);else e(t)}move(t,e,n){if(this._assertWriterUsedCorrectly(),!(t instanceof Fo))throw new be.b("writer-move-invalid-range: Invalid range to move.",this);if(!t.isFlat)throw new be.b("writer-move-range-not-flat: Range to move is not flat.",this);const i=Bo._createAt(e,n);if(i.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!us(t.root,i.root))throw new be.b("writer-move-different-document: Range is going to be moved between different documents.",this);const o=t.root.document?t.root.document.version:null,r=new Xr(t.start,t.end.offset-t.start.offset,i,o);this.batch.addOperation(r),this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof Fo?t:Fo._createOn(t)).getMinimalFlatRanges().reverse();for(const t of e)this._addOperationForAffectedMarkers("move",t),hs(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,n=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(e instanceof Lo))throw new be.b("writer-merge-no-element-before: Node before merge position must be an element.",this);if(!(n instanceof Lo))throw new be.b("writer-merge-no-element-after: Node after merge position must be an element.",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,n){return this.model.createPositionFromPath(t,e,n)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(t,e,n){return this.model.createSelection(t,e,n)}_mergeDetached(t){const e=t.nodeBefore,n=t.nodeAfter;this.move(Fo._createIn(n),Bo._createAt(e,"end")),this.remove(n)}_merge(t){const e=Bo._createAt(t.nodeBefore,"end"),n=Bo._createAt(t.nodeAfter,0),i=t.root.document.graveyard,o=new Bo(i,[0]),r=t.root.document.version,s=new os(n,t.nodeAfter.maxOffset,e,o,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof Lo))throw new be.b("writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.",this);const n=t.root.document?t.root.document.version:null,i=new ns(Bo._createBefore(t),t.name,e,n);this.batch.addOperation(i),this.model.applyOperation(i)}split(t,e){this._assertWriterUsedCorrectly();let n,i,o=t.parent;if(!o.parent)throw new be.b("writer-split-element-no-parent: Element with no parent can not be split.",this);if(e||(e=o.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new be.b("writer-split-invalid-limit-element: Limit element is not a position ancestor.",this);do{const e=o.root.document?o.root.document.version:null,r=o.maxOffset-t.offset,s=new rs(t,r,null,e);this.batch.addOperation(s),this.model.applyOperation(s),n||i||(n=o,i=t.parent.nextSibling),o=(t=this.createPositionAfter(t.parent)).parent}while(o!==e);return{position:t,range:new Fo(Bo._createAt(n,"end"),Bo._createAt(i,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new be.b("writer-wrap-range-not-flat: Range to wrap is not flat.",this);const n=e instanceof Lo?e:new Lo(e);if(n.childCount>0)throw new be.b("writer-wrap-element-not-empty: Element to wrap with is not empty.",this);if(null!==n.parent)throw new be.b("writer-wrap-element-attached: Element to wrap with is already attached to tree model.",this);this.insert(n,t.start);const i=new Fo(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(i,Bo._createAt(n,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new be.b("writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.",this);this.move(Fo._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||"boolean"!=typeof e.usingOperation)throw new be.b("writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.",this);const n=e.usingOperation,i=e.range,o=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new be.b("writer-addMarker-marker-exists: Marker with provided name already exists.",this);if(!i)throw new be.b("writer-addMarker-no-range: Range parameter is required when adding a new marker.",this);return n?(ds(this,t,null,i,o),this.model.markers.get(t)):this.model.markers._set(t,i,n,o)}updateMarker(t,e){this._assertWriterUsedCorrectly();const n="string"==typeof t?t:t.name,i=this.model.markers.get(n);if(!i)throw new be.b("writer-updateMarker-marker-not-exists: Marker with provided name does not exists.",this);if(!e)return void this.model.markers._refresh(i);const o="boolean"==typeof e.usingOperation,r="boolean"==typeof e.affectsData,s=r?e.affectsData:i.affectsData;if(!o&&!e.range&&!r)throw new be.b("writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.",this);const a=i.getRange(),c=e.range?e.range:a;o&&e.usingOperation!==i.managedUsingOperations?e.usingOperation?ds(this,n,null,c,s):(ds(this,n,a,null,s),this.model.markers._set(n,c,void 0,s)):i.managedUsingOperations?ds(this,n,a,c,s):this.model.markers._set(n,c,void 0,s)}removeMarker(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new be.b("writer-removeMarker-no-marker: Trying to remove marker which does not exist.",this);const n=this.model.markers.get(e);n.managedUsingOperations?ds(this,e,n.getRange(),null,n.affectsData):this.model.markers._remove(e)}setSelection(t,e,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(t,e,n)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._setSelectionAttribute(t,e);else for(const[e,n]of Io(t))this._setSelectionAttribute(e,n)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._removeSelectionAttribute(t);else for(const e of t)this._removeSelectionAttribute(e)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const i=Xo._getStoreAttributeKey(t);this.setAttribute(i,e,n.anchor.parent)}n._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const n=Xo._getStoreAttributeKey(t);this.removeAttribute(n,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new be.b("writer-incorrect-use: Trying to use a writer outside the change() block.",this)}_addOperationForAffectedMarkers(t,e){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const i=n.getRange();let o=!1;if("move"==t)o=e.containsPosition(i.start)||e.start.isEqual(i.start)||e.containsPosition(i.end)||e.end.isEqual(i.end);else{const t=e.nodeBefore,n=e.nodeAfter,r=i.start.parent==t&&i.start.isAtEnd,s=i.end.parent==n&&0==i.end.offset,a=i.end.nodeAfter==n,c=i.start.nodeAfter==n;o=r||s||a||c}o&&this.updateMarker(n.name,{range:i})}}}function cs(t,e,n,i){const o=t.model,r=o.document;let s,a,c,l=i.start;for(const t of i.getWalker({shallow:!0}))c=t.item.getAttribute(e),s&&a!=c&&(a!=n&&d(),l=s),s=t.nextPosition,a=c;function d(){const i=new Fo(l,s),c=i.root.document?r.version:null,d=new Jr(i,e,a,n,c);t.batch.addOperation(d),o.applyOperation(d)}s instanceof Bo&&s!=l&&a!=n&&d()}function ls(t,e,n,i){const o=t.model,r=o.document,s=i.getAttribute(e);let a,c;if(s!=n){if(i.root===i){const t=i.document?r.version:null;c=new is(i,e,s,n,t)}else{const o=(a=new Fo(Bo._createBefore(i),t.createPositionAfter(i))).root.document?r.version:null;c=new Jr(a,e,s,n,o)}t.batch.addOperation(c),o.applyOperation(c)}}function ds(t,e,n,i,o){const r=t.model,s=r.document,a=new es(e,n,i,r.markers,o,s.version);t.batch.addOperation(a),r.applyOperation(a)}function hs(t,e,n,i){let o;if(t.root.document){const n=i.document,r=new Bo(n.graveyard,[0]);o=new Xr(t,e,r,n.version)}else o=new Zr(t,e);n.addOperation(o),i.applyOperation(o)}function us(t,e){return t===e||t instanceof ss&&e instanceof ss}class fs{constructor(t){this._markerCollection=t,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize);const e=Fo._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}this._cachedChanges=null}bufferOperation(t){switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),n=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),n||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=Fo._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const n=t.graveyardPosition.parent;this._markInsert(n,t.graveyardPosition.offset,1);const i=t.targetPosition.parent;this._isInInsertedElement(i)||this._markInsert(i,t.targetPosition.offset,e.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(t,e,n,i){const o=this._changedMarkers.get(t);o?(o.newRange=n,o.affectsData=i,null==o.oldRange&&null==o.newRange&&this._changedMarkers.delete(t)):this._changedMarkers.set(t,{oldRange:e,newRange:n,affectsData:i})}getMarkersToRemove(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.oldRange&&t.push({name:e,range:n.oldRange});return t}getMarkersToAdd(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.newRange&&t.push({name:e,range:n.newRange});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map(t=>({name:t[0],data:{oldRange:t[1].oldRange,newRange:t[1].newRange}}))}hasDataChanges(){for(const[,t]of this._changedMarkers)if(t.affectsData)return!0;return this._changesInElement.size>0}getChanges(t={includeChangesInGraveyard:!1}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();const e=[];for(const t of this._changesInElement.keys()){const n=this._changesInElement.get(t).sort((t,e)=>t.offset===e.offset?t.type!=e.type?"remove"==t.type?-1:1:0:t.offsett.position.root!=e.position.root?t.position.root.rootNamen.offset){if(i>o){const t={type:"attribute",offset:o,howMany:i-o,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=n.offset&&t.offseto?(t.nodesToHandle=i-o,t.offset=o):t.nodesToHandle=0);if("remove"==n.type&&t.offsetn.offset){const o={type:"attribute",offset:n.offset,howMany:i-n.offset,count:this._changeCount++};this._handleChange(o,e),e.push(o),t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}"attribute"==n.type&&(t.offset>=n.offset&&i<=o?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=n.offset&&i>=o&&(n.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,n){return{type:"insert",position:Bo._createAt(t,e),name:n,length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,n){return{type:"remove",position:Bo._createAt(t,e),name:n,length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,n){const i=[];n=new Map(n);for(const[o,r]of e){const e=n.has(o)?n.get(o):null;e!==r&&i.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++}),n.delete(o)}for(const[e,o]of n)i.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return i}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const n=this._changesInElement.get(e),i=t.startOffset;if(n)for(const t of n)if("insert"==t.type&&i>=t.offset&&ii){for(let e=0;e{const n=e[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new be.b("model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.",this,{operation:n})},{priority:"highest"}),this.listenTo(t,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:"high"}),this.listenTo(t,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&(this.version++,this.history.addOperation(n))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(t.markers,"update",(t,e,n,i)=>{this.differ.bufferMarkerChange(e.name,n,i,e.affectsData),null===n&&e.on("change",(t,n)=>{this.differ.bufferMarkerChange(e.name,n,e.getRange(),e.affectsData)})})}get graveyard(){return this.getRoot(_s)}createRoot(t="$root",e="main"){if(this.roots.get(e))throw new be.b("model-document-createRoot-name-exists: Root with specified name already exists.",this,{name:e});const n=new ss(this,t,e);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,t=>t.rootName).filter(t=>t!=_s)}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=Oe(this);return t.selection="[engine.model.DocumentSelection]",t.model="[engine.model.Model]",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",t.batch):this.fire("change",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const t of this.roots)if(t!==this.graveyard)return t;return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,n=e.schema,i=e.createPositionFromPath(t,[0]);return n.getNearestSelectionRange(i)||e.createRange(i)}_validateSelectionRange(t){return ys(t.start)&&ys(t.end)}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),e=n(t))break}while(e)}}function ys(t){const e=t.textNode;if(e){const n=e.data,i=t.offset-e.startOffset;return!ws(n,i)&&!ks(n,i)}return!0}Ie(vs,Ae);class xs{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){return this._markers.has(t)}get(t){return this._markers.get(t)||null}_set(t,e,n=!1,i=!1){const o=t instanceof As?t.name:t,r=this._markers.get(o);if(r){const t=r.getRange();let s=!1;return t.isEqual(e)||(r._attachLiveRange(Jo.fromRange(e)),s=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,s=!0),"boolean"==typeof i&&i!=r.affectsData&&(r._affectsData=i,s=!0),s&&this.fire("update:"+o,r,t,e),r}const s=Jo.fromRange(e),a=new As(o,s,n,i);return this._markers.set(o,a),this.fire("update:"+o,a,null,e),a}_remove(t){const e=t instanceof As?t.name:t,n=this._markers.get(e);return!!n&&(this._markers.delete(e),this.fire("update:"+e,n,n.getRange(),null),this._destroyMarker(n),!0)}_refresh(t){const e=t instanceof As?t.name:t,n=this._markers.get(e);if(!n)throw new be.b("markercollection-refresh-marker-not-exists: Marker with provided name does not exists.",this);const i=n.getRange();this.fire("update:"+e,n,i,i,n.managedUsingOperations,n.affectsData)}*getMarkersAtPosition(t){for(const e of this)e.getRange().containsPosition(t)&&(yield e)}*getMarkersIntersectingRange(t){for(const e of this)null!==e.getRange().getIntersection(t)&&(yield e)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values())e.name.startsWith(t+":")&&(yield e)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}Ie(xs,Ae);class As{constructor(t,e,n,i){this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=n,this._affectsData=i}get managedUsingOperations(){if(!this._liveRange)throw new be.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new be.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._affectsData}getStart(){if(!this._liveRange)throw new be.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new be.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new be.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.toRange()}is(t){return"marker"==t||"model:marker"==t}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate("change:range").to(this),t.delegate("change:content").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Ie(As,Ae);class Ts extends Bo{constructor(t,e,n="toNone"){if(super(t,e,n),!this.root.is("rootElement"))throw new be.b("model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.",t);(function(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&function(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",t)}}.call(this,n)},{priority:"low"})}).call(this)}detach(){this.stopListening()}is(t){return"livePosition"==t||"model:livePosition"==t||super.is(t)}toPosition(){return new Bo(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,e){return new this(t.root,t.path.slice(),e||t.stickiness)}}Ie(Ts,Ae);class Cs{constructor(t,e,n){this.model=t,this.writer=e,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(t,e){t=Array.from(t);for(let n=0;n!0);if(t.schema.checkChild(e.nextPosition,"$text"))return e.nextPosition}}function Is(t,e,n){const i=e+(n?0:-1);return Ms.includes(t.charAt(i))}function Ns(t,e,n){return e===(n?t.endOffset:0)}function Os(t,e){const n=[];Array.from(t.getItems({direction:"backward"})).map(t=>e.createRangeOn(t)).filter(e=>(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end))).forEach(t=>{n.push(t.start.parent),e.remove(t)}),n.forEach(t=>{let n=t;for(;n.parent&&n.isEmpty;){const t=e.createRangeOn(n);n=n.parent,e.remove(t)}})}function Rs(t,e){return t.isCollapsed?function(t,e){const n=t.start,i=e.getNearestSelectionRange(n);if(!i)return null;const o=i.start;return n.isEqual(o)?null:o.nodeAfter&&e.isLimit(o.nodeAfter)?new Fo(o,Bo._createAfter(o.nodeAfter)):new Fo(o)}(t,e):function(t,e){const n=t.start,i=t.end,o=e.checkChild(n,"$text"),r=e.checkChild(i,"$text"),s=e.getLimitElement(n),a=e.getLimitElement(i);if(s===a){if(o&&r)return null;if(function(t,e,n){const i=t.nodeAfter&&!n.isLimit(t.nodeAfter)||n.checkChild(t,"$text"),o=e.nodeBefore&&!n.isLimit(e.nodeBefore)||n.checkChild(e,"$text");return i||o}(n,i,e)){const t=n.nodeAfter&&e.isObject(n.nodeAfter)?null:e.getNearestSelectionRange(n,"forward"),o=i.nodeBefore&&e.isObject(i.nodeBefore)?null:e.getNearestSelectionRange(i,"backward"),r=t?t.start:n,s=o?o.start:i;return new Fo(r,s)}}const c=s&&!s.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const t=n.nodeAfter&&i.nodeBefore&&n.nodeAfter.parent===i.nodeBefore.parent,o=c&&(!t||!Ls(n.nodeAfter,e)),r=l&&(!t||!Ls(i.nodeBefore,e));let d=n,h=i;return o&&(d=Bo._createBefore(Ds(s,e))),r&&(h=Bo._createAfter(Ds(a,e))),new Fo(d,h)}return null}(t,e)}function Ds(t,e){let n=t,i=n;for(;e.isLimit(i)&&i.parent;)n=i,i=i.parent;return n}function Ls(t,e){return t&&e.isObject(t)}class js{constructor(){this.markers=new xs,this.document=new vs(this),this.schema=new xr,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(t=>this.decorate(t)),this.on("applyOperation",(t,e)=>{e[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$block",{allowIn:"$root",isBlock:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",isLimit:!0}),this.schema.extend("$text",{allowIn:"$clipboardHolder"}),this.schema.register("$marker"),this.schema.addChildCheck((t,e)=>{if("$marker"===e.name)return!0}),function(t){t.document.registerPostFixer(e=>(function(t,e){const n=e.document.selection,i=e.schema,o=[];let r=!1;for(const t of n.getRanges()){const e=Rs(t,i);e?(o.push(e),r=!0):o.push(t)}if(r){let e=o;if(o.length>1){const t=o[0].start,n=o[o.length-1].end;e=[new Fo(t,n)]}t.setSelection(e,{backward:n.isBackward})}})(e,t))}(this)}change(t){return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Br,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}enqueueChange(t,e){"string"==typeof t?t=new Br(t):"function"==typeof t&&(e=t,t=new Br),this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}applyOperation(t){t._execute()}insertContent(t,e,n){return function(t,e,n,i){return t.change(o=>{let r;const s=(r=n?n instanceof $o||n instanceof Xo?n:o.createSelection(n,i):t.document.selection).getFirstPosition();r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});const a=new Cs(t,o,s);let c;c=e.is("documentFragment")?e.getChildren():[e],a.handleNodes(c,{isFirst:!0,isLast:!0});const l=a.getSelectionRange();l&&(r instanceof Xo?o.setSelection(l):r.setTo(l));const d=a.getAffectedRange()||t.createRange(s);return a.destroy(),d})}(this,t,e,n)}deleteContent(t,e){!function(t,e,n={}){if(e.isCollapsed)return;const i=e.getFirstRange();if("$graveyard"==i.root.rootName)return;const o=t.schema;t.change(t=>{if(!n.doNotResetEntireContent&&function(t,e){const n=t.getLimitElement(e);if(!e.containsEntireContent(n))return!1;const i=e.getFirstRange();return i.start.parent!=i.end.parent&&t.checkChild(n,"paragraph")}(o,e))return void function(t,e){const n=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(n)),Ps(t,t.createPositionAt(n,0),e)}(t,e);const r=i.start,s=Ts.fromPosition(i.end,"toNext");if(i.start.isTouching(i.end)||t.remove(i),n.leaveUnmerged||(function t(e,n,i){const o=n.parent,r=i.parent;if(o!=r&&!e.model.schema.isLimit(o)&&!e.model.schema.isLimit(r)&&function(t,e,n){const i=new Fo(t,e);for(const t of i.getWalker())if(n.isLimit(t.item))return!1;return!0}(n,i,e.model.schema)){for(n=e.createPositionAfter(o),(i=e.createPositionBefore(r)).isEqual(n)||e.insert(r,n),e.merge(n);i.parent.isEmpty;){const t=i.parent;i=e.createPositionBefore(t),e.remove(t)}t(e,n,i)}}(t,r,s),o.removeDisallowedAttributes(r.parent.getChildren(),t)),Ss(t,e,r),function(t,e){const n=t.checkChild(e,"$text"),i=t.checkChild(e,"paragraph");return!n&&i}(o,r)){const i=o.getNearestSelectionRange(r);n.doNotAutoparagraph&&i?Ss(t,e,i):Ps(t,r,e)}s.detach()})}(this,t,e)}modifySelection(t,e){!function(t,e,n={}){const i=t.schema,o="backward"!=n.direction,r=n.unit?n.unit:"character",s=e.focus,a=new jo({boundaries:function(t,e){const n=t.root,i=Bo._createAt(n,e?"end":0);return e?new Fo(t,i):new Fo(i,t)}(s,o),singleCharacters:!0,direction:o?"forward":"backward"}),c={walker:a,schema:i,isForward:o,unit:r};let l;for(;l=a.next();){if(l.done)return;const n=Es(c,l.value);if(n)return void(e instanceof Xo?t.change(t=>{t.setSelectionFocus(n)}):e.setFocus(n))}}(this,t,e)}getSelectedContent(t){return function(t,e){return t.change(t=>{const n=t.createDocumentFragment(),i=e.getFirstRange();if(!i||i.isCollapsed)return n;const o=i.start.root,r=i.start.getCommonPath(i.end),s=o.getNodeByPath(r);let a;const c=(a=i.start.parent==i.end.parent?i:t.createRange(t.createPositionAt(s,i.start.path[r.length]),t.createPositionAt(s,i.end.path[r.length]+1))).end.offset-a.start.offset;for(const e of a.getItems({shallow:!0}))e.is("textProxy")?t.appendText(e.data,e.getAttributes(),n):t.append(e._clone(!0),n);if(a!=i){const e=i._getTransformedByMove(a.start,t.createPositionAt(n,0),c)[0],o=t.createRange(t.createPositionAt(n,0),e.start);Os(t.createRange(e.end,t.createPositionAt(n,"end")),t),Os(o,t)}return n})}(this,t)}hasContent(t,e){const n=t instanceof Lo?Fo._createIn(t):t;if(n.isCollapsed)return!1;for(const t of this.markers.getMarkersIntersectingRange(n))if(t.affectsData)return!0;const{ignoreWhitespaces:i=!1}=e||{};for(const t of n.getItems())if(t.is("textProxy")){if(!i)return!0;if(-1!==t.data.search(/\S/))return!0}else if(this.schema.isObject(t))return!0;return!1}createPositionFromPath(t,e,n){return new Bo(t,e,n)}createPositionAt(t,e){return Bo._createAt(t,e)}createPositionAfter(t){return Bo._createAfter(t)}createPositionBefore(t){return Bo._createBefore(t)}createRange(t,e){return new Fo(t,e)}createRangeIn(t){return Fo._createIn(t)}createRangeOn(t){return Fo._createOn(t)}createSelection(t,e,n){return new $o(t,e,n)}createBatch(t){return new Br(t)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const e=this._pendingChanges[0].batch;this._currentWriter=new as(this,e);const n=this._pendingChanges[0].callback(this._currentWriter);t.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),t}}Ie(js,sn);class Vs{constructor(){this._listener=Object.create(Ci)}listenTo(t){this._listener.listenTo(t,"keydown",(t,e)=>{this._listener.fire("_keydown:"+Ln(e),e)})}set(t,e,n={}){const i=jn(t),o=n.priority;this._listener.listenTo(this._listener,"_keydown:"+i,(t,n)=>{e(n,()=>{n.preventDefault(),n.stopPropagation(),t.stop()}),t.return=!0},{priority:o})}press(t){return!!this._listener.fire("_keydown:"+Ln(t),t)}destroy(){this._listener.stopListening()}}class zs extends Vs{constructor(t){super(),this.editor=t}set(t,e,n={}){if("string"==typeof e){const t=e;e=(e,n)=>{this.editor.execute(t),n()}}super.set(t,e,n)}}class Bs{constructor(t){const e=this.constructor.builtinPlugins;this.config=new me(t,this.constructor.defaultConfig),this.config.define("plugins",e),this.plugins=new pr(this,e),this.commands=new br;const n=this.config.get("language")||{};this.locale=new kr({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.set("isReadOnly",!1),this.model=new js,this.data=new Lr(this.model),this.editing=new mr(this.model),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new jr([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new zs(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const t=this.config,e=t.get("plugins")||[],n=t.get("removePlugins")||[],i=t.get("extraPlugins")||[];return this.plugins.init(e.concat(i),n)}destroy(){let t=Promise.resolve();return"initializing"==this.state&&(t=new Promise(t=>this.once("ready",t))),t.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})}execute(...t){this.commands.execute(...t)}}Ie(Bs,sn);var Fs={setData(t){this.data.set(t)},getData(t){return this.data.get(t)}},Us={updateSourceElement(){if(!this.sourceElement)throw new be.b("editor-missing-sourceelement: Cannot update the source element of a detached editor.",this);!function(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}(this.sourceElement,this.data.get())}};class Hs{getHtml(t){const e=document.implementation.createHTMLDocument("").createElement("div");return e.appendChild(t),e.innerHTML}}class qs{constructor(){this._domParser=new DOMParser,this._domConverter=new yi({blockFiller:ti}),this._htmlWriter=new Hs}toData(t){const e=this._domConverter.viewToDom(t,document);return this._htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this._domConverter.domToView(e)}_toDom(t){const e=this._domParser.parseFromString(t,"text/html"),n=e.createDocumentFragment(),i=e.body.childNodes;for(;i.length>0;)n.appendChild(i[0]);return n}}class Ws{constructor(t){this.editor=t,this._components=new Map}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){if(this.has(t))throw new be.b("componentfactory-item-exists: The item already exists in the component factory.",this,{name:t});this._components.set(Ys(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new be.b("componentfactory-item-missing: The required component is not registered in the factory.",this,{name:t});return this._components.get(Ys(t)).callback(this.editor.locale)}has(t){return this._components.has(Ys(t))}}function Ys(t){return String(t).toLowerCase()}class $s{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(t){if(this._elements.has(t))throw new be.b("focusTracker-add-element-already-exist",this);this.listenTo(t,"focus",()=>this._focus(t),{useCapture:!0}),this.listenTo(t,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(t),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}Ie($s,Ci),Ie($s,sn);class Gs{constructor(t){this.editor=t,this.componentFactory=new Ws(t),this.focusTracker=new $s,this._editableElementsMap=new Map,this.listenTo(t.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const t of this._editableElementsMap.values())t.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(t,e){this._editableElementsMap.set(t,e),e.ckeditorInstance||(e.ckeditorInstance=this.editor)}getEditableElement(t="main"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}}Ie(Gs,Ae),n(14);const Qs=new WeakMap;function Ks(t){const{view:e,element:n,text:i,isDirectHost:o=!0}=t,r=e.document;Qs.has(r)||(Qs.set(r,new Map),r.registerPostFixer(t=>Js(r,t))),Qs.get(r).set(n,{text:i,isDirectHost:o}),e.change(t=>Js(r,t))}function Js(t,e){const n=Qs.get(t);let i=!1;for(const[t,o]of n)Zs(e,t,o)&&(i=!0);return i}function Zs(t,e,n){const{text:i,isDirectHost:o}=n,r=o?e:function(t){if(1===t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement"))return e}return null}(e);let s=!1;return!!r&&(n.hostElement=r,r.getAttribute("data-placeholder")!==i&&(t.setAttribute("data-placeholder",i,r),s=!0),function(t){const e=t.document;if(!e)return!1;const n=!Array.from(t.getChildren()).some(t=>!t.is("uiElement"));if(!e.isFocused&&n)return!0;const i=e.selection.anchor;return!(!n||!i||i.parent===t)}(r)?function(t,e){return!e.hasClass("ck-placeholder")&&(t.addClass("ck-placeholder",e),!0)}(t,r)&&(s=!0):function(t,e){return!!e.hasClass("ck-placeholder")&&(t.removeClass("ck-placeholder",e),!0)}(t,r)&&(s=!0),s)}class Xs{constructor(){this._replacedElements=[]}replace(t,e){this._replacedElements.push({element:t,newElement:e}),t.style.display="none",e&&t.parentNode.insertBefore(e,t.nextSibling)}restore(){this._replacedElements.forEach(({element:t,newElement:e})=>{t.style.display="",e&&e.remove()}),this._replacedElements=[]}}class ta extends Gs{constructor(t,e){super(t),this.view=e,this._toolbarConfig=function(t){return Array.isArray(t)?{items:t}:t?Object.assign({items:[]},t):{items:[]}}(t.config.get("toolbar")),this._elementReplacer=new Xs}get element(){return this.view.element}init(t){const e=this.editor,n=this.view,i=e.editing.view,o=n.editable,r=i.document.getRoot();o.name=r.rootName,n.render();const s=o.element;this.setEditableElement(o.name,s),this.focusTracker.add(s),n.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(s),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const t=this.view,e=this.editor.editing.view;this._elementReplacer.restore(),e.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initToolbar(){const t=this.editor,e=this.view,n=t.editing.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,this._toolbarConfig.viewportTopOffset&&(e.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset),e.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),function({origin:t,originKeystrokeHandler:e,originFocusTracker:n,toolbar:i,beforeFocus:o,afterBlur:r}){n.add(i.element),e.set("Alt+F10",(t,e)=>{n.isFocused&&!i.focusTracker.isFocused&&(o&&o(),i.focus(),e())}),i.keystrokes.set("Esc",(e,n)=>{i.focusTracker.isFocused&&(t.focus(),r&&r(),n())})}({origin:n,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:e.toolbar})}_initPlaceholder(){const t=this.editor,e=t.editing.view,n=e.document.getRoot(),i=t.sourceElement,o=t.config.get("placeholder")||i&&"textarea"===i.tagName.toLowerCase()&&i.getAttribute("placeholder");o&&Ks({view:e,element:n,text:o,isDirectHost:!1})}}class ea extends xn{constructor(t){super({idProperty:"viewUid"}),this.on("add",(t,e,n)=>{e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[n])}),this.on("remove",(t,e)=>{e.element&&this._parentElement&&e.element.remove()}),this.locale=t,this._parentElement=null}destroy(){this.map(t=>t.destroy())}setParent(t){this._parentElement=t}delegate(...t){if(!t.length||!function(t){return t.every(t=>"string"==typeof t)}(t))throw new be.b("ui-viewcollection-delegate-wrong-events: All event names must be strings.",this);return{to:e=>{for(const n of this)for(const i of t)n.delegate(i).to(e);this.on("add",(n,i)=>{for(const n of t)i.delegate(n).to(e)}),this.on("remove",(n,i)=>{for(const n of t)i.stopDelegating(n,e)})}}}}const na="http://www.w3.org/1999/xhtml";class ia{constructor(t){Object.assign(this,ua(ha(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new be.b("ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const n of e.children)ba(n)?yield n:wa(n)&&(yield*t(n))}(this)}static bind(t,e){return{to:(n,i)=>new ra({eventNameOrFunction:n,attribute:n,observable:t,emitter:e,callback:i}),if:(n,i,o)=>new sa({observable:t,emitter:e,attribute:n,valueIfTrue:i,callback:o})}}static extend(t,e){if(t._isRendered)throw new be.b("template-extend-render: Attempting to extend a template which has already been rendered.",[this,t]);!function t(e,n){if(n.attributes&&(e.attributes||(e.attributes={}),ma(e.attributes,n.attributes)),n.eventListeners&&(e.eventListeners||(e.eventListeners={}),ma(e.eventListeners,n.eventListeners)),n.text&&e.text.push(...n.text),n.children&&n.children.length){if(e.children.length!=n.children.length)throw new be.b("ui-template-extend-children-mismatch: The number of children in extended definition does not match.",e);let i=0;for(const o of n.children)t(e.children[i++],o)}}(t,ua(ha(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text)throw new be.b('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.',this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let e=t.node;return e||(e=t.node=document.createElementNS(this.ns||na,this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),e}_renderText(t){let e=t.node;return e?t.revertData.text=e.textContent:e=t.node=document.createTextNode(""),aa(this.text)?this._bindToObservable({schema:this.text,updater:function(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}(e),data:t}):e.textContent=this.text.join(""),e}_renderAttributes(t){let e,n,i,o;if(!this.attributes)return;const r=t.node,s=t.revertData;for(e in this.attributes)if(i=r.getAttribute(e),n=this.attributes[e],s&&(s.attributes[e]=i),o=C(n[0])&&n[0].ns?n[0].ns:null,aa(n)){const a=o?n[0].value:n;s&&_a(e)&&a.unshift(i),this._bindToObservable({schema:a,updater:la(r,e,o),data:t})}else"style"==e&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],t):(s&&i&&_a(e)&&n.unshift(i),pa(n=n.map(t=>t&&t.value||t).reduce((t,e)=>t.concat(e),[]).reduce(ga,""))||r.setAttributeNS(o,e,n))}_renderStyleAttribute(t,e){const n=e.node;for(const i in t){const o=t[i];aa(o)?this._bindToObservable({schema:[o],updater:da(n,i),data:e}):n.style[i]=o}}_renderElementChildren(t){const e=t.node,n=t.intoFragment?document.createDocumentFragment():e,i=t.isApplying;let o=0;for(const r of this.children)if(ka(r)){if(!i){r.setParent(e);for(const t of r)n.appendChild(t.element)}}else if(ba(r))i||(r.isRendered||r.render(),n.appendChild(r.element));else if(mi(r))n.appendChild(r);else if(i){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),r._renderNode({node:n.childNodes[o++],isApplying:!0,revertData:e})}else n.appendChild(r.render());t.intoFragment&&e.appendChild(n)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const n=this.eventListeners[e].map(n=>{const[i,o]=e.split("@");return n.activateDomEventListener(i,o,t)});t.revertData&&t.revertData.bindings.push(n)}}_bindToObservable({schema:t,updater:e,data:n}){const i=n.revertData;ca(t,e,n);const o=t.filter(t=>!pa(t)).filter(t=>t.observable).map(i=>i.activateAttributeListener(t,e,n));i&&i.bindings.push(o)}_revertTemplateFromNode(t,e){for(const t of e.bindings)for(const e of t)e();if(e.text)t.textContent=e.text;else{for(const n in e.attributes){const i=e.attributes[n];null===i?t.removeAttribute(n):t.setAttribute(n,i)}for(let n=0;nca(t,e,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,i),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,i)}}}class ra extends oa{activateDomEventListener(t,e,n){const i=(t,n)=>{e&&!n.target.matches(e)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,t,i),()=>{this.emitter.stopListening(n.node,t,i)}}}class sa extends oa{getValue(t){return!pa(super.getValue(t))&&(this.valueIfTrue||!0)}}function aa(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(aa):t instanceof oa)}function ca(t,e,{node:n}){let i=function(t,e){return t.map(t=>t instanceof oa?t.getValue(e):t)}(t,n);pa(i=1==t.length&&t[0]instanceof sa?i[0]:i.reduce(ga,""))?e.remove():e.set(i)}function la(t,e,n){return{set(i){t.setAttributeNS(n,e,i)},remove(){t.removeAttributeNS(n,e)}}}function da(t,e){return{set(n){t.style[e]=n},remove(){t.style[e]=null}}}function ha(t){return fe(t,t=>{if(t&&(t instanceof oa||wa(t)||ba(t)||ka(t)))return t})}function ua(t){if("string"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){Array.isArray(t.text)||(t.text=[t.text])}(t),t.on&&(t.eventListeners=function(t){for(const e in t)fa(t,e);return t}(t.on),delete t.on),!t.text){t.attributes&&function(t){for(const e in t)t[e].value&&(t[e].value=[].concat(t[e].value)),fa(t,e)}(t.attributes);const e=[];if(t.children)if(ka(t.children))e.push(t.children);else for(const n of t.children)wa(n)||ba(n)||mi(n)?e.push(n):e.push(new ia(n));t.children=e}return t}function fa(t,e){Array.isArray(t[e])||(t[e]=[t[e]])}function ga(t,e){return pa(e)?t:pa(t)?e:`${t} ${e}`}function ma(t,e){for(const n in e)t[n]?t[n].push(...e[n]):t[n]=e[n]}function pa(t){return!t&&0!==t}function ba(t){return t instanceof va}function wa(t){return t instanceof ia}function ka(t){return t instanceof ea}function _a(t){return"class"==t||"style"==t}n(16);class va{constructor(t){this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new xn,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(e,n)=>{n.locale=t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=ia.bind(this,this)}createCollection(){const t=new ea;return this._viewCollections.add(t),t}registerChild(t){Ve(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){Ve(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new ia(t)}extendTemplate(t){ia.extend(this.template,t)}render(){if(this.isRendered)throw new be.b("ui-view-render-already-rendered: This View has already been rendered.",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(t=>t.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}Ie(va,Ci),Ie(va,sn),n(18);class ya extends va{constructor(t){super(t),this.body=this.createCollection()}render(){super.render(),this._renderBodyCollection()}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const t=this.locale,e=this._bodyCollectionContainer=new ia({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:t.uiLanguageDirection},children:this.body}).render();document.body.appendChild(e)}}n(20);class xa extends va{constructor(t){super(t),this.set("text"),this.set("for");const e=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],for:e.to("for")},children:[{text:e.to("text")}]})}}class Aa extends ya{constructor(t){super(t);const e=_e();this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:t.uiLanguageDirection,lang:t.uiLanguage,"aria-labelledby":`ck-editor__aria-label_${e}`},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(t){const e=this.t,n=new xa;return n.text=e("bn"),n.extendTemplate({attributes:{id:`ck-editor__aria-label_${t}`,class:"ck-voice-label"}}),n}}class Ta extends va{constructor(t,e,n){super(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=e}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const t=this._editingView;function e(e){t.change(n=>{const i=t.document.getRoot(e.name);n.addClass(e.isFocused?"ck-focused":"ck-blurred",i),n.removeClass(e.isFocused?"ck-blurred":"ck-focused",i)})}t.isRenderingInProgress?function n(i){t.once("change:isRenderingInProgress",(t,o,r)=>{r?n(i):e(i)})}(this):e(this)}}class Ca extends Ta{constructor(t,e,n){super(t,e,n),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const t=this._editingView,e=this.t;t.change(n=>{const i=t.document.getRoot(this.name);n.setAttribute("aria-label",e("bm",[this.name]),i)})}}function Pa(t){return e=>e+t}n(22);const Sa=Pa("px");class Ma extends va{constructor(t){super(t);const e=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new ia({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:e.to("isSticky",t=>t?"block":"none"),height:e.to("isSticky",t=>t?Sa(this._panelRect.height):null)}}}).render(),this._contentPanel=new ia({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",e.if("isSticky","ck-sticky-panel__content_sticky"),e.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:e.to("isSticky",t=>t?Sa(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:e.to("_hasViewportTopOffset",t=>t?Sa(this.viewportTopOffset):null),bottom:e.to("_isStickyToTheLimiter",t=>t?Sa(this.limiterBottomOffset):null),marginLeft:e.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(ki.window,"scroll",()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,"change:isActive",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const t=this._panelRect=this._contentPanel.getBoundingClientRect();let e;this.limiterElement?(e=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&e.top{this[e](),n()})}}get first(){return this.focusables.find(Ia)||null}get last(){return this.focusables.filter(Ia).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((e,n)=>{const i=e.element===this.focusTracker.focusedElement;return i&&(t=n),i}),t)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){t&&t.focus()}_getFocusableItem(t){const e=this.current,n=this.focusables.length;if(!n)return null;if(null===e)return this[1===t?"first":"last"];let i=(e+n+t)%n;do{const e=this.focusables.get(i);if(Ia(e))return e;i=(i+n+t)%n}while(i!==e);return null}}function Ia(t){return!(!t.focus||"none"==ki.window.getComputedStyle(t.element).display)}class Na extends va{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}n(24);class Oa extends va{constructor(t){super(t);const e=this.bindTemplate,n=this.t;this.set("ariaLabel",n("bl")),this.items=this.createCollection(),this.focusTracker=new $s,this.keystrokes=new Vs,this.set("isVertical",!1),this.set("class"),this._focusCycler=new Ea({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["arrowleft","arrowup"],focusNext:["arrowright","arrowdown"]}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar",e.if("isVertical","ck-toolbar_vertical"),e.to("class")],role:"toolbar","aria-label":e.to("ariaLabel")},children:this.items,on:{mousedown:function(t){return t.bindTemplate.to(e=>{e.target===t.element&&e.preventDefault()})}(this)}})}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e){t.map(t=>{"|"==t?this.items.add(new Na):e.has(t)?this.items.add(e.create(t)):console.warn(Object(be.a)("toolbarview-item-unavailable: The requested toolbar item is unavailable."),{name:t})})}}n(26);class Ra extends Aa{constructor(t,e){super(t),this.stickyPanel=new Ma(t),this.toolbar=new Oa(t),this.editable=new Ca(t,e)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class Da extends Bs{constructor(t,e){super(e),ge(t)&&(this.sourceElement=t),this.data.processor=new qs,this.model.document.createRoot(),this.ui=new ta(this,new Ra(this.locale,this.editing.view)),function(t){if(!P(t.updateSourceElement))throw new be.b("attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.",t);const e=t.sourceElement;if(e&&"textarea"===e.tagName.toLowerCase()&&e.form){let n;const i=e.form,o=()=>t.updateSourceElement();P(i.submit)&&(n=i.submit,i.submit=()=>{o(),n.apply(i)}),i.addEventListener("submit",o),t.on("destroy",()=>{i.removeEventListener("submit",o),n&&(i.submit=n)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,e={}){return new Promise(n=>{const i=new this(t,e);n(i.initPlugins().then(()=>i.ui.init(ge(t)?t:null)).then(()=>{if(!ge(t)&&e.initialData)throw new be.b("editor-create-initial-data: The config.initialData option cannot be used together with initial data passed in Editor.create().",null);const n=e.initialData||function(t){return ge(t)?function(t){return t instanceof HTMLTextAreaElement?t.value:t.innerHTML}(t):t}(t);return i.data.init(n)}).then(()=>i.fire("ready")).then(()=>i))})}}Ie(Da,Fs),Ie(Da,Us);class La{constructor(t){this.editor=t}destroy(){this.stopListening()}}Ie(La,sn);class ja{constructor(t){this.files=function(t){const e=t.files?Array.from(t.files):[],n=t.items?Array.from(t.items):[];return e.length?e:n.filter(t=>"file"===t.kind).map(t=>t.getAsFile())}(t),this._native=t}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}}class Va extends Qi{constructor(t){super(t);const e=this.document;function n(t,n){n.preventDefault();const i=n.dropRange?[n.dropRange]:Array.from(e.selection.getRanges()),o=new ke(e,"clipboardInput");e.fire(o,{dataTransfer:n.dataTransfer,targetRanges:i}),o.stop.called&&n.stopPropagation()}this.domEventType=["paste","copy","cut","drop","dragover"],this.listenTo(e,"paste",n,{priority:"low"}),this.listenTo(e,"drop",n,{priority:"low"})}onDomEvent(t){const e={dataTransfer:new ja(t.clipboardData?t.clipboardData:t.dataTransfer)};"drop"==t.type&&(e.dropRange=function(t,e){const n=e.target.ownerDocument,i=e.clientX,o=e.clientY;let r;return n.caretRangeFromPoint&&n.caretRangeFromPoint(i,o)?r=n.caretRangeFromPoint(i,o):e.rangeParent&&((r=n.createRange()).setStart(e.rangeParent,e.rangeOffset),r.collapse(!0)),r?t.domConverter.domRangeToView(r):t.document.selection.getFirstRange()}(this.view,t)),this.fire(t.type,t,e)}}const za=["figcaption","li"];class Ba extends La{static get pluginName(){return"Clipboard"}init(){const t=this.editor,e=t.model.document,n=t.editing.view,i=n.document;function o(n,o){const r=o.dataTransfer;o.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));i.fire("clipboardOutput",{dataTransfer:r,content:s,method:n.name})}this._htmlDataProcessor=new qs,n.addObserver(Va),this.listenTo(i,"clipboardInput",e=>{t.isReadOnly&&e.stop()},{priority:"highest"}),this.listenTo(i,"clipboardInput",(t,e)=>{const i=e.dataTransfer;let o="";i.getData("text/html")?o=function(t){return t.replace(/(\s+)<\/span>/g,(t,e)=>1==e.length?" ":e)}(i.getData("text/html")):i.getData("text/plain")&&(o=function(t){return(t=t.replace(//g,">").replace(/\n/g,"

").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).indexOf("

")>-1&&(t=`

${t}

`),t}(i.getData("text/plain"))),o=this._htmlDataProcessor.toView(o),this.fire("inputTransformation",{content:o,dataTransfer:i}),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(t,e)=>{if(!e.content.isEmpty){const t=this.editor.data,n=this.editor.model,i=t.toModel(e.content,"$clipboardHolder");if(0==i.childCount)return;n.insertContent(i)}},{priority:"low"}),this.listenTo(i,"copy",o,{priority:"low"}),this.listenTo(i,"cut",(e,n)=>{t.isReadOnly?n.preventDefault():o(e,n)},{priority:"low"}),this.listenTo(i,"clipboardOutput",(n,i)=>{i.content.isEmpty||(i.dataTransfer.setData("text/html",this._htmlDataProcessor.toData(i.content)),i.dataTransfer.setData("text/plain",function t(e){let n="";if(e.is("text")||e.is("textProxy"))n=e.data;else if(e.is("img")&&e.hasAttribute("alt"))n=e.getAttribute("alt");else{let i=null;for(const o of e.getChildren()){const e=t(o);i&&(i.is("containerElement")||o.is("containerElement"))&&(za.includes(i.name)||za.includes(o.name)?n+="\n":n+="\n\n"),n+=e,i=o}}return n}(i.content))),"cut"==i.method&&t.model.deleteContent(e.selection)},{priority:"low"})}}class Fa{constructor(t){this.editor=t,this.set("value",void 0),this.set("isEnabled",!1),this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",t=>{this.isEnabled||t.stop()},{priority:"high"}),this.listenTo(t,"change:isReadOnly",(t,e,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",Ua,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",Ua),this.refresh())}execute(){}destroy(){this.stopListening()}}function Ua(t){t.return=!1,t.stop()}function*Ha(t,e){for(const n of e)n&&t.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}Ie(Fa,sn);class qa extends Fa{execute(){const t=this.editor.model,e=t.document;t.change(n=>{!function(t,e,n,i){const o=n.isCollapsed,r=n.getFirstRange(),s=r.start.parent,a=r.end.parent;if(i.isLimit(s)||i.isLimit(a))o||s!=a||t.deleteContent(n);else if(o){const t=Ha(e.model.schema,n.getAttributes());Wa(e,r.start),e.setSelectionAttribute(t)}else{const i=!(r.start.isAtStart&&r.end.isAtEnd),o=s==a;t.deleteContent(n,{leaveUnmerged:i}),i&&(o?Wa(e,n.focus):e.setSelection(a,0))}}(this.editor.model,n,e.selection,t.schema),this.fire("afterExecute",{writer:n})})}}function Wa(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}class Ya extends Mi{constructor(t){super(t);const e=this.document;e.on("keydown",(t,n)=>{if(this.isEnabled&&n.keyCode==Dn.enter){let i;e.once("enter",t=>i=t,{priority:"highest"}),e.fire("enter",new Gi(e,n.domEvent,{isSoft:n.shiftKey})),i&&i.stop.called&&t.stop()}})}observe(){}}class $a extends La{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,n=e.document;e.addObserver(Ya),t.commands.add("enter",new qa(t)),this.listenTo(n,"enter",(n,i)=>{i.preventDefault(),i.isSoft||(t.execute("enter"),e.scrollToTheSelection())},{priority:"low"})}}class Ga extends Fa{execute(){const t=this.editor.model,e=t.document;t.change(n=>{!function(t,e,n){const i=n.isCollapsed,o=n.getFirstRange(),r=o.start.parent,s=o.end.parent,a=r==s;if(i){const i=Ha(t.schema,n.getAttributes());Qa(e,o.end),e.removeSelectionAttribute(n.getAttributeKeys()),e.setSelectionAttribute(i)}else{const i=!(o.start.isAtStart&&o.end.isAtEnd);t.deleteContent(n,{leaveUnmerged:i}),a?Qa(e,n.focus):i&&e.setSelection(s,0)}}(t,n,e.selection),this.fire("afterExecute",{writer:n})})}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const n=e.anchor;if(!n||!t.checkChild(n,"softBreak"))return!1;const i=e.getFirstRange(),o=i.start.parent,r=i.end.parent;return!Ka(o,t)&&!Ka(r,t)||o===r}(t.schema,e.selection)}}function Qa(t,e){const n=t.createElement("softBreak");t.insert(n,e),t.setSelection(n,"after")}function Ka(t,e){return!t.is("rootElement")&&(e.isLimit(t)||Ka(t.parent,e))}class Ja extends La{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,n=t.conversion,i=t.editing.view,o=i.document;e.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(t,e)=>e.createEmptyElement("br")}),i.addObserver(Ya),t.commands.add("shiftEnter",new Ga(t)),this.listenTo(o,"enter",(e,n)=>{n.preventDefault(),n.isSoft&&(t.execute("shiftEnter"),i.scrollToTheSelection())},{priority:"low"})}}class Za{constructor(t,e=20){this.model=t,this.size=0,this.limit=e,this.isLocked=!1,this._changeCallback=(t,e)=>{"transparent"!=e.type&&e!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch()),this._batch}input(t){this.size+=t,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(t){this.isLocked&&!t||(this._batch=null,this.size=0)}}class Xa extends Fa{constructor(t,e){super(t),this._buffer=new Za(t.model,e),this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,n=e.document,i=t.text||"",o=i.length,r=t.range||n.selection.getFirstRange(),s=t.resultRange;e.enqueueChange(this._buffer.batch,t=>{const a=r.isCollapsed;this._buffer.lock(),e.deleteContent(e.createSelection(r)),i&&e.insertContent(t.createText(i,n.selection.getAttributes()),r.start),s?t.setSelection(s):a&&t.setSelection(r.start.getShiftedBy(o)),this._buffer.unlock(),this._buffer.input(o),this._batches.add(this._buffer.batch)})}}const tc=[Ln("arrowUp"),Ln("arrowRight"),Ln("arrowDown"),Ln("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let t=112;t<=135;t++)tc.push(t);function ec(t){if(t.newChildren.length-t.oldChildren.length!=1)return;const e=function(t,e){const n=[];let i,o=0;return t.forEach(t=>{"equal"==t?(r(),o++):"insert"==t?(s("insert")?i.values.push(e[o]):(r(),i={type:"insert",index:o,values:[e[o]]}),o++):s("delete")?i.howMany++:(r(),i={type:"delete",index:o,howMany:1})}),r(),n;function r(){i&&(n.push(i),i=null)}function s(t){return i&&i.type==t}}(ui(t.oldChildren,t.newChildren,nc),t.newChildren);if(e.length>1)return;const n=e[0];return n.values[0]&&n.values[0].is("text")?n:void 0}function nc(t,e){return t&&t.is("text")&&e&&e.is("text")?t.data===e.data:t===e}class ic{constructor(t){this.editor=t,this.editing=this.editor.editing}handle(t,e){if(function(t){if(0==t.length)return!1;for(const e of t)if("children"===e.type&&!ec(e))return!0;return!1}(t))this._handleContainerChildrenMutations(t,e);else for(const n of t)this._handleTextMutation(n,e),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(t,e){const n=function(t){const e=t.map(t=>t.node).reduce((t,e)=>t.getCommonAncestor(e,{includeSelf:!0}));if(e)return e.getAncestors({includeSelf:!0,parentFirst:!0}).find(t=>t.is("containerElement")||t.is("rootElement"))}(t);if(!n)return;const i=this.editor.editing.view.domConverter.mapViewToDom(n),o=new yi,r=this.editor.data.toModel(o.domToView(i)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const a=Array.from(r.getChildren()),c=Array.from(s.getChildren()),l=a[a.length-1],d=c[c.length-1];l&&l.is("softBreak")&&d&&!d.is("softBreak")&&a.pop();const h=this.editor.model.schema;if(!oc(a,h)||!oc(c,h))return;const u=a.map(t=>t.is("text")?t.data:"@").join("").replace(/\u00A0/g," "),f=c.map(t=>t.is("text")?t.data:"@").join("").replace(/\u00A0/g," ");if(f===u)return;const g=ui(f,u),{firstChangeAt:m,insertions:p,deletions:b}=rc(g);let w=null;e&&(w=this.editing.mapper.toModelRange(e.getFirstRange()));const k=u.substr(m,p),_=this.editor.model.createRange(this.editor.model.createPositionAt(s,m),this.editor.model.createPositionAt(s,m+b));this.editor.execute("input",{text:k,range:_,resultRange:w})}_handleTextMutation(t,e){if("text"!=t.type)return;const n=t.newText.replace(/\u00A0/g," "),i=t.oldText.replace(/\u00A0/g," ");if(i===n)return;const o=ui(i,n),{firstChangeAt:r,insertions:s,deletions:a}=rc(o);let c=null;e&&(c=this.editing.mapper.toModelRange(e.getFirstRange()));const l=this.editing.view.createPositionAt(t.node,r),d=this.editing.mapper.toModelPosition(l),h=this.editor.model.createRange(d,d.getShiftedBy(a)),u=n.substr(r,s);this.editor.execute("input",{text:u,range:h,resultRange:c})}_handleTextNodeInsertion(t){if("children"!=t.type)return;const e=ec(t),n=this.editing.view.createPositionAt(t.node,e.index),i=this.editing.mapper.toModelPosition(n),o=e.values[0].data;this.editor.execute("input",{text:o.replace(/\u00A0/g," "),range:this.editor.model.createRange(i)})}}function oc(t,e){return t.every(t=>e.isInline(t))}function rc(t){let e=null,n=null;for(let i=0;i{n.deleteContent(n.document.selection)}),t.unlock()}Nn.isAndroid?i.document.on("beforeinput",(t,e)=>r(e),{priority:"lowest"}):i.document.on("keydown",(t,e)=>r(e),{priority:"lowest"}),i.document.on("compositionstart",(function(){const t=n.document,e=1!==t.selection.rangeCount||t.selection.getFirstRange().isFlat;t.selection.isCollapsed||e||s()}),{priority:"lowest"}),i.document.on("compositionend",()=>{e=n.createSelection(n.document.selection)},{priority:"lowest"})}(t),function(t){t.editing.view.document.on("mutations",(e,n,i)=>{new ic(t).handle(n,i)})}(t)}isInput(t){return this.editor.commands.get("input")._batches.has(t)}}class ac extends Fa{constructor(t,e){super(t),this.direction=e,this._buffer=new Za(t.model,t.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,n=e.document;e.enqueueChange(this._buffer.batch,i=>{this._buffer.lock();const o=i.createSelection(t.selection||n.selection),r=o.isCollapsed;if(o.isCollapsed&&e.modifySelection(o,{direction:this.direction,unit:t.unit}),this._shouldEntireContentBeReplacedWithParagraph(t.sequence||1))return void this._replaceEntireContentWithParagraph(i);if(o.isCollapsed)return;let s=0;o.getFirstRange().getMinimalFlatRanges().forEach(t=>{s+=_n(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),e.deleteContent(o,{doNotResetEntireContent:r}),this._buffer.input(s),i.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,n=e.document.selection,i=e.schema.getLimitElement(n);if(!n.isCollapsed||!n.containsEntireContent(i))return!1;if(!e.schema.checkChild(i,"paragraph"))return!1;const o=i.getChild(0);return!o||"paragraph"!==o.name}_replaceEntireContentWithParagraph(t){const e=this.editor.model,n=e.document.selection,i=e.schema.getLimitElement(n),o=t.createElement("paragraph");t.remove(t.createRangeIn(i)),t.insert(o,i),t.setSelection(o,0)}}class cc extends Mi{constructor(t){super(t);const e=t.document;let n=0;function i(t,n,i){let o;e.once("delete",t=>o=t,{priority:Number.POSITIVE_INFINITY}),e.fire("delete",new Gi(e,n,i)),o&&o.stop.called&&t.stop()}e.on("keyup",(t,e)=>{e.keyCode!=Dn.delete&&e.keyCode!=Dn.backspace||(n=0)}),e.on("keydown",(t,e)=>{const o={};if(e.keyCode==Dn.delete)o.direction="forward",o.unit="character";else{if(e.keyCode!=Dn.backspace)return;o.direction="backward",o.unit="codePoint"}const r=Nn.isMac?e.altKey:e.ctrlKey;o.unit=r?"word":o.unit,o.sequence=++n,i(t,e.domEvent,o)}),Nn.isAndroid&&e.on("beforeinput",(e,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;const o={unit:"codepoint",direction:"backward",sequence:1},r=n.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(o.selectionToRemove=t.domConverter.domSelectionToView(r)),i(e,n.domEvent,o)})}observe(){}}class lc extends La{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,n=e.document;if(e.addObserver(cc),t.commands.add("forwardDelete",new ac(t,"forward")),t.commands.add("delete",new ac(t,"backward")),this.listenTo(n,"delete",(n,i)=>{const o={unit:i.unit,sequence:i.sequence};if(i.selectionToRemove){const e=t.model.createSelection(),n=[];for(const e of i.selectionToRemove.getRanges())n.push(t.editing.mapper.toModelRange(e));e.setTo(n),o.selection=e}t.execute("forward"==i.direction?"forwardDelete":"delete",o),i.preventDefault(),e.scrollToTheSelection()}),Nn.isAndroid){let t=null;this.listenTo(n,"delete",(e,n)=>{const i=n.domTarget.ownerDocument.defaultView.getSelection();t={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}},{priority:"lowest"}),this.listenTo(n,"keyup",(e,n)=>{if(t){const e=n.domTarget.ownerDocument.defaultView.getSelection();e.collapse(t.anchorNode,t.anchorOffset),e.extend(t.focusNode,t.focusOffset),t=null}})}}}class dc extends La{static get requires(){return[sc,lc]}static get pluginName(){return"Typing"}}class hc extends Fr{get type(){return"noop"}clone(){return new hc(this.baseVersion)}getReversed(){return new hc(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const uc=new Map;function fc(t,e,n){let i=uc.get(t);i||(i=new Map,uc.set(t,i)),i.set(e,n)}function gc(t){return[t]}function mc(t,e,n={}){const i=function(t,e){const n=uc.get(t);return n&&n.has(e)?n.get(e):gc}(t.constructor,e.constructor);try{return i(t=t.clone(),e,n)}catch(t){throw t}}function pc(t,e,n){t=t.slice(),e=e.slice();const i=new bc(n.document,n.useRelations,n.forceWeakRemove);i.setOriginalOperations(t),i.setOriginalOperations(e);const o=i.originalOperations;if(0==t.length||0==e.length)return{operationsA:t,operationsB:e,originalOperations:o};const r=new WeakMap;for(const e of t)r.set(e,0);const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;for(;a{if(t.key===e.key){const i=t.range.getDifference(e.range).map(e=>new Jr(e,t.key,t.oldValue,t.newValue,0)),o=t.range.getIntersection(e.range);return o&&n.aIsStrong&&i.push(new Jr(o,e.key,e.newValue,t.newValue,0)),0==i.length?[new hc(0)]:i}return[t]}),fc(Jr,ts,(t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const n=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map(e=>new Jr(e,t.key,t.oldValue,t.newValue,t.baseVersion));if(e.shouldReceiveAttributes){const i=_c(e,t.key,t.oldValue);i&&n.unshift(i)}return n}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]}),fc(Jr,os,(t,e)=>{const n=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&n.push(Fo._createFromPositionAndShift(e.graveyardPosition,1));const i=t.range._getTransformedByMergeOperation(e);return i.isCollapsed||n.push(i),n.map(e=>new Jr(e,t.key,t.oldValue,t.newValue,t.baseVersion))}),fc(Jr,Xr,(t,e)=>(function(t,e){const n=Fo._createFromPositionAndShift(e.sourcePosition,e.howMany);let i=null,o=[];n.containsRange(t,!0)?i=t:t.start.hasSameParentAs(n.start)?(o=t.getDifference(n),i=t.getIntersection(n)):o=[t];const r=[];for(let t of o){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const n=e.getMovedRangeStart(),i=t.start.hasSameParentAs(n);t=t._getTransformedByInsertion(n,e.howMany,i),r.push(...t)}return i&&r.push(i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]),r})(t.range,e).map(e=>new Jr(e,t.key,t.oldValue,t.newValue,t.baseVersion))),fc(Jr,rs,(t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const n=t.clone();return n.range=new Fo(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,n]}return t.range=t.range._getTransformedBySplitOperation(e),[t]}),fc(ts,Jr,(t,e)=>{const n=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const i=_c(t,e.key,e.newValue);i&&n.push(i)}return n}),fc(ts,ts,(t,e,n)=>t.position.isEqual(e.position)&&n.aIsStrong?[t]:(t.position=t.position._getTransformedByInsertOperation(e),[t])),fc(ts,Xr,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),fc(ts,rs,(t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t])),fc(ts,os,(t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t])),fc(es,ts,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t])),fc(es,es,(t,e,n)=>{if(t.name==e.name){if(!n.aIsStrong)return[new hc(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]}),fc(es,os,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t])),fc(es,Xr,(t,e,n)=>{if(t.oldRange&&(t.oldRange=Fo._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(n.abRelation){const i=Fo._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if("left"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.start.path=n.abRelation.path,t.newRange.end=i.end,[t];if("right"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=i.start,t.newRange.end.path=n.abRelation.path,[t]}t.newRange=Fo._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]}),fc(es,rs,(t,e,n)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(n.abRelation){const i=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?t.newRange.start=Bo._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!n.abRelation.wasInLeftElement&&(t.newRange.start=Bo._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasInRightElement?t.newRange.end=Bo._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?t.newRange.end=Bo._createAt(e.insertionPosition):t.newRange.end=i.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]}),fc(os,ts,(t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t])),fc(os,os,(t,e,n)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(n.bWasUndone){const n=e.graveyardPosition.path.slice();return n.push(0),t.sourcePosition=new Bo(e.graveyardPosition.root,n),t.howMany=0,[t]}return[new hc(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const i="$graveyard"==t.targetPosition.root.rootName,o="$graveyard"==e.targetPosition.root.rootName;if(o&&!i||(!i||o)&&n.aIsStrong){const n=e.targetPosition._getTransformedByMergeOperation(e),i=t.targetPosition._getTransformedByMergeOperation(e);return[new Xr(n,t.howMany,i,0)]}return[new hc(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),t.graveyardPosition.isEqual(e.graveyardPosition)&&n.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),fc(os,Xr,(t,e,n)=>{const i=Fo._createFromPositionAndShift(e.sourcePosition,e.howMany);return"remove"==e.type&&!n.bWasUndone&&!n.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition)?[new hc(0)]:(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])}),fc(os,rs,(t,e,n)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)){const i=0!=e.howMany,o=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(i||o||"mergeTargetNotMoved"==n.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if("mergeSameElement"==n.abRelation||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}),fc(Xr,ts,(t,e)=>{const n=Fo._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=n.start,t.howMany=n.end.offset-n.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]}),fc(Xr,Xr,(t,e,n)=>{const i=Fo._createFromPositionAndShift(t.sourcePosition,t.howMany),o=Fo._createFromPositionAndShift(e.sourcePosition,e.howMany);let r,s=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),r=t.targetPosition.isEqual(e.targetPosition)&&a?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),vc(t,e)&&vc(e,t))return[e.getReversed()];if(i.containsPosition(e.targetPosition)&&i.containsRange(o,!0))return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),yc([i],r);if(o.containsPosition(t.targetPosition)&&o.containsRange(i,!0))return i.start=i.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),i.end=i.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),yc([i],r);const c=Ne(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),yc([i],r);"remove"!=t.type||"remove"==e.type||n.aWasUndone||n.forceWeakRemove?"remove"==t.type||"remove"!=e.type||n.bWasUndone||n.forceWeakRemove||(s=!1):s=!0;const l=[],d=i.getDifference(o);for(const t of d){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany),t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const n="same"==Ne(t.start.getParentPath(),e.getMovedRangeStart().getParentPath()),i=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,n);l.push(...i)}const h=i.getIntersection(o);return null!==h&&s&&(h.start=h.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),h.end=h.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===l.length?l.push(h):1==l.length?o.start.isBefore(i.start)||o.start.isEqual(i.start)?l.unshift(h):l.push(h):l.splice(1,0,h)),0===l.length?[new hc(t.baseVersion)]:yc(l,r)}),fc(Xr,rs,(t,e,n)=>{let i=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(i=t.targetPosition._getTransformedBySplitOperation(e));const o=Fo._createFromPositionAndShift(t.sourcePosition,t.howMany);if(o.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=i,[t];if(o.start.hasSameParentAs(e.splitPosition)&&o.containsPosition(e.splitPosition)){let t=new Fo(e.splitPosition,o.end);return t=t._getTransformedBySplitOperation(e),yc([new Fo(o.start,e.splitPosition),t],i)}t.targetPosition.isEqual(e.splitPosition)&&"insertAtSource"==n.abRelation&&(i=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&"insertBetween"==n.abRelation&&(i=t.targetPosition);const r=[o._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const i=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);t.howMany>1&&i&&!n.aWasUndone&&r.push(Fo._createFromPositionAndShift(e.insertionPosition,1))}return yc(r,i)}),fc(Xr,os,(t,e,n)=>{const i=Fo._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition))if("remove"!=t.type||n.forceWeakRemove){if(1==t.howMany)return n.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new hc(0)]}else if(!n.aWasUndone){const n=[];let i=e.graveyardPosition.clone(),o=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(n.push(new Xr(t.sourcePosition,t.howMany-1,t.targetPosition,0)),i=i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),s=new Xr(i,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const c=new Bo(s.targetPosition.root,a);o=o._getTransformedByMove(i,r,1);const l=new Xr(o,e.howMany,c,0);return n.push(s),n.push(l),n}const o=Fo._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=o.start,t.howMany=o.end.offset-o.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]}),fc(ns,ts,(t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t])),fc(ns,os,(t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t])),fc(ns,Xr,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),fc(ns,ns,(t,e,n)=>{if(t.position.isEqual(e.position)){if(!n.aIsStrong)return[new hc(0)];t.oldName=e.newName}return[t]}),fc(ns,rs,(t,e)=>"same"!=Ne(t.position.path,e.splitPosition.getParentPath())||e.graveyardPosition?(t.position=t.position._getTransformedBySplitOperation(e),[t]):[t,new ns(t.position.getShiftedBy(1),t.oldName,t.newName,0)]),fc(is,is,(t,e,n)=>{if(t.root===e.root&&t.key===e.key){if(!n.aIsStrong||t.newValue===e.newValue)return[new hc(0)];t.oldValue=e.newValue}return[t]}),fc(rs,ts,(t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset{if(!t.graveyardPosition&&!n.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const n=e.graveyardPosition.path.slice();n.push(0);const i=new Bo(e.graveyardPosition.root,n),o=rs.getInsertionPosition(new Bo(e.graveyardPosition.root,n)),r=new rs(i,0,null,0);return r.insertionPosition=o,t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=rs.getInsertionPosition(t.splitPosition),t.graveyardPosition=r.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[r,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=rs.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),fc(rs,Xr,(t,e,n)=>{const i=Fo._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const o=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);if(!n.bWasUndone&&o){const n=t.splitPosition._getTransformedByMoveOperation(e),i=t.graveyardPosition._getTransformedByMoveOperation(e),o=i.path.slice();o.push(0);const r=new Bo(i.root,o);return[new Xr(n,t.howMany,r,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.splitPosition)){const n=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=n,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new hc(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new hc(0)];if("splitBefore"==n.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const i="$graveyard"==t.splitPosition.root.rootName,o="$graveyard"==e.splitPosition.root.rootName;if(o&&!i||(!i||o)&&n.aIsStrong){const n=[];return e.howMany&&n.push(new Xr(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&n.push(new Xr(t.splitPosition,t.howMany,t.moveTargetPosition,0)),n}return[new hc(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.baRelation){const n=e.insertionPosition.path.slice();n.push(0);const i=new Bo(e.insertionPosition.root,n);return[t,new Xr(t.insertionPosition,1,i,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset0}addBatch(t){const e=this.editor.model.document.selection,n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,n){const i=this.editor.model,o=i.document,r=[];for(const e of t){const t=Ac(e,n).find(t=>t.start.root!=o.graveyard);t&&r.push(t)}r.length&&i.change(t=>{t.setSelection(r,{backward:e})})}_undo(t,e){const n=this.editor.model,i=n.document;this._createdBatches.add(e);const o=t.operations.slice().filter(t=>t.isDocumentOperation);o.reverse();for(const t of o){const o=t.baseVersion+1,r=Array.from(i.history.getOperations(o)),s=pc([t.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const o of s)e.addOperation(o),n.applyOperation(o),i.history.setOperationAsUndone(t,o)}}}function Ac(t,e){const n=t.getTransformedByOperations(e);n.sort((t,e)=>t.start.isBefore(e.start)?-1:1);for(let t=1;te.batch==t):this._stack.length-1,n=this._stack.splice(e,1)[0],i=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(i,()=>{this._undo(n.batch,i);const t=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t),this.fire("revert",n.batch,i)}),this.refresh()}}class Cc extends xc{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(e,()=>{const n=t.batch.operations[t.batch.operations.length-1].baseVersion+1,i=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,i),this._undo(t.batch,e)}),this.refresh()}}class Pc extends La{constructor(t){super(t),this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new Tc(t),this._redoCommand=new Cc(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",(t,e)=>{const n=e[0];if(!n.isDocumentOperation)return;const i=n.batch,o=this._redoCommand._createdBatches.has(i),r=this._undoCommand._createdBatches.has(i);this._batchRegistry.has(i)||"transparent"==i.type&&!o&&!r||(o?this._undoCommand.addBatch(i):r||(this._undoCommand.addBatch(i),this._redoCommand.clearStack()),this._batchRegistry.add(i))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(t,e,n)=>{this._redoCommand.addBatch(n)}),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}n(28);class Sc extends va{constructor(){super();const t=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:t.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const t=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),e=t.getAttribute("viewBox");for(e&&(this.viewBox=e),this.element.innerHTML="";t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(t=>{t.style.fill=this.fillColor})}}n(30);class Mc extends va{constructor(t){super(t),this.set("text",""),this.set("position","s");const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",e.to("position",t=>"ck-tooltip_"+t),e.if("text","ck-hidden",t=>!t.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:e.to("text")}]}]})}}n(32);class Ec extends va{constructor(t){super(t);const e=this.bindTemplate,n=_e();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(n),this.iconView=new Sc,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",e.to("class"),e.if("isEnabled","ck-disabled",t=>!t),e.if("isVisible","ck-hidden",t=>!t),e.to("isOn",t=>t?"ck-on":"ck-off"),e.if("withText","ck-button_with-text")],type:e.to("type",t=>t||"button"),tabindex:e.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${n}`,"aria-disabled":e.if("isEnabled",!0,t=>!t),"aria-pressed":e.to("isOn",t=>!!this.isToggleable&&String(t))},children:this.children,on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(t=>{this.isEnabled?this.fire("execute"):t.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView)}focus(){this.element.focus()}_createTooltipView(){const t=new Mc;return t.bind("text").to(this,"_tooltipString"),t.bind("position").to(this,"tooltipPosition"),t}_createLabelView(t){const e=new va,n=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:`ck-editor__aria-label_${t}`},children:[{text:this.bindTemplate.to("label")}]}),e}_getTooltipString(t,e,n){return t?"string"==typeof t?t:(n&&(n=function(t){return Nn.isMac?Vn(t).map(t=>Rn[t.toLowerCase()]||t).reduce((t,e)=>t.slice(-1)in On?t+e:t+"+"+e):t}(n)),t instanceof Function?t(e,n):`${e}${n?` (${n})`:""}`):""}}var Ic='',Nc='';class Oc extends La{init(){const t=this.editor,e=t.locale,n=t.t,i="ltr"==e.uiLanguageDirection?Ic:Nc,o="ltr"==e.uiLanguageDirection?Nc:Ic;this._addButton("undo",n("bj"),"CTRL+Z",i),this._addButton("redo",n("bk"),"CTRL+Y",o)}_addButton(t,e,n,i){const o=this.editor;o.ui.componentFactory.add(t,r=>{const s=o.commands.get(t),a=new Ec(r);return a.set({label:e,icon:i,keystroke:n,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",()=>o.execute(t)),a})}}class Rc extends La{static get requires(){return[Pc,Oc]}static get pluginName(){return"Undo"}}class Dc extends La{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new xn({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(t){if("string"!=typeof t)throw new be.b("pendingactions-add-invalid-message: The message must be a string.",this);const e=Object.create(sn);return e.set("message",t),this._actions.add(e),this.hasAny=!0,e}remove(t){this._actions.remove(t),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class Lc{constructor(){const t=new window.FileReader;this._reader=t,this._data=void 0,this.set("loaded",0),t.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;return this.total=t.size,new Promise((n,i)=>{e.onload=()=>{const t=e.result;this._data=t,n(t)},e.onerror=()=>{i("error")},e.onabort=()=>{i("aborted")},this._reader.readAsDataURL(t)})}abort(){this._reader.abort()}}Ie(Lc,sn);class jc extends La{static get pluginName(){return"FileRepository"}static get requires(){return[Dc]}init(){this.loaders=new xn,this.loaders.on("add",()=>this._updatePendingAction()),this.loaders.on("remove",()=>this._updatePendingAction()),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(t,e)=>e?t/e*100:0)}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter)return console.warn(Object(be.a)("filerepository-no-upload-adapter: Upload adapter is not defined.")),null;const e=new Vc(Promise.resolve(t),this.createUploadAdapter);return this.loaders.add(e),this._loadersMap.set(t,e),t instanceof Promise&&e.file.then(t=>{this._loadersMap.set(t,e)}),e.file.catch(()=>{}),e.on("change:uploaded",()=>{let t=0;for(const e of this.loaders)t+=e.uploaded;this.uploaded=t}),e.on("change:uploadTotal",()=>{let t=0;for(const e of this.loaders)e.uploadTotal&&(t+=e.uploadTotal);this.uploadTotal=t}),e}destroyLoader(t){const e=t instanceof Vc?t:this.getLoader(t);e._destroy(),this.loaders.remove(e),this._loadersMap.forEach((t,n)=>{t===e&&this._loadersMap.delete(n)})}_updatePendingAction(){const t=this.editor.plugins.get(Dc);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t,n=t=>`${e("aw")} ${parseInt(t)}%.`;this._pendingAction=t.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else t.remove(this._pendingAction),this._pendingAction=null}}Ie(jc,sn);class Vc{constructor(t,e){this.id=_e(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=e(this),this._reader=new Lc,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(t,e)=>e?t/e*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(t=>this._filePromiseWrapper?t:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new be.b("filerepository-read-wrong-status: You cannot call read if the status is different than idle.",this);return this.status="reading",this._filePromiseWrapper.promise.then(t=>this._reader.read(t)).then(t=>(this.status="idle",t)).catch(t=>{if("aborted"===t)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:t})}upload(){if("idle"!=this.status)throw new be.b("filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.",this);return this.status="uploading",this._filePromiseWrapper.promise.then(()=>this._adapter.upload()).then(t=>(this.uploadResponse=t,this.status="idle",t)).catch(t=>{if("aborted"===this.status)throw"aborted";throw this.status="error",t})}abort(){const t=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==t?this._reader.abort():"uploading"==t&&this._adapter.abort&&this._adapter.abort():this._filePromiseWrapper.rejecter("aborted"),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(t){const e={};return e.promise=new Promise((n,i)=>{e.resolver=n,e.rejecter=i,e.isFulfilled=!1,t.then(t=>{e.isFulfilled=!0,n(t)}).catch(t=>{e.isFulfilled=!0,i(t)})}),e}}Ie(Vc,sn);const zc="ckCsrfToken",Bc=40,Fc="abcdefghijklmnopqrstuvwxyz0123456789";class Uc extends La{static get requires(){return[jc]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const t=this.editor.config.get("ckfinder.uploadUrl");t&&(this.editor.plugins.get(jc).createUploadAdapter=e=>new Hc(e,t,this.editor.t))}}class Hc{constructor(t,e,n){this.loader=t,this.url=e,this.t=n}upload(){return this.loader.file.then(t=>new Promise((e,n)=>{this._initRequest(),this._initListeners(e,n,t),this._sendRequest(t)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open("POST",this.url,!0),t.responseType="json"}_initListeners(t,e,n){const i=this.xhr,o=this.loader,r=(0,this.t)("a")+` ${n.name}.`;i.addEventListener("error",()=>e(r)),i.addEventListener("abort",()=>e()),i.addEventListener("load",()=>{const n=i.response;if(!n||!n.uploaded)return e(n&&n.error&&n.error.message?n.error.message:r);t({default:n.url})}),i.upload&&i.upload.addEventListener("progress",t=>{t.lengthComputable&&(o.uploadTotal=t.total,o.uploaded=t.loaded)})}_sendRequest(t){const e=new FormData;e.append("upload",t),e.append("ckCsrfToken",function(){let t=function(t){t=t.toLowerCase();const e=document.cookie.split(";");for(const n of e){const e=n.split("=");if(decodeURIComponent(e[0].trim().toLowerCase())===t)return decodeURIComponent(e[1])}return null}(zc);return t&&t.length==Bc||(t=function(t){let e="";const n=new Uint8Array(t);window.crypto.getRandomValues(n);for(let t=0;t.5?i.toUpperCase():i}return e}(Bc),function(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+";path=/"}(zc,t)),t}()),this.xhr.send(e)}}class qc{constructor(t,e,n){let i,o=null;"function"==typeof n?i=n:(o=t.commands.get(n),i=()=>{t.execute(n)}),t.model.document.on("change",(n,r)=>{if(o&&!o.isEnabled)return;if("transparent"==r.type)return;const s=Array.from(t.model.document.differ.getChanges()),a=s[0];if(1!=s.length||"insert"!==a.type||"$text"!=a.name||1!=a.length)return;const c=a.position.textNode||a.position.nodeAfter;if(!c.parent.is("paragraph"))return;const l=e.exec(c.data);l&&t.model.enqueueChange(t=>{const e=t.createPositionAt(c.parent,0),n=t.createPositionAt(c.parent,l[0].length),o=new Jo(e,n);!1!==i({match:l})&&t.remove(o),o.detach()})})}}class Wc{constructor(t,e,n){let i,o,r,s;e instanceof RegExp?i=e:r=e,"string"==typeof n?o=n:s=n,r=r||(t=>{let e;const n=[],o=[];for(;null!==(e=i.exec(t))&&!(e&&e.length<4);){let{index:t,1:i,2:r,3:s}=e;const a=i+r+s,c=[t+=e[0].length-a.length,t+i.length],l=[t+i.length+r.length,t+i.length+r.length+s.length];n.push(c),n.push(l),o.push([t+i.length,t+i.length+r.length])}return{remove:n,format:o}}),s=s||((e,n)=>{const i=t.model.schema.getValidRanges(n,o);for(const t of i)e.setAttribute(o,!0,t);e.removeSelectionAttribute(o)}),t.model.document.on("change",(e,n)=>{if("transparent"==n.type)return;const i=t.model.document.selection;if(!i.isCollapsed)return;const o=Array.from(t.model.document.differ.getChanges()),a=o[0];if(1!=o.length||"insert"!==a.type||"$text"!=a.name||1!=a.length)return;const c=i.focus.parent,l=function(t){return Array.from(t.getChildren()).reduce((t,e)=>t+e.data,"")}(c).slice(0,i.focus.offset),d=r(l),h=Yc(c,d.format,t.model),u=Yc(c,d.remove,t.model);h.length&&u.length&&t.model.enqueueChange(t=>{if(!1!==s(t,h))for(const e of u.reverse())t.remove(e)})})}}function Yc(t,e,n){return e.filter(t=>void 0!==t[0]&&void 0!==t[1]).map(e=>n.createRange(n.createPositionAt(t,e[0]),n.createPositionAt(t,e[1])))}function $c(t,e){return(n,i)=>{if(!t.commands.get(e).isEnabled)return!1;const o=t.model.schema.getValidRanges(i,e);for(const t of o)n.setAttribute(e,!0,t);n.removeSelectionAttribute(e)}}class Gc extends Fa{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,i=void 0===t.forceValue?!this.value:t.forceValue;e.change(t=>{if(n.isCollapsed)i?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const o=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of o)i?t.setAttribute(this.attributeKey,i,e):t.removeAttribute(this.attributeKey,e)}})}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,n=t.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const t of n.getRanges())for(const n of t.getItems())if(e.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const Qc="bold";class Kc extends La{init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Qc}),t.model.schema.setAttributeProperties(Qc,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Qc,view:"strong",upcastAlso:["b",{styles:{"font-weight":"bold"}}]}),t.commands.add(Qc,new Gc(t,Qc)),t.keystrokes.set("CTRL+B",Qc)}}var Jc='';const Zc="bold";class Xc extends La{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Zc,n=>{const i=t.commands.get(Zc),o=new Ec(n);return o.set({label:e("d"),icon:Jc,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>t.execute(Zc)),o})}}const tl="italic";class el extends La{init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:tl}),t.model.schema.setAttributeProperties(tl,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:tl,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(tl,new Gc(t,tl)),t.keystrokes.set("CTRL+I",tl)}}var nl='';const il="italic";class ol extends La{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(il,n=>{const i=t.commands.get(il),o=new Ec(n);return o.set({label:e("e"),icon:nl,keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>t.execute(il)),o})}}function rl(t){const e=t.next();return e.done?null:e.value}class sl extends Fa{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.schema,i=e.document.selection,o=Array.from(i.getTopMostBlocks()),r=void 0===t.forceValue?!this.value:t.forceValue;e.change(t=>{if(r){const e=o.filter(t=>al(t)||ll(n,t));this._applyQuote(t,e)}else this._removeQuote(t,o.filter(al))})}_getValue(){const t=rl(this.editor.model.document.selection.getTopMostBlocks());return!(!t||!al(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=rl(t.getSelectedBlocks());return!!n&&ll(e,n)}_removeQuote(t,e){cl(t,e).reverse().forEach(e=>{if(e.start.isAtStart&&e.end.isAtEnd)return void t.unwrap(e.start.parent);if(e.start.isAtStart){const n=t.createPositionBefore(e.start.parent);return void t.move(e,n)}e.end.isAtEnd||t.split(e.end);const n=t.createPositionAfter(e.end.parent);t.move(e,n)})}_applyQuote(t,e){const n=[];cl(t,e).reverse().forEach(e=>{let i=al(e.start);i||(i=t.createElement("blockQuote"),t.wrap(e,i)),n.push(i)}),n.reverse().reduce((e,n)=>e.nextSibling==n?(t.merge(t.createPositionAfter(e)),e):n)}}function al(t){return"blockQuote"==t.parent.name?t.parent:null}function cl(t,e){let n,i=0;const o=[];for(;i{if(t.endsWith("blockQuote")&&"blockQuote"==e.name)return!1}),t.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),t.model.document.registerPostFixer(n=>{const i=t.model.document.differ.getChanges();for(const t of i)if("insert"==t.type){const i=t.position.nodeAfter;if(!i)continue;if(i.is("blockQuote")&&i.isEmpty)return n.remove(i),!0;if(i.is("blockQuote")&&!e.checkChild(t.position,i))return n.unwrap(i),!0;if(i.is("element")){const t=n.createRangeIn(i);for(const i of t.getItems())if(i.is("blockQuote")&&!e.checkChild(n.createPositionBefore(i),i))return n.unwrap(i),!0}}else if("remove"==t.type){const e=t.position.parent;if(e.is("blockQuote")&&e.isEmpty)return n.remove(e),!0}return!1})}afterInit(){const t=this.editor.commands.get("blockQuote");this.listenTo(this.editor.editing.view.document,"enter",(e,n)=>{const i=this.editor.model.document,o=i.selection.getLastPosition().parent;i.selection.isCollapsed&&o.isEmpty&&t.value&&(this.editor.execute("blockQuote"),this.editor.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())})}}var hl='';n(34);class ul extends La{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("blockQuote",n=>{const i=t.commands.get("blockQuote"),o=new Ec(n);return o.set({label:e("f"),icon:hl,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>t.execute("blockQuote")),o})}}var fl='';class gl extends La{static get pluginName(){return"CKFinderUI"}init(){const t=this.editor,e=t.ui.componentFactory,n=t.t;e.add("ckfinder",e=>{const i=t.commands.get("ckfinder"),o=new Ec(e);return o.set({label:n("g"),icon:fl,tooltip:!0}),o.bind("isEnabled").to(i),o.on("execute",()=>{t.execute("ckfinder"),t.editing.view.focus()}),o})}}class ml extends La{static get pluginName(){return"Notification"}init(){this.on("show:warning",(t,e)=>{window.alert(e.message)},{priority:"lowest"})}showSuccess(t,e={}){this._showNotification({message:t,type:"success",namespace:e.namespace,title:e.title})}showInfo(t,e={}){this._showNotification({message:t,type:"info",namespace:e.namespace,title:e.title})}showWarning(t,e={}){this._showNotification({message:t,type:"warning",namespace:e.namespace,title:e.title})}_showNotification(t){const e=`show:${t.type}`+(t.namespace?`:${t.namespace}`:"");this.fire(e,{message:t.message,type:t.type,title:t.title||""})}}class pl extends Fa{constructor(t){super(t),this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}refresh(){const t=this.editor.commands.get("imageUpload"),e=this.editor.commands.get("link");this.isEnabled=t&&e&&(t.isEnabled||e.isEnabled)}execute(){const t=this.editor,e=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=e&&"modal"!=e)throw new be.b('ckfinder-unknown-openerMethod: The openerMethod config option must by "popup" or "modal".',t);const n=this.editor.config.get("ckfinder.options")||{};n.chooseFiles=!0;const i=n.onInit;n.language||(n.language=t.locale.uiLanguage),n.onInit=e=>{i&&i(e),e.on("files:choose",n=>{const i=n.data.files.toArray(),o=i.filter(t=>!t.isImage()),r=i.filter(t=>t.isImage());for(const e of o)t.execute("link",e.getUrl());const s=[];for(const t of r){const n=t.getUrl();s.push(n||e.request("file:getProxyUrl",{file:t}))}s.length&&bl(t,s)}),e.on("file:choose:resizedImage",e=>{const n=e.data.resizedUrl;if(n)bl(t,[n]);else{const e=t.plugins.get("Notification"),n=t.locale.t;e.showWarning(n("ar"),{title:n("as"),namespace:"ckfinder"})}})},window.CKFinder[e](n)}}function bl(t,e){if(t.commands.get("imageUpload").isEnabled)t.execute("imageInsert",{source:e});else{const e=t.plugins.get("Notification"),n=t.locale.t;e.showWarning(n("at"),{title:n("au"),namespace:"ckfinder"})}}class wl extends La{static get pluginName(){return"CKFinderEditing"}static get requires(){return[ml]}init(){const t=this.editor;t.commands.add("ckfinder",new pl(t))}}const kl=/^data:(\S*?);base64,/;class _l{constructor(t,e,n){if(!t)throw new be.b("fileuploader-missing-file: File must be provided as the first argument",null);if(!e)throw new be.b("fileuploader-missing-token: Token must be provided as the second argument.",null);if(!n)throw new be.b("fileuploader-missing-api-address: Api address must be provided as the third argument.",null);this.file=function(t){if("string"!=typeof t)return!1;const e=t.match(kl);return!(!e||!e.length)}(t)?function(t,e=512){try{const n=t.match(kl)[1],i=atob(t.replace(kl,"")),o=[];for(let t=0;tt(n)),this}onError(t){return this.once("error",(e,n)=>t(n)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const t=new XMLHttpRequest;t.open("POST",this._apiAddress),t.setRequestHeader("Authorization",this._token.value),t.responseType="json",this.xhr=t}_attachXHRListeners(){const t=this,e=this.xhr;function n(e){return()=>t.fire("error",e)}e.addEventListener("error",n("Network Error")),e.addEventListener("abort",n("Abort")),e.upload&&e.upload.addEventListener("progress",t=>{t.lengthComputable&&this.fire("progress",{total:t.total,uploaded:t.loaded})}),e.addEventListener("load",()=>{const t=e.status,n=e.response;if(t<200||t>299)return this.fire("error",n.message||n.error)})}_sendRequest(){const t=new FormData,e=this.xhr;return t.append("file",this.file),new Promise((n,i)=>{e.addEventListener("load",()=>{const t=e.status,o=e.response;return t<200||t>299?o.message?i(new be.b("fileuploader-uploading-data-failed: Uploading file failed.",this,{message:o.message})):i(o.error):n(o)}),e.addEventListener("error",()=>i(new Error("Network Error"))),e.addEventListener("abort",()=>i(new Error("Abort"))),e.send(t)})}}Ie(_l,Ae);const vl={refreshInterval:36e5,autoRefresh:!0};class yl{constructor(t,e=vl){if(!t)throw new be.b("token-missing-token-url: A `tokenUrl` must be provided as the first constructor argument.",this);this.set("value",e.initValue),this._refresh="function"==typeof t?t:()=>(function(t){return new Promise((e,n)=>{const i=new XMLHttpRequest;i.open("GET",t),i.addEventListener("load",()=>{const t=i.status,o=i.response;return t<200||t>299?n(new be.b("token-cannot-download-new-token: Cannot download new token from the provided url.",null)):e(o)}),i.addEventListener("error",()=>n(new Error("Network Error"))),i.addEventListener("abort",()=>n(new Error("Abort"))),i.send()})})(t),this._options=Object.assign({},vl,e)}init(){return new Promise((t,e)=>{this._options.autoRefresh&&this._startRefreshing(),this.value?t(this):this._refreshToken().then(t).catch(e)})}_refreshToken(){return this._refresh().then(t=>this.set("value",t)).then(()=>this)}destroy(){this._stopRefreshing()}_startRefreshing(){this._refreshInterval=setInterval(()=>this._refreshToken(),this._options.refreshInterval)}_stopRefreshing(){clearInterval(this._refreshInterval)}static create(t,e=vl){return new yl(t,e).init()}}Ie(yl,sn);var xl=yl;class Al extends La{static get pluginName(){return"CloudServices"}init(){const t=this.editor.config.get("cloudServices")||{};for(const e in t)this[e]=t[e];if(this.tokenUrl)return this.token=new Al.Token(this.tokenUrl),this.token.init();this.token=null}}Al.Token=xl;class Tl extends La{static get requires(){return[jc,Al]}init(){const t=this.editor,e=t.plugins.get(Al),n=e.token,i=e.uploadUrl;n&&(this._uploadGateway=new Tl._UploadGateway(n,i),t.plugins.get(jc).createUploadAdapter=t=>new Cl(this._uploadGateway,t))}}class Cl{constructor(t,e){this.uploadGateway=t,this.loader=e}upload(){return this.loader.file.then(t=>(this.fileUploader=this.uploadGateway.upload(t),this.fileUploader.on("progress",(t,e)=>{this.loader.uploadTotal=e.total,this.loader.uploaded=e.uploaded}),this.fileUploader.send()))}abort(){this.fileUploader.abort()}}Tl._UploadGateway=class{constructor(t,e){if(!t)throw new be.b("uploadgateway-missing-token: Token must be provided.",null);if(!e)throw new be.b("uploadgateway-missing-api-address: Api address must be provided.",null);this._token=t,this._apiAddress=e}upload(t){return new _l(t,this._token,this._apiAddress)}};class Pl extends Mi{constructor(t){super(t),this._observedElements=new Set}observe(t,e){this.document.getRoot(e).on("change:children",(e,n)=>{this.view.once("render",()=>this._updateObservedElements(t,n))})}_updateObservedElements(t,e){if(!e.is("element")||e.is("attributeElement"))return;const n=this.view.domConverter.mapViewToDom(e);if(n){for(const t of n.querySelectorAll("img"))this._observedElements.has(t)||(this.listenTo(t,"load",(t,e)=>this._fireEvents(e)),this._observedElements.add(t));for(const e of this._observedElements)t.contains(e)||(this.stopListening(e),this._observedElements.delete(e))}}_fireEvents(t){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",t))}destroy(){this._observedElements.clear(),super.destroy()}}function Sl(t){return n=>{n.on(`attribute:${t}:image`,e)};function e(t,e,n){if(!n.consumable.consume(e.item,t.name))return;const i=n.writer,o=n.mapper.toViewElement(e.item).getChild(0);null!==e.attributeNewValue?i.setAttribute(e.attributeKey,e.attributeNewValue,o):i.removeAttribute(e.attributeKey,o)}}class Ml{constructor(){this._stack=[]}add(t,e){const n=this._stack,i=n[0];this._insertDescriptor(t);const o=n[0];i===o||El(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:e})}remove(t,e){const n=this._stack,i=n[0];this._removeDescriptor(t);const o=n[0];i===o||El(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:e})}_insertDescriptor(t){const e=this._stack,n=e.findIndex(e=>e.id===t.id);if(El(t,e[n]))return;n>-1&&e.splice(n,1);let i=0;for(;e[i]&&Il(e[i],t);)i++;e.splice(i,0,t)}_removeDescriptor(t){const e=this._stack,n=e.findIndex(e=>e.id===t);n>-1&&e.splice(n,1)}}function El(t,e){return t&&e&&t.priority==e.priority&&Nl(t.classes)==Nl(e.classes)}function Il(t,e){return t.priority>e.priority||!(t.priorityNl(e.classes)}function Nl(t){return Array.isArray(t)?t.sort().join(","):t}Ie(Ml,Ae);var Ol='';const Rl="ck-widget",Dl="ck-widget_selected";function Ll(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function jl(t,e,n={}){return Nn.isEdge||e.setAttribute("contenteditable","false",t),e.addClass(Rl,t),e.setCustomProperty("widget",!0,t),t.getFillerOffset=Fl,n.label&&function(t,e,n){n.setCustomProperty("widgetLabel",e,t)}(t,n.label,e),n.hasSelectionHandler&&function(t,e){const n=e.createUIElement("div",{class:"ck ck-widget__selection-handler"},(function(t){const e=this.toDomElement(t),n=new Sc;return n.set("content",Ol),n.render(),e.appendChild(n.element),e}));e.insert(e.createPositionAt(t,0),n),e.addClass(["ck-widget_with-selection-handler"],t)}(t,e),function(t,e,n,i){const o=new Ml;o.on("change:top",(e,o)=>{o.oldDescriptor&&i(t,o.oldDescriptor,o.writer),o.newDescriptor&&n(t,o.newDescriptor,o.writer)}),e.setCustomProperty("addHighlight",(t,e,n)=>o.add(e,n),t),e.setCustomProperty("removeHighlight",(t,e,n)=>o.remove(e,n),t)}(t,e,(t,e,n)=>n.addClass(i(e.classes),t),(t,e,n)=>n.removeClass(i(e.classes),t)),t;function i(t){return Array.isArray(t)?t:[t]}}function Vl(t){const e=t.getCustomProperty("widgetLabel");return e?"function"==typeof e?e():e:""}function zl(t,e){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],t),Nn.isEdge||(e.setAttribute("contenteditable",t.isReadOnly?"false":"true",t),t.on("change:isReadOnly",(n,i,o)=>{e.setAttribute("contenteditable",o?"false":"true",t)})),t.on("change:isFocused",(n,i,o)=>{o?e.addClass("ck-editor__nested-editable_focused",t):e.removeClass("ck-editor__nested-editable_focused",t)}),t}function Bl(t,e){const n=t.getSelectedElement();if(n&&e.schema.isBlock(n))return e.createPositionAfter(n);const i=t.getSelectedBlocks().next().value;if(i){if(i.isEmpty)return e.createPositionAt(i,0);const n=e.createPositionAfter(i);return t.focus.isTouching(n)?n:e.createPositionBefore(i)}return t.focus}function Fl(){return null}function Ul(t){const e=t.getSelectedElement();return e&&function(t){return!!t.getCustomProperty("image")&&Ll(t)}(e)?e:null}function Hl(t){return!!t&&t.is("image")}function ql(t,e,n={}){const i=t.createElement("image",n),o=Bl(e.document.selection,e);e.insertContent(i,o),i.parent&&t.setSelection(i,"on")}function Wl(t){const e=t.schema,n=t.document.selection;return function(t,e,n){const i=function(t,e){const n=Bl(t,e).parent;return n.isEmpty&&!n.is("$root")?n.parent:n}(t,n);return e.checkChild(i,"image")}(n,e,t)&&!function(t,e){const n=t.getSelectedElement();return n&&e.isObject(n)}(n,e)&&function(t){return[...t.focus.getAncestors()].every(t=>!t.is("image"))}(n)}class Yl extends Fa{refresh(){this.isEnabled=Wl(this.editor.model)}execute(t){const e=this.editor.model;e.change(n=>{const i=Array.isArray(t.source)?t.source:[t.source];for(const t of i)ql(n,e,{src:t})})}}class $l extends La{init(){const t=this.editor,e=t.model.schema,n=t.t,i=t.conversion;t.editing.view.addObserver(Pl),e.register("image",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["alt","src","srcset"]}),i.for("dataDowncast").elementToElement({model:"image",view:(t,e)=>Gl(e)}),i.for("editingDowncast").elementToElement({model:"image",view:(t,e)=>(function(t,e,n){return e.setCustomProperty("image",!0,t),jl(t,e,{label:function(){const e=t.getChild(0).getAttribute("alt");return e?`${e} ${n}`:n}})})(Gl(e),e,n("j"))}),i.for("downcast").add(Sl("src")).add(Sl("alt")).add(function(){return e=>{e.on("attribute:srcset:image",t)};function t(t,e,n){if(!n.consumable.consume(e.item,t.name))return;const i=n.writer,o=n.mapper.toViewElement(e.item).getChild(0);if(null===e.attributeNewValue){const t=e.attributeOldValue;t.data&&(i.removeAttribute("srcset",o),i.removeAttribute("sizes",o),t.width&&i.removeAttribute("width",o))}else{const t=e.attributeNewValue;t.data&&(i.setAttribute("srcset",t.data,o),i.setAttribute("sizes","100vw",o),t.width&&i.setAttribute("width",t.width,o))}}}()),i.for("upcast").elementToElement({view:{name:"img",attributes:{src:!0}},model:(t,e)=>e.createElement("image",{src:t.getAttribute("src")})}).attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:t=>{const e={data:t.getAttribute("srcset")};return t.hasAttribute("width")&&(e.width=t.getAttribute("width")),e}}}).add(function(){return e=>{e.on("element:figure",t)};function t(t,e,n){if(!n.consumable.test(e.viewItem,{name:!0,classes:"image"}))return;const i=Array.from(e.viewItem.getChildren()).find(t=>t.is("img"));if(!i||!i.hasAttribute("src")||!n.consumable.test(i,{name:!0}))return;const o=n.convertItem(i,e.modelCursor),r=rl(o.modelRange.getItems());r&&(n.convertChildren(e.viewItem,n.writer.createPositionAt(r,0)),e.modelRange=o.modelRange,e.modelCursor=o.modelCursor)}}()),t.commands.add("imageInsert",new Yl(t))}}function Gl(t){const e=t.createEmptyElement("img"),n=t.createContainerElement("figure",{class:"image"});return t.insert(t.createPositionAt(n,0),e),n}class Ql extends Qi{constructor(t){super(t),this.domEventType="mousedown"}onDomEvent(t){this.fire(t.type,t)}}n(36);const Kl=jn("Ctrl+A");class Jl extends La{static get pluginName(){return"Widget"}init(){const t=this.editor.editing.view,e=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(t,e,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const i=n.writer,o=i.document.selection,r=o.getSelectedElement();let s=null;for(const t of o.getRanges())for(const e of t){const t=e.item;Ll(t)&&!Zl(t,s)&&(i.addClass(Dl,t),this._previouslySelected.add(t),s=t,t==r&&i.setSelection(o.getRanges(),{fake:!0,label:Vl(r)}))}},{priority:"low"}),t.addObserver(Ql),this.listenTo(e,"mousedown",(...t)=>this._onMousedown(...t)),this.listenTo(e,"keydown",(...t)=>this._onKeydown(...t),{priority:"high"}),this.listenTo(e,"delete",(t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())},{priority:"high"})}_onMousedown(t,e){const n=this.editor,i=n.editing.view,o=i.document;let r=e.target;if(function(t){for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(Ll(t))return!1;t=t.parent}return!1}(r)){if(Nn.isSafari&&e.domEvent.detail>=3){const t=n.editing.mapper.toModelElement(r);this.editor.model.change(n=>{e.preventDefault(),n.setSelection(t,"in")})}return}if(!Ll(r)&&!(r=r.findAncestor(Ll)))return;e.preventDefault(),o.isFocused||i.focus();const s=n.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_onKeydown(t,e){const n=e.keyCode,i=n==Dn.arrowdown||n==Dn.arrowright;let o=!1;!function(t){return t==Dn.arrowright||t==Dn.arrowleft||t==Dn.arrowup||t==Dn.arrowdown}(n)?function(t){return Ln(t)==Kl}(e)?o=this._selectAllNestedEditableContent()||this._selectAllContent():n===Dn.enter&&(o=this._handleEnterKey(e.shiftKey)):o=this._handleArrowKeys(i),o&&(e.preventDefault(),t.stop())}_handleDelete(t){if(this.editor.isReadOnly)return;const e=this.editor.model.document.selection;if(!e.isCollapsed)return;const n=this._getObjectElementNextToSelection(t);return n?(this.editor.model.change(t=>{let i=e.anchor.parent;for(;i.isEmpty;){const e=i;i=e.parent,t.remove(e)}this._setSelectionOverElement(n)}),!0):void 0}_handleArrowKeys(t){const e=this.editor.model,n=e.schema,i=e.document.selection,o=i.getSelectedElement();if(o&&n.isObject(o)){const o=t?i.getLastPosition():i.getFirstPosition(),r=n.getNearestSelectionRange(o,t?"forward":"backward");return r&&e.change(t=>{t.setSelection(r)}),!0}if(!i.isCollapsed)return;const r=this._getObjectElementNextToSelection(t);return r&&n.isObject(r)?(this._setSelectionOverElement(r),!0):void 0}_handleEnterKey(t){const e=this.editor.model,n=e.document.selection.getSelectedElement();if(function(t,e){return t&&e.isObject(t)&&!e.isInline(t)}(n,e.schema))return e.change(i=>{let o=i.createPositionAt(n,t?"before":"after");const r=i.createElement("paragraph");if(e.schema.isBlock(n.parent)){const t=e.schema.findAllowedParent(o,r);o=i.split(o,t).position}i.insert(r,o),i.setSelection(r,"in")}),!0}_selectAllNestedEditableContent(){const t=this.editor.model,e=t.document.selection,n=t.schema.getLimitElement(e);return e.getFirstRange().root!=n&&(t.change(t=>{t.setSelection(t.createRangeIn(n))}),!0)}_selectAllContent(){const t=this.editor.model,e=this.editor.editing,n=e.view.document.selection.getSelectedElement();if(n&&Ll(n)){const i=e.mapper.toModelElement(n.parent);return t.change(t=>{t.setSelection(t.createRangeIn(i))}),!0}return!1}_setSelectionOverElement(t){this.editor.model.change(e=>{e.setSelection(e.createRangeOn(t))})}_getObjectElementNextToSelection(t){const e=this.editor.model,n=e.schema,i=e.document.selection,o=e.createSelection(i);e.modifySelection(o,{direction:t?"forward":"backward"});const r=t?o.focus.nodeBefore:o.focus.nodeAfter;return r&&n.isObject(r)?r:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(Dl,e);this._previouslySelected.clear()}}function Zl(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}class Xl extends Fa{refresh(){const t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=Hl(t),Hl(t)&&t.hasAttribute("alt")?this.value=t.getAttribute("alt"):this.value=!1}execute(t){const e=this.editor.model,n=e.document.selection.getSelectedElement();e.change(e=>{e.setAttribute("alt",t.newValue,n)})}}class td extends La{init(){this.editor.commands.add("imageTextAlternative",new Xl(this.editor))}}function ed({emitter:t,activator:e,callback:n,contextElements:i}){t.listenTo(document,"mousedown",(t,{target:o})=>{if(e()){for(const t of i)if(t.contains(o))return;n()}})}n(38);class nd extends va{constructor(t,e){super(t);const n=`ck-input-${_e()}`,i=`ck-status-${_e()}`;this.set("label"),this.set("value"),this.set("isReadOnly",!1),this.set("errorText",null),this.set("infoText",null),this.labelView=this._createLabelView(n),this.inputView=this._createInputView(e,n,i),this.statusView=this._createStatusView(i),this.bind("_statusText").to(this,"errorText",this,"infoText",(t,e)=>t||e);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input",o.if("isReadOnly","ck-disabled")]},children:[this.labelView,this.inputView,this.statusView]})}_createLabelView(t){const e=new xa(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createInputView(t,e,n){const i=new t(this.locale,n);return i.id=e,i.ariaDescribedById=n,i.bind("value").to(this),i.bind("isReadOnly").to(this),i.bind("hasError").to(this,"errorText",t=>!!t),i.on("input",()=>{this.errorText=null}),i}_createStatusView(t){const e=new va(this.locale),n=this.bindTemplate;return e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input__status",n.if("errorText","ck-labeled-input__status_error"),n.if("_statusText","ck-hidden",t=>!t)],id:t,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),e}select(){this.inputView.select()}focus(){this.inputView.focus()}}n(40);class id extends va{constructor(t){super(t),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById");const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",e.if("hasError","ck-error")],id:e.to("id"),placeholder:e.to("placeholder"),readonly:e.to("isReadOnly"),"aria-invalid":e.if("hasError",!0),"aria-describedby":e.to("ariaDescribedById")},on:{input:e.to("input")}})}render(){super.render();const t=t=>{this.element.value=t||0===t?t:""};t(this.value),this.on("change:value",(e,n,i)=>{t(i)})}select(){this.element.select()}focus(){this.element.focus()}}function od({view:t}){t.listenTo(t.element,"submit",(e,n)=>{n.preventDefault(),t.fire("submit")},{useCapture:!0})}var rd='',sd='';n(42);class ad extends va{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new $s,this.keystrokes=new Vs,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(e("bd"),rd,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(e("be"),sd,"ck-button-cancel","cancel"),this._focusables=new ea,this._focusCycler=new Ea({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),od({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)})}_createButton(t,e,n,i){const o=new Ec(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createLabeledInputView(){const t=this.locale.t,e=new nd(this.locale,id);return e.label=t("ca"),e.inputView.placeholder=t("ca"),e}}function cd({element:t,target:e,positions:n,limiter:i,fitInViewport:o}){P(e)&&(e=e()),P(i)&&(i=i());const r=function(t){for(;t&&"html"!=t.tagName.toLowerCase();){if("static"!=ki.window.getComputedStyle(t).position)return t;t=t.parentElement}return null}(t.parentElement),s=new bo(t),a=new bo(e);let c,l;if(i||o){const t=i&&new bo(i).getVisible(),e=o&&new bo(ki.window);[l,c]=function(t,e,n,i,o){let r,s,a=0,c=0;const l=n.getArea();return t.some(t=>{const[d,h]=ld(t,e,n);let u,f;if(i)if(o){const t=i.getIntersection(o);u=t?t.getIntersectionArea(h):0}else u=i.getIntersectionArea(h);function g(){c=f,a=u,r=h,s=d}return o&&(f=o.getIntersectionArea(h)),o&&!i?f>c&&g():!o&&i?u>a&&g():f>c&&u>=a?g():f>=c&&u>a&&g(),u===l}),r?[s,r]:null}(n,a,s,t,e)||ld(n[0],a,s)}else[l,c]=ld(n[0],a,s);let{left:d,top:h}=dd(c);if(r){const t=dd(new bo(r)),e=mo(r);d-=t.left,h-=t.top,d+=r.scrollLeft,h+=r.scrollTop,d-=e.left,h-=e.top}return{left:d,top:h,name:l}}function ld(t,e,n){const{left:i,top:o,name:r}=t(e,n);return[r,n.clone().moveTo(i,o)]}function dd({left:t,top:e}){const{scrollX:n,scrollY:i}=ki.window;return{left:t+n,top:e+i}}n(44);const hd=Pa("px"),ud=ki.document.body;class fd extends va{constructor(t){super(t);const e=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class"),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",e.to("position",t=>`ck-balloon-panel_${t}`),e.if("isVisible","ck-balloon-panel_visible"),e.if("withArrow","ck-balloon-panel_with-arrow"),e.to("class")],style:{top:e.to("top",hd),left:e.to("left",hd)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=fd.defaultPositions,n=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthWest,e.northArrowSouthEast],limiter:ud,fitInViewport:!0},t),i=fd._getOptimalPosition(n),o=parseInt(i.left),r=parseInt(i.top),s=i.name;Object.assign(this,{top:r,left:o,position:s})}pin(t){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(t):this._stopPinning()},this._startPinning(t),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(t){this.attachTo(t);const e=gd(t.target),n=t.limiter?gd(t.limiter):ud;this.listenTo(ki.document,"scroll",(i,o)=>{const r=o.target,s=e&&r.contains(e),a=n&&r.contains(n);!s&&!a&&e&&n||this.attachTo(t)},{useCapture:!0}),this.listenTo(ki.window,"resize",()=>{this.attachTo(t)})}_stopPinning(){this.stopListening(ki.document,"scroll"),this.stopListening(ki.window,"resize")}}function gd(t){return ge(t)?t:go(t)?t.commonAncestorContainer:"function"==typeof t?gd(t()):null}function md(t,e){return t.top-e.height-fd.arrowVerticalOffset}function pd(t){return t.bottom+fd.arrowVerticalOffset}fd.arrowHorizontalOffset=25,fd.arrowVerticalOffset=10,fd._getOptimalPosition=cd,fd.defaultPositions={northArrowSouth:(t,e)=>({top:md(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s"}),northArrowSouthEast:(t,e)=>({top:md(t,e),left:t.left+t.width/2-e.width+fd.arrowHorizontalOffset,name:"arrow_se"}),northArrowSouthWest:(t,e)=>({top:md(t,e),left:t.left+t.width/2-fd.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouth:(t,e)=>({top:md(t,e),left:t.left-e.width/2,name:"arrow_s"}),northWestArrowSouthWest:(t,e)=>({top:md(t,e),left:t.left-fd.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouthEast:(t,e)=>({top:md(t,e),left:t.left-e.width+fd.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouth:(t,e)=>({top:md(t,e),left:t.right-e.width/2,name:"arrow_s"}),northEastArrowSouthEast:(t,e)=>({top:md(t,e),left:t.right-e.width+fd.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouthWest:(t,e)=>({top:md(t,e),left:t.right-fd.arrowHorizontalOffset,name:"arrow_sw"}),southArrowNorth:(t,e)=>({top:pd(t),left:t.left+t.width/2-e.width/2,name:"arrow_n"}),southArrowNorthEast:(t,e)=>({top:pd(t),left:t.left+t.width/2-e.width+fd.arrowHorizontalOffset,name:"arrow_ne"}),southArrowNorthWest:(t,e)=>({top:pd(t),left:t.left+t.width/2-fd.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorth:(t,e)=>({top:pd(t),left:t.left-e.width/2,name:"arrow_n"}),southWestArrowNorthWest:(t,e)=>({top:pd(t),left:t.left-fd.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorthEast:(t,e)=>({top:pd(t),left:t.left-e.width+fd.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorth:(t,e)=>({top:pd(t),left:t.right-e.width/2,name:"arrow_n"}),southEastArrowNorthEast:(t,e)=>({top:pd(t),left:t.right-e.width+fd.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorthWest:(t,e)=>({top:pd(t),left:t.right-fd.arrowHorizontalOffset,name:"arrow_nw"})};var bd='\n',wd='\n';n(46),n(48);const kd=Pa("px");class _d extends La{static get pluginName(){return"ContextualBalloon"}constructor(t){super(t),this.positionLimiter=()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},this.set("visibleView",null),this.view=new fd(t.locale),t.ui.view.body.add(this.view),t.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this.hasView(t.view))throw new be.b("contextualballoon-add-view-exist: Cannot add configuration of the same view twice.",[this,t]);const e=t.stackId||"main";if(!this._idToStack.has(e))return this._idToStack.set(e,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(e)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(e));const n=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),n.set(t.view,t),this._viewToStack.set(t.view,n),n===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new be.b("contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.",[this,t]);const e=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(1===e.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(e.values())[e.size-2])),1===e.size?(this._idToStack.delete(this._getStackId(e)),this._numberOfStacks=this._idToStack.size):e.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e)throw new be.b("contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){return Array.from(this._idToStack.entries()).find(e=>e[1]===t)[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;t[e]||(e=0),this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;t[e]||(e=t.length-1),this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new vd(this.editor.locale),e=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>!e&&t>1),t.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(t,n)=>{if(n<2)return"";const i=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("bp",[i,n])}),t.buttonNextView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),t.buttonPrevView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),t}_createFakePanelsView(){const t=new yd(this.editor.locale,this.view);return t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>!e&&t>=2?Math.min(t-1,2):0),t.listenTo(this.view,"change:top",()=>t.updatePosition()),t.listenTo(this.view,"change:left",()=>t.updatePosition()),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:e="",withArrow:n=!0,singleViewMode:i=!1}){this.view.class=e,this.view.withArrow=n,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),i&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&!t.limiter&&(t=Object.assign({},t,{limiter:this.positionLimiter})),t}}class vd extends va{constructor(t){super(t);const e=t.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new $s,this.buttonPrevView=this._createButtonView(e("bq"),bd),this.buttonNextView=this._createButtonView(e("br"),wd),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",n.to("isNavigationVisible",t=>t?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}showView(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const n=new Ec(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n}}class yd extends va{constructor(t,e){super(t);const n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=e,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",t=>t?"":"ck-hidden")],style:{top:n.to("top",kd),left:n.to("left",kd),width:n.to("width",kd),height:n.to("height",kd)}},children:this.content}),this.on("change:numberOfPanels",(t,e,n,i)=>{n>i?this._addPanels(n-i):this._removePanels(i-n),this.updatePosition()})}_addPanels(t){for(;t--;){const t=new va;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(t){for(;t--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView,{width:n,height:i}=new bo(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:n,height:i})}}}var xd='';function Ad(t){const e=t.editing.view,n=fd.defaultPositions;return{target:e.domConverter.viewToDom(e.document.selection.getSelectedElement()),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}class Td extends La{static get requires(){return[_d]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const t=this.editor,e=t.t;t.ui.componentFactory.add("imageTextAlternative",n=>{const i=t.commands.get("imageTextAlternative"),o=new Ec(n);return o.set({label:e("bs"),icon:xd,tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",()=>this._showForm()),o})}_createForm(){const t=this.editor,e=t.editing.view.document;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new ad(t.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{t.execute("imageTextAlternative",{newValue:this._form.labeledInput.inputView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(t,e)=>{this._hideForm(!0),e()}),this.listenTo(t.ui,"update",()=>{Ul(e.selection)?this._isVisible&&function(t){const e=t.plugins.get("ContextualBalloon");if(Ul(t.editing.view.document.selection)){const n=Ad(t);e.updatePosition(n)}}(t):this._hideForm(!0)}),ed({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const t=this.editor,e=t.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._isInBalloon||this._balloon.add({view:this._form,position:Ad(t)}),n.value=n.inputView.element.value=e.value||"",this._form.labeledInput.select()}_hideForm(t){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class Cd extends La{static get requires(){return[td,Td]}static get pluginName(){return"ImageTextAlternative"}}n(50);class Pd extends La{static get requires(){return[$l,Jl,Cd]}static get pluginName(){return"Image"}}class Sd extends va{constructor(t){super(t),this.buttonView=new Ec(t),this._fileInputView=new Md(t),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class Md extends va{constructor(t){super(t),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}var Ed='';function Id(t){return/^image\/(jpeg|png|gif|bmp)$/.test(t.type)}function Nd(t){return new Promise((e,n)=>{const i=t.getAttribute("src");fetch(i).then(t=>t.blob()).then(t=>{const o=function(t,e){return t.type?t.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}(t,i),r=function(t,e,n){try{return new File([t],e,{type:n})}catch(t){return null}}(t,`image.${o.replace("image/","")}`,o);r?e(r):n()}).catch(n)})}class Od extends La{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("imageUpload",n=>{const i=new Sd(n),o=t.commands.get("imageUpload");return i.set({acceptedType:"image/*",allowMultipleFiles:!0}),i.buttonView.set({label:e("p"),icon:Ed,tooltip:!0}),i.buttonView.bind("isEnabled").to(o),i.on("done",(e,n)=>{const i=Array.from(n).filter(Id);i.length&&t.execute("imageUpload",{file:i})}),i})}}var Rd='';n(52),n(54),n(56);class Dd extends La{constructor(t){super(t),this.placeholder="data:image/svg+xml;utf8,"+encodeURIComponent(Rd)}init(){this.editor.editing.downcastDispatcher.on("attribute:uploadStatus:image",(...t)=>this.uploadStatusChange(...t))}uploadStatusChange(t,e,n){const i=this.editor,o=e.item,r=o.getAttribute("uploadId");if(!n.consumable.consume(e.item,t.name))return;const s=i.plugins.get(jc),a=r?e.attributeNewValue:null,c=this.placeholder,l=i.editing.mapper.toViewElement(o),d=n.writer;if("reading"==a)return Ld(l,d),void jd(c,l,d);if("uploading"==a){const t=s.loaders.get(r);return Ld(l,d),void(t?(Vd(l,d),function(t,e,n,i){const o=function(t){const e=t.createUIElement("div",{class:"ck-progress-bar"});return t.setCustomProperty("progressBar",!0,e),e}(e);e.insert(e.createPositionAt(t,"end"),o),n.on("change:uploadedPercent",(t,e,n)=>{i.change(t=>{t.setStyle("width",n+"%",o)})})}(l,d,t,i.editing.view),function(t,e,n){if(n.data){const i=t.getChild(0);e.setAttribute("src",n.data,i)}}(l,d,t)):jd(c,l,d))}"complete"==a&&s.loaders.get(r)&&!Nn.isEdge&&function(t,e,n){const i=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(t,"end"),i),setTimeout(()=>{n.change(t=>t.remove(t.createRangeOn(i)))},3e3)}(l,d,i.editing.view),function(t,e){Bd(t,e,"progressBar")}(l,d),Vd(l,d),function(t,e){e.removeClass("ck-appear",t)}(l,d)}}function Ld(t,e){t.hasClass("ck-appear")||e.addClass("ck-appear",t)}function jd(t,e,n){e.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",e);const i=e.getChild(0);i.getAttribute("src")!==t&&n.setAttribute("src",t,i),zd(e,"placeholder")||n.insert(n.createPositionAfter(i),function(t){const e=t.createUIElement("div",{class:"ck-upload-placeholder-loader"});return t.setCustomProperty("placeholder",!0,e),e}(n))}function Vd(t,e){t.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",t),Bd(t,e,"placeholder")}function zd(t,e){for(const n of t.getChildren())if(n.getCustomProperty(e))return n}function Bd(t,e,n){const i=zd(t,n);i&&e.remove(e.createRangeOn(i))}class Fd{createDocumentFragment(t){return new Fn(t)}createElement(t,e,n){return new Fe(t,e,n)}createText(t){return new De(t)}clone(t,e=!1){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,n){return n._insertChild(t,e)}removeChildren(t,e,n){return n._removeChildren(t,e)}remove(t){const e=t.parent;return e?this.removeChildren(e.getChildIndex(t),1,e):[]}replace(t,e){const n=t.parent;if(n){const i=n.getChildIndex(t);return this.removeChildren(i,1,n),this.insertChild(i,e,n),!0}return!1}unwrapElement(t){const e=t.parent;if(e){const n=e.getChildIndex(t);this.remove(t),this.insertChild(n,t.getChildren(),e)}}rename(t,e){const n=new Fe(t,e.getAttributes(),e.getChildren());return this.replace(e,n)?n:null}setAttribute(t,e,n){n._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,n){_(t)&&void 0===n&&(n=e),n._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,n){n._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return bn._createAt(t,e)}createPositionAfter(t){return bn._createAfter(t)}createPositionBefore(t){return bn._createBefore(t)}createRange(t,e){return new wn(t,e)}createRangeOn(t){return wn._createOn(t)}createRangeIn(t){return wn._createIn(t)}createSelection(t,e,n){return new vn(t,e,n)}}class Ud extends Fa{refresh(){this.isEnabled=Wl(this.editor.model)}execute(t){const e=this.editor,n=e.model,i=e.plugins.get(jc);n.change(e=>{const o=Array.isArray(t.file)?t.file:[t.file];for(const t of o)Hd(e,n,i,t)})}}function Hd(t,e,n,i){const o=n.createLoader(i);o&&ql(t,e,{uploadId:o.id})}class qd extends La{static get requires(){return[jc,ml]}init(){const t=this.editor,e=t.model.document,n=t.model.schema,i=t.conversion,o=t.plugins.get(jc);n.extend("image",{allowAttributes:["uploadId","uploadStatus"]}),t.commands.add("imageUpload",new Ud(t)),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(t.editing.view.document,"clipboardInput",(e,n)=>{if(function(t){return Array.from(t.types).includes("text/html")&&""!==t.getData("text/html")}(n.dataTransfer))return;const i=Array.from(n.dataTransfer.files).filter(t=>!!t&&Id(t)),o=n.targetRanges.map(e=>t.editing.mapper.toModelRange(e));t.model.change(n=>{n.setSelection(o),i.length&&(e.stop(),t.model.enqueueChange("default",()=>{t.execute("imageUpload",{file:i})}))})}),t.plugins.has("Clipboard")&&this.listenTo(t.plugins.get("Clipboard"),"inputTransformation",(e,n)=>{const i=Array.from(t.editing.view.createRangeIn(n.content)).filter(t=>(function(t){return!(!t.is("element","img")||!t.getAttribute("src"))&&(t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g))})(t.item)&&!t.item.getAttribute("uploadProcessed")).map(t=>({promise:Nd(t.item),imageElement:t.item}));if(!i.length)return;const r=new Fd;for(const t of i){r.setAttribute("uploadProcessed",!0,t.imageElement);const e=o.createLoader(t.promise);e&&(r.setAttribute("src","",t.imageElement),r.setAttribute("uploadId",e.id,t.imageElement))}}),t.editing.view.document.on("dragover",(t,e)=>{e.preventDefault()}),e.on("change",()=>{const n=e.differ.getChanges({includeChangesInGraveyard:!0});for(const e of n)if("insert"==e.type&&"$text"!=e.name){const n=e.position.nodeAfter,i="$graveyard"==e.position.root.rootName;for(const e of Wd(t,n)){const t=e.getAttribute("uploadId");if(!t)continue;const n=o.loaders.get(t);n&&(i?n.abort():"idle"==n.status&&this._readAndUpload(n,e))}}})}_readAndUpload(t,e){const n=this.editor,i=n.model,o=n.locale.t,r=n.plugins.get(jc),s=n.plugins.get(ml);return i.enqueueChange("transparent",t=>{t.setAttribute("uploadStatus","reading",e)}),t.read().then(()=>{const o=t.upload();if(Nn.isSafari){const t=n.editing.mapper.toViewElement(e).getChild(0);n.editing.view.once("render",()=>{if(!t.parent)return;const e=n.editing.view.domConverter.mapViewToDom(t.parent);if(!e)return;const i=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=i})}return i.enqueueChange("transparent",t=>{t.setAttribute("uploadStatus","uploading",e)}),o}).then(t=>{i.enqueueChange("transparent",n=>{n.setAttributes({uploadStatus:"complete",src:t.default},e),this._parseAndSetSrcsetAttributeOnImage(t,e,n)}),a()}).catch(n=>{if("error"!==t.status&&"aborted"!==t.status)throw n;"error"==t.status&&n&&s.showWarning(n,{title:o("al"),namespace:"upload"}),a(),i.enqueueChange("transparent",t=>{t.remove(e)})});function a(){i.enqueueChange("transparent",t=>{t.removeAttribute("uploadId",e),t.removeAttribute("uploadStatus",e)}),r.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,n){let i=0;const o=Object.keys(t).filter(t=>{const e=parseInt(t,10);if(!isNaN(e))return i=Math.max(i,e),!0}).map(e=>`${t[e]} ${e}w`).join(", ");""!=o&&n.setAttribute("srcset",{data:o,width:i},e)}}function Wd(t,e){return Array.from(t.model.createRangeOn(e)).filter(t=>t.item.is("image")).map(t=>t.item)}class Yd extends La{static get pluginName(){return"ImageUpload"}static get requires(){return[qd,Od,Dd]}}class $d extends Fa{refresh(){const t=this.editor.model,e=rl(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is("paragraph"),this.isEnabled=!!e&&Gd(e,t.schema)}execute(t={}){const e=this.editor.model,n=e.document;e.change(i=>{const o=(t.selection||n.selection).getSelectedBlocks();for(const t of o)!t.is("paragraph")&&Gd(t,e.schema)&&i.rename(t,"paragraph")})}}function Gd(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class Qd extends La{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model,n=t.data;t.commands.add("paragraph",new $d(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,e)=>Qd.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,converterPriority:"low"}),n.upcastDispatcher.on("element",(t,e,n)=>{n.consumable.test(e.viewItem,{name:e.viewItem.name})&&Jd(e.viewItem,e.modelCursor,n.schema)&&Object.assign(e,Kd(e.viewItem,e.modelCursor,n))},{priority:"low"}),n.upcastDispatcher.on("text",(t,e,n)=>{e.modelRange||Jd(e.viewItem,e.modelCursor,n.schema)&&Object.assign(e,Kd(e.viewItem,e.modelCursor,n))},{priority:"lowest"}),e.document.registerPostFixer(t=>this._autoparagraphEmptyRoots(t)),t.data.on("ready",()=>{e.enqueueChange("transparent",t=>this._autoparagraphEmptyRoots(t))},{priority:"lowest"})}_autoparagraphEmptyRoots(t){const e=this.editor.model;for(const n of e.document.getRootNames()){const i=e.document.getRoot(n);if(i.isEmpty&&"$graveyard"!=i.rootName&&e.schema.checkChild(i,"paragraph"))return t.insertElement("paragraph",i),!0}}}function Kd(t,e,n){const i=n.writer.createElement("paragraph");return n.writer.insert(i,e),n.convertItem(t,n.writer.createPositionAt(i,0))}function Jd(t,e,n){const i=n.createContext(e);return!!n.checkChild(i,"paragraph")&&!!n.checkChild(i.push("paragraph"),t)}Qd.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td"]);class Zd extends Fa{constructor(t,e){super(t),this.modelElements=e}refresh(){const t=rl(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some(e=>Xd(t,e,this.editor.model.schema))}execute(t){const e=this.editor.model,n=e.document,i=t.value;e.change(t=>{const o=Array.from(n.selection.getSelectedBlocks()).filter(t=>Xd(t,i,e.schema));for(const e of o)e.is(i)||t.rename(e,i)})}}function Xd(t,e,n){return n.checkChild(t.parent,e)&&!n.isObject(t)}const th="paragraph";class eh extends La{constructor(t){super(t),t.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[Qd]}init(){const t=this.editor,e=t.config.get("heading.options"),n=[];for(const i of e)i.model!==th&&(t.model.schema.register(i.model,{inheritAllFrom:"$block"}),t.conversion.elementToElement(i),n.push(i.model));this._addDefaultH1Conversion(t),t.commands.add("heading",new Zd(t,n))}afterInit(){const t=this.editor,e=t.commands.get("enter"),n=t.config.get("heading.options");e&&this.listenTo(e,"afterExecute",(e,i)=>{const o=t.model.document.selection.getFirstPosition().parent;n.some(t=>o.is(t.model))&&!o.is(th)&&0===o.childCount&&i.writer.rename(o,th)})}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:ve.get("low")+1})}}class nh{constructor(t,e){e&&tn(this,e),t&&this.set(t)}}Ie(nh,sn);class ih extends va{constructor(t){super(t);const e=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",e.to("position",t=>`ck-dropdown__panel_${t}`),e.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:e.to(t=>t.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const t=this.children.last;"function"==typeof t.focusLast?t.focusLast():t.focus()}}}n(58);class oh extends va{constructor(t,e,n){super(t);const i=this.bindTemplate;this.buttonView=e,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("panelPosition","auto"),this.focusTracker=new $s,this.keystrokes=new Vs,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",t=>!t)]},children:[e,n]}),e.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&("auto"===this.panelPosition?this.panelView.position=oh._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)}),this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const t=(t,e)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,e())};this.keystrokes.set("arrowdown",(t,e)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,e())}),this.keystrokes.set("arrowright",(t,e)=>{this.isOpen&&e()}),this.keystrokes.set("arrowleft",t),this.keystrokes.set("esc",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:t,southWest:e,northEast:n,northWest:i}=oh.defaultPanelPositions;return"ltr"===this.locale.uiLanguageDirection?[t,e,n,i]:[e,t,i,n]}}oh.defaultPanelPositions={southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.bottom-e.height,left:t.left-e.width+t.width,name:"nw"})},oh._getOptimalPosition=cd;var rh='';class sh extends Ec{constructor(t){super(t),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new Sc;return t.content=rh,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}n(60);class ah extends va{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new $s,this.keystrokes=new Vs,this._focusCycler=new Ea({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class ch extends va{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class lh extends va{constructor(t){super(t),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}n(62);class dh extends Ec{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new va;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}function hh(t,e=sh){const n=new e(t),i=new ih(t),o=new oh(t,n,i);return n.bind("isEnabled").to(o),n instanceof sh?n.bind("isOn").to(o,"isOpen"):n.arrowView.bind("isOn").to(o,"isOpen"),function(t){(function(t){t.on("render",()=>{ed({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:[t.element]})})})(t),function(t){t.on("execute",e=>{e.source instanceof dh||(t.isOpen=!1)})}(t),function(t){t.keystrokes.set("arrowdown",(e,n)=>{t.isOpen&&(t.panelView.focus(),n())}),t.keystrokes.set("arrowup",(e,n)=>{t.isOpen&&(t.panelView.focusLast(),n())})}(t)}(o),o}function uh(t,e){const n=t.locale,i=t.listView=new ah(n);i.items.bindTo(e).using(({type:t,model:e})=>{if("separator"===t)return new lh(n);if("button"===t||"switchbutton"===t){const i=new ch(n);let o;return(o="button"===t?new Ec(n):new dh(n)).bind(...Object.keys(e)).to(e),o.delegate("execute").to(i),i.children.add(o),i}}),t.panelView.children.add(i),i.items.delegate("execute").to(t)}n(64),n(66),n(10);class fh extends La{init(){const t=this.editor,e=t.t,n=function(t){const e=t.t,n={Paragraph:e("bt"),"Heading 1":e("bu"),"Heading 2":e("bv"),"Heading 3":e("bw"),"Heading 4":e("bx"),"Heading 5":e("by"),"Heading 6":e("bz")};return t.config.get("heading.options").map(t=>{const e=n[t.title];return e&&e!=t.title&&(t.title=e),t})}(t),i=e("h"),o=e("i");t.ui.componentFactory.add("heading",e=>{const r={},s=new xn,a=t.commands.get("heading"),c=t.commands.get("paragraph"),l=[a];for(const t of n){const e={type:"button",model:new nh({label:t.title,class:t.class,withText:!0})};"paragraph"===t.model?(e.model.bind("isOn").to(c,"value"),e.model.set("commandName","paragraph"),l.push(c)):(e.model.bind("isOn").to(a,"value",e=>e===t.model),e.model.set({commandName:"heading",commandValue:t.model})),s.add(e),r[t.model]=t.title}const d=hh(e);return uh(d,s),d.buttonView.set({isOn:!1,withText:!0,tooltip:o}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(l,"isEnabled",(...t)=>t.some(t=>t)),d.buttonView.bind("label").to(a,"value",c,"value",(t,e)=>{const n=t||e&&"paragraph";return r[n]?r[n]:i}),this.listenTo(d,"execute",e=>{t.execute(e.source.commandName,e.source.commandValue?{value:e.source.commandValue}:void 0),t.editing.view.focus()}),d})}}function gh(t){for(const e of t.getChildren())if(e&&e.is("caption"))return e;return null}function mh(t){const e=t.parent;return"figcaption"==t.name&&e&&"figure"==e.name&&e.hasClass("image")?{name:!0}:null}class ph extends La{init(){const t=this.editor,e=t.editing.view,n=t.model.schema,i=t.data,o=t.editing,r=t.t;n.register("caption",{allowIn:"image",allowContentOf:"$block",isLimit:!0}),t.model.document.registerPostFixer(t=>this._insertMissingModelCaptionElement(t)),t.conversion.for("upcast").elementToElement({view:mh,model:"caption"}),i.downcastDispatcher.on("insert:caption",bh(t=>t.createContainerElement("figcaption"),!1));const s=function(t,e){return n=>{const i=n.createEditableElement("figcaption");return n.setCustomProperty("imageCaption",!0,i),Ks({view:t,element:i,text:e}),zl(i,n)}}(e,r("ak"));o.downcastDispatcher.on("insert:caption",bh(s)),o.downcastDispatcher.on("insert",this._fixCaptionVisibility(t=>t.item),{priority:"high"}),o.downcastDispatcher.on("remove",this._fixCaptionVisibility(t=>t.position.parent),{priority:"high"}),e.document.registerPostFixer(t=>this._updateCaptionVisibility(t))}_updateCaptionVisibility(t){const e=this.editor.editing.mapper,n=this._lastSelectedCaption;let i;const o=this.editor.model.document.selection,r=o.getSelectedElement();if(r&&r.is("image")){const t=gh(r);i=e.toViewElement(t)}const s=wh(o.getFirstPosition().parent);if(s&&(i=e.toViewElement(s)),i)return n?n===i?_h(i,t):(kh(n,t),this._lastSelectedCaption=i,_h(i,t)):(this._lastSelectedCaption=i,_h(i,t));if(n){const e=kh(n,t);return this._lastSelectedCaption=null,e}return!1}_fixCaptionVisibility(t){return(e,n,i)=>{const o=wh(t(n)),r=this.editor.editing.mapper,s=i.writer;if(o){const t=r.toViewElement(o);t&&(o.childCount?s.removeClass("ck-hidden",t):s.addClass("ck-hidden",t))}}}_insertMissingModelCaptionElement(t){const e=this.editor.model,n=e.document.differ.getChanges(),i=[];for(const t of n)if("insert"==t.type&&"$text"!=t.name){const n=t.position.nodeAfter;if(n.is("image")&&!gh(n)&&i.push(n),!n.is("image")&&n.childCount)for(const t of e.createRangeIn(n).getItems())t.is("image")&&!gh(t)&&i.push(t)}for(const e of i)t.appendElement("caption",e);return!!i.length}}function bh(t,e=!0){return(n,i,o)=>{const r=i.item;if((r.childCount||e)&&Hl(r.parent)){if(!o.consumable.consume(i.item,"insert"))return;const e=o.mapper.toViewElement(i.range.start.parent),n=t(o.writer),s=o.writer;r.childCount||s.addClass("ck-hidden",n),function(t,e,n,i){const o=i.writer.createPositionAt(n,"end");i.writer.insert(o,t),i.mapper.bindElements(e,t)}(n,i.item,e,o)}}}function wh(t){const e=t.getAncestors({includeSelf:!0}).find(t=>"caption"==t.name);return e&&e.parent&&"image"==e.parent.name?e:null}function kh(t,e){return!t.childCount&&!t.hasClass("ck-hidden")&&(e.addClass("ck-hidden",t),!0)}function _h(t,e){return!!t.hasClass("ck-hidden")&&(e.removeClass("ck-hidden",t),!0)}n(69);class vh extends Fa{constructor(t,e){super(t),this.defaultStyle=!1,this.styles=e.reduce((t,e)=>(t[e.name]=e,e.isDefault&&(this.defaultStyle=e.name),t),{})}refresh(){const t=this.editor.model.document.selection.getSelectedElement();if(this.isEnabled=Hl(t),t)if(t.hasAttribute("imageStyle")){const e=t.getAttribute("imageStyle");this.value=!!this.styles[e]&&e}else this.value=this.defaultStyle;else this.value=!1}execute(t){const e=t.value,n=this.editor.model,i=n.document.selection.getSelectedElement();n.change(t=>{this.styles[e].isDefault?t.removeAttribute("imageStyle",i):t.setAttribute("imageStyle",e,i)})}}function yh(t,e){for(const n of e)if(n.name===t)return n}var xh='',Ah='',Th='',Ch='';const Ph={full:{name:"full",title:"Full size image",icon:xh,isDefault:!0},side:{name:"side",title:"Side image",icon:Ch,className:"image-style-side"},alignLeft:{name:"alignLeft",title:"Left aligned image",icon:Ah,className:"image-style-align-left"},alignCenter:{name:"alignCenter",title:"Centered image",icon:Th,className:"image-style-align-center"},alignRight:{name:"alignRight",title:"Right aligned image",icon:Ch,className:"image-style-align-right"}},Sh={full:xh,left:Ah,right:Ch,center:Th};function Mh(t=[]){return t.map(Eh)}function Eh(t){if("string"==typeof t){const e=t;Ph[e]?t=Object.assign({},Ph[e]):(console.warn(Object(be.a)("image-style-not-found: There is no such image style of given name."),{name:e}),t={name:e})}else if(Ph[t.name]){const e=Ph[t.name],n=Object.assign({},t);for(const i in e)t.hasOwnProperty(i)||(n[i]=e[i]);t=n}return"string"==typeof t.icon&&Sh[t.icon]&&(t.icon=Sh[t.icon]),t}class Ih extends La{static get pluginName(){return"ImageStyleEditing"}init(){const t=this.editor,e=t.model.schema,n=t.data,i=t.editing;t.config.define("image.styles",["full","side"]);const o=Mh(t.config.get("image.styles"));e.extend("image",{allowAttributes:"imageStyle"});const r=function(t){return(e,n,i)=>{if(!i.consumable.consume(n.item,e.name))return;const o=yh(n.attributeNewValue,t),r=yh(n.attributeOldValue,t),s=i.mapper.toViewElement(n.item),a=i.writer;r&&a.removeClass(r.className,s),o&&a.addClass(o.className,s)}}(o);i.downcastDispatcher.on("attribute:imageStyle:image",r),n.downcastDispatcher.on("attribute:imageStyle:image",r),n.upcastDispatcher.on("element:figure",function(t){const e=t.filter(t=>!t.isDefault);return(t,n,i)=>{if(!n.modelRange)return;const o=n.viewItem,r=rl(n.modelRange.getItems());if(i.schema.checkAttribute(r,"imageStyle"))for(const t of e)i.consumable.consume(o,{classes:t.className})&&i.writer.setAttribute("imageStyle",t.name,r)}}(o),{priority:"low"}),t.commands.add("imageStyle",new vh(t,o))}}n(71);class Nh extends La{static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{"Full size image":t("k"),"Side image":t("l"),"Left aligned image":t("m"),"Centered image":t("n"),"Right aligned image":t("o")}}init(){const t=function(t,e){for(const n of t)e[n.title]&&(n.title=e[n.title]);return t}(Mh(this.editor.config.get("image.styles")),this.localizedDefaultStylesTitles);for(const e of t)this._createButton(e)}_createButton(t){const e=this.editor,n=`imageStyle:${t.name}`;e.ui.componentFactory.add(n,n=>{const i=e.commands.get("imageStyle"),o=new Ec(n);return o.set({label:t.title,icon:t.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(i,"isEnabled"),o.bind("isOn").to(i,"value",e=>e===t.name),this.listenTo(o,"execute",()=>e.execute("imageStyle",{value:t.name})),o})}}class Oh extends La{static get requires(){return[_d]}static get pluginName(){return"WidgetToolbarRepository"}init(){const t=this.editor;if(t.plugins.has("BalloonToolbar")){const e=t.plugins.get("BalloonToolbar");this.listenTo(e,"show",e=>{(function(t){const e=t.getSelectedElement();return!(!e||!Ll(e))})(t.editing.view.document.selection)&&e.stop()},{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.listenTo(t.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(t.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values())t.view.destroy()}register(t,{ariaLabel:e,items:n,getRelatedElement:i,balloonClassName:o="ck-toolbar-container"}){const r=this.editor,s=r.t,a=new Oa(r.locale);if(a.ariaLabel=e||s("av"),this._toolbarDefinitions.has(t))throw new be.b("widget-toolbar-duplicated: Toolbar with the given id was already added.",this,{toolbarId:t});a.fillFromConfig(n,r.ui.componentFactory),this._toolbarDefinitions.set(t,{view:a,getRelatedElement:i,balloonClassName:o})}_updateToolbarsVisibility(){let t=0,e=null,n=null;for(const i of this._toolbarDefinitions.values()){const o=i.getRelatedElement(this.editor.editing.view.document.selection);if(this.editor.ui.focusTracker.isFocused)if(o){const r=o.getAncestors().length;r>t&&(t=r,e=o,n=i)}else this._isToolbarInBalloon(i)&&this._hideToolbar(i);else this._isToolbarVisible(i)&&this._hideToolbar(i)}n&&this._showToolbar(n,e)}_hideToolbar(t){this._balloon.remove(t.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(t,e){this._isToolbarVisible(t)?Rh(this.editor,e):this._isToolbarInBalloon(t)||(this._balloon.add({view:t.view,position:Dh(this.editor,e),balloonClassName:t.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const t of this._toolbarDefinitions.values())if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);Rh(this.editor,e)}}))}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function Rh(t,e){const n=t.plugins.get("ContextualBalloon"),i=Dh(t,e);n.updatePosition(i)}function Dh(t,e){const n=t.editing.view,i=fd.defaultPositions;return{target:n.domConverter.mapViewToDom(e),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast]}}function Lh(t,e,n){return n.createRange(jh(t,e,!0,n),jh(t,e,!1,n))}function jh(t,e,n,i){let o=t.textNode||(n?t.nodeBefore:t.nodeAfter),r=null;for(;o&&o.getAttribute("linkHref")==e;)r=o,o=n?o.previousSibling:o.nextSibling;return r?i.createPositionAt(r,n?"before":"after"):t}class Vh extends Fa{constructor(t){super(t),this.manualDecorators=new xn}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document;this.value=e.selection.getAttribute("linkHref");for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id);this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"linkHref")}execute(t,e={}){const n=this.editor.model,i=n.document.selection,o=[],r=[];for(const t in e)e[t]?o.push(t):r.push(t);n.change(e=>{if(i.isCollapsed){const s=i.getFirstPosition();if(i.hasAttribute("linkHref")){const a=Lh(s,i.getAttribute("linkHref"),n);e.setAttribute("linkHref",t,a),o.forEach(t=>{e.setAttribute(t,!0,a)}),r.forEach(t=>{e.removeAttribute(t,a)}),e.setSelection(a)}else if(""!==t){const r=Io(i.getAttributes());r.set("linkHref",t),o.forEach(t=>{r.set(t,!0)});const a=e.createText(t,r);n.insertContent(a,s),e.setSelection(e.createRangeOn(a))}}else{const s=n.schema.getValidRanges(i.getRanges(),"linkHref");for(const n of s)e.setAttribute("linkHref",t,n),o.forEach(t=>{e.setAttribute(t,!0,n)}),r.forEach(t=>{e.removeAttribute(t,n)})}})}_getDecoratorStateFromModel(t){return this.editor.model.document.selection.getAttribute(t)||!1}}class zh extends Fa{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute("linkHref")}execute(){const t=this.editor,e=this.editor.model,n=e.document.selection,i=t.commands.get("link");e.change(t=>{const o=n.isCollapsed?[Lh(n.getFirstPosition(),n.getAttribute("linkHref"),e)]:n.getRanges();for(const e of o)if(t.removeAttribute("linkHref",e),i)for(const n of i.manualDecorators)t.removeAttribute(n.id,e)})}}var Bh=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:function(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(o);++ithis._definitions.add(t)):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",(t,e,n)=>{if(!n.consumable.test(e.item,"attribute:linkHref"))return;const i=n.writer,o=i.document.selection;for(const t of this._definitions){const r=i.createAttributeElement("a",t.attributes,{priority:5});i.setCustomProperty("link",!0,r),t.callback(e.attributeNewValue)?e.item.is("selection")?i.wrap(o.getFirstRange(),r):i.wrap(n.mapper.toViewRange(e.range),r):i.unwrap(n.mapper.toViewRange(e.range),r)}},{priority:"high"})}}}class cu{constructor({id:t,label:e,attributes:n}){this.id=t,this.set("value"),this.label=e,this.attributes=n}}Ie(cu,sn);class lu{constructor(t,e,n){this.model=t,this.attribute=n,this._modelSelection=t.document.selection,this._overrideUid=null,this._isNextGravityRestorationSkipped=!1,e.listenTo(this._modelSelection,"change:range",(t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&du(this._modelSelection.getFirstPosition(),n)||this._restoreGravity())})}handleForwardMovement(t,e){const n=this.attribute;if(!(this._isGravityOverridden||t.isAtStart&&this._hasSelectionAttribute))return fu(t,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(e),this._removeSelectionAttribute(),!0):hu(t,n)?(this._preventCaretMovement(e),this._overrideGravity(),!0):uu(t,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(e),this._overrideGravity(),!0):void 0}handleBackwardMovement(t,e){const n=this.attribute;return this._isGravityOverridden?fu(t,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(e),this._restoreGravity(),this._removeSelectionAttribute(),!0):(this._preventCaretMovement(e),this._restoreGravity(),t.isAtStart&&this._removeSelectionAttribute(),!0):fu(t,n)&&!this._hasSelectionAttribute?(this._preventCaretMovement(e),this._setSelectionAttributeFromTheNodeBefore(t),!0):t.isAtEnd&&uu(t,n)?this._hasSelectionAttribute?void(gu(t,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity())):(this._preventCaretMovement(e),this._setSelectionAttributeFromTheNodeBefore(t),!0):t.isAtStart?this._hasSelectionAttribute?(this._removeSelectionAttribute(),this._preventCaretMovement(e),!0):void 0:void(gu(t,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity()))}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change(t=>t.overrideSelectionGravity())}_restoreGravity(){this.model.change(t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}_preventCaretMovement(t){t.preventDefault()}_removeSelectionAttribute(){this.model.change(t=>{t.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(t){const e=this.attribute;this.model.change(n=>{n.setSelectionAttribute(this.attribute,t.nodeBefore.getAttribute(e))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=!0}}function du(t,e){return hu(t,e)||uu(t,e)}function hu(t,e){const{nodeBefore:n,nodeAfter:i}=t,o=!!n&&n.hasAttribute(e);return!!i&&i.hasAttribute(e)&&(!o||n.getAttribute(e)!==i.getAttribute(e))}function uu(t,e){const{nodeBefore:n,nodeAfter:i}=t,o=!!n&&n.hasAttribute(e),r=!!i&&i.hasAttribute(e);return o&&(!r||n.getAttribute(e)!==i.getAttribute(e))}function fu(t,e){const{nodeBefore:n,nodeAfter:i}=t,o=!!n&&n.hasAttribute(e);if(i&&i.hasAttribute(e)&&o)return i.getAttribute(e)!==n.getAttribute(e)}function gu(t,e){return du(t.getShiftedBy(-1),e)}n(73);const mu="ck-link_selected",pu="automatic",bu="manual",wu=/^(https?:)?\/\//;class ku extends La{constructor(t){super(t),t.config.define("link",{addTargetToExternalLinks:!1})}init(){const t=this.editor,e=t.locale;t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:ru}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>ru(su(t),e)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new Vh(t)),t.commands.add("unlink",new zh(t));const n=function(t,e){const n={"Open in a new tab":t("ax"),Downloadable:t("ay")};return e.forEach(t=>(t.label&&n[t.label]&&(t.label=n[t.label]),t)),e}(t.t,function(t){const e=[];if(t)for(const[n,i]of Object.entries(t)){const t=Object.assign({},i,{id:`link${nu(n)}`});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(n.filter(t=>t.mode===pu)),this._enableManualDecorators(n.filter(t=>t.mode===bu)),function({view:t,model:e,emitter:n,attribute:i,locale:o}){const r=new lu(e,n,i),s=e.document.selection;n.listenTo(t.document,"keydown",(t,e)=>{if(!s.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const n=e.keyCode==Dn.arrowright,i=e.keyCode==Dn.arrowleft;if(!n&&!i)return;const a=s.getFirstPosition(),c=o.contentLanguageDirection;let l;(l="ltr"===c&&n||"rtl"===c&&i?r.handleForwardMovement(a,e):r.handleBackwardMovement(a,e))&&t.stop()},{priority:ve.get("high")+1})}({view:t.editing.view,model:t.model,emitter:this,attribute:"linkHref",locale:e}),this._setupLinkHighlight()}_enableAutomaticDecorators(t){const e=this.editor,n=new au;e.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:pu,callback:t=>wu.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(t),n.length&&e.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,n=e.commands.get("link").manualDecorators;t.forEach(t=>{e.model.schema.extend("$text",{allowAttributes:t.id}),n.add(new cu(t)),e.conversion.for("downcast").attributeToElement({model:t.id,view:(e,i)=>{if(e){const e=n.get(t.id).attributes,o=i.createAttributeElement("a",e,{priority:5});return i.setCustomProperty("link",!0,o),o}}}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:n.get(t.id).attributes},model:{key:t.id}})})}_setupLinkHighlight(){const t=this.editor,e=t.editing.view,n=new Set;e.document.registerPostFixer(e=>{const i=t.model.document.selection;let o=!1;if(i.hasAttribute("linkHref")){const r=Lh(i.getFirstPosition(),i.getAttribute("linkHref"),t.model),s=t.editing.mapper.toViewRange(r);for(const t of s.getItems())t.is("a")&&!t.hasClass(mu)&&(e.addClass(mu,t),n.add(t),o=!0)}return o}),t.conversion.for("editingDowncast").add(t=>{function i(){e.change(t=>{for(const e of n.values())t.removeClass(mu,e),n.delete(e)})}t.on("insert",i,{priority:"highest"}),t.on("remove",i,{priority:"highest"}),t.on("attribute",i,{priority:"highest"}),t.on("selection",i,{priority:"highest"})})}}class _u extends Qi{constructor(t){super(t),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}n(75);class vu extends va{constructor(t,e=[]){super(t);const n=t.t;this.focusTracker=new $s,this.keystrokes=new Vs,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("bd"),rd,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("be"),sd,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e),this._focusables=new ea,this._focusCycler=new Ea({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const i=["ck","ck-link-form"];e.length&&i.push("ck-link-form_layout-vertical"),this.setTemplate({tag:"form",attributes:{class:i,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((t,e)=>(t[e.name]=e.isOn,t),{})}render(){super.render(),od({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new nd(this.locale,id);return e.label=t("bf"),e.inputView.placeholder="https://example.com",e}_createButton(t,e,n,i){const o=new Ec(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const n of t){const t=new dh(this.locale);t.set({name:n.id,label:n.label,withText:!0}),t.bind("isOn").to(n,"value"),t.on("execute",()=>{n.set("value",!t.isOn)}),e.add(t)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new va;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}var yu='',xu='';n(77);class Au extends va{constructor(t){super(t);const e=t.t;this.focusTracker=new $s,this.keystrokes=new Vs,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(e("az"),yu,"unlink"),this.editButtonView=this._createButton(e("ba"),xu,"edit"),this.set("href"),this._focusables=new ea,this._focusCycler=new Ea({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(t,e,n){const i=new Ec(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.delegate("execute").to(this,n),i}_createPreviewButton(){const t=new Ec(this.locale),e=this.bindTemplate,n=this.t;return t.set({withText:!0,tooltip:n("bb")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",t=>t&&su(t)),target:"_blank"}}),t.bind("label").to(this,"href",t=>t||n("bc")),t.bind("isEnabled").to(this,"href",t=>!!t),t.template.tag="a",t.template.eventListeners={},t}}var Tu='';const Cu="Ctrl+K";class Pu extends La{static get requires(){return[_d]}static get pluginName(){return"LinkUI"}init(){const t=this.editor;t.editing.view.addObserver(_u),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=t.plugins.get(_d),this._createToolbarLinkButton(),this._enableUserBalloonInteractions()}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const t=this.editor,e=new Au(t.locale),n=t.commands.get("link"),i=t.commands.get("unlink");return e.bind("href").to(n,"value"),e.editButtonView.bind("isEnabled").to(n),e.unlinkButtonView.bind("isEnabled").to(i),this.listenTo(e,"edit",()=>{this._addFormView()}),this.listenTo(e,"unlink",()=>{t.execute("unlink"),this._hideUI()}),e.keystrokes.set("Esc",(t,e)=>{this._hideUI(),e()}),e.keystrokes.set(Cu,(t,e)=>{this._addFormView(),e()}),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),n=new vu(t.locale,e.manualDecorators);return n.urlInputView.bind("value").to(e,"value"),n.urlInputView.bind("isReadOnly").to(e,"isEnabled",t=>!t),n.saveButtonView.bind("isEnabled").to(e),this.listenTo(n,"submit",()=>{t.execute("link",n.urlInputView.inputView.element.value,n.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(n,"cancel",()=>{this._closeFormView()}),n.keystrokes.set("Esc",(t,e)=>{this._closeFormView(),e()}),n}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link"),n=t.t;t.keystrokes.set(Cu,(t,n)=>{n(),e.isEnabled&&this._showUI(!0)}),t.ui.componentFactory.add("link",t=>{const i=new Ec(t);return i.isEnabled=!0,i.label=n("aq"),i.icon=Tu,i.keystroke=Cu,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(e,"isEnabled"),i.bind("isOn").to(e,"value",t=>!!t),this.listenTo(i,"execute",()=>this._showUI(!0)),i})}_enableUserBalloonInteractions(){const t=this.editor.editing.view.document;this.listenTo(t,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())},{priority:"high"}),this.editor.keystrokes.set("Esc",(t,e)=>{this._isUIVisible&&(this._hideUI(),e())}),ed({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const t=this.editor.commands.get("link");this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.select(),this.formView.urlInputView.inputView.element.value=t.value||""}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),void 0!==t.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus())}_showUI(t=!1){this.editor.commands.get("link").isEnabled&&(this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI())}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView)}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let n=this._getSelectedLinkElement(),i=r();const o=()=>{const t=this._getSelectedLinkElement(),e=r();n&&!t||!n&&e!==i?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=t,i=e};function r(){return e.selection.focus.getAncestors().reverse().find(t=>t.is("element"))}this.listenTo(t.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view,e=t.document,n=this._getSelectedLinkElement();return{target:n?t.domConverter.mapViewToDom(n):t.domConverter.viewRangeToDom(e.selection.getFirstRange())}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection;if(e.isCollapsed)return Su(e.getFirstPosition());{const n=e.getFirstRange().getTrimmed(),i=Su(n.start),o=Su(n.end);return i&&i==o&&t.createRangeIn(i).getTrimmed().isEqual(n)?i:null}}}function Su(t){return t.getAncestors().find(t=>(function(t){return t.is("attributeElement")&&!!t.getCustomProperty("link")})(t))}class Mu extends Fa{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document,n=Array.from(e.selection.getSelectedBlocks()).filter(e=>Iu(e,t.schema)),i=!0===this.value;t.change(t=>{if(i){let e=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,o=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t=n;)r>o.getAttribute("listIndent")&&(r=o.getAttribute("listIndent")),o.getAttribute("listIndent")==r&&t[e?"unshift":"push"](o),o=o[e?"previousSibling":"nextSibling"]}}function Iu(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class Nu extends Fa{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let n=Array.from(e.selection.getSelectedBlocks());t.change(t=>{const e=n[n.length-1];let i=e.nextSibling;for(;i&&"listItem"==i.name&&i.getAttribute("listIndent")>e.getAttribute("listIndent");)n.push(i),i=i.nextSibling;this._indentBy<0&&(n=n.reverse());for(const e of n){const n=e.getAttribute("listIndent")+this._indentBy;n<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",n,e)}})}_checkEnabled(){const t=rl(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),n=t.getAttribute("listType");let i=t.previousSibling;for(;i&&i.is("listItem")&&i.getAttribute("listIndent")>=e;){if(i.getAttribute("listIndent")==e)return i.getAttribute("listType")==n;i=i.previousSibling}return!1}return!0}}function Ou(t,e,n,i){const o=e.parent,r=n.mapper,s=n.writer;let a=r.toViewPosition(i.createPositionBefore(t));const c=Lu(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),l=t.previousSibling;if(c&&c.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=r.toViewElement(c);a=s.breakContainer(s.createPositionAfter(t))}else a=l&&"listItem"==l.name?r.toViewPosition(i.createPositionAt(l,"end")):r.toViewPosition(i.createPositionBefore(t));if(a=Du(a),s.insert(a,o),l&&"listItem"==l.name){const t=r.toViewElement(l),n=s.createRange(s.createPositionAt(t,0),a).getWalker({ignoreElementEnd:!0});for(const t of n)if(t.item.is("li")){const i=s.breakContainer(s.createPositionBefore(t.item)),o=t.item.parent,r=s.createPositionAt(e,"end");Ru(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(o),r),n.position=i}}else{const n=o.nextSibling;if(n&&(n.is("ul")||n.is("ol"))){let i=null;for(const e of n.getChildren()){const n=r.toModelElement(e);if(!(n&&n.getAttribute("listIndent")>t.getAttribute("listIndent")))break;i=e}i&&(s.breakContainer(s.createPositionAfter(i)),s.move(s.createRangeOn(i.parent),s.createPositionAt(e,"end")))}}Ru(s,o,o.nextSibling),Ru(s,o.previousSibling,o)}function Ru(t,e,n){return!e||!n||"ul"!=e.name&&"ol"!=e.name?null:e.name!=n.name||e.getAttribute("class")!==n.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function Du(t){return t.getLastMatchingPosition(t=>t.item.is("uiElement"))}function Lu(t,e){const n=!!e.sameIndent,i=!!e.smallerIndent,o=e.listIndent;let r=t;for(;r&&"listItem"==r.name;){const t=r.getAttribute("listIndent");if(n&&o==t||i&&o>t)return r;r=r.previousSibling}return null}function ju(t,e,n,i){t.ui.componentFactory.add(e,o=>{const r=t.commands.get(e),s=new Ec(o);return s.set({label:n,icon:i,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",()=>t.execute(e)),s})}function Vu(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:We.call(this)}function zu(t){return(e,n,i)=>{const o=i.consumable;if(!o.test(n.item,"insert")||!o.test(n.item,"attribute:listType")||!o.test(n.item,"attribute:listIndent"))return;o.consume(n.item,"insert"),o.consume(n.item,"attribute:listType"),o.consume(n.item,"attribute:listIndent");const r=n.item;Ou(r,function(t,e){const n=e.mapper,i=e.writer,o="numbered"==t.getAttribute("listType")?"ol":"ul",r=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=Vu,e}(i),s=i.createContainerElement(o,null);return i.insert(i.createPositionAt(s,0),r),n.bindElements(t,r),r}(r,i),i,t)}}function Bu(t,e,n){if(!n.consumable.consume(e.item,"attribute:listType"))return;const i=n.mapper.toViewElement(e.item),o=n.writer;o.breakContainer(o.createPositionBefore(i)),o.breakContainer(o.createPositionAfter(i));const r=i.parent,s="numbered"==e.attributeNewValue?"ol":"ul";o.rename(s,r)}function Fu(t,e,n){const i=n.mapper.toViewElement(e.item).parent,o=n.writer;Ru(o,i,i.nextSibling),Ru(o,i.previousSibling,i);for(const t of e.item.getChildren())n.consumable.consume(t,"insert")}function Uu(t,e,n){if("listItem"!=e.item.name){let t=n.mapper.toViewPosition(e.range.start);const i=n.writer,o=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&"li"==(t=i.breakContainer(t)).parent.name;){const e=t,n=i.createPositionAt(t.parent,"end");if(!e.isEqual(n)){const t=i.remove(i.createRange(e,n));o.push(t)}t=i.createPositionAfter(t.parent)}if(o.length>0){for(let e=0;e0){const e=Ru(i,n,n.nextSibling);e&&e.parent==n&&t.offset--}}Ru(i,t.nodeBefore,t.nodeAfter)}}}function Hu(t,e,n){const i=n.mapper.toViewPosition(e.position),o=i.nodeBefore,r=i.nodeAfter;Ru(n.writer,o,r)}function qu(t,e,n){if(n.consumable.consume(e.viewItem,{name:!0})){const t=n.writer,i=this.conversionApi.store,o=t.createElement("listItem");i.indent=i.indent||0,t.setAttribute("listIndent",i.indent,o);const r=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";t.setAttribute("listType",r,o),i.indent++;const s=n.splitToAllowedParent(o,e.modelCursor);if(!s)return;t.insert(o,s.position);const a=function(t,e,n){const{writer:i,schema:o}=n;let r=i.createPositionAfter(t);for(const s of e)if("ul"==s.name||"ol"==s.name)r=n.convertItem(s,r).modelCursor;else{const e=n.convertItem(s,i.createPositionAt(t,"end")),a=e.modelRange.start.nodeAfter;a&&a.is("element")&&!o.checkChild(t,a.name)&&(t=e.modelCursor.parent.is("listItem")?e.modelCursor.parent:Qu(e.modelCursor),r=i.createPositionAfter(t))}return r}(o,e.viewItem.getChildren(),n);i.indent--,e.modelRange=t.createRange(e.modelCursor,a),s.cursorParent?e.modelCursor=t.createPositionAt(s.cursorParent,0):e.modelCursor=e.modelRange.end}}function Wu(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t)e.is("li")||e._remove()}}function Yu(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let n=!1,i=!0;for(const e of t)!n||e.is("ul")||e.is("ol")||e._remove(),e.is("text")?(i&&(e._data=e.data.replace(/^\s+/,"")),(!e.nextSibling||e.nextSibling.is("ul")||e.nextSibling.is("ol"))&&(e._data=e.data.replace(/\s+$/,""))):(e.is("ul")||e.is("ol"))&&(n=!0),i=!1}}function $u(t){return(e,n)=>{if(n.isPhantom)return;const i=n.modelPosition.nodeBefore;if(i&&i.is("listItem")){const e=n.mapper.toViewElement(i),o=e.getAncestors().find(t=>t.is("ul")||t.is("ol")),r=t.createPositionAt(e,0).getWalker();for(const t of r){if("elementStart"==t.type&&t.item.is("li")){n.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==o){n.viewPosition=t.nextPosition;break}}}}}function Gu(t,[e,n]){let i,o=e.is("documentFragment")?e.getChild(0):e;if(i=n?this.createSelection(n):this.document.selection,o&&o.is("listItem")){const t=i.getFirstPosition();let e=null;if(t.parent.is("listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;o&&o.is("listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+t),o=o.nextSibling}}}function Qu(t){const e=new jo({startPosition:t});let n;do{n=e.next()}while(!n.value.item.is("listItem"));return n.value.item}function Ku(t,e,n,i,o,r){const s=Lu(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t,foo:"b"}),a=o.mapper,c=o.writer,l=s?s.getAttribute("listIndent"):null;let d;if(s)if(l==t){const t=a.toViewElement(s).parent;d=c.createPositionAfter(t)}else{const t=r.createPositionAt(s,"end");d=a.toViewPosition(t)}else d=n;d=Du(d);for(const t of[...i.getChildren()])(t.is("ul")||t.is("ol"))&&(d=c.move(c.createRangeOn(t),d).end,Ru(c,t,t.nextSibling),Ru(c,t.previousSibling,t))}class Ju extends La{static get requires(){return[Qd]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,n=t.editing;t.model.document.registerPostFixer(e=>(function(t,e){const n=t.document.differ.getChanges(),i=new Map;let o=!1;for(const t of n)if("insert"==t.type&&"listItem"==t.name)r(t.position);else if("insert"==t.type&&"listItem"!=t.name){if("$text"!=t.name){const n=t.position.nodeAfter;n.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",n),o=!0),n.hasAttribute("listType")&&(e.removeAttribute("listType",n),o=!0)}r(t.position.getShiftedBy(t.length))}else"remove"==t.type&&"listItem"==t.name?r(t.position):"attribute"==t.type&&"listIndent"==t.attributeKey?r(t.range.start):"attribute"==t.type&&"listType"==t.attributeKey&&r(t.range.start);for(const t of i.values())s(t),a(t);return o;function r(t){const e=t.nodeBefore;if(e&&e.is("listItem")){let n=e;if(i.has(n))return;for(;n.previousSibling&&n.previousSibling.is("listItem");)if(n=n.previousSibling,i.has(n))return;i.set(t.nodeBefore,n)}else{const e=t.nodeAfter;e&&e.is("listItem")&&i.set(e,e)}}function s(t){let n=0,i=null;for(;t&&t.is("listItem");){const r=t.getAttribute("listIndent");if(r>n){let s;null===i?(i=r-n,s=n):(i>r&&(i=r),s=r-i),e.setAttribute("listIndent",s,t),o=!0}else i=null,n=t.getAttribute("listIndent")+1;t=t.nextSibling}}function a(t){let n=[],i=null;for(;t&&t.is("listItem");){const r=t.getAttribute("listIndent");if(i&&i.getAttribute("listIndent")>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){const i=n[r];t.getAttribute("listType")!=i&&(e.setAttribute("listType",i,t),o=!0)}else n[r]=t.getAttribute("listType");i=t,t=t.nextSibling}}})(t.model,e)),n.mapper.registerViewToModelLength("li",Zu),e.mapper.registerViewToModelLength("li",Zu),n.mapper.on("modelToViewPosition",$u(n.view)),n.mapper.on("viewToModelPosition",function(t){return(e,n)=>{const i=n.viewPosition,o=i.parent,r=n.mapper;if("ul"==o.name||"ol"==o.name){if(i.isAtEnd){const e=r.toModelElement(i.nodeBefore),o=r.getModelLength(i.nodeBefore);n.modelPosition=t.createPositionBefore(e).getShiftedBy(o)}else{const e=r.toModelElement(i.nodeAfter);n.modelPosition=t.createPositionBefore(e)}e.stop()}else if("li"==o.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const s=r.toModelElement(o);let a=1,c=i.nodeBefore;for(;c&&(c.is("ul")||c.is("ol"));)a+=r.getModelLength(c),c=c.previousSibling;n.modelPosition=t.createPositionBefore(s).getShiftedBy(a),e.stop()}}}(t.model)),e.mapper.on("modelToViewPosition",$u(n.view)),n.downcastDispatcher.on("insert",Uu,{priority:"high"}),n.downcastDispatcher.on("insert:listItem",zu(t.model)),e.downcastDispatcher.on("insert",Uu,{priority:"high"}),e.downcastDispatcher.on("insert:listItem",zu(t.model)),n.downcastDispatcher.on("attribute:listType:listItem",Bu,{priority:"high"}),n.downcastDispatcher.on("attribute:listType:listItem",Fu,{priority:"low"}),n.downcastDispatcher.on("attribute:listIndent:listItem",function(t){return(e,n,i)=>{if(!i.consumable.consume(n.item,"attribute:listIndent"))return;const o=i.mapper.toViewElement(n.item),r=i.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s);r.remove(c),a&&a.nextSibling&&Ru(r,a,a.nextSibling),Ku(n.attributeOldValue+1,n.range.start,c.start,o,i,t),Ou(n.item,o,i,t);for(const t of n.item.getChildren())i.consumable.consume(t,"insert")}}(t.model)),n.downcastDispatcher.on("remove:listItem",function(t){return(e,n,i)=>{const o=i.mapper.toViewPosition(n.position).getLastMatchingPosition(t=>!t.item.is("li")).nodeAfter,r=i.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s),l=r.remove(c);a&&a.nextSibling&&Ru(r,a,a.nextSibling),Ku(i.mapper.toModelElement(o).getAttribute("listIndent")+1,n.position,c.start,o,i,t);for(const t of r.createRangeIn(l).getItems())i.mapper.unbindViewElement(t);e.stop()}}(t.model)),n.downcastDispatcher.on("remove",Hu,{priority:"low"}),e.upcastDispatcher.on("element:ul",Wu,{priority:"high"}),e.upcastDispatcher.on("element:ol",Wu,{priority:"high"}),e.upcastDispatcher.on("element:li",Yu,{priority:"high"}),e.upcastDispatcher.on("element:li",qu),t.model.on("insertContent",Gu,{priority:"high"}),t.commands.add("numberedList",new Mu(t,"numbered")),t.commands.add("bulletedList",new Mu(t,"bulleted")),t.commands.add("indentList",new Nu(t,"forward")),t.commands.add("outdentList",new Nu(t,"backward"));const i=n.view.document;this.listenTo(i,"enter",(t,e)=>{const n=this.editor.model.document,i=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==i.name&&i.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),this.listenTo(i,"delete",(t,e)=>{if("backward"!==e.direction)return;const n=this.editor.model.document.selection;if(!n.isCollapsed)return;const i=n.getFirstPosition();if(!i.isAtStart)return;const o=i.parent;"listItem"===o.name&&(o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop()))},{priority:"high"});const o=t=>(e,n)=>{this.editor.commands.get(t).isEnabled&&(this.editor.execute(t),n())};t.keystrokes.set("Tab",o("indentList")),t.keystrokes.set("Shift+Tab",o("outdentList"))}afterInit(){const t=this.editor.commands,e=t.get("indent"),n=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),n&&n.registerChildCommand(t.get("outdentList"))}}function Zu(t){let e=1;for(const n of t.getChildren())if("ul"==n.name||"ol"==n.name)for(const t of n.getChildren())e+=Zu(t);return e}var Xu='',tf='';class ef extends La{init(){const t=this.editor.t;ju(this.editor,"numberedList",t("q"),Xu),ju(this.editor,"bulletedList",t("r"),tf)}}function nf(t,e){return t=>{t.on("attribute:url:media",n)};function n(n,i,o){if(!o.consumable.consume(i.item,n.name))return;const r=i.attributeNewValue,s=o.writer,a=o.mapper.toViewElement(i.item);s.remove(s.createRangeIn(a));const c=t.getMediaViewElement(s,r,e);s.insert(s.createPositionAt(a,0),c)}}function of(t,e,n,i){const o=t.createContainerElement("figure",{class:"media"});return o.getFillerOffset=af,t.insert(t.createPositionAt(o,0),e.getMediaViewElement(t,n,i)),o}function rf(t){const e=t.getSelectedElement();return e&&e.is("media")?e:null}function sf(t,e,n){t.change(i=>{const o=i.createElement("media",{url:e});t.insertContent(o,n),i.setSelection(o,"on")})}function af(){return null}class cf extends Fa{refresh(){const t=this.editor.model,e=t.document.selection,n=t.schema,i=e.getFirstPosition(),o=rf(e);let r=i.parent;r!=r.root&&(r=r.parent),this.value=o?o.getAttribute("url"):null,this.isEnabled=n.checkChild(r,"media")}execute(t){const e=this.editor.model,n=e.document.selection,i=rf(n);if(i)e.change(e=>{e.setAttribute("url",t,i)});else{const i=Bl(n,e);sf(e,t,i)}}}var lf='';const df="0 0 64 42";class hf{constructor(t,e){const n=e.providers,i=e.extraProviders||[],o=new Set(e.removeProviders),r=n.concat(i).filter(t=>{const e=t.name;return e?!o.has(e):(console.warn(Object(be.a)("media-embed-no-provider-name: The configured media provider has no name and cannot be used."),{provider:t}),!1)});this.locale=t,this.providerDefinitions=r}hasMedia(t){return!!this._getMedia(t)}getMediaViewElement(t,e,n){return this._getMedia(e).getViewElement(t,n)}_getMedia(t){if(!t)return new uf(this.locale);t=t.trim();for(const e of this.providerDefinitions){const n=e.html;let i=e.url;Array.isArray(i)||(i=[i]);for(const e of i){const i=this._getUrlMatches(t,e);if(i)return new uf(this.locale,t,i,n)}}return null}_getUrlMatches(t,e){let n=t.match(e);if(n)return n;let i=t.replace(/^https?:\/\//,"");return(n=i.match(e))?n:(n=(i=i.replace(/^www\./,"")).match(e))||null}}class uf{constructor(t,e,n,i){this.url=this._getValidUrl(e),this._t=t.t,this._match=n,this._previewRenderer=i}getViewElement(t,e){const n={};if(e.renderForEditingView||e.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),e.renderForEditingView&&(n.class="ck-media__wrapper");const i=this._getPreviewHtml(e);return t.createUIElement("div",n,(function(t){const e=this.toDomElement(t);return e.innerHTML=i,e}))}return this.url&&(n.url=this.url),t.createEmptyElement("oembed",n)}_getPreviewHtml(t){return this._previewRenderer?this._previewRenderer(this._match):this.url&&t.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const t=new Mc,e=new Sc;return t.text=this._t("Open media in new tab"),e.content=lf,e.viewBox=df,new ia({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[e]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]},t]}]}).render().outerHTML}_getValidUrl(t){return t?t.match(/^https?/)?t:"https://"+t:null}}n(79);class ff extends La{static get pluginName(){return"MediaEmbedEditing"}constructor(t){super(t),t.config.define("mediaEmbed",{providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:t=>'
'+`
'},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:t=>'
'+`
'},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,/^youtube\.com\/embed\/([\w-]+)/,/^youtu\.be\/([\w-]+)/],html:t=>'
'+`
'},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^\/]+\/[^\/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^\/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^\/]+\/(\d+)/,/^vimeo\.com\/groups\/[^\/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^\/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:t=>'
'+`
'},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:/^google\.com\/maps/},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new hf(t.locale,t.config.get("mediaEmbed"))}init(){const t=this.editor,e=t.model.schema,n=t.t,i=t.conversion,o=t.config.get("mediaEmbed.previewsInData"),r=this.registry;t.commands.add("mediaEmbed",new cf(t)),e.register("media",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["url"]}),i.for("dataDowncast").elementToElement({model:"media",view:(t,e)=>{const n=t.getAttribute("url");return of(e,r,n,{renderMediaPreview:n&&o})}}),i.for("dataDowncast").add(nf(r,{renderMediaPreview:o})),i.for("editingDowncast").elementToElement({model:"media",view:(t,e)=>{const i=t.getAttribute("url");return function(t,e,n){return e.setCustomProperty("media",!0,t),jl(t,e,{label:n})}(of(e,r,i,{renderForEditingView:!0}),e,n("am"))}}),i.for("editingDowncast").add(nf(r,{renderForEditingView:!0})),i.for("upcast").elementToElement({view:{name:"oembed",attributes:{url:!0}},model:(t,e)=>{const n=t.getAttribute("url");if(r.hasMedia(n))return e.createElement("media",{url:n})}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(t,e)=>{const n=t.getAttribute("data-oembed-url");if(r.hasMedia(n))return e.createElement("media",{url:n})}})}}const gf=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:\/?#[\]@!$&'()*+,;=]+$/;class mf extends La{static get requires(){return[Ba,Rc]}static get pluginName(){return"AutoMediaEmbed"}constructor(t){super(t),this._timeoutId=null,this._positionToInsert=null}init(){const t=this.editor,e=t.model.document;this.listenTo(t.plugins.get(Ba),"inputTransformation",()=>{const t=e.selection.getFirstRange(),n=Ts.fromPosition(t.start);n.stickiness="toPrevious";const i=Ts.fromPosition(t.end);i.stickiness="toNext",e.once("change:data",()=>{this._embedMediaBetweenPositions(n,i),n.detach(),i.detach()},{priority:"high"})}),t.commands.get("undo").on("execute",()=>{this._timeoutId&&(ki.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(t,e){const n=this.editor,i=n.plugins.get(ff).registry,o=new Jo(t,e),r=o.getWalker({ignoreElementEnd:!0});let s="";for(const t of r)t.item.is("textProxy")&&(s+=t.item.data);(s=s.trim()).match(gf)&&i.hasMedia(s)&&n.commands.get("mediaEmbed").isEnabled&&(this._positionToInsert=Ts.fromPosition(t),this._timeoutId=ki.window.setTimeout(()=>{n.model.change(t=>{let e;this._timeoutId=null,t.remove(o),"$graveyard"!==this._positionToInsert.root.rootName&&(e=this._positionToInsert),sf(n.model,s,e),this._positionToInsert.detach(),this._positionToInsert=null})},100))}}n(81);class pf extends va{constructor(t,e){super(e);const n=e.t;this.focusTracker=new $s,this.keystrokes=new Vs,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("bd"),rd,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("be"),sd,"ck-button-cancel","cancel"),this._focusables=new ea,this._focusCycler=new Ea({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=t,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),od({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t),this.listenTo(this.urlInputView.element,"selectstart",(t,e)=>{e.stopPropagation()},{priority:"high"})}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.inputView.element.value.trim()}set url(t){this.urlInputView.inputView.element.value=t.trim()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e)return this.urlInputView.errorText=e,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t,e=new nd(this.locale,id),n=e.inputView;return this._urlInputViewInfoDefault=t("bg"),this._urlInputViewInfoTip=t("bh"),e.label=t("bi"),e.infoText=this._urlInputViewInfoDefault,n.placeholder="https://example.com",n.on("input",()=>{e.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault}),e}_createButton(t,e,n,i){const o=new Ec(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}}var bf='';class wf extends La{static get requires(){return[ff]}static get pluginName(){return"MediaEmbedUI"}init(){const t=this.editor,e=t.commands.get("mediaEmbed"),n=t.plugins.get(ff).registry;this.form=new pf(function(t,e){return[e=>{if(!e.url.length)return t("ao")},n=>{if(!e.hasMedia(n.url))return t("ap")}]}(t.t,n),t.locale),t.ui.componentFactory.add("mediaEmbed",n=>{const i=hh(n);return this._setUpDropdown(i,this.form,e,t),this._setUpForm(this.form,i,e),i})}_setUpDropdown(t,e,n){const i=this.editor,o=i.t,r=t.buttonView;function s(){i.editing.view.focus(),t.isOpen=!1}t.bind("isEnabled").to(n),t.panelView.children.add(e),r.set({label:o("an"),icon:bf,tooltip:!0}),r.on("open",()=>{e.url=n.value||"",e.urlInputView.select(),e.focus()},{priority:"low"}),t.on("submit",()=>{e.isValid()&&(i.execute("mediaEmbed",e.url),s())}),t.on("change:isOpen",()=>e.resetFormStatus()),t.on("cancel",()=>s())}_setUpForm(t,e,n){t.delegate("submit","cancel").to(e),t.urlInputView.bind("value").to(n,"value"),t.urlInputView.bind("isReadOnly").to(n,"isEnabled",t=>!t),t.saveButtonView.bind("isEnabled").to(n)}}function kf(t){const e={},n=t.getStyle("mso-list");return n&&(e.id=parseInt(n.match(/(^|\s+)l(\d+)/i)[2]),e.order=parseInt(n.match(/\s*lfo(\d+)/i)[1]),e.indent=parseInt(n.match(/\s*level(\d+)/i)[1])),e}function _f(t){return t.is("ol")||t.is("ul")}n(83);const vf=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class yf{isActive(t){return vf.test(t)}execute(t){const e=new Fd;!function(t,e){for(const n of t.getChildren())if(n.is("b")&&"normal"===n.getStyle("font-weight")){const i=t.getChildIndex(n);e.remove(n),e.insertChild(i,n.getChildren(),t)}}(t.content,e),function(t,e){for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("li")){const n=t.nextSibling;n&&_f(n)&&(e.remove(n),e.insertChild(t.childCount,n,t))}if(_f(t)){let n=t.getChild(0);for(;_f(n);)e.unwrapElement(n),n=t.getChild(0)}}}(t.content,e),function(t,e){for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("li")){const n=t.getChild(0);n.is("p")&&e.unwrapElement(n)}}}(t.content,e)}}function xf(t){return t.replace(/(\s+)<\/span>/g,(t,e)=>1===e.length?" ":Array(e.length+1).join("  ").substr(0,e.length))}function Af(t){return btoa(t.match(/\w{2}/g).map(t=>String.fromCharCode(parseInt(t,16))).join(""))}const Tf=//i,Cf=/xmlns:o="urn:schemas-microsoft-com/i;class Pf{isActive(t){return Tf.test(t)||Cf.test(t)}execute(t){const{body:e,stylesString:n}=function(t){const e=new DOMParser,n=function(t){return xf(xf(t)).replace(/([\s]*?)[\r\n]+(\s*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," <\/o:p>/g," ").replace(/>(\s*[\r\n]\s*)<")}(function(t){const e=t.match(/<\/body>(.*?)(<\/html>|$)/);return e&&e[1]&&(t=t.slice(0,e.index)+t.slice(e.index).replace(e[1],"")),t}(t=t.replace(//g,"$1").replace(//g,"$1")),Pa(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));u+=e.length-d.length,e=d,A(l,u-c,u)}else{var p=e.indexOf("<");if(0===p){if(Sa.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),u,u+v+3),$(v+3);continue}}if(Da.test(e)){var h=e.indexOf("]>");if(h>=0){$(h+2);continue}}var m=e.match(Oa);if(m){$(m[0].length);continue}var g=e.match(ka);if(g){var y=u;$(g[0].length),A(g[1],y,u);continue}var b=T();if(b){C(b),Pa(b.tagName,e)&&$(1);continue}}var w=void 0,_=void 0,x=void 0;if(p>=0){for(_=e.slice(p);!(ka.test(_)||Ca.test(_)||Sa.test(_)||Da.test(_)||(x=_.indexOf("<",1))<0);)p+=x,_=e.slice(p);w=e.substring(0,p)}p<0&&(w=e),w&&$(w.length),t.chars&&w&&t.chars(w,u-w.length,u)}if(e===n){t.chars&&t.chars(e);break}}function $(t){u+=t,e=e.substring(t)}function T(){var t=e.match(Ca);if(t){var n,r,i={tagName:t[1],attrs:[],start:u};for($(t[0].length);!(n=e.match(Aa))&&(r=e.match(xa)||e.match(_a));)r.start=u,$(r[0].length),r.end=u,i.attrs.push(r);if(n)return i.unarySlash=n[1],$(n[0].length),i.end=u,i}}function C(e){var n=e.tagName,u=e.unarySlash;a&&("p"===r&&wa(n)&&A(r),s(n)&&r===n&&A(n));for(var c=o(n)||!!u,l=e.attrs.length,f=new Array(l),d=0;d=0&&i[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(var c=i.length-1;c>=o;c--)t.end&&t.end(i[c].tag,n,a);i.length=o,r=o&&i[o-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,a):"p"===s&&(t.start&&t.start(e,[],!1,n,a),t.end&&t.end(e,n,a))}A()}(e,{warn:qa,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,a,o,l,f){var d=r&&r.ns||Za(e);X&&"svg"===d&&(a=function(e){for(var t=[],n=0;nu&&(s.push(a=e.slice(u,i)),o.push(JSON.stringify(a)));var c=Ar(r[1].trim());o.push("_s("+c+")"),s.push({"@binding":c}),u=i+r[0].length}return u':'
',Ko.innerHTML.indexOf(" ")>0}var ns=!!Z&&ts(!1),rs=!!Z&&ts(!0),is=_((function(e){var t=Kn(e);return t&&t.innerHTML})),as=Tn.prototype.$mount;Tn.prototype.$mount=function(e,t){if((e=e&&Kn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=is(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=es(r,{outputSourceRange:!1,shouldDecodeNewlines:ns,shouldDecodeNewlinesForHref:rs,delimiters:n.delimiters,comments:n.comments},this),a=i.render,o=i.staticRenderFns;n.render=a,n.staticRenderFns=o}}return as.call(this,e,t)},Tn.compile=es,e.exports=Tn}).call(this,n(4),n(13).setImmediate)},13:function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(14),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(4))},14:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,a,o,s,u=1,c={},l=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){v(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){v(e.data)},r=function(e){a.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(v,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&v(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;n0;)t[n]=arguments[n+1];if(g(Object.assign))return Object.assign.apply(Object,[e].concat(t));if(null==e)throw new TypeError("Cannot convert undefined or null to object");var r=Object(e);return t.forEach((function(e){null!=e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))})),r},$=0,T="{id}",C=function(e,t){for(var n=Array.isArray(e)?e:w(e),r=0;r=0&&e.maxLength<524288&&(t=d("max:"+e.maxLength,t)),e.minLength>0&&(t=d("min:"+e.minLength,t)),"number"===e.type&&(t=d("decimal",t),""!==e.min&&(t=d("min_value:"+e.min,t)),""!==e.max&&(t=d("max_value:"+e.max,t))),t;if(function(e){return E(["date","week","month","datetime-local","time"],e.type)}(e)){var n=e.step&&Number(e.step)<60?"HH:mm:ss":"HH:mm";if("date"===e.type)return d("date_format:yyyy-MM-dd",t);if("datetime-local"===e.type)return d("date_format:yyyy-MM-ddT"+n,t);if("month"===e.type)return d("date_format:yyyy-MM",t);if("week"===e.type)return d("date_format:yyyy-[W]WW",t);if("time"===e.type)return d("date_format:"+n,t)}return t},N=function(e){return g(Object.values)?Object.values(e):Object.keys(e).map((function(t){return e[t]}))},E=function(e,t){return-1!==e.indexOf(t)},I=function(e){return Array.isArray(e)&&0===e.length},M=function(e,t,n){Object.defineProperty(e,t,{configurable:!1,writable:!0,value:n})},F="en",j=function(e){void 0===e&&(e={}),this.container={},this.merge(e)},P={locale:{configurable:!0}};P.locale.get=function(){return F},P.locale.set=function(e){F=e||"en"},j.prototype.hasLocale=function(e){return!!this.container[e]},j.prototype.setDateFormat=function(e,t){this.container[e]||(this.container[e]={}),this.container[e].dateFormat=t},j.prototype.getDateFormat=function(e){return this.container[e]&&this.container[e].dateFormat?this.container[e].dateFormat:null},j.prototype.getMessage=function(e,t,n){var r=null;return r=this.hasMessage(e,t)?this.container[e].messages[t]:this._getDefaultMessage(e),g(r)?r.apply(void 0,n):r},j.prototype.getFieldMessage=function(e,t,n,r){if(!this.hasLocale(e))return this.getMessage(e,n,r);var i=this.container[e].custom&&this.container[e].custom[t];if(!i||!i[n])return this.getMessage(e,n,r);var a=i[n];return g(a)?a.apply(void 0,r):a},j.prototype._getDefaultMessage=function(e){return this.hasMessage(e,"_default")?this.container[e].messages._default:this.container.en.messages._default},j.prototype.getAttribute=function(e,t,n){return void 0===n&&(n=""),this.hasAttribute(e,t)?this.container[e].attributes[t]:n},j.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.container[e].messages&&this.container[e].messages[t])},j.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.container[e].attributes&&this.container[e].attributes[t])},j.prototype.merge=function(e){S(this.container,e)},j.prototype.setMessage=function(e,t,n){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].messages||(this.container[e].messages={}),this.container[e].messages[t]=n},j.prototype.setAttribute=function(e,t,n){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].attributes[t]=n},Object.defineProperties(j.prototype,P);var L={default:new j({en:{messages:{},attributes:{},custom:{}}})},q="default",U=function(){};U._checkDriverName=function(e){if(!e)throw h("you must provide a name to the dictionary driver")},U.setDriver=function(e,t){void 0===t&&(t=null),this._checkDriverName(e),t&&(L[e]=t),q=e},U.getDriver=function(){return L[q]};var R=function e(t,n){void 0===t&&(t=null),void 0===n&&(n=null),this.vmId=n||null,this.items=t&&t instanceof e?t.items:[]};R.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},R.prototype.add=function(e){var t;(t=this.items).push.apply(t,this._normalizeError(e))},R.prototype._normalizeError=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return e.scope=s(e.scope)?null:e.scope,e.vmId=s(e.vmId)?t.vmId||null:e.vmId,e})):(e.scope=s(e.scope)?null:e.scope,e.vmId=s(e.vmId)?this.vmId||null:e.vmId,[e])},R.prototype.regenerate=function(){this.items.forEach((function(e){e.msg=g(e.regenerate)?e.regenerate():e.msg}))},R.prototype.update=function(e,t){var n=A(this.items,(function(t){return t.id===e}));if(n){var r=this.items.indexOf(n);this.items.splice(r,1),n.scope=t.scope,this.items.push(n)}},R.prototype.all=function(e){var t=this;return this.items.filter((function(n){var r=!0,i=!0;return s(e)||(r=n.scope===e),s(t.vmId)||(i=n.vmId===t.vmId),i&&r})).map((function(e){return e.msg}))},R.prototype.any=function(e){var t=this;return!!this.items.filter((function(n){var r=!0,i=!0;return s(e)||(r=n.scope===e),s(t.vmId)||(i=n.vmId===t.vmId),i&&r})).length},R.prototype.clear=function(e){var t=this,n=s(this.vmId)?function(){return!0}:function(e){return e.vmId===t.vmId},r=function(t){return t.scope===e};0===arguments.length?r=function(){return!0}:s(e)&&(e=null);for(var i=0;i=9999&&($=0,T=T.replace("{id}","_{id}")),$++,T.replace("{id}",String($))),this.el=e.el,this.updated=!1,this.vmId=e.vmId,M(this,"dependencies",[]),M(this,"watchers",[]),M(this,"events",[]),this.delay=0,this.rules={},this.forceRequired=!1,this._cacheId(e),this.classNames=x({},se.classNames),e=x({},se,e),this._delay=s(e.delay)?0:e.delay,this.validity=e.validity,this.aria=e.aria,this.flags=e.flags||{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},M(this,"vm",e.vm),M(this,"componentInstance",e.component),this.ctorConfig=this.componentInstance?l("$options.$_veeValidate",this.componentInstance):void 0,this.update(e),this.initialValue=this.value,this.updated=!1},ce={validator:{configurable:!0},isRequired:{configurable:!0},isDisabled:{configurable:!0},alias:{configurable:!0},value:{configurable:!0},bails:{configurable:!0},rejectsFalse:{configurable:!0}};ce.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:{validate:function(){return Promise.resolve(!0)}}},ce.isRequired.get=function(){return!!this.rules.required||this.forceRequired},ce.isDisabled.get=function(){return!(!this.el||!this.el.disabled)},ce.alias.get=function(){if(this._alias)return this._alias;var e=null;return this.ctorConfig&&this.ctorConfig.alias&&(e=g(this.ctorConfig.alias)?this.ctorConfig.alias.call(this.componentInstance):this.ctorConfig.alias),!e&&this.el&&(e=a(this.el,"as")),!e&&this.componentInstance?this.componentInstance.$attrs&&this.componentInstance.$attrs["data-vv-as"]:e},ce.value.get=function(){if(g(this.getter))return this.getter()},ce.bails.get=function(){return this._bails},ce.rejectsFalse.get=function(){return this.componentInstance&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},ue.prototype.matches=function(e){var t=this;return!e||(e.id?this.id===e.id:!!(s(e.vmId)?function(){return!0}:function(e){return e===t.vmId})(e.vmId)&&(void 0===e.name&&void 0===e.scope||(void 0===e.scope?this.name===e.name:void 0===e.name?this.scope===e.scope:e.name===this.name&&e.scope===this.scope)))},ue.prototype._cacheId=function(e){this.el&&!e.targetOf&&(this.el._veeValidateId=this.id)},ue.prototype.waitFor=function(e){this._waitingFor=e},ue.prototype.isWaitingFor=function(e){return this._waitingFor===e},ue.prototype.update=function(e){var t,n,r,i=this;if(this.targetOf=e.targetOf||null,this.immediate=e.immediate||this.immediate||!1,this.persist=e.persist||this.persist||!1,!s(e.scope)&&e.scope!==this.scope&&g(this.validator.update)&&this.validator.update(this.id,{scope:e.scope}),this.scope=s(e.scope)?s(this.scope)?null:this.scope:e.scope,this.name=(s(e.name)?e.name:String(e.name))||this.name||null,this.rules=void 0!==e.rules?p(e.rules):this.rules,this._bails=void 0!==e.bails?e.bails:this._bails,this.model=e.model||this.model,this.listen=void 0!==e.listen?e.listen:this.listen,this.classes=!(!e.classes&&!this.classes)&&!this.componentInstance,this.classNames=m(e.classNames)?S(this.classNames,e.classNames):this.classNames,this.getter=g(e.getter)?e.getter:this.getter,this._alias=e.alias||this._alias,this.events=e.events?ie(e.events):this.events,this.delay=(t=this.events,n=e.delay||this.delay,r=this._delay,"number"==typeof n?t.reduce((function(e,t){return e[t]=n,e}),{}):t.reduce((function(e,t){return"object"==typeof n&&t in n?(e[t]=n[t],e):"number"==typeof r?(e[t]=r,e):(e[t]=r&&r[t]||0,e)}),{})),this.updateDependencies(),this.addActionListeners(),void 0!==e.rules&&(this.flags.required=this.isRequired),0===Object.keys(e.rules||{}).length&&this.updated){var a=this.flags.validated;this.validator.validate("#"+this.id).then((function(){i.flags.validated=a}))}this.flags.validated&&void 0!==e.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.addValueListeners(),this.el&&(this.updateClasses(),this.updateAriaAttrs())},ue.prototype.reset=function(){var e=this;this._cancellationToken&&(this._cancellationToken.cancelled=!0,delete this._cancellationToken);var t={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};Object.keys(this.flags).filter((function(e){return"required"!==e})).forEach((function(n){e.flags[n]=t[n]})),this.initialValue=this.value,this.flags.changed=!1,this.addValueListeners(),this.addActionListeners(),this.updateClasses(!0),this.updateAriaAttrs(),this.updateCustomValidity()},ue.prototype.setFlags=function(e){var t=this,n={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(e).forEach((function(r){t.flags[r]=e[r],n[r]&&void 0===e[n[r]]&&(t.flags[n[r]]=!e[r])})),void 0===e.untouched&&void 0===e.touched&&void 0===e.dirty&&void 0===e.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},ue.prototype.updateDependencies=function(){var e=this;this.dependencies.forEach((function(e){return e.field.destroy()})),this.dependencies=[];var t=Object.keys(this.rules).reduce((function(t,n){return te.isTargetRule(n)&&t.push({selector:e.rules[n][0],name:n}),t}),[]);t.length&&this.vm&&this.vm.$el&&t.forEach((function(t){var n=t.selector,r=t.name,i=e.vm.$refs[n],a=Array.isArray(i)?i[0]:i;if(a){var o={vm:e.vm,classes:e.classes,classNames:e.classNames,delay:e.delay,scope:e.scope,events:e.events.join("|"),immediate:e.immediate,targetOf:e.id};g(a.$watch)?(o.component=a,o.el=a.$el,o.getter=J.resolveGetter(a.$el,a.$vnode)):(o.el=a,o.getter=J.resolveGetter(a,{})),e.dependencies.push({name:r,field:new ue(o)})}}))},ue.prototype.unwatch=function(e){if(void 0===e&&(e=null),!e)return this.watchers.forEach((function(e){return e.unwatch()})),void(this.watchers=[]);this.watchers.filter((function(t){return e.test(t.tag)})).forEach((function(e){return e.unwatch()})),this.watchers=this.watchers.filter((function(t){return!e.test(t.tag)}))},ue.prototype.updateClasses=function(e){var t=this;if(void 0===e&&(e=!1),this.classes&&!this.isDisabled){var n=function(n){b(n,t.classNames.dirty,t.flags.dirty),b(n,t.classNames.pristine,t.flags.pristine),b(n,t.classNames.touched,t.flags.touched),b(n,t.classNames.untouched,t.flags.untouched),e&&(b(n,t.classNames.valid,!1),b(n,t.classNames.invalid,!1)),!s(t.flags.valid)&&t.flags.validated&&b(n,t.classNames.valid,t.flags.valid),!s(t.flags.invalid)&&t.flags.validated&&b(n,t.classNames.invalid,t.flags.invalid)};if(i(this.el)){var r=document.querySelectorAll('input[name="'+this.el.name+'"]');w(r).forEach(n)}else n(this.el)}},ue.prototype.addActionListeners=function(){var e=this;if(this.unwatch(/class/),this.el){var t=function(){e.flags.touched=!0,e.flags.untouched=!1,e.classes&&(b(e.el,e.classNames.touched,!0),b(e.el,e.classNames.untouched,!1)),e.unwatch(/^class_blur$/)},n=r(this.el)?"input":"change",a=function(){e.flags.dirty=!0,e.flags.pristine=!1,e.classes&&(b(e.el,e.classNames.pristine,!1),b(e.el,e.classNames.dirty,!0)),e.unwatch(/^class_input$/)};if(this.componentInstance&&g(this.componentInstance.$once))return this.componentInstance.$once("input",a),this.componentInstance.$once("blur",t),this.watchers.push({tag:"class_input",unwatch:function(){e.componentInstance.$off("input",a)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){e.componentInstance.$off("blur",t)}});if(this.el){oe(this.el,n,a);var o=i(this.el)?"change":"blur";oe(this.el,o,t),this.watchers.push({tag:"class_input",unwatch:function(){e.el.removeEventListener(n,a)}}),this.watchers.push({tag:"class_blur",unwatch:function(){e.el.removeEventListener(o,t)}})}}},ue.prototype.checkValueChanged=function(){return(null!==this.initialValue||""!==this.value||!r(this.el))&&this.value!==this.initialValue},ue.prototype._determineInputEvent=function(){return this.componentInstance?this.componentInstance.$options.model&&this.componentInstance.$options.model.event||"input":this.model&&this.model.lazy?"change":r(this.el)?"input":"change"},ue.prototype._determineEventList=function(e){var t=this;return!this.events.length||this.componentInstance||r(this.el)?[].concat(this.events).map((function(e){return"input"===e&&t.model&&t.model.lazy?"change":e})):this.events.map((function(t){return"input"===t?e:t}))},ue.prototype.addValueListeners=function(){var e=this;if(this.unwatch(/^input_.+/),this.listen&&this.el){var t={cancelled:!1},n=this.targetOf?function(){var t=e.validator._resolveField("#"+e.targetOf);t&&t.flags.validated&&e.validator.validate("#"+e.targetOf)}:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];(0===n.length||re(n[0]))&&(n[0]=e.value),e.flags.pending=!0,e._cancellationToken=t,e.validator.validate("#"+e.id,n[0])},r=this._determineInputEvent(),i=this._determineEventList(r);if(E(i,r)){var a=null,o=null,s=!1;if(this.model&&this.model.expression&&(a=this.vm,o=this.model.expression,s=!0),!o&&this.componentInstance&&this.componentInstance.$options.model&&(a=this.componentInstance,o=this.componentInstance.$options.model.prop||"value"),a&&o){var u=f(n,this.delay[r],t),c=a.$watch(o,u);this.watchers.push({tag:"input_model",unwatch:function(){e.vm.$nextTick((function(){c()}))}}),s&&(i=i.filter((function(e){return e!==r})))}}i.forEach((function(r){var i=f(n,e.delay[r],t);e._addComponentEventListener(r,i),e._addHTMLEventListener(r,i)}))}},ue.prototype._addComponentEventListener=function(e,t){var n=this;this.componentInstance&&(this.componentInstance.$on(e,t),this.watchers.push({tag:"input_vue",unwatch:function(){n.componentInstance.$off(e,t)}}))},ue.prototype._addHTMLEventListener=function(e,t){var n=this;if(this.el&&!this.componentInstance){var r=function(r){oe(r,e,t),n.watchers.push({tag:"input_native",unwatch:function(){r.removeEventListener(e,t)}})};if(r(this.el),i(this.el)){var a=document.querySelectorAll('input[name="'+this.el.name+'"]');w(a).forEach((function(e){e._veeValidateId&&e!==n.el||r(e)}))}}},ue.prototype.updateAriaAttrs=function(){var e=this;if(this.aria&&this.el&&g(this.el.setAttribute)){var t=function(t){t.setAttribute("aria-required",e.isRequired?"true":"false"),t.setAttribute("aria-invalid",e.flags.invalid?"true":"false")};if(i(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');w(n).forEach(t)}else t(this.el)}},ue.prototype.updateCustomValidity=function(){this.validity&&this.el&&g(this.el.setCustomValidity)&&this.validator.errors&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},ue.prototype.destroy=function(){this._cancellationToken&&(this._cancellationToken.cancelled=!0),this.unwatch(),this.dependencies.forEach((function(e){return e.field.destroy()})),this.dependencies=[]},Object.defineProperties(ue.prototype,ce);var le=function(e){void 0===e&&(e=[]),this.items=e||[],this.itemsById=this.items.reduce((function(e,t){return e[t.id]=t,e}),{})},fe={length:{configurable:!0}};le.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},fe.length.get=function(){return this.items.length},le.prototype.find=function(e){return A(this.items,(function(t){return t.matches(e)}))},le.prototype.findById=function(e){return this.itemsById[e]||null},le.prototype.filter=function(e){return Array.isArray(e)?this.items.filter((function(t){return e.some((function(e){return t.matches(e)}))})):this.items.filter((function(t){return t.matches(e)}))},le.prototype.map=function(e){return this.items.map(e)},le.prototype.remove=function(e){var t=null;if(!(t=e instanceof ue?e:this.find(e)))return null;var n=this.items.indexOf(t);return this.items.splice(n,1),delete this.itemsById[t.id],t},le.prototype.push=function(e){if(!(e instanceof ue))throw h("FieldBag only accepts instances of Field that has an id defined.");if(!e.id)throw h("Field id must be defined.");if(this.findById(e.id))throw h("Field with id "+e.id+" is already added.");this.items.push(e),this.itemsById[e.id]=e},Object.defineProperties(le.prototype,fe);var de=function(e,t){this.id=t._uid,this._base=e,this._paused=!1,this.errors=new R(e.errors,this.id)},pe={flags:{configurable:!0},rules:{configurable:!0},fields:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};pe.flags.get=function(){var e=this;return this._base.fields.items.filter((function(t){return t.vmId===e.id})).reduce((function(e,t){return t.scope&&(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags),e[t.name]=t.flags,e}),{})},pe.rules.get=function(){return this._base.rules},pe.fields.get=function(){return new le(this._base.fields.filter({vmId:this.id}))},pe.dictionary.get=function(){return this._base.dictionary},pe.locale.get=function(){return this._base.locale},pe.locale.set=function(e){this._base.locale=e},de.prototype.localize=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).localize.apply(e,t)},de.prototype.update=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).update.apply(e,t)},de.prototype.attach=function(e){var t=x({},e,{vmId:this.id});return this._base.attach(t)},de.prototype.pause=function(){this._paused=!0},de.prototype.resume=function(){this._paused=!1},de.prototype.remove=function(e){return this._base.remove(e)},de.prototype.detach=function(e,t){return this._base.detach(e,t,this.id)},de.prototype.extend=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).extend.apply(e,t)},de.prototype.validate=function(e,t,n){return void 0===n&&(n={}),this._paused?Promise.resolve(!0):this._base.validate(e,t,x({},{vmId:this.id},n||{}))},de.prototype.verify=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).verify.apply(e,t)},de.prototype.validateAll=function(e,t){return void 0===t&&(t={}),this._paused?Promise.resolve(!0):this._base.validateAll(e,x({},{vmId:this.id},t||{}))},de.prototype.validateScopes=function(e){return void 0===e&&(e={}),this._paused?Promise.resolve(!0):this._base.validateScopes(x({},{vmId:this.id},e||{}))},de.prototype.destroy=function(){delete this.id,delete this._base},de.prototype.reset=function(e){return this._base.reset(Object.assign({},e||{},{vmId:this.id}))},de.prototype.flag=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).flag.apply(e,t.concat([this.id]))},de.prototype._resolveField=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base)._resolveField.apply(e,t)},Object.defineProperties(de.prototype,pe);var ve=null,he=function(){return ve},me={provide:function(){return this.$validator&&!k(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!k(this.$vnode)&&!1!==this.$options.$__veeInject){this.$parent||V(this.$options.$_veeValidate||{});var e=B(this);(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=new de(he(),this));var t,n=(t=this.$options.inject,!(!m(t)||!t.$validator));if(this.$validator||!e.inject||n||(this.$validator=new de(he(),this)),n||this.$validator){if(!n&&this.$validator)this.$options._base.util.defineReactive(this.$validator,"errors",this.$validator.errors);this.$options.computed||(this.$options.computed={}),this.$options.computed[e.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[e.fieldsBagName||"fields"]=function(){return this.$validator.fields.items.reduce((function(e,t){return t.scope?(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags,e):(e[t.name]=t.flags,e)}),{})}}}},beforeDestroy:function(){this.$validator&&this._uid===this.$validator.id&&this.$validator.errors.clear()}};function ge(e,t){return t&&t.$validator?t.$validator.fields.findById(e._veeValidateId):null}var ye={bind:function(e,t,n){var r=n.context.$validator;if(r){var i=J.generate(e,t,n);r.attach(i)}},inserted:function(e,t,n){var r=ge(e,n.context),i=J.resolveScope(e,t,n);r&&i!==r.scope&&(r.update({scope:i}),r.updated=!1)},update:function(e,t,n){var r=ge(e,n.context);if(!(!r||r.updated&&u(t.value,t.oldValue))){var i=J.resolveScope(e,t,n),a=J.resolveRules(e,t,n);r.update({scope:i,rules:a})}},unbind:function(e,t,n){var r=n.context,i=ge(e,r);i&&r.$validator.detach(i)}},be=function(e,t,n){void 0===t&&(t={fastExit:!0}),void 0===n&&(n=null),this.errors=new R,this.fields=new le,this._createFields(e),this.paused=!1,this.fastExit=!!s(t&&t.fastExit)||t.fastExit,this.$vee=n||{_vm:{$nextTick:function(e){return g(e)?e():Promise.resolve()},$emit:function(){},$off:function(){}}}},we={rules:{configurable:!0},dictionary:{configurable:!0},flags:{configurable:!0},locale:{configurable:!0}},_e={rules:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};_e.rules.get=function(){return te.rules},we.rules.get=function(){return te.rules},we.dictionary.get=function(){return U.getDriver()},_e.dictionary.get=function(){return U.getDriver()},we.flags.get=function(){return this.fields.items.reduce((function(e,t){var n;return t.scope?(e["$"+t.scope]=((n={})[t.name]=t.flags,n),e):(e[t.name]=t.flags,e)}),{})},we.locale.get=function(){return be.locale},we.locale.set=function(e){be.locale=e},_e.locale.get=function(){return U.getDriver().locale},_e.locale.set=function(e){var t=e!==U.getDriver().locale;U.getDriver().locale=e,t&&be.$vee&&be.$vee._vm&&be.$vee._vm.$emit("localeChanged")},be.create=function(e,t){return new be(e,t)},be.extend=function(e,t,n){void 0===n&&(n={}),be._guardExtend(e,t);var r=t.options||{};be._merge(e,{validator:t,paramNames:n&&n.paramNames||t.paramNames,options:x({hasTarget:!1,immediate:!0},r,n||{})})},be.remove=function(e){te.remove(e)},be.prototype.localize=function(e,t){be.localize(e,t)},be.localize=function(e,t){var n;if(m(e))U.getDriver().merge(e);else{if(t){var r=e||t.name;t=x({},t),U.getDriver().merge(((n={})[r]=t,n))}e&&(be.locale=e)}},be.prototype.attach=function(e){var t=this,n={name:e.name,scope:e.scope,persist:!0},r=e.persist?this.fields.find(n):null;r&&(e.flags=r.flags,r.destroy(),this.fields.remove(r));var i=e.initialValue,a=new ue(e);return this.fields.push(a),a.immediate?this.$vee._vm.$nextTick((function(){return t.validate("#"+a.id,i||a.value,{vmId:e.vmId})})):this._validate(a,i||a.value,{initial:!0}).then((function(e){a.flags.valid=e.valid,a.flags.invalid=!e.valid})),a},be.prototype.flag=function(e,t,n){void 0===n&&(n=null);var r=this._resolveField(e,void 0,n);r&&t&&r.setFlags(t)},be.prototype.detach=function(e,t,n){var r=g(e.destroy)?e:this._resolveField(e,t,n);r&&(r.persist||(r.destroy(),this.errors.remove(r.name,r.scope,r.vmId),this.fields.remove(r)))},be.prototype.extend=function(e,t,n){void 0===n&&(n={}),be.extend(e,t,n)},be.prototype.reset=function(e){var t=this;return this.$vee._vm.$nextTick().then((function(){return t.$vee._vm.$nextTick()})).then((function(){t.fields.filter(e).forEach((function(n){n.waitFor(null),n.reset(),t.errors.remove(n.name,n.scope,e&&e.vmId)}))}))},be.prototype.update=function(e,t){var n=t.scope;this._resolveField("#"+e)&&this.errors.update(e,{scope:n})},be.prototype.remove=function(e){be.remove(e)},be.prototype.validate=function(e,t,n){var r=this;void 0===n&&(n={});var i=n.silent,a=n.vmId;if(this.paused)return Promise.resolve(!0);if(s(e))return this.validateScopes({silent:i,vmId:a});if("*"===e)return this.validateAll(void 0,{silent:i,vmId:a});if(/^(.+)\.\*$/.test(e)){var o=e.match(/^(.+)\.\*$/)[1];return this.validateAll(o)}var u=this._resolveField(e);if(!u)return this._handleFieldNotFound(e);i||(u.flags.pending=!0),void 0===t&&(t=u.value);var c=this._validate(u,t);return u.waitFor(c),c.then((function(e){return!i&&u.isWaitingFor(c)&&(u.waitFor(null),r._handleValidationResults([e],a)),e.valid}))},be.prototype.pause=function(){return this.paused=!0,this},be.prototype.resume=function(){return this.paused=!1,this},be.prototype.validateAll=function(e,t){var n=this;void 0===t&&(t={});var r=t.silent,i=t.vmId;if(this.paused)return Promise.resolve(!0);var a=null,o=!1;return"string"==typeof e?a={scope:e,vmId:i}:m(e)?(a=Object.keys(e).map((function(e){return{name:e,vmId:i,scope:null}})),o=!0):a=Array.isArray(e)?e.map((function(e){return"object"==typeof e?Object.assign({vmId:i},e):{name:e,vmId:i}})):{scope:null,vmId:i},Promise.all(this.fields.filter(a).map((function(t){return n._validate(t,o?e[t.name]:t.value)}))).then((function(e){return r||n._handleValidationResults(e,i),e.every((function(e){return e.valid}))}))},be.prototype.validateScopes=function(e){var t=this;void 0===e&&(e={});var n=e.silent,r=e.vmId;return this.paused?Promise.resolve(!0):Promise.all(this.fields.filter({vmId:r}).map((function(e){return t._validate(e,e.value)}))).then((function(e){return n||t._handleValidationResults(e,r),e.every((function(e){return e.valid}))}))},be.prototype.verify=function(e,t,n){void 0===n&&(n={});var r={name:n&&n.name||"{field}",rules:p(t),bails:l("bails",n,!0),forceRequired:!1,get isRequired(){return!!this.rules.required||this.forceRequired}},i=Object.keys(r.rules).filter(te.isTargetRule);return i.length&&n&&m(n.values)&&(r.dependencies=i.map((function(e){var t=r.rules[e][0];return{name:e,field:{value:n.values[t]}}}))),this._validate(r,e).then((function(e){var t=[],n={};return e.errors.forEach((function(e){t.push(e.msg),n[e.rule]=e.msg})),{valid:e.valid,errors:t,failedRules:n}}))},be.prototype.destroy=function(){this.$vee._vm.$off("localeChanged")},be.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach((function(n){var r=x({},{name:n,rules:e[n]});t.attach(r)}))},be.prototype._getDateFormat=function(e){var t=null;return e.date_format&&Array.isArray(e.date_format)&&(t=e.date_format[0]),t||U.getDriver().getDateFormat(this.locale)},be.prototype._formatErrorMessage=function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r=null);var i=this._getFieldDisplayName(e),a=this._getLocalizedParams(t,r);return U.getDriver().getFieldMessage(this.locale,e.name,t.name,[i,a,n])},be.prototype._convertParamObjectToArray=function(e,t){if(Array.isArray(e))return e;var n=te.getParamNames(t);return n&&m(e)?n.reduce((function(t,n){return n in e&&t.push(e[n]),t}),[]):e},be.prototype._getLocalizedParams=function(e,t){void 0===t&&(t=null);var n=this._convertParamObjectToArray(e.params,e.name);return e.options.hasTarget&&n&&n[0]?[t||U.getDriver().getAttribute(this.locale,n[0],n[0])].concat(n.slice(1)):n},be.prototype._getFieldDisplayName=function(e){return e.alias||U.getDriver().getAttribute(this.locale,e.name,e.name)},be.prototype._convertParamArrayToObj=function(e,t){var n=te.getParamNames(t);if(!n)return e;if(m(e)){if(n.some((function(t){return-1!==Object.keys(e).indexOf(t)})))return e;e=[e]}return e.reduce((function(e,t,r){return e[n[r]]=t,e}),{})},be.prototype._test=function(e,t,n){var r=this,i=te.getValidatorMethod(n.name),a=Array.isArray(n.params)?w(n.params):n.params;a||(a=[]);var o=null;if(!i||"function"!=typeof i)return Promise.reject(h("No such validator '"+n.name+"' exists."));if(n.options.hasTarget&&e.dependencies){var s=A(e.dependencies,(function(e){return e.name===n.name}));s&&(o=s.field.alias,a=[s.field.value].concat(a.slice(1)))}else"required"===n.name&&e.rejectsFalse&&(a=a.length?a:[!0]);if(n.options.isDate){var u=this._getDateFormat(e.rules);"date_format"!==n.name&&a.push(u)}var c=i(t,this._convertParamArrayToObj(a,n.name));return g(c.then)?c.then((function(t){var i=!0,a={};return Array.isArray(t)?i=t.every((function(e){return m(e)?e.valid:e})):(i=m(t)?t.valid:t,a=t.data),{valid:i,data:c.data,errors:i?[]:[r._createFieldError(e,n,a,o)]}})):(m(c)||(c={valid:c,data:{}}),{valid:c.valid,data:c.data,errors:c.valid?[]:[this._createFieldError(e,n,c.data,o)]})},be._merge=function(e,t){var n=t.validator,r=t.options,i=t.paramNames,a=g(n)?n:n.validate;n.getMessage&&U.getDriver().setMessage(be.locale,e,n.getMessage),te.add(e,{validate:a,options:r,paramNames:i})},be._guardExtend=function(e,t){if(!g(t)&&!g(t.validate))throw h("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.")},be.prototype._createFieldError=function(e,t,n,r){var i=this;return{id:e.id,vmId:e.vmId,field:e.name,msg:this._formatErrorMessage(e,t,n,r),rule:t.name,scope:e.scope,regenerate:function(){return i._formatErrorMessage(e,t,n,r)}}},be.prototype._resolveField=function(e,t,n){if("#"===e[0])return this.fields.findById(e.slice(1));if(!s(t))return this.fields.find({name:e,scope:t,vmId:n});if(E(e,".")){var r=e.split("."),i=r[0],a=r.slice(1),o=this.fields.find({name:a.join("."),scope:i,vmId:n});if(o)return o}return this.fields.find({name:e,scope:null,vmId:n})},be.prototype._handleFieldNotFound=function(e,t){var n=s(t)?e:(s(t)?"":t+".")+e;return Promise.reject(h('Validating a non-existent field: "'+n+'". Use "attach()" first.'))},be.prototype._handleValidationResults=function(e,t){var n=this,r=e.map((function(e){return{id:e.id}}));this.errors.removeById(r.map((function(e){return e.id}))),e.forEach((function(e){n.errors.remove(e.field,e.scope,t)}));var i=e.reduce((function(e,t){return e.push.apply(e,t.errors),e}),[]);this.errors.add(i),this.fields.filter(r).forEach((function(t){var n=A(e,(function(e){return e.id===t.id}));t.setFlags({pending:!1,valid:n.valid,validated:!0})}))},be.prototype._shouldSkip=function(e,t){return!1!==e.bails&&(!(!e.isDisabled||!z().useConstraintAttrs)||!e.isRequired&&(s(t)||""===t||I(t)))},be.prototype._shouldBail=function(e){return void 0!==e.bails?e.bails:this.fastExit},be.prototype._validate=function(e,t,n){var r=this;void 0===n&&(n={});var i=n.initial,a=Object.keys(e.rules).filter(te.isRequireRule);if(e.forceRequired=!1,a.forEach((function(n){var i=te.getOptions(n),a=r._test(e,t,{name:n,params:e.rules[n],options:i});if(g(a.then))throw h("Require rules cannot be async");if(!m(a))throw h("Require rules has to return an object (see docs)");!0===a.data.required&&(e.forceRequired=!0)})),this._shouldSkip(e,t))return Promise.resolve({valid:!0,id:e.id,field:e.name,scope:e.scope,errors:[]});var o=[],s=[],u=!1;return g(e.checkValueChanged)&&(e.flags.changed=e.checkValueChanged()),Object.keys(e.rules).filter((function(e){return!i||!te.has(e)||te.isImmediate(e)})).some((function(n){var i=te.getOptions(n),a=r._test(e,t,{name:n,params:e.rules[n],options:i});return g(a.then)?o.push(a):!a.valid&&r._shouldBail(e)?(s.push.apply(s,a.errors),u=!0):o.push(new Promise((function(e){return e(a)}))),u})),u?Promise.resolve({valid:!1,errors:s,id:e.id,field:e.name,scope:e.scope}):Promise.all(o).then((function(t){return t.reduce((function(e,t){var n;return t.valid||(n=e.errors).push.apply(n,t.errors),e.valid=e.valid&&t.valid,e}),{valid:!0,errors:s,id:e.id,field:e.name,scope:e.scope})}))},Object.defineProperties(be.prototype,we),Object.defineProperties(be,_e);var xe=function(e){return m(e)?Object.keys(e).reduce((function(t,n){return t[n]=xe(e[n]),t}),{}):g(e)?e("{0}",["{1}","{2}","{3}"]):e},$e=function(e,t){this.i18n=e,this.rootKey=t},Te={locale:{configurable:!0}};Te.locale.get=function(){return this.i18n.locale},Te.locale.set=function(e){v("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},$e.prototype.getDateFormat=function(e){return this.i18n.getDateTimeFormat(e||this.locale)},$e.prototype.setDateFormat=function(e,t){this.i18n.setDateTimeFormat(e||this.locale,t)},$e.prototype.getMessage=function(e,t,n){var r=this.rootKey+".messages."+t,i=n;return Array.isArray(n)&&(i=[].concat.apply([],n)),this.i18n.te(r)?this.i18n.t(r,i):this.i18n.te(r,this.i18n.fallbackLocale)?this.i18n.t(r,this.i18n.fallbackLocale,i):this.i18n.t(this.rootKey+".messages._default",i)},$e.prototype.getAttribute=function(e,t,n){void 0===n&&(n="");var r=this.rootKey+".attributes."+t;return this.i18n.te(r)?this.i18n.t(r):n},$e.prototype.getFieldMessage=function(e,t,n,r){var i=this.rootKey+".custom."+t+"."+n;return this.i18n.te(i)?this.i18n.t(i,r):this.getMessage(e,n,r)},$e.prototype.merge=function(e){var t=this;Object.keys(e).forEach((function(n){var r,i=S({},l(n+"."+t.rootKey,t.i18n.messages,{})),a=S(i,function(e){var t={};return e.messages&&(t.messages=xe(e.messages)),e.custom&&(t.custom=xe(e.custom)),e.attributes&&(t.attributes=e.attributes),s(e.dateFormat)||(t.dateFormat=e.dateFormat),t}(e[n]));t.i18n.mergeLocaleMessage(n,((r={})[t.rootKey]=a,r)),a.dateFormat&&t.i18n.setDateTimeFormat(n,a.dateFormat)}))},$e.prototype.setMessage=function(e,t,n){var r,i;this.merge(((i={})[e]={messages:(r={},r[t]=n,r)},i))},$e.prototype.setAttribute=function(e,t,n){var r,i;this.merge(((i={})[e]={attributes:(r={},r[t]=n,r)},i))},Object.defineProperties($e.prototype,Te);var Ce,Ae,ke,Oe={aggressive:function(){return{on:["input"]}},eager:function(e){return e.errors.length?{on:["input"]}:{on:["change","blur"]}},passive:function(){return{on:[]}},lazy:function(){return{on:["change"]}}},Se=function(e,t){var n;this.configure(e),ke=this,t&&(Ce=t),this._validator=(n=new be(null,{fastExit:e&&e.fastExit},this),ve=n,n),this._initVM(this.config),this._initI18n(this.config)},De={i18nDriver:{configurable:!0},config:{configurable:!0}},Ne={i18nDriver:{configurable:!0},config:{configurable:!0}};Se.setI18nDriver=function(e,t){U.setDriver(e,t)},Se.configure=function(e){V(e)},Se.setMode=function(e,t){if(V({mode:e}),t){if(!g(t))throw new Error("A mode implementation must be a function");Oe[e]=t}},Se.use=function(e,t){return void 0===t&&(t={}),g(e)?ke?void e({Validator:be,ErrorBag:R,Rules:be.rules},t):(Ae||(Ae=[]),void Ae.push({plugin:e,options:t})):v("The plugin must be a callable function")},Se.install=function(e,t){Ce&&e===Ce||(Ce=e,ke=new Se(t),be.$vee=ke,function(){try{var e=Object.defineProperty({},"passive",{get:function(){ae=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(e){ae=!1}}(),Ce.mixin(me),Ce.directive("validate",ye),Ae&&(Ae.forEach((function(e){var t=e.plugin,n=e.options;Se.use(t,n)})),Ae=null))},De.i18nDriver.get=function(){return U.getDriver()},Ne.i18nDriver.get=function(){return U.getDriver()},De.config.get=function(){return z()},Ne.config.get=function(){return z()},Se.prototype._initVM=function(e){var t=this;this._vm=new Ce({data:function(){return{errors:t._validator.errors,fields:t._validator.fields}}})},Se.prototype._initI18n=function(e){var t=this,n=e.dictionary,r=e.i18n,i=e.i18nRootKey,a=e.locale,o=function(){n&&t.i18nDriver.merge(n),t._validator.errors.regenerate()};r?(Se.setI18nDriver("i18n",new $e(r,i)),r._vm.$watch("locale",o)):"undefined"!=typeof window&&this._vm.$on("localeChanged",o),n&&this.i18nDriver.merge(n),a&&!r&&this._validator.localize(a)},Se.prototype.configure=function(e){V(e)},Object.defineProperties(Se.prototype,De),Object.defineProperties(Se,Ne),Se.mixin=me,Se.directive=ye,Se.Validator=be,Se.ErrorBag=R;var Ee,Ie={name:"en",messages:{_default:function(e){return"The "+e+" value is not valid"},after:function(e,t){var n=t[0];return"The "+e+" must be after "+(t[1]?"or equal to ":"")+n},alpha:function(e){return"The "+e+" field may only contain alphabetic characters"},alpha_dash:function(e){return"The "+e+" field may contain alpha-numeric characters as well as dashes and underscores"},alpha_num:function(e){return"The "+e+" field may only contain alpha-numeric characters"},alpha_spaces:function(e){return"The "+e+" field may only contain alphabetic characters as well as spaces"},before:function(e,t){var n=t[0];return"The "+e+" must be before "+(t[1]?"or equal to ":"")+n},between:function(e,t){return"The "+e+" field must be between "+t[0]+" and "+t[1]},confirmed:function(e){return"The "+e+" confirmation does not match"},credit_card:function(e){return"The "+e+" field is invalid"},date_between:function(e,t){return"The "+e+" must be between "+t[0]+" and "+t[1]},date_format:function(e,t){return"The "+e+" must be in the format "+t[0]},decimal:function(e,t){void 0===t&&(t=[]);var n=t[0];return void 0===n&&(n="*"),"The "+e+" field must be numeric and may contain"+(n&&"*"!==n?" "+n:"")+" decimal points"},digits:function(e,t){return"The "+e+" field must be numeric and contains exactly "+t[0]+" digits"},dimensions:function(e,t){return"The "+e+" field must be "+t[0]+" pixels by "+t[1]+" pixels"},email:function(e){return"The "+e+" field must be a valid email"},excluded:function(e){return"The "+e+" field must be a valid value"},ext:function(e){return"The "+e+" field must be a valid file"},image:function(e){return"The "+e+" field must be an image"},included:function(e){return"The "+e+" field must be a valid value"},integer:function(e){return"The "+e+" field must be an integer"},ip:function(e){return"The "+e+" field must be a valid ip address"},ip_or_fqdn:function(e){return"The "+e+" field must be a valid ip address or FQDN"},length:function(e,t){var n=t[0],r=t[1];return r?"The "+e+" length must be between "+n+" and "+r:"The "+e+" length must be "+n},max:function(e,t){return"The "+e+" field may not be greater than "+t[0]+" characters"},max_value:function(e,t){return"The "+e+" field must be "+t[0]+" or less"},mimes:function(e){return"The "+e+" field must have a valid file type"},min:function(e,t){return"The "+e+" field must be at least "+t[0]+" characters"},min_value:function(e,t){return"The "+e+" field must be "+t[0]+" or more"},numeric:function(e){return"The "+e+" field may only contain numeric characters"},regex:function(e){return"The "+e+" field format is invalid"},required:function(e){return"The "+e+" field is required"},required_if:function(e,t){return"The "+e+" field is required when the "+t[0]+" field has this value"},size:function(e,t){return"The "+e+" size must be less than "+function(e){var t=0===(e=1024*Number(e))?0:Math.floor(Math.log(e)/Math.log(1024));return 1*(e/Math.pow(1024,t)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}(t[0])},url:function(e){return"The "+e+" field is not a valid URL"}},attributes:{}};function Me(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}"undefined"!=typeof VeeValidate&&VeeValidate.Validator.localize(((Ee={})[Ie.name]=Ie,Ee));var Fe=6e4;function je(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();t.setSeconds(0,0);var r=t.getTime()%Fe;return n*Fe+r}var Pe=36e5,Le=6e4,qe=2,Ue={dateTimeDelimeter:/[T ]/,plainTime:/:/,timeZoneDelimeter:/[Z ]/i,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Re(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},r=null==n.additionalDigits?qe:Me(n.additionalDigits);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i=function(e){var t,n={},r=e.split(Ue.dateTimeDelimeter);Ue.plainTime.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1],Ue.timeZoneDelimeter.test(n.date)&&(n.date=e.split(Ue.timeZoneDelimeter)[0],t=e.substr(n.date.length,e.length)));if(t){var i=Ue.timezone.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}(e),a=function(e,t){var n,r=Ue.YYY[t],i=Ue.YYYYY[t];if(n=Ue.YYYY.exec(e)||i.exec(e)){var a=n[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(n=Ue.YY.exec(e)||r.exec(e)){var o=n[1];return{year:100*parseInt(o,10),restDateString:e.slice(o.length)}}return{year:null}}(i.date,r),o=a.year,s=function(e,t){if(null===t)return null;var n,r,i,a;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=Ue.MM.exec(e))return r=new Date(0),i=parseInt(n[1],10)-1,Ze(t,i)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(n=Ue.DDD.exec(e)){r=new Date(0);var o=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=Ve(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,o)?(r.setUTCFullYear(t,0,o),r):new Date(NaN)}if(n=Ue.MMDD.exec(e)){r=new Date(0),i=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Ze(t,i,s)?(r.setUTCFullYear(t,i,s),r):new Date(NaN)}if(n=Ue.Www.exec(e))return a=parseInt(n[1],10)-1,Ye(t,a)?He(t,a):new Date(NaN);if(n=Ue.WwwD.exec(e)){a=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return Ye(t,a,u)?He(t,a,u):new Date(NaN)}return null}(a.restDateString,o);if(isNaN(s))return new Date(NaN);if(s){var u,c=s.getTime(),l=0;if(i.time&&(l=function(e){var t,n,r;if(t=Ue.HH.exec(e))return We(n=parseFloat(t[1].replace(",",".")))?n%24*Pe:NaN;if(t=Ue.HHMM.exec(e))return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),We(n,r)?n%24*Pe+r*Le:NaN;if(t=Ue.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return We(n,r,i)?n%24*Pe+r*Le+1e3*i:NaN}return null}(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(u=function(e){var t,n,r;if(t=Ue.timezoneZ.exec(e))return 0;if(t=Ue.timezoneHH.exec(e))return r=parseInt(t[2],10),Ge()?(n=r*Pe,"+"===t[1]?-n:n):NaN;if(t=Ue.timezoneHHMM.exec(e)){r=parseInt(t[2],10);var i=parseInt(t[3],10);return Ge(r,i)?(n=r*Pe+i*Le,"+"===t[1]?-n:n):NaN}return 0}(i.timezone),isNaN(u))return new Date(NaN)}else u=je(new Date(c+l)),u=je(new Date(c+l+u));return new Date(c+l+u)}return new Date(NaN)}function He(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var Be=[31,28,31,30,31,30,31,31,30,31,30,31],ze=[31,29,31,30,31,30,31,31,30,31,30,31];function Ve(e){return e%400==0||e%4==0&&e%100!=0}function Ze(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var r=Ve(e);if(r&&n>ze[t])return!1;if(!r&&n>Be[t])return!1}return!0}function Ye(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function We(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}function Ge(e,t){return null==t||!(t<0||t>59)}function Xe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Re(e,t);return!isNaN(n)}var Qe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Ke(e){return function(t){var n=t||{},r=n.width?String(n.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var Je={date:Ke({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ke({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ke({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},et={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function tt(e){return function(t,n){var r=n||{},i=r.width?String(r.width):e.defaultWidth;return("formatting"===(r.context?String(r.context):"standalone")&&e.formattingValues?e.formattingValues[i]||e.formattingValues[e.defaultFormattingWidth]:e.values[i]||e.values[e.defaultWidth])[e.argumentCallback?e.argumentCallback(t):t]}}function nt(e){return function(t,n){var r=String(t),i=n||{},a=i.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,c=s[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?l.findIndex((function(e){return e.test(r)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(l,(function(e){return e.test(r)})),u=e.valueCallback?e.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}}var rt,it={formatDistance:function(e,t,n){var r;return n=n||{},r="string"==typeof Qe[e]?Qe[e]:1===t?Qe[e].one:Qe[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Je,formatRelative:function(e,t,n,r){return et[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:tt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:tt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:tt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:tt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:tt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaulFormattingWidth:"wide"})},match:{ordinalNumber:(rt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var n=String(e),r=t||{},i=n.match(rt.matchPattern);if(!i)return null;var a=i[0],o=n.match(rt.parsePattern);if(!o)return null;var s=rt.valueCallback?rt.valueCallback(o[0]):o[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:nt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:nt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:nt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:nt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},at=864e5;function ot(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Re(e,t),r=n.getUTCDay(),i=(r<1?7:0)+r-1;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function st(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Re(e,t),r=n.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(r+1,0,4),i.setUTCHours(0,0,0,0);var a=ot(i,t),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var s=ot(o,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}var ut=6048e5;function ct(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Re(e,t),r=ot(n,t).getTime()-function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=st(e,t),r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),ot(r,t)}(n,t).getTime();return Math.round(r/ut)+1}function lt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=t||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,a=null==i?0:Me(i),o=null==n.weekStartsOn?a:Me(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Re(e,n),u=s.getUTCDay(),c=(u=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=lt(c,t),f=new Date(0);f.setUTCFullYear(r,0,u),f.setUTCHours(0,0,0,0);var d=lt(f,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}var dt=6048e5;function pt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Re(e,t),r=lt(n,t).getTime()-function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=t||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,a=null==i?1:Me(i),o=null==n.firstWeekContainsDate?a:Me(n.firstWeekContainsDate),s=ft(e,t),u=new Date(0);return u.setUTCFullYear(s,0,o),u.setUTCHours(0,0,0,0),lt(u,t)}(n,t).getTime();return Math.round(r/dt)+1}var vt="midnight",ht="noon",mt="morning",gt="afternoon",yt="evening",bt="night",wt={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n,r){var i=e.getUTCFullYear(),a=i>0?i:1-i;return"yy"===t?_t(a%100,2):"yo"===t?n.ordinalNumber(a,{unit:"year"}):_t(a,t.length)},Y:function(e,t,n,r){var i=ft(e,r),a=i>0?i:1-i;return"YY"===t?_t(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):_t(a,t.length)},R:function(e,t,n,r){return _t(st(e,r),t.length)},u:function(e,t,n,r){return _t(e.getUTCFullYear(),t.length)},Q:function(e,t,n,r){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return _t(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n,r){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return _t(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n,r){var i=e.getUTCMonth();switch(t){case"M":return String(i+1);case"MM":return _t(i+1,2);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n,r){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return _t(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=pt(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):_t(i,t.length)},I:function(e,t,n,r){var i=ct(e,r);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):_t(i,t.length)},d:function(e,t,n,r){var i=e.getUTCDate();return"do"===t?n.ordinalNumber(i,{unit:"date"}):_t(i,t.length)},D:function(e,t,n,r){var i=function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Re(e,t),r=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var i=r-n.getTime();return Math.floor(i/at)+1}(e,r);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):_t(i,t.length)},E:function(e,t,n,r){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return _t(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return _t(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n,r){var i=e.getUTCDay(),a=0===i?7:i;switch(t){case"i":return String(a);case"ii":return _t(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?ht:0===i?vt:i/12>=1?"pm":"am",t){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?yt:i>=12?gt:i>=4?mt:bt,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n,r){var i=e.getUTCHours()%12;return 0===i&&(i=12),"ho"===t?n.ordinalNumber(i,{unit:"hour"}):_t(i,t.length)},H:function(e,t,n,r){var i=e.getUTCHours();return"Ho"===t?n.ordinalNumber(i,{unit:"hour"}):_t(i,t.length)},K:function(e,t,n,r){var i=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):_t(i,t.length)},k:function(e,t,n,r){var i=e.getUTCHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):_t(i,t.length)},m:function(e,t,n,r){var i=e.getUTCMinutes();return"mo"===t?n.ordinalNumber(i,{unit:"minute"}):_t(i,t.length)},s:function(e,t,n,r){var i=e.getUTCSeconds();return"so"===t?n.ordinalNumber(i,{unit:"second"}):_t(i,t.length)},S:function(e,t,n,r){var i=t.length,a=e.getUTCMilliseconds();return _t(Math.floor(a*Math.pow(10,i-3)),i)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return $t(i);case"XXXX":case"XX":return xt(i);case"XXXXX":case"XXX":default:return xt(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return $t(i);case"xxxx":case"xx":return xt(i);case"xxxxx":case"xxx":default:return xt(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tt(i,":");case"OOOO":default:return"GMT"+xt(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tt(i,":");case"zzzz":default:return"GMT"+xt(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return _t(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return _t((r._originalDate||e).getTime(),t.length)}};function _t(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?"-":"+",i=Math.abs(e);return r+_t(Math.floor(i/60),2)+n+_t(i%60,2)}function $t(e,t){return e%60==0?(e>0?"-":"+")+_t(Math.abs(e)/60,2):xt(e,t)}function Tt(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=t||"";return n+String(i)+o+_t(a,2)}function Ct(e,t,n){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function At(e,t,n){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var kt={p:At,P:function(e,t,n){var r,i=e.match(/(P+)(p+)?/),a=i[1],o=i[2];if(!o)return Ct(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",Ct(a,t)).replace("{{time}}",At(o,t))}};function Ot(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return function(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Re(e,n).getTime(),i=Me(t);return new Date(r+i)}(e,-Me(t),n)}var St=["D","DD","YY","YYYY"];function Dt(e){return-1!==St.indexOf(e)}function Nt(e){throw new RangeError("`options.awareOfUnicodeTokens` must be set to `true` to use `"+e+"` token; see: https://git.io/fxCyr")}var Et=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,It=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mt=/^'(.*?)'?$/,Ft=/''/g;function jt(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(t),i=n||{},a=i.locale||it,o=a.options&&a.options.firstWeekContainsDate,s=null==o?1:Me(o),u=null==i.firstWeekContainsDate?s:Me(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=a.options&&a.options.weekStartsOn,l=null==c?0:Me(c),f=null==i.weekStartsOn?l:Me(i.weekStartsOn);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!a.localize)throw new RangeError("locale must contain localize property");if(!a.formatLong)throw new RangeError("locale must contain formatLong property");var d=Re(e,i);if(!Xe(d,i))return"Invalid Date";var p=Ot(d,je(d),i),v={firstWeekContainsDate:u,weekStartsOn:f,locale:a,_originalDate:d};return r.match(It).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,kt[t])(e,a.formatLong,v):e})).join("").match(Et).map((function(e){if("''"===e)return"'";var t=e[0];if("'"===t)return e.match(Mt)[1].replace(Ft,"'");var n=wt[t];return n?(!i.awareOfUnicodeTokens&&Dt(e)&&Nt(e),n(p,e,a.localize,v)):e})).join("")}function Pt(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Re(e,n),i=Re(t,n);return r.getTime()>i.getTime()}function Lt(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Re(e,n),i=Re(t,n);return r.getTime()=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Re(e,n),c=Me(t),l=((c%7+7)%70,i=r?t:1-t;if(i<=50)n=e||100;else{var a=i+50;n=e+100*Math.floor(a/100)-(e>=a%100?100:0)}return r?n:1-n}var rn=[31,28,31,30,31,30,31,31,30,31,30,31],an=[31,29,31,30,31,30,31,31,30,31,30,31];function on(e){return e%400==0||e%4==0&&e%100!=0}var sn={G:{priority:140,parse:function(e,t,n,r){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}},set:function(e,t,n){return e.setUTCFullYear(1===t?10:-9,0,1),e.setUTCHours(0,0,0,0),e}},y:{priority:130,parse:function(e,t,n,r){var i=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return Jt(4,e,i);case"yo":return n.ordinalNumber(e,{unit:"year",valueCallback:i});default:return Jt(t.length,e,i)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n){var r=ft(e,n);if(t.isTwoDigitYear){var i=nn(t.year,r);return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}var a=r>0?t.year:1-t.year;return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}},Y:{priority:130,parse:function(e,t,n,r){var i=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return Jt(4,e,i);case"Yo":return n.ordinalNumber(e,{unit:"year",valueCallback:i});default:return Jt(t.length,e,i)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n){var r=e.getUTCFullYear();if(t.isTwoDigitYear){var i=nn(t.year,r);return e.setUTCFullYear(i,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),lt(e,n)}var a=r>0?t.year:1-t.year;return e.setUTCFullYear(a,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),lt(e,n)}},R:{priority:130,parse:function(e,t,n,r){return en("R"===t?4:t.length,e)},set:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0),ot(r)}},u:{priority:130,parse:function(e,t,n,r){return en("u"===t?4:t.length,e)},set:function(e,t,n){return e.setUTCFullYear(t,0,1),e.setUTCHours(0,0,0,0),e}},Q:{priority:120,parse:function(e,t,n,r){switch(t){case"Q":case"QQ":return Jt(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n){return e.setUTCMonth(3*(t-1),1),e.setUTCHours(0,0,0,0),e}},q:{priority:120,parse:function(e,t,n,r){switch(t){case"q":case"qq":return Jt(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n){return e.setUTCMonth(3*(t-1),1),e.setUTCHours(0,0,0,0),e}},M:{priority:110,parse:function(e,t,n,r){var i=function(e){return e-1};switch(t){case"M":return Xt(zt.month,e,i);case"MM":return Jt(2,e,i);case"Mo":return n.ordinalNumber(e,{unit:"month",valueCallback:i});case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n){return e.setUTCMonth(t,1),e.setUTCHours(0,0,0,0),e}},L:{priority:110,parse:function(e,t,n,r){var i=function(e){return e-1};switch(t){case"L":return Xt(zt.month,e,i);case"LL":return Jt(2,e,i);case"Lo":return n.ordinalNumber(e,{unit:"month",valueCallback:i});case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n){return e.setUTCMonth(t,1),e.setUTCHours(0,0,0,0),e}},w:{priority:100,parse:function(e,t,n,r){switch(t){case"w":return Xt(zt.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Jt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n){return lt(function(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Re(e,n),i=Me(t),a=pt(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*a),r}(e,t,n),n)}},I:{priority:100,parse:function(e,t,n,r){switch(t){case"I":return Xt(zt.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Jt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n){return ot(function(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Re(e,n),i=Me(t),a=ct(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*a),r}(e,t,n),n)}},d:{priority:90,parse:function(e,t,n,r){switch(t){case"d":return Xt(zt.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Jt(t.length,e)}},validate:function(e,t,n){var r=on(e.getUTCFullYear()),i=e.getUTCMonth();return r?t>=1&&t<=an[i]:t>=1&&t<=rn[i]},set:function(e,t,n){return e.setUTCDate(t),e.setUTCHours(0,0,0,0),e}},D:{priority:90,parse:function(e,t,n,r){switch(t){case"D":case"DD":return Xt(zt.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Jt(t.length,e)}},validate:function(e,t,n){return on(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,n){return e.setUTCMonth(0,t),e.setUTCHours(0,0,0,0),e}},E:{priority:90,parse:function(e,t,n,r){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n){return(e=Ut(e,t,n)).setUTCHours(0,0,0,0),e}},e:{priority:90,parse:function(e,t,n,r){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Jt(t.length,e,i);case"eo":return n.ordinalNumber(e,{unit:"day",valueCallback:i});case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n){return(e=Ut(e,t,n)).setUTCHours(0,0,0,0),e}},c:{priority:90,parse:function(e,t,n,r){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Jt(t.length,e,i);case"co":return n.ordinalNumber(e,{unit:"day",valueCallback:i});case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n){return(e=Ut(e,t,n)).setUTCHours(0,0,0,0),e}},i:{priority:90,parse:function(e,t,n,r){var i=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return Jt(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return n.day(e,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(e,{width:"short",context:"formatting",valueCallback:i})||n.day(e,{width:"narrow",context:"formatting",valueCallback:i});case"iiiii":return n.day(e,{width:"narrow",context:"formatting",valueCallback:i});case"iiiiii":return n.day(e,{width:"short",context:"formatting",valueCallback:i})||n.day(e,{width:"narrow",context:"formatting",valueCallback:i});case"iiii":default:return n.day(e,{width:"wide",context:"formatting",valueCallback:i})||n.day(e,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(e,{width:"short",context:"formatting",valueCallback:i})||n.day(e,{width:"narrow",context:"formatting",valueCallback:i})}},validate:function(e,t,n){return t>=1&&t<=7},set:function(e,t,n){return(e=function(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Me(t);r%7==0&&(r-=7);var i=Re(e,n),a=((r%7+7)%7<1?7:0)+r-i.getUTCDay();return i.setUTCDate(i.getUTCDate()+a),i}(e,t,n)).setUTCHours(0,0,0,0),e}},a:{priority:80,parse:function(e,t,n,r){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n){return e.setUTCHours(tn(t),0,0,0),e}},b:{priority:80,parse:function(e,t,n,r){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n){return e.setUTCHours(tn(t),0,0,0),e}},B:{priority:80,parse:function(e,t,n,r){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n){return e.setUTCHours(tn(t),0,0,0),e}},h:{priority:70,parse:function(e,t,n,r){switch(t){case"h":return Xt(zt.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Jt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=12},set:function(e,t,n){var r=e.getUTCHours()>=12;return r&&t<12?e.setUTCHours(t+12,0,0,0):r||12!==t?e.setUTCHours(t,0,0,0):e.setUTCHours(0,0,0,0),e}},H:{priority:70,parse:function(e,t,n,r){switch(t){case"H":return Xt(zt.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Jt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=23},set:function(e,t,n){return e.setUTCHours(t,0,0,0),e}},K:{priority:70,parse:function(e,t,n,r){switch(t){case"K":return Xt(zt.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Jt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n){return e.getUTCHours()>=12&&t<12?e.setUTCHours(t+12,0,0,0):e.setUTCHours(t,0,0,0),e}},k:{priority:70,parse:function(e,t,n,r){switch(t){case"k":return Xt(zt.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Jt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=24},set:function(e,t,n){var r=t<=24?t%24:t;return e.setUTCHours(r,0,0,0),e}},m:{priority:60,parse:function(e,t,n,r){switch(t){case"m":return Xt(zt.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Jt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n){return e.setUTCMinutes(t,0,0),e}},s:{priority:50,parse:function(e,t,n,r){switch(t){case"s":return Xt(zt.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Jt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n){return e.setUTCSeconds(t,0),e}},S:{priority:40,parse:function(e,t,n,r){return Jt(t.length,e,(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))},set:function(e,t,n){return e.setUTCMilliseconds(t),e}},X:{priority:20,parse:function(e,t,n,r){switch(t){case"X":return Qt(Vt,e);case"XX":return Qt(Zt,e);case"XXXX":return Qt(Yt,e);case"XXXXX":return Qt(Gt,e);case"XXX":default:return Qt(Wt,e)}},set:function(e,t,n){return new Date(e.getTime()-t)}},x:{priority:20,parse:function(e,t,n,r){switch(t){case"x":return Qt(Vt,e);case"xx":return Qt(Zt,e);case"xxxx":return Qt(Yt,e);case"xxxxx":return Qt(Gt,e);case"xxx":default:return Qt(Wt,e)}},set:function(e,t,n){return new Date(e.getTime()-t)}},t:{priority:10,parse:function(e,t,n,r){return Kt(e)},set:function(e,t,n){return new Date(1e3*t)}},T:{priority:10,parse:function(e,t,n,r){return Kt(e)},set:function(e,t,n){return new Date(t)}}},un=20,cn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ln=/^'(.*?)'?$/,fn=/''/g,dn=/\S/;function pn(e){var t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}function vn(e,t){if("string"!=typeof e)return Xe(e)?e:null;var n=function(e,t,n,r){if(arguments.length<3)throw new TypeError("3 arguments required, but only "+arguments.length+" present");var i=String(e),a=String(t),o=r||{},s=o.locale||it;if(!s.match)throw new RangeError("locale must contain match property");var u=s.options&&s.options.firstWeekContainsDate,c=null==u?1:Me(u),l=null==o.firstWeekContainsDate?c:Me(o.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=s.options&&s.options.weekStartsOn,d=null==f?0:Me(f),p=null==o.weekStartsOn?d:Me(o.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===a)return""===i?Re(n,o):new Date(NaN);var v,h={firstWeekContainsDate:l,weekStartsOn:p,locale:s},m=[{priority:un,set:pn,index:0}],g=a.match(cn);for(v=0;v0&&dn.test(i))return new Date(NaN);var x=m.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return m.filter((function(t){return t.priority===e})).reverse()})).map((function(e){return e[0]})),$=Re(n,o);if(isNaN($))return new Date(NaN);var T=Ot($,je($));for(v=0;v=e},Dn={validate:Sn,paramNames:["min","max"]},Nn={validate:function(e,t){var n=t.targetValue;return String(e)===String(n)},options:{hasTarget:!0},paramNames:["targetValue"]};function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function In(e,t){return e(t={exports:{}},t.exports),t.exports}var Mn=In((function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t;throw t=null===e?"null":"object"===(t=n(e))&&e.constructor&&e.constructor.hasOwnProperty("name")?e.constructor.name:"a ".concat(t),new TypeError("Expected string but received ".concat(t,"."))}},e.exports=t.default,e.exports.default=t.default}));En(Mn);var Fn=En(In((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e);var t=e.replace(/[- ]+/g,"");if(!r.test(t))return!1;for(var i,a,o,s=0,u=t.length-1;u>=0;u--)i=t.substring(u,u+1),a=parseInt(i,10),s+=o&&(a*=2)>=10?a%10+1:a,o=!o;return!(s%10!=0||!t)};var n=function(e){return e&&e.__esModule?e:{default:e}}(Mn);var r=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14})$/;e.exports=t.default,e.exports.default=t.default}))),jn={validate:function(e){return Fn(String(e))}},Pn={validate:function(e,t){void 0===t&&(t={});var n=t.min,r=t.max,i=t.inclusivity;void 0===i&&(i="()");var a=t.format;void 0===a&&(a=i,i="()");var o=vn(String(n),a),s=vn(String(r),a),u=vn(String(e),a);return!!(o&&s&&u)&&("()"===i?Pt(u,o)&&Lt(u,s):"(]"===i?Pt(u,o)&&(qt(u,s)||Lt(u,s)):"[)"===i?Lt(u,s)&&(qt(u,o)||Pt(u,o)):qt(u,s)||qt(u,o)||Lt(u,s)&&Pt(u,o))},options:{isDate:!0},paramNames:["min","max","inclusivity","format"]},Ln={validate:function(e,t){return!!vn(e,t.format)},options:{isDate:!0},paramNames:["format"]},qn=function(e,t){void 0===t&&(t={});var n=t.decimals;void 0===n&&(n="*");var r=t.separator;if(void 0===r&&(r="."),s(e)||""===e)return!1;if(Array.isArray(e))return e.every((function(e){return qn(e,{decimals:n,separator:r})}));if(0===Number(n))return/^-?\d*$/.test(e);if(!new RegExp("^[-+]?\\d*(\\"+r+"\\d"+("*"===n?"+":"{1,"+n+"}")+")?([eE]{1}[-]?\\d+)?$").test(e))return!1;var i=parseFloat(e);return i==i},Un={validate:qn,paramNames:["decimals","separator"]},Rn=function(e,t){var n=t[0];if(Array.isArray(e))return e.every((function(e){return Rn(e,[n])}));var r=String(e);return/^[0-9]*$/.test(r)&&r.length===Number(n)},Hn={validate:Rn},Bn=/\.(jpg|svg|jpeg|png|bmp|gif)$/i,zn={validate:function(e,t){var n=t[0],r=t[1],i=_(e).filter((function(e){return Bn.test(e.name)}));return 0!==i.length&&Promise.all(i.map((function(e){return function(e,t,n){var r=window.URL||window.webkitURL;return new Promise((function(i){var a=new Image;a.onerror=function(){return i({valid:!1})},a.onload=function(){return i({valid:a.width===Number(t)&&a.height===Number(n)})},a.src=r.createObjectURL(e)}))}(e,n,r)})))}},Vn=In((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var n in t)void 0===e[n]&&(e[n]=t[n]);return e},e.exports=t.default,e.exports.default=t.default}));En(Vn);var Zn=In((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var i,a;(0,n.default)(e),"object"===r(t)?(i=t.min||0,a=t.max):(i=arguments[1],a=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=i&&(void 0===a||o<=a)};var n=function(e){return e&&e.__esModule?e:{default:e}}(Mn);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=t.default,e.exports.default=t.default}));En(Zn);var Yn=In((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,r.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));for(var i=e.split("."),o=0;o63)return!1;if(t.require_tld){var s=i.pop();if(!i.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(s))return!1}for(var u,c=0;c1&&void 0!==arguments[1]?arguments[1]:"";(0,n.default)(t);a=String(a);if(!a)return e(t,4)||e(t,6);if("4"===a)return!!r.test(t)&&t.split(".").sort((function(e,t){return e-t}))[3]<=255;if("6"===a){var o=t.split(":"),s=!1,u=e(o[o.length-1],4),c=u?7:8;if(o.length>c)return!1;if("::"===t)return!0;"::"===t.substr(0,2)?(o.shift(),o.shift(),s=!0):"::"===t.substr(t.length-2)&&(o.pop(),o.pop(),s=!0);for(var l=0;l0&&l=1:o.length===c}return!1};var n=function(e){return e&&e.__esModule?e:{default:e}}(Mn);var r=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,i=/^[0-9A-F]{1,4}$/i;e.exports=t.default,e.exports.default=t.default})),Xn=En(Gn),Qn=En(In((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,r.default)(t,u)).require_display_name||t.allow_display_name){var s=e.match(c);if(s)e=s[1];else if(t.require_display_name)return!1}var h=e.split("@"),m=h.pop(),g=h.join("@"),y=m.toLowerCase();if(t.domain_specific_validation&&("gmail.com"===y||"googlemail.com"===y)){var b=(g=g.toLowerCase()).split("+")[0];if(!(0,i.default)(b.replace(".",""),{min:6,max:30}))return!1;for(var w=b.split("."),_=0;_$/i,l=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,f=/^[a-z\d]+$/,d=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,p=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,v=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default,e.exports.default=t.default})));var Kn={validate:function(e,t){void 0===t&&(t={});var n=t.multiple;void 0===n&&(n=!1);var r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(t,["multiple"]);n&&!Array.isArray(e)&&(e=String(e).split(",").map((function(e){return e.trim()})));var i=x({},r);return Array.isArray(e)?e.every((function(e){return Qn(String(e),i)})):Qn(String(e),i)}},Jn=function(e,t){return Array.isArray(e)?e.every((function(e){return Jn(e,t)})):w(t).some((function(t){return t==e}))},er={validate:Jn},tr={validate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return!Jn.apply(void 0,e)}},nr={validate:function(e,t){var n=new RegExp(".("+t.join("|")+")$","i");return _(e).every((function(e){return n.test(e.name)}))}},rr={validate:function(e){return(Array.isArray(e)?e:[e]).every((function(e){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e.name)}))}},ir={validate:function(e){return Array.isArray(e)?e.every((function(e){return/^-?[0-9]+$/.test(String(e))})):/^-?[0-9]+$/.test(String(e))}},ar={validate:function(e,t){void 0===t&&(t={});var n=t.version;return void 0===n&&(n=4),s(e)&&(e=""),Array.isArray(e)?e.every((function(e){return Xn(e,n)})):Xn(e,n)},paramNames:["version"]},or={validate:function(e){return s(e)&&(e=""),Array.isArray(e)?e.every((function(e){return Xn(e,"")||Wn(e)})):Xn(e,"")||Wn(e)}},sr={validate:function(e,t){return void 0===t&&(t=[]),e===t[0]}},ur={validate:function(e,t){return void 0===t&&(t=[]),e!==t[0]}},cr={validate:function(e,t){var n=t[0],r=t[1];return void 0===r&&(r=void 0),!s(e)&&(n=Number(n),"number"==typeof e&&(e=String(e)),e.length||(e=w(e)),function(e,t,n){return void 0===n?e.length===t:(n=Number(n),e.length>=t&&e.length<=n)}(e,n,r))}},lr=function(e,t){var n=t[0];return s(e)?n>=0:Array.isArray(e)?e.every((function(e){return lr(e,[n])})):String(e).length<=n},fr={validate:lr},dr=function(e,t){var n=t[0];return!s(e)&&""!==e&&(Array.isArray(e)?e.length>0&&e.every((function(e){return dr(e,[n])})):Number(e)<=n)},pr={validate:dr},vr={validate:function(e,t){var n=new RegExp(t.join("|").replace("*",".+")+"$","i");return _(e).every((function(e){return n.test(e.type)}))}},hr=function(e,t){var n=t[0];return!s(e)&&(Array.isArray(e)?e.every((function(e){return hr(e,[n])})):String(e).length>=n)},mr={validate:hr},gr=function(e,t){var n=t[0];return!s(e)&&""!==e&&(Array.isArray(e)?e.length>0&&e.every((function(e){return gr(e,[n])})):Number(e)>=n)},yr={validate:gr},br=/^[٠١٢٣٤٥٦٧٨٩]+$/,wr=/^[0-9]+$/,_r={validate:function(e){var t=function(e){var t=String(e);return wr.test(t)||br.test(t)};return Array.isArray(e)?e.every(t):t(e)}},xr=function(e,t){var n=t.expression;return"string"==typeof n&&(n=new RegExp(n)),Array.isArray(e)?e.every((function(e){return xr(e,{expression:n})})):n.test(String(e))},$r={validate:xr,paramNames:["expression"]},Tr={validate:function(e,t){void 0===t&&(t=[]);var n=t[0];return void 0===n&&(n=!1),!s(e)&&!I(e)&&((!1!==e||!n)&&!!String(e).trim().length)}},Cr={validate:function(e,t){void 0===t&&(t=[]);var n=t[0],r=t.slice(1).includes(String(n).trim());if(!r)return{valid:!0,data:{required:r}};var i=I(e)||[!1,null,void 0].includes(e);return{valid:!(i=i||!String(e).trim().length),data:{required:r}}},options:{hasTarget:!0,computesRequired:!0}},Ar={validate:function(e,t){var n=t[0];if(isNaN(n))return!1;var r=1024*Number(n);return _(e).every((function(e){return e.size<=r}))}},kr=En(In((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),!e||e.length>=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;var o,c,f,d,p,v,h,m;if(t=(0,a.default)(t,s),h=e.split("#"),e=h.shift(),h=e.split("?"),e=h.shift(),(h=e.split("://")).length>1){if(o=h.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(o))return!1}else{if(t.require_protocol)return!1;if("//"===e.substr(0,2)){if(!t.allow_protocol_relative_urls)return!1;h[0]=e.substr(2)}}if(""===(e=h.join("://")))return!1;if(h=e.split("/"),""===(e=h.shift())&&!t.require_host)return!0;if((h=e.split("@")).length>1){if(t.disallow_auth)return!1;if((c=h.shift()).indexOf(":")>=0&&c.split(":").length>2)return!1}d=h.join("@"),v=null,m=null;var g=d.match(u);g?(f="",m=g[1],v=g[2]||null):(h=d.split(":"),f=h.shift(),h.length&&(v=h.join(":")));if(null!==v&&(p=parseInt(v,10),!/^[0-9]+$/.test(v)||p<=0||p>65535))return!1;if(!((0,i.default)(f)||(0,r.default)(f,t)||m&&(0,i.default)(m,6)))return!1;if(f=f||m,t.host_whitelist&&!l(f,t.host_whitelist))return!1;if(t.host_blacklist&&l(f,t.host_blacklist))return!1;return!0};var n=o(Mn),r=o(Yn),i=o(Gn),a=o(Vn);function o(e){return e&&e.__esModule?e:{default:e}}var s={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},u=/^\[([^\]]+)\](?::([0-9]+))?$/;function c(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function l(e,t){for(var n=0;n0&&this.syncValue(t[0]),this.validateSilent().then((function(t){return e.applyResult(t),t}))},validateSilent:function(){var e,t,n=this;return this.setFlags({pending:!0}),Er.verify(this.value,this.rules,{name:this.name,values:(e=this,t=e.$_veeObserver.refs,e.fieldDeps.reduce((function(e,n){return t[n]?(e[n]=t[n].value,e):e}),{})),bails:this.bails}).then((function(e){return n.setFlags({pending:!1}),n.isRequired||n.setFlags({valid:e.valid,invalid:!e.valid}),e}))},applyResult:function(e){var t=e.errors,n=e.failedRules;this.messages=t,this.failedRules=x({},n),this.setFlags({valid:!t.length,changed:this.value!==this.initialValue,invalid:!!t.length,validated:!0})},registerField:function(){Er||(Er=he()||new be(null,{fastExit:z().fastExit})),function(e){s(e.id)&&e.id===e.vid&&(e.id=Ir,Ir++);var t=e.id,n=e.vid;if(e.isDeactivated||t===n&&e.$_veeObserver.refs[t])return;t!==n&&e.$_veeObserver.refs[t]===e&&e.$_veeObserver.unsubscribe({vid:t});e.$_veeObserver.subscribe(e),e.id=n}(this)}}};function Fr(e){return{errors:e.messages,flags:e.flags,classes:e.classes,valid:e.isValid,failedRules:e.failedRules,reset:function(){return e.reset()},validate:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return e.validate.apply(e,t)},aria:{"aria-invalid":e.flags.invalid?"true":"false","aria-required":e.isRequired?"true":"false"}}}function jr(e){return(g(e.mode)?e.mode:Oe[e.mode])({errors:e.messages,value:e.value,flags:e.flags})}function Pr(e){this.initialized||(this.initialValue=e.value);var t=function(e,t){return!(e._ignoreImmediate||!e.immediate)||(e.value!==t.value||(!!e._needsValidation||!e.initialized&&void 0===t.value))}(this,e);this._needsValidation=!1,this.value=e.value,this._ignoreImmediate=!0,t&&this.validateSilent().then(this.immediate||this.flags.validated?this.applyResult:function(e){return e})}function Lr(e){var t=e.$veeHandler,n=jr(e);return t&&e.$veeDebounce===e.debounce||(t=f((function(){e.$nextTick((function(){var t=e.validateSilent();e._pendingValidation=t,t.then((function(n){t===e._pendingValidation&&(e.applyResult(n),e._pendingValidation=null)}))}))}),n.debounce||e.debounce),e.$veeHandler=t,e.$veeDebounce=e.debounce),{onInput:function(t){e.syncValue(t),e.setFlags({dirty:!0,pristine:!1})},onBlur:function(){e.setFlags({touched:!0,untouched:!1})},onValidate:t}}function qr(e){var t=Z(e);this._inputEventName=this._inputEventName||Q(e,t),Pr.call(this,t);var n=Lr(this),r=n.onInput,i=n.onBlur,a=n.onValidate;X(e,this._inputEventName,r),X(e,"blur",i),this.normalizedEvents.forEach((function(t){X(e,t,a)})),this.initialized=!0}var Ur={pristine:"every",dirty:"some",touched:"some",untouched:"every",valid:"every",invalid:"some",pending:"some",validated:"every"};var Rr=0,Hr={name:"ValidationObserver",provide:function(){return{$_veeObserver:this}},inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver?this.$vnode.context.$_veeObserver:null}}},props:{tag:{type:String,default:"span"},slim:{type:Boolean,default:!1}},data:function(){return{vid:"obs_"+Rr++,refs:{},observers:[],persistedStore:{}}},computed:{ctx:function(){var e=this,t={errors:{},validate:function(t){var n=e.validate(t);return{then:function(e){return n.then((function(t){return t&&g(e)?Promise.resolve(e()):Promise.resolve(t)}))}}},reset:function(){return e.reset()}};return N(this.refs).concat(Object.keys(this.persistedStore).map((function(t){return{vid:t,flags:e.persistedStore[t].flags,messages:e.persistedStore[t].errors}})),this.observers).reduce((function(e,t){return Object.keys(Ur).forEach((function(n){var r,i,a=t.flags||t.ctx;n in e?e[n]=(r=e[n],i=a[n],[r,i][Ur[n]]((function(e){return e}))):e[n]=a[n]})),e.errors[t.vid]=t.messages||N(t.ctx.errors).reduce((function(e,t){return e.concat(t)}),[]),e}),t)}},created:function(){this.$_veeObserver&&this.$_veeObserver.subscribe(this,"observer")},activated:function(){this.$_veeObserver&&this.$_veeObserver.subscribe(this,"observer")},deactivated:function(){this.$_veeObserver&&this.$_veeObserver.unsubscribe(this,"observer")},beforeDestroy:function(){this.$_veeObserver&&this.$_veeObserver.unsubscribe(this,"observer")},render:function(e){var t=this.$slots.default||this.$scopedSlots.default||[];return g(t)&&(t=t(this.ctx)),this.slim?K(e,t):e(this.tag,{on:this.$listeners,attrs:this.$attrs},t)},methods:{subscribe:function(e,t){var n;void 0===t&&(t="provider"),"observer"!==t?(this.refs=Object.assign({},this.refs,((n={})[e.vid]=e,n)),e.persist&&this.persistedStore[e.vid]&&this.restoreProviderState(e)):this.observers.push(e)},unsubscribe:function(e,t){var n=e.vid;void 0===t&&(t="provider"),"provider"===t&&this.removeProvider(n);var r=C(this.observers,(function(e){return e.vid===n}));-1!==r&&this.observers.splice(r,1)},validate:function(e){void 0===e&&(e={silent:!1});var t=e.silent;return Promise.all(N(this.refs).map((function(e){return e[t?"validateSilent":"validate"]().then((function(e){return e.valid}))})).concat(this.observers.map((function(e){return e.validate({silent:t})})))).then((function(e){return e.every((function(e){return e}))}))},reset:function(){var e=this;return Object.keys(this.persistedStore).forEach((function(t){e.$delete(e.persistedStore,t)})),N(this.refs).concat(this.observers).forEach((function(e){return e.reset()}))},restoreProviderState:function(e){var t=this.persistedStore[e.vid];e.setFlags(t.flags),e.applyResult(t),this.$delete(this.persistedStore,e.vid)},removeProvider:function(e){var t,n=this.refs[e];n&&n.persist&&(this.persistedStore=x({},this.persistedStore,((t={})[e]={flags:n.flags,errors:n.messages,failedRules:n.failedRules},t))),this.$delete(this.refs,e)}}};Object.keys(Sr).forEach((function(e){be.extend(e,Sr[e].validate,x({},Sr[e].options,{paramNames:Sr[e].paramNames}))})),be.localize({en:Ie});Se.version="2.2.15",Se.mapFields=function(e){if(!e)return function(){return Nr(this.$validator.flags)};var t=function(e){return Array.isArray(e)?e.reduce((function(e,t){return E(t,".")?e[t.split(".")[1]]=t:e[t]=t,e}),{}):e}(e);return Object.keys(t).reduce((function(e,n){var r=t[n];return e[n]=function(){if(this.$validator.flags[r])return this.$validator.flags[r];if("*"===t[n])return Nr(this.$validator.flags,!1);if(r.indexOf(".")<=0)return{};var e=r.split("."),i=e[0],a=e.slice(1);return i=this.$validator.flags["$"+i],"*"===(a=a.join("."))&&i?Nr(i):i&&i[a]?i[a]:{}},e}),{})},Se.ValidationProvider=Mr,Se.ValidationObserver=Hr,Se.withValidation=function(e,t){void 0===t&&(t=null);var n=g(e)?e.options:e;n.$__veeInject=!1;var r={name:(n.name||"AnonymousHoc")+"WithValidation",props:x({},Mr.props),data:Mr.data,computed:x({},Mr.computed),methods:x({},Mr.methods),$__veeInject:!1,beforeDestroy:Mr.beforeDestroy,inject:Mr.inject};t||(t=function(e){return e});var i=n.model&&n.model.event||"input";return r.render=function(e){var r;this.registerField();var a=Fr(this),o=x({},this.$listeners),s=Z(this.$vnode);this._inputEventName=this._inputEventName||Q(this.$vnode,s),Pr.call(this,s);var u=Lr(this),c=u.onInput,l=u.onBlur,f=u.onValidate;G(o,i,c),G(o,"blur",l),this.normalizedEvents.forEach((function(e,t){G(o,e,f)}));var d,p,v=(W(this.$vnode)||{prop:"value"}).prop,h=x({},this.$attrs,((r={})[v]=s.value,r),t(a));return e(n,{attrs:this.$attrs,props:h,on:o},(d=this.$slots,p=this.$vnode.context,Object.keys(d).reduce((function(e,t){return d[t].forEach((function(e){e.context||(d[t].context=p,e.data||(e.data={}),e.data.slot=t)})),e.concat(d[t])}),[])))},r},t.a=Se},13:function(e,t,n){"use strict";(function(t,n){var r=Object.freeze({});function i(e){return null==e}function a(e){return null!=e}function o(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function u(e){return null!==e&&"object"==typeof e}var c=Object.prototype.toString;function l(e){return"[object Object]"===c.call(e)}function f(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function d(e){return a(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function p(e){return null==e?"":Array.isArray(e)||l(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function v(e){var t=parseFloat(e);return isNaN(t)?e:t}function h(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function w(e,t){return b.call(e,t)}function _(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var x=/-(\w)/g,$=_((function(e){return e.replace(x,(function(e,t){return t?t.toUpperCase():""}))})),T=_((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),C=/\B([A-Z])/g,A=_((function(e){return e.replace(C,"-$1").toLowerCase()})),k=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function O(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function S(e,t){for(var n in t)e[n]=t[n];return e}function D(e){for(var t={},n=0;n0,K=G&&G.indexOf("edge/")>0,J=(G&&G.indexOf("android"),G&&/iphone|ipad|ipod|ios/.test(G)||"ios"===W),ee=(G&&/chrome\/\d+/.test(G),G&&/phantomjs/.test(G),G&&G.match(/firefox\/(\d+)/)),te={}.watch,ne=!1;if(Z)try{var re={};Object.defineProperty(re,"passive",{get:function(){ne=!0}}),window.addEventListener("test-passive",null,re)}catch(r){}var ie=function(){return void 0===B&&(B=!Z&&!Y&&void 0!==t&&t.process&&"server"===t.process.env.VUE_ENV),B},ae=Z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function oe(e){return"function"==typeof e&&/native code/.test(e.toString())}var se,ue="undefined"!=typeof Symbol&&oe(Symbol)&&"undefined"!=typeof Reflect&&oe(Reflect.ownKeys);se="undefined"!=typeof Set&&oe(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ce=N,le=0,fe=function(){this.id=le++,this.subs=[]};fe.prototype.addSub=function(e){this.subs.push(e)},fe.prototype.removeSub=function(e){y(this.subs,e)},fe.prototype.depend=function(){fe.target&&fe.target.addDep(this)},fe.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t-1)if(a&&!w(i,"default"))o=!1;else if(""===o||o===A(e)){var u=Re(String,i.type);(u<0||s0&&(lt((u=e(u,(n||"")+"_"+r))[0])&<(l)&&(f[c]=ye(l.text+u[0].text),u.shift()),f.push.apply(f,u)):s(u)?lt(l)?f[c]=ye(l.text+u):""!==u&&f.push(ye(u)):lt(u)&<(l)?f[c]=ye(l.text+u.text):(o(t._isVList)&&a(u.tag)&&i(u.key)&&a(n)&&(u.key="__vlist"+n+"_"+r+"__"),f.push(u)));return f}(e):void 0}function lt(e){return a(e)&&a(e.text)&&!1===e.isComment}function ft(e,t){if(e){for(var n=Object.create(null),r=ue?Reflect.ownKeys(e):Object.keys(e),i=0;i0,o=e?!!e.$stable:!a,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(o&&n&&n!==r&&s===n.$key&&!a&&!n.$hasNormal)return n;for(var u in i={},e)e[u]&&"$"!==u[0]&&(i[u]=ht(t,u,e[u]))}else i={};for(var c in t)c in i||(i[c]=mt(t,c));return e&&Object.isExtensible(e)&&(e._normalized=i),H(i,"$stable",o),H(i,"$key",s),H(i,"$hasNormal",a),i}function ht(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ct(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function mt(e,t){return function(){return e[t]}}function gt(e,t){var n,r,i,o,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;rdocument.createEvent("Event").timeStamp&&(ln=function(){return fn.now()})}function dn(){var e,t;for(cn=ln(),sn=!0,nn.sort((function(e,t){return e.id-t.id})),un=0;unun&&nn[n].id>e.id;)n--;nn.splice(n+1,0,e)}else nn.push(e);on||(on=!0,tt(dn))}}(this)},vn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||u(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){He(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},vn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},vn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},vn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var hn={enumerable:!0,configurable:!0,get:N,set:N};function mn(e,t,n){hn.get=function(){return this[t][n]},hn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,hn)}var gn={lazy:!0};function yn(e,t,n){var r=!ie();"function"==typeof n?(hn.get=r?bn(t):wn(n),hn.set=N):(hn.get=n.get?r&&!1!==n.cache?bn(t):wn(n.get):N,hn.set=n.set||N),Object.defineProperty(e,t,hn)}function bn(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),fe.target&&t.depend(),t.value}}function wn(e){return function(){return e.call(this,this)}}function _n(e,t,n,r){return l(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var xn=0;function $n(e){var t=e.options;if(e.super){var n=$n(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&S(e.extendOptions,r),(t=e.options=je(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function Tn(e){this._init(e)}function Cn(e){return e&&(e.Ctor.options.name||e.tag)}function An(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===c.call(n)&&e.test(t));var n}function kn(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var a in n){var o=n[a];if(o){var s=Cn(o.componentOptions);s&&!t(s)&&On(n,a,r,i)}}}function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,y(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=xn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=je($n(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Xt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,i=n&&n.context;e.$slots=dt(t._renderChildren,i),e.$scopedSlots=r,e._c=function(t,n,r,i){return Rt(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Rt(e,t,n,r,i,!0)};var a=n&&n.data;ke(e,"$attrs",a&&a.attrs||r,null,!0),ke(e,"$listeners",t._parentListeners||r,null,!0)}(t),tn(t,"beforeCreate"),function(e){var t=ft(e.$options.inject,e);t&&(Te(!1),Object.keys(t).forEach((function(n){ke(e,n,t[n])})),Te(!0))}(t),function(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&Te(!1);var a=function(a){i.push(a);var o=Le(a,t,n,e);ke(r,a,o),a in e||mn(e,"_props",a)};for(var o in t)a(o);Te(!0)}(e,t.props),t.methods&&function(e,t){for(var n in e.$options.props,t)e[n]="function"!=typeof t[n]?N:k(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;l(t=e._data="function"==typeof t?function(e,t){pe();try{return e.call(t,t)}catch(e){return He(e,t,"data()"),{}}finally{ve()}}(t,e):t||{})||(t={});for(var n,r=Object.keys(t),i=e.$options.props,a=(e.$options.methods,r.length);a--;){var o=r[a];i&&w(i,o)||(void 0,36!==(n=(o+"").charCodeAt(0))&&95!==n&&mn(e,"_data",o))}Ae(t,!0)}(e):Ae(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=ie();for(var i in t){var a=t[i],o="function"==typeof a?a:a.get;r||(n[i]=new vn(e,o||N,N,gn)),i in e||yn(e,i,a)}}(e,t.computed),t.watch&&t.watch!==te&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i1?O(t):t;for(var n=O(arguments,1),r='event handler for "'+e+'"',i=0,a=t.length;iparseInt(this.max)&&On(o,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return U}};Object.defineProperty(e,"config",t),e.util={warn:ce,extend:S,mergeOptions:je,defineReactive:ke},e.set=Oe,e.delete=Se,e.nextTick=tt,e.observable=function(e){return Ae(e),e},e.options=Object.create(null),L.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,S(e.options.components,Dn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=je(this.options,e),this}}(e),function(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var a=e.name||n.options.name,o=function(e){this._init(e)};return(o.prototype=Object.create(n.prototype)).constructor=o,o.cid=t++,o.options=je(n.options,e),o.super=n,o.options.props&&function(e){var t=e.options.props;for(var n in t)mn(e.prototype,"_props",n)}(o),o.options.computed&&function(e){var t=e.options.computed;for(var n in t)yn(e.prototype,n,t[n])}(o),o.extend=n.extend,o.mixin=n.mixin,o.use=n.use,L.forEach((function(e){o[e]=n[e]})),a&&(o.options.components[a]=o),o.superOptions=n.options,o.extendOptions=e,o.sealedOptions=S({},o.options),i[r]=o,o}}(e),function(e){L.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&l(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(Tn),Object.defineProperty(Tn.prototype,"$isServer",{get:ie}),Object.defineProperty(Tn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Tn,"FunctionalRenderContext",{value:Et}),Tn.version="2.6.10";var Nn=h("style,class"),En=h("input,textarea,option,select,progress"),In=function(e,t,n){return"value"===n&&En(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Mn=h("contenteditable,draggable,spellcheck"),Fn=h("events,caret,typing,plaintext-only"),jn=function(e,t){return Rn(t)||"false"===t?"false":"contenteditable"===e&&Fn(t)?t:"true"},Pn=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ln="http://www.w3.org/1999/xlink",qn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Un=function(e){return qn(e)?e.slice(6,e.length):""},Rn=function(e){return null==e||!1===e};function Hn(e,t){return{staticClass:Bn(e.staticClass,t.staticClass),class:a(e.class)?[e.class,t.class]:t.class}}function Bn(e,t){return e?t?e+" "+t:e:t||""}function zn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r-1?hr(e,t,n):Pn(t)?Rn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Mn(t)?e.setAttribute(t,jn(t,n)):qn(t)?Rn(n)?e.removeAttributeNS(Ln,Un(t)):e.setAttributeNS(Ln,t,n):hr(e,t,n)}function hr(e,t,n){if(Rn(n))e.removeAttribute(t);else{if(X&&!Q&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var mr={create:pr,update:pr};function gr(e,t){var n=t.elm,r=t.data,o=e.data;if(!(i(r.staticClass)&&i(r.class)&&(i(o)||i(o.staticClass)&&i(o.class)))){var s=function(e){for(var t=e.data,n=e,r=e;a(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Hn(r.data,t));for(;a(n=n.parent);)n&&n.data&&(t=Hn(t,n.data));return function(e,t){return a(e)||a(t)?Bn(e,zn(t)):""}(t.staticClass,t.class)}(t),u=n._transitionClasses;a(u)&&(s=Bn(s,zn(u))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var yr,br,wr,_r,xr,$r,Tr={create:gr,update:gr},Cr=/[\w).+\-_$\]]/;function Ar(e){var t,n,r,i,a,o=!1,s=!1,u=!1,c=!1,l=0,f=0,d=0,p=0;for(r=0;r=0&&" "===(h=e.charAt(v));v--);h&&Cr.test(h)||(c=!0)}}else void 0===i?(p=r+1,i=e.slice(0,r).trim()):m();function m(){(a||(a=[])).push(e.slice(p,r).trim()),p=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==p&&m(),a)for(r=0;r-1?{exp:e.slice(0,_r),key:'"'+e.slice(_r+1)+'"'}:{exp:e,key:null};for(br=e,_r=xr=$r=0;!Br();)zr(wr=Hr())?Zr(wr):91===wr&&Vr(wr);return{exp:e.slice(0,xr),key:e.slice(xr+1,$r)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Hr(){return br.charCodeAt(++_r)}function Br(){return _r>=yr}function zr(e){return 34===e||39===e}function Vr(e){var t=1;for(xr=_r;!Br();)if(zr(e=Hr()))Zr(e);else if(91===e&&t++,93===e&&t--,0===t){$r=_r;break}}function Zr(e){for(var t=e;!Br()&&(e=Hr())!==t;);}var Yr,Wr="__r",Gr="__c";function Xr(e,t,n){var r=Yr;return function i(){null!==t.apply(null,arguments)&&Jr(e,i,n,r)}}var Qr=Ye&&!(ee&&Number(ee[1])<=53);function Kr(e,t,n,r){if(Qr){var i=cn,a=t;t=a._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return a.apply(this,arguments)}}Yr.addEventListener(e,t,ne?{capture:n,passive:r}:n)}function Jr(e,t,n,r){(r||Yr).removeEventListener(e,t._wrapper||t,n)}function ei(e,t){if(!i(e.data.on)||!i(t.data.on)){var n=t.data.on||{},r=e.data.on||{};Yr=t.elm,function(e){if(a(e[Wr])){var t=X?"change":"input";e[t]=[].concat(e[Wr],e[t]||[]),delete e[Wr]}a(e[Gr])&&(e.change=[].concat(e[Gr],e.change||[]),delete e[Gr])}(n),ot(n,r,Kr,Jr,Xr,t.context),Yr=void 0}}var ti,ni={create:ei,update:ei};function ri(e,t){if(!i(e.data.domProps)||!i(t.data.domProps)){var n,r,o=t.elm,s=e.data.domProps||{},u=t.data.domProps||{};for(n in a(u.__ob__)&&(u=t.data.domProps=S({},u)),s)n in u||(o[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var c=i(r)?"":String(r);ii(o,c)&&(o.value=c)}else if("innerHTML"===n&&Yn(o.tagName)&&i(o.innerHTML)){(ti=ti||document.createElement("div")).innerHTML=""+r+"";for(var l=ti.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}else if(r!==s[n])try{o[n]=r}catch(e){}}}}function ii(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(a(r)){if(r.number)return v(n)!==v(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var ai={create:ri,update:ri},oi=_((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function si(e){var t=ui(e.style);return e.staticStyle?S(e.staticStyle,t):t}function ui(e){return Array.isArray(e)?D(e):"string"==typeof e?oi(e):e}var ci,li=/^--/,fi=/\s*!important$/,di=function(e,t,n){if(li.test(t))e.style.setProperty(t,n);else if(fi.test(n))e.style.setProperty(A(t),n.replace(fi,""),"important");else{var r=vi(t);if(Array.isArray(n))for(var i=0,a=n.length;i-1?t.split(gi).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function bi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(gi).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function wi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&S(t,_i(e.name||"v")),S(t,e),t}return"string"==typeof e?_i(e):void 0}}var _i=_((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),xi=Z&&!Q,$i="transition",Ti="animation",Ci="transition",Ai="transitionend",ki="animation",Oi="animationend";xi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ci="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ki="WebkitAnimation",Oi="webkitAnimationEnd"));var Si=Z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Di(e){Si((function(){Si(e)}))}function Ni(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),yi(e,t))}function Ei(e,t){e._transitionClasses&&y(e._transitionClasses,t),bi(e,t)}function Ii(e,t,n){var r=Fi(e,t),i=r.type,a=r.timeout,o=r.propCount;if(!i)return n();var s=i===$i?Ai:Oi,u=0,c=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++u>=o&&c()};setTimeout((function(){u0&&(n=$i,l=o,f=a.length):t===Ti?c>0&&(n=Ti,l=c,f=u.length):f=(n=(l=Math.max(o,c))>0?o>c?$i:Ti:null)?n===$i?a.length:u.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===$i&&Mi.test(r[Ci+"Property"])}}function ji(e,t){for(;e.length1}function Hi(e,t){!0!==t.data.show&&Li(t)}var Bi=function(e){var t,n,r={},u=e.modules,c=e.nodeOps;for(t=0;tv?b(e,i(n[g+1])?null:n[g+1].elm,n,p,g,r):p>g&&_(0,t,d,v)}(d,h,g,n,l):a(g)?(a(e.text)&&c.setTextContent(d,""),b(d,null,g,0,g.length-1,n)):a(h)?_(0,h,0,h.length-1):a(e.text)&&c.setTextContent(d,""):e.text!==t.text&&c.setTextContent(d,t.text),a(v)&&a(p=v.hook)&&a(p=p.postpatch)&&p(e,t)}}}function C(e,t,n){if(o(n)&&a(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r-1,o.selected!==a&&(o.selected=a);else if(M(Wi(o),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Yi(e,t){return t.every((function(t){return!M(t,e)}))}function Wi(e){return"_value"in e?e._value:e.value}function Gi(e){e.target.composing=!0}function Xi(e){e.target.composing&&(e.target.composing=!1,Qi(e.target,"input"))}function Qi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Ki(e){return!e.componentInstance||e.data&&e.data.transition?e:Ki(e.componentInstance._vnode)}var Ji={model:zi,show:{bind:function(e,t,n){var r=t.value,i=(n=Ki(n)).data&&n.data.transition,a=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Li(n,(function(){e.style.display=a}))):e.style.display=r?a:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Ki(n)).data&&n.data.transition?(n.data.show=!0,r?Li(n,(function(){e.style.display=e.__vOriginalDisplay})):qi(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},ea={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ta(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?ta(Zt(t.children)):e}function na(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var a in i)t[$(a)]=i[a];return t}function ra(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var ia=function(e){return e.tag||Vt(e)},aa=function(e){return"show"===e.name},oa={name:"transition",props:ea,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(ia)).length){var r=this.mode,i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var a=ta(i);if(!a)return i;if(this._leaving)return ra(e,i);var o="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?o+"comment":o+a.tag:s(a.key)?0===String(a.key).indexOf(o)?a.key:o+a.key:a.key;var u=(a.data||(a.data={})).transition=na(this),c=this._vnode,l=ta(c);if(a.data.directives&&a.data.directives.some(aa)&&(a.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,l)&&!Vt(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=S({},u);if("out-in"===r)return this._leaving=!0,st(f,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),ra(e,i);if("in-out"===r){if(Vt(a))return c;var d,p=function(){d()};st(u,"afterEnter",p),st(u,"enterCancelled",p),st(f,"delayLeave",(function(e){d=e}))}}return i}}},sa=S({tag:String,moveClass:String},ea);function ua(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function ca(e){e.data.newPos=e.elm.getBoundingClientRect()}function la(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var a=e.elm.style;a.transform=a.WebkitTransform="translate("+r+"px,"+i+"px)",a.transitionDuration="0s"}}delete sa.mode;var fa={Transition:oa,TransitionGroup:{props:sa,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Kt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],a=this.children=[],o=na(this),s=0;s-1?Xn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Xn[e]=/HTMLUnknownElement/.test(t.toString())},S(Tn.options.directives,Ji),S(Tn.options.components,fa),Tn.prototype.__patch__=Z?Bi:N,Tn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ge),tn(e,"beforeMount"),r=function(){e._update(e._render(),n)},new vn(e,r,N,{before:function(){e._isMounted&&!e._isDestroyed&&tn(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,tn(e,"mounted")),e}(this,e=e&&Z?Kn(e):void 0,t)},Z&&setTimeout((function(){U.devtools&&ae&&ae.emit("init",Tn)}),0);var da,pa=/\{\{((?:.|\r?\n)+?)\}\}/g,va=/[-.*+?^${}()|[\]\/\\]/g,ha=_((function(e){var t=e[0].replace(va,"\\$&"),n=e[1].replace(va,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")})),ma={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Pr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=jr(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}},ga={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Pr(e,"style");n&&(e.staticStyle=JSON.stringify(oi(n)));var r=jr(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},ya=h("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ba=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wa=h("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),_a=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xa=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,$a="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+R.source+"]*",Ta="((?:"+$a+"\\:)?"+$a+")",Ca=new RegExp("^<"+Ta),Aa=/^\s*(\/?)>/,ka=new RegExp("^<\\/"+Ta+"[^>]*>"),Oa=/^]+>/i,Sa=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Ma=/&(?:lt|gt|quot|amp|#39);/g,Fa=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,ja=h("pre,textarea",!0),Pa=function(e,t){return e&&ja(e)&&"\n"===t[0]};function La(e,t){var n=t?Fa:Ma;return e.replace(n,(function(e){return Ia[e]}))}var qa,Ua,Ra,Ha,Ba,za,Va,Za,Ya=/^@|^v-on:/,Wa=/^v-|^@|^:/,Ga=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Xa=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qa=/^\(|\)$/g,Ka=/^\[.*\]$/,Ja=/:(.*)$/,eo=/^:|^\.|^v-bind:/,to=/\.[^.\]]+(?=[^\]]*$)/g,no=/^v-slot(:|$)|^#/,ro=/[\r\n]/,io=/\s+/g,ao=_((function(e){return(da=da||document.createElement("div")).innerHTML=e,da.textContent})),oo="_empty_";function so(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:vo(t),rawAttrsMap:{},parent:n,children:[]}}function uo(e,t){var n,r;(r=jr(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.scopedSlots&&!e.attrsList.length,function(e){var t=jr(e,"ref");t&&(e.ref=t,e.refInFor=function(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(e))}(e),function(e){var t;"template"===e.tag?(t=Pr(e,"scope"),e.slotScope=t||Pr(e,"slot-scope")):(t=Pr(e,"slot-scope"))&&(e.slotScope=t);var n=jr(e,"slot");if(n&&(e.slotTarget='""'===n?'"default"':n,e.slotTargetDynamic=!(!e.attrsMap[":slot"]&&!e.attrsMap["v-bind:slot"]),"template"===e.tag||e.slotScope||Nr(e,"slot",n,function(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}(e,"slot"))),"template"===e.tag){var r=Lr(e,no);if(r){var i=fo(r),a=i.name,o=i.dynamic;e.slotTarget=a,e.slotTargetDynamic=o,e.slotScope=r.value||oo}}else{var s=Lr(e,no);if(s){var u=e.scopedSlots||(e.scopedSlots={}),c=fo(s),l=c.name,f=c.dynamic,d=u[l]=so("template",[],e);d.slotTarget=l,d.slotTargetDynamic=f,d.children=e.children.filter((function(e){if(!e.slotScope)return e.parent=d,!0})),d.slotScope=s.value||oo,e.children=[],e.plain=!1}}}(e),function(e){"slot"===e.tag&&(e.slotName=jr(e,"name"))}(e),function(e){var t;(t=jr(e,"is"))&&(e.component=t),null!=Pr(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var i=0;i-1"+("true"===a?":("+t+")":":_q("+t+","+a+")")),Fr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+a+"):("+o+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Rr(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Rr(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Rr(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===a&&"radio"===o)!function(e,t,n){var r=n&&n.number,i=jr(e,"value")||"null";Dr(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Fr(e,"change",Rr(t,i),null,!0)}(e,r,i);else if("input"===a||"textarea"===a)!function(e,t,n){var r=e.attrsMap.type,i=n||{},a=i.lazy,o=i.number,s=i.trim,u=!a&&"range"!==r,c=a?"change":"range"===r?Wr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),o&&(l="_n("+l+")");var f=Rr(t,l);u&&(f="if($event.target.composing)return;"+f),Dr(e,"value","("+t+")"),Fr(e,c,f,null,!0),(s||o)&&Fr(e,"blur","$forceUpdate()")}(e,r,i);else if(!U.isReservedTag(a))return Ur(e,r,i),!1;return!0},text:function(e,t){t.value&&Dr(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Dr(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:ya,mustUseProp:In,canBeLeftOpenTag:ba,isReservedTag:Wn,getTagNamespace:Gn,staticKeys:function(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}(wo)},xo=_((function(e){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));var $o=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/,To=/\([^)]*?\);*$/,Co=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ao={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ko={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Oo=function(e){return"if("+e+")return null;"},So={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Oo("$event.target !== $event.currentTarget"),ctrl:Oo("!$event.ctrlKey"),shift:Oo("!$event.shiftKey"),alt:Oo("!$event.altKey"),meta:Oo("!$event.metaKey"),left:Oo("'button' in $event && $event.button !== 0"),middle:Oo("'button' in $event && $event.button !== 1"),right:Oo("'button' in $event && $event.button !== 2")};function Do(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var a in e){var o=No(e[a]);e[a]&&e[a].dynamic?i+=a+","+o+",":r+='"'+a+'":'+o+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function No(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return No(e)})).join(",")+"]";var t=Co.test(e.value),n=$o.test(e.value),r=Co.test(e.value.replace(To,""));if(e.modifiers){var i="",a="",o=[];for(var s in e.modifiers)if(So[s])a+=So[s],Ao[s]&&o.push(s);else if("exact"===s){var u=e.modifiers;a+=Oo(["ctrl","shift","alt","meta"].filter((function(e){return!u[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else o.push(s);return o.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Eo).join("&&")+")return null;"}(o)),a&&(i+=a),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Eo(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ao[e],r=ko[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Io={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:N},Mo=function(e){this.options=e,this.warn=e.warn||Or,this.transforms=Sr(e.modules,"transformCode"),this.dataGenFns=Sr(e.modules,"genData"),this.directives=S(S({},Io),e.directives);var t=e.isReservedTag||E;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Fo(e,t){var n=new Mo(t);return{render:"with(this){return "+(e?jo(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function jo(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Po(e,t);if(e.once&&!e.onceProcessed)return Lo(e,t);if(e.for&&!e.forProcessed)return Uo(e,t);if(e.if&&!e.ifProcessed)return qo(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=zo(e,t),i="_t("+n+(r?","+r:""),a=e.attrs||e.dynamicAttrs?Yo((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:$(e.name),value:e.value,dynamic:e.dynamic}}))):null,o=e.attrsMap["v-bind"];return!a&&!o||r||(i+=",null"),a&&(i+=","+a),o&&(i+=(a?"":",null")+","+o),i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:zo(t,n,!0);return"_c("+e+","+Ro(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Ro(e,t));var i=e.inlineTemplate?null:zo(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var a=0;a>>0}(o):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var a=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Fo(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);a&&(n+=a+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Yo(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ho(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ho))}function Bo(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return qo(e,t,Bo,"null");if(e.for&&!e.forProcessed)return Uo(e,t,Bo);var r=e.slotScope===oo?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(zo(e,t)||"undefined")+":undefined":zo(e,t)||"undefined":jo(e,t))+"}",a=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+a+"}"}function zo(e,t,n,r,i){var a=e.children;if(a.length){var o=a[0];if(1===a.length&&o.for&&"template"!==o.tag&&"slot"!==o.tag){var s=n?t.maybeComponent(o)?",1":",0":"";return""+(r||jo)(o,t)+s}var u=n?function(e,t){for(var n=0,r=0;r]*>)","i")),d=e.replace(f,(function(e,n,r){return c=r.length,Na(l)||"noscript"===l||(n=n.replace(//g,"$1").replace(//g,"$1")),Pa(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));u+=e.length-d.length,e=d,A(l,u-c,u)}else{var p=e.indexOf("<");if(0===p){if(Sa.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),u,u+v+3),$(v+3);continue}}if(Da.test(e)){var h=e.indexOf("]>");if(h>=0){$(h+2);continue}}var m=e.match(Oa);if(m){$(m[0].length);continue}var g=e.match(ka);if(g){var y=u;$(g[0].length),A(g[1],y,u);continue}var b=T();if(b){C(b),Pa(b.tagName,e)&&$(1);continue}}var w=void 0,_=void 0,x=void 0;if(p>=0){for(_=e.slice(p);!(ka.test(_)||Ca.test(_)||Sa.test(_)||Da.test(_)||(x=_.indexOf("<",1))<0);)p+=x,_=e.slice(p);w=e.substring(0,p)}p<0&&(w=e),w&&$(w.length),t.chars&&w&&t.chars(w,u-w.length,u)}if(e===n){t.chars&&t.chars(e);break}}function $(t){u+=t,e=e.substring(t)}function T(){var t=e.match(Ca);if(t){var n,r,i={tagName:t[1],attrs:[],start:u};for($(t[0].length);!(n=e.match(Aa))&&(r=e.match(xa)||e.match(_a));)r.start=u,$(r[0].length),r.end=u,i.attrs.push(r);if(n)return i.unarySlash=n[1],$(n[0].length),i.end=u,i}}function C(e){var n=e.tagName,u=e.unarySlash;a&&("p"===r&&wa(n)&&A(r),s(n)&&r===n&&A(n));for(var c=o(n)||!!u,l=e.attrs.length,f=new Array(l),d=0;d=0&&i[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(var c=i.length-1;c>=o;c--)t.end&&t.end(i[c].tag,n,a);i.length=o,r=o&&i[o-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,a):"p"===s&&(t.start&&t.start(e,[],!1,n,a),t.end&&t.end(e,n,a))}A()}(e,{warn:qa,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,a,o,l,f){var d=r&&r.ns||Za(e);X&&"svg"===d&&(a=function(e){for(var t=[],n=0;nu&&(s.push(a=e.slice(u,i)),o.push(JSON.stringify(a)));var c=Ar(r[1].trim());o.push("_s("+c+")"),s.push({"@binding":c}),u=i+r[0].length}return u':'
',Ko.innerHTML.indexOf(" ")>0}var ns=!!Z&&ts(!1),rs=!!Z&&ts(!0),is=_((function(e){var t=Kn(e);return t&&t.innerHTML})),as=Tn.prototype.$mount;Tn.prototype.$mount=function(e,t){if((e=e&&Kn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=is(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=es(r,{outputSourceRange:!1,shouldDecodeNewlines:ns,shouldDecodeNewlinesForHref:rs,delimiters:n.delimiters,comments:n.comments},this),a=i.render,o=i.staticRenderFns;n.render=a,n.staticRenderFns=o}}return as.call(this,e,t)},Tn.compile=es,e.exports=Tn}).call(this,n(4),n(14).setImmediate)},14:function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(15),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(4))},15:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,a,o,s,u=1,c={},l=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){v(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){v(e.data)},r=function(e){a.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(v,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&v(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;n-1)e[t]=n[t];else{var r=Object.getOwnPropertyDescriptor(n,t);void 0!==r.value?"function"==typeof r.value?(e.methods||(e.methods={}))[t]=r.value:(e.mixins||(e.mixins=[])).push({data:function(){var e;return(e={})[t]=r.value,e}}):(r.get||r.set)&&((e.computed||(e.computed={}))[t]={get:r.get,set:r.set})}})),(e.mixins||(e.mixins=[])).push({data:function(){return function(t,e){var n=e.prototype._init;e.prototype._init=function(){var e=this,n=Object.getOwnPropertyNames(t);if(t.$options.props)for(var r in t.$options.props)t.hasOwnProperty(r)||n.push(r);n.forEach((function(n){"_"!==n.charAt(0)&&Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){t[n]=e},configurable:!0})}))};var r=new e;e.prototype._init=n;var i={};return Object.keys(r).forEach((function(t){void 0!==r[t]&&(i[t]=r[t])})),i}(this,t)}});var r=t.__decorators__;r&&(r.forEach((function(t){return t(e)})),delete t.__decorators__);var u,c,f=Object.getPrototypeOf(t.prototype),d=f instanceof i.a?f.constructor:i.a,p=d.extend(e);return function(t,e,n){Object.getOwnPropertyNames(e).forEach((function(r){if(!h[r]){var i=Object.getOwnPropertyDescriptor(t,r);if(!i||i.configurable){var o=Object.getOwnPropertyDescriptor(e,r);if(!s){if("cid"===r)return;var a=Object.getOwnPropertyDescriptor(n,r);if(!function(t){var e=typeof t;return null==t||"object"!==e&&"function"!==e}(o.value)&&a&&a.value===o.value)return}0,Object.defineProperty(t,r,o)}}}))}(p,t,d),o&&(a(u=p,c=t),Object.getOwnPropertyNames(c.prototype).forEach((function(t){a(u.prototype,c.prototype,t)})),Object.getOwnPropertyNames(c).forEach((function(t){a(u,c,t)}))),p}var h={prototype:!0,arguments:!0,callee:!0,caller:!0};function f(t){return"function"==typeof t?c(t):function(e){return c(e,t)}}f.registerHooks=function(t){l.push.apply(l,t)};var d=f;n.d(e,"b",(function(){return p})),n.d(e,"c",(function(){return g})),n.d(e,"e",(function(){return _})),n.d(e,"a",(function(){return d})),n.d(e,"d",(function(){return i.a}));function p(t){return u((function(e,n){void 0===e.inject&&(e.inject={}),Array.isArray(e.inject)||(e.inject[n]=t||n)}))}var v="undefined"!=typeof Reflect&&void 0!==Reflect.getMetadata;function m(t,e,n){v&&(Array.isArray(t)||"function"==typeof t||void 0!==t.type||(t.type=Reflect.getMetadata("design:type",e,n)))}function g(t){return void 0===t&&(t={}),function(e,n){m(t,e,n),u((function(e,n){(e.props||(e.props={}))[n]=t}))(e,n)}}function _(t,e){void 0===e&&(e={});var n=e.deep,r=void 0!==n&&n,i=e.immediate,o=void 0!==i&&i;return u((function(e,n){"object"!=typeof e.watch&&(e.watch=Object.create(null));var i=e.watch;"object"!=typeof i[t]||Array.isArray(i[t])?void 0===i[t]&&(i[t]=[]):i[t]=[i[t]],i[t].push({handler:n,deep:r,immediate:o})}))}},function(t,e,n){"use strict";var r=n(15),i=n(25),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return null!==t&&"object"==typeof t}function u(t){return"[object Function]"===o.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof O?t:g(t)?new O(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new O(t.x,t.y):new O(t,e,n)}function z(t,e){if(t)for(var n=e?[t,e]:t,r=0,i=n.length;r=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=j(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>=e.x&&r.x<=n.x,a=i.y>=e.y&&r.y<=n.y;return o&&a},overlaps:function(t){t=j(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>e.x&&r.xe.y&&r.y=r.lat&&n.lat<=i.lat&&e.lng>=r.lng&&n.lng<=i.lng},intersects:function(t){t=N(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>=e.lat&&r.lat<=n.lat,a=i.lng>=e.lng&&r.lng<=n.lng;return o&&a},overlaps:function(t){t=N(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>e.lat&&r.late.lng&&r.lng1,Ct=!!document.createElement("canvas").getContext,Et=!(!document.createElementNS||!Y("svg").createSVGRect),Mt=!Et&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Pt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var St=(Object.freeze||Object)({ie:J,ielt9:Q,edge:tt,webkit:et,android:nt,android23:rt,androidStock:ot,opera:at,chrome:st,gecko:ut,safari:lt,phantom:ct,opera12:ht,win:ft,ie3d:dt,webkit3d:pt,gecko3d:vt,any3d:mt,mobile:gt,mobileWebkit:_t,mobileWebkit3d:yt,msPointer:bt,pointer:wt,touch:xt,mobileOpera:Lt,mobileGecko:kt,retina:Tt,canvas:Ct,svg:Et,vml:Mt}),At=bt?"MSPointerDown":"pointerdown",Ot=bt?"MSPointerMove":"pointermove",Dt=bt?"MSPointerUp":"pointerup",It=bt?"MSPointerCancel":"pointercancel",zt=["INPUT","SELECT","OPTION"],jt={},$t=!1,Nt=0;function Rt(t,e,n,r){return"touchstart"===e?function(t,e,n){var r=i((function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(zt.indexOf(t.target.tagName)<0))return;je(t)}Zt(t,e)}));t["_leaflet_touchstart"+n]=r,t.addEventListener(At,r,!1),$t||(document.documentElement.addEventListener(At,Bt,!0),document.documentElement.addEventListener(Ot,Ft,!0),document.documentElement.addEventListener(Dt,Ut,!0),document.documentElement.addEventListener(It,Ut,!0),$t=!0)}(t,n,r):"touchmove"===e?function(t,e,n){var r=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Zt(t,e)};t["_leaflet_touchmove"+n]=r,t.addEventListener(Ot,r,!1)}(t,n,r):"touchend"===e&&function(t,e,n){var r=function(t){Zt(t,e)};t["_leaflet_touchend"+n]=r,t.addEventListener(Dt,r,!1),t.addEventListener(It,r,!1)}(t,n,r),this}function Bt(t){jt[t.pointerId]=t,Nt++}function Ft(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Ut(t){delete jt[t.pointerId],Nt--}function Zt(t,e){for(var n in t.touches=[],jt)t.touches.push(jt[n]);t.changedTouches=[t],e(t)}var Ht=bt?"MSPointerDown":wt?"pointerdown":"touchstart",qt=bt?"MSPointerUp":wt?"pointerup":"touchend",Vt="_leaflet_";function Wt(t,e,n){var r,i,o=!1,a=250;function s(t){var e;if(wt){if(!tt||"mouse"===t.pointerType)return;e=Nt}else e=t.touches.length;if(!(e>1)){var n=Date.now(),s=n-(r||n);i=t.touches?t.touches[0]:t,o=s>0&&s<=a,r=n}}function u(t){if(o&&!i.cancelBubble){if(wt){if(!tt||"mouse"===t.pointerType)return;var n,a,s={};for(a in i)n=i[a],s[a]=n&&n.bind?n.bind(i):n;i=s}i.type="dblclick",i.button=0,e(i),r=null}}return t[Vt+Ht+n]=s,t[Vt+qt+n]=u,t[Vt+"dblclick"+n]=e,t.addEventListener(Ht,s,!1),t.addEventListener(qt,u,!1),t.addEventListener("dblclick",e,!1),this}function Gt(t,e){var n=t[Vt+Ht+e],r=t[Vt+qt+e],i=t[Vt+"dblclick"+e];return t.removeEventListener(Ht,n,!1),t.removeEventListener(qt,r,!1),tt||t.removeEventListener("dblclick",i,!1),this}var Yt,Xt,Kt,Jt,Qt,te=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ee=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ne="webkitTransition"===ee||"OTransition"===ee?ee+"End":"transitionend";function re(t){return"string"==typeof t?document.getElementById(t):t}function ie(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);n=r?r[e]:null}return"auto"===n?null:n}function oe(t,e,n){var r=document.createElement(t);return r.className=e||"",n&&n.appendChild(r),r}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function se(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ue(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function le(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ce(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=pe(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function he(t,e){if(void 0!==t.classList)for(var n=f(e),r=0,i=n.length;r100&&r<500||t.target._simulatedClick&&!t._simulated?$e(t):(Fe=n,e(t))}(t,s)}),t.addEventListener(e,o,!1)):"attachEvent"in t&&t.attachEvent("on"+e,o):Wt(t,o,i),t[Pe]=t[Pe]||{},t[Pe][i]=o}function Oe(t,e,n,r){var i=e+a(n)+(r?"_"+a(r):""),o=t[Pe]&&t[Pe][i];if(!o)return this;wt&&0===e.indexOf("touch")?function(t,e,n){var r=t["_leaflet_"+e+n];"touchstart"===e?t.removeEventListener(At,r,!1):"touchmove"===e?t.removeEventListener(Ot,r,!1):"touchend"===e&&(t.removeEventListener(Dt,r,!1),t.removeEventListener(It,r,!1))}(t,e,i):!xt||"dblclick"!==e||!Gt||wt&&st?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",o,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,o,!1):"detachEvent"in t&&t.detachEvent("on"+e,o):Gt(t,i),t[Pe][i]=null}function De(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,He(t),this}function Ie(t){return Ae(t,"mousewheel",De),this}function ze(t){return Me(t,"mousedown touchstart dblclick",De),Ae(t,"click",Ze),this}function je(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function $e(t){return je(t),De(t),this}function Ne(t,e){if(!e)return new O(t.clientX,t.clientY);var n=Ce(e),r=n.boundingClientRect;return new O((t.clientX-r.left)/n.x-e.clientLeft,(t.clientY-r.top)/n.y-e.clientTop)}var Re=ft&&st?2*window.devicePixelRatio:ut?window.devicePixelRatio:1;function Be(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Re:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Fe,Ue={};function Ze(t){Ue[t.type]=!0}function He(t){var e=Ue[t.type];return Ue[t.type]=!1,e}function qe(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var Ve=(Object.freeze||Object)({on:Me,off:Se,stopPropagation:De,disableScrollPropagation:Ie,disableClickPropagation:ze,preventDefault:je,stop:$e,getMousePosition:Ne,getWheelDelta:Be,fakeStop:Ze,skipped:He,isExternalTarget:qe,addListener:Me,removeListener:Se}),We=A.extend({run:function(t,e,n,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=ye(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,N(t));return n.equals(r)||this.panTo(r,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),r=I(e.paddingBottomRight||e.padding||[0,0]),i=this.getCenter(),o=this.project(i),a=this.project(t),s=this.getPixelBounds(),u=s.getSize().divideBy(2),l=j([s.min.add(n),s.max.subtract(r)]);if(!l.contains(a)){this._enforcingBounds=!0;var c=o.subtract(a),h=I(a.x+c.x,a.y+c.y);(a.xl.max.x)&&(h.x=o.x-c.x,c.x>0?h.x+=u.x-n.x:h.x-=u.x-r.x),(a.yl.max.y)&&(h.y=o.y-c.y,c.y>0?h.y+=u.y-n.y:h.y-=u.y-r.y),this.panTo(this.unproject(h),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),o=e.divideBy(2).round(),a=r.divideBy(2).round(),s=o.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,r,t):navigator.geolocation.getCurrentPosition(e,r,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new R(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){var i=this.getBoundsZoom(n);this.setView(e,r.maxZoom?Math.min(i,r.maxZoom):i)}var o={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ae(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ae(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=oe("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new $(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=N(t),n=I(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),u=this.getSize().subtract(n),l=j(this.project(s,r),this.project(a,r)).getSize(),c=mt?this.options.zoomSnap:1,h=u.x/l.x,f=u.y/l.y,d=e?Math.max(h,f):Math.min(h,f);return r=this.getScaleZoom(d,r),c&&(r=Math.round(r/(c/100))*(c/100),r=e?Math.ceil(r/c)*c:Math.floor(r/c)*c),Math.max(i,Math.min(o,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new z(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var r=n.zoom(t*n.scale(e));return isNaN(r)?1/0:r},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(B(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(B(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(B(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(N(t))},distance:function(t,e){return this.options.crs.distance(B(t),B(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(B(t)))},mouseEventToContainerPoint:function(t){return Ne(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=re(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Me(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&mt,he(t,"leaflet-container"+(xt?" leaflet-touch":"")+(Tt?" leaflet-retina":"")+(Q?" leaflet-oldie":"")+(lt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ie(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),_e(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(he(t.markerPane,"leaflet-zoom-hide"),he(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){_e(this._mapPane,new O(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,!1)._move(t,e)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){_e(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Se:Me;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),mt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,r=[],i="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(i&&!qe(o,t))break;if(r.push(n),i)break}if(o===this._container)break;o=o.parentNode}return r.length||s||i||!qe(o,t)||(r=[this]),r},_handleDOMEvent:function(t){if(this._loaded&&!He(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Le(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,r){if("click"===t.type){var i=n({},t);i.type="preclick",this._fireDOMEvent(i,i.type,r)}if(!t._stopped&&(r=(r||[]).concat(this._findEventTargets(t,e))).length){var o=r[0];"contextmenu"===e&&o.listens(e,!0)&&je(t);var a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var s=o.getLatLng&&(!o._radius||o._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?o.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var u=0;u0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),r=mt?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){fe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=oe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=te,n=this._proxy.style[e];ge(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",(function(){var t=this.getCenter(),e=this.getZoom();ge(this._proxy,this.project(t,e),this.getZoomScale(e,1))}),this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ae(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),i=this._getCenterOffset(t)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(i)||(C((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,he(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:r}),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&fe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),C((function(){this._moveEnd(!0)}),this))}}),Ye=P.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),r=t._controlCorners[n];return he(e,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ae(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Xe=function(t){return new Ye(t)};Ge.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=oe("div",e+"control-container",this._container);function r(r,i){var o=e+r+" "+e+i;t[r+i]=oe("div",o,n)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ae(this._controlCorners[t]);ae(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ke=Ye.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,r){return n1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(t){var e,n=document.createElement("label"),r=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=r):e=this._createRadioElement("leaflet-base-layers_"+a(this),r),this._layerControlInputs.push(e),e.layerId=a(t.layer),Me(e,"click",this._onInputClick,this);var i=document.createElement("span");i.innerHTML=" "+t.name;var o=document.createElement("div");return n.appendChild(o),o.appendChild(e),o.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,r=[],i=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?r.push(e):t.checked||i.push(e);for(o=0;o=0;i--)t=n[i],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&re.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Je=Ye.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=oe("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,r,i){var o=oe("a",n,r);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),ze(o),Me(o,"click",$e),Me(o,"click",i,this),Me(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";fe(this._zoomInButton,e),fe(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&he(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&he(this._zoomInButton,e)}});Ge.mergeOptions({zoomControl:!0}),Ge.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Je,this.addControl(this.zoomControl))}));var Qe=Ye.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=oe("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=oe("div",e,n)),t.imperial&&(this._iScale=oe("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,r,i=3.2808399*t;i>5280?(e=i/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" ft",r/i))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),tn=Ye.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=oe("div","leaflet-control-attribution"),ze(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Ge.mergeOptions({attributionControl:!0}),Ge.addInitHook((function(){this.options.attributionControl&&(new tn).addTo(this)})),Ye.Layers=Ke,Ye.Zoom=Je,Ye.Scale=Qe,Ye.Attribution=tn,Xe.layers=function(t,e,n){return new Ke(t,e,n)},Xe.zoom=function(t){return new Je(t)},Xe.scale=function(t){return new Qe(t)},Xe.attribution=function(t){return new tn(t)};var en=P.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});en.addTo=function(t,e){return t.addHandler(e,this),this};var nn,rn={Events:S},on=xt?"touchstart mousedown":"mousedown",an={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},sn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},un=A.extend({options:{clickTolerance:3},initialize:function(t,e,n,r){d(this,r),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Me(this._dragStartTarget,on,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(un._dragging===this&&this.finishDrag(),Se(this._dragStartTarget,on,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ce(this._element,"leaflet-zoom-anim")&&!(un._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(un._dragging=this,this._preventOutline&&Le(this._element),we(),Yt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Te(this._element);this._startPoint=new O(e.clientX,e.clientY),this._parentScale=Ce(n),Me(document,sn[t.type],this._onMove,this),Me(document,an[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new O(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)l&&(a=s,l=u);l>r&&(n[a]=1,t(e,n,r,i,a),t(e,n,r,a,o))}(t,r,e,0,n-1);var i,o=[];for(i=0;ie&&(n.push(t[r]),i=r);var a,s,u,l;return ie.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function pn(t,e,n,r){var i,o=e.x,a=e.y,s=n.x-o,u=n.y-a,l=s*s+u*u;return l>0&&((i=((t.x-o)*s+(t.y-a)*u)/l)>1?(o=n.x,a=n.y):i>0&&(o+=s*i,a+=u*i)),s=t.x-o,u=t.y-a,r?s*s+u*u:new O(o,a)}function vn(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function mn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),vn(t)}var gn=(Object.freeze||Object)({simplify:ln,pointToSegmentDistance:cn,closestPointOnSegment:function(t,e,n){return pn(t,e,n)},clipSegment:hn,_getEdgeIntersection:fn,_getBitCode:dn,_sqClosestPointOnSegment:pn,isFlat:vn,_flat:mn});function _n(t,e,n){var r,i,o,a,s,u,l,c,h,f=[1,4,2,8];for(i=0,l=t.length;i1e-7;u++)e=o*Math.sin(s),e=Math.pow((1-e)/(1+e),o/2),s+=l=Math.PI/2-2*Math.atan(a*e)-s;return new R(s*n,t.x*n/r)}},xn=(Object.freeze||Object)({LonLat:bn,Mercator:wn,SphericalMercator:H}),Ln=n({},Z,{code:"EPSG:3395",projection:wn,transformation:function(){var t=.5/(Math.PI*wn.R);return V(t,.5,-t,.5)}()}),kn=n({},Z,{code:"EPSG:4326",projection:bn,transformation:V(1/180,1,-1/180,.5)}),Tn=n({},U,{projection:bn,transformation:V(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,r=e.lat-t.lat;return Math.sqrt(n*n+r*r)},infinite:!0});U.Earth=Z,U.EPSG3395=Ln,U.EPSG3857=W,U.EPSG900913=G,U.EPSG4326=kn,U.Simple=Tn;var Cn=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});Ge.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&a(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()e)return a=(r-e)/n,this._map.layerPointToLatLng([o.x-a*(o.x-i.x),o.y-a*(o.y-i.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=B(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new $,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return vn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=vn(t),r=0,i=t.length;r=2&&e[0]instanceof R&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){jn.prototype._setLatLngs.call(this,t),vn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return vn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new O(e,e);if(t=new z(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var r,i=0,o=this._rings.length;it.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(l=!l);return l||jn.prototype._containsPoint.call(this,t,!0)}}),Nn=Mn.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,r,i=g(t)?t:t.features;if(i){for(e=0,n=i.length;e0?r:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var a=0;ai?(e.height=i+"px",he(t,"leaflet-popup-scrolled")):fe(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();_e(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ie(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,r=this._containerWidth,i=new O(this._containerLeft,-n-this._containerBottom);i._add(ye(this._container));var o=t.layerPointToContainerPoint(i),a=I(this.options.autoPanPadding),s=I(this.options.autoPanPaddingTopLeft||a),u=I(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),c=0,h=0;o.x+r+u.x>l.x&&(c=o.x+r-l.x+u.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+n+u.y>l.y&&(h=o.y+n-l.y+u.y),o.y-h-s.y<0&&(h=o.y-s.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),$e(t)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ge.mergeOptions({closePopupOnClick:!0}),Ge.include({openPopup:function(t,e,n){return t instanceof Qn||(t=new Qn(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Cn.include({bindPopup:function(t,e){return t instanceof Qn?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Qn(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&($e(t),e instanceof Dn?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var tr=Jn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Jn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Jn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Jn.prototype.getEvents.call(this);return xt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oe("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,r=e.latLngToContainerPoint(e.getCenter()),i=e.layerPointToContainerPoint(t),o=this.options.direction,a=n.offsetWidth,s=n.offsetHeight,u=I(this.options.offset),l=this._getAnchor();"top"===o?t=t.add(I(-a/2+u.x,-s+u.y+l.y,!0)):"bottom"===o?t=t.subtract(I(a/2-u.x,-u.y,!0)):"center"===o?t=t.subtract(I(a/2+u.x,s/2-l.y+u.y,!0)):"right"===o||"auto"===o&&i.xthis.options.maxZoom||nr&&this._retainParent(i,o,a,r))},_retainChildren:function(t,e,n,r){for(var i=2*t;i<2*t+2;i++)for(var o=2*e;o<2*e+2;o++){var a=new O(i,o);a.z=n+1;var s=this._tileCoordsToKey(a),u=this._tiles[s];u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&i1)this._setView(t,n);else{for(var h=i.min.y;h<=i.max.y;h++)for(var f=i.min.x;f<=i.max.x;f++){var d=new O(f,h);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:a.push(d)}}if(a.sort((function(t,e){return t.distanceTo(o)-e.distanceTo(o)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(f=0;fn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),r=t.scaleBy(n),i=r.add(n);return[e.unproject(r,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new $(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new O(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ae(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){he(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=l,t.onmousemove=l,Q&&this.options.opacity<1&&ve(t,this.options.opacity),nt&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),r=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&C(i(this._tileReady,this,t,null,o)),_e(o,n),this._tiles[r]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var r=this._tileCoordsToKey(t);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(ve(n.el,0),E(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(he(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Q||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?u(t.x,this._wrapX):t.x,this._wrapY?u(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),rr=nr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Tt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),nt||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Me(n,"load",i(this._tileOnLoad,this,e,n)),Me(n,"error",i(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Tt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=r),e["-y"]=r}return m(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Q?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var r=this.options.errorTileUrl;r&&e.getAttribute("src")!==r&&(e.src=r),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=l,e.onerror=l,e.complete||(e.src=y,ae(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return ot||e.el.setAttribute("src",y),nr.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return nr.prototype._tileReady.call(this,t,e,n)}});function ir(t,e){return new rr(t,e)}var or=rr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var r=n({},this.defaultWmsParams);for(var i in e)i in this.options||(r[i]=e[i]);var o=(e=d(this,e)).detectRetina&&Tt?2:1,a=this.getTileSize();r.width=a.x*o,r.height=a.y*o,this.wmsParams=r},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,rr.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,r=j(n.project(e[0]),n.project(e[1])),i=r.min,o=r.max,a=(this._wmsVersion>=1.3&&this._crs===kn?[i.y,i.x,o.y,o.x]:[i.x,i.y,o.x,o.y]).join(","),s=rr.prototype.getTileUrl.call(this,t);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});rr.WMS=or,ir.wms=function(t,e){return new or(t,e)};var ar=Cn.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&he(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),r=ye(this._container),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),a=this._map.project(t,e).subtract(o),s=i.multiplyBy(-n).add(r).add(i).subtract(a);mt?ge(this._container,s,n):_e(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sr=ar.extend({getEvents:function(){var t=ar.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ar.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Me(t,"mousemove",s(this._onMouseMove,32,this),this),Me(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Me(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,ae(this._container),Se(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){ar.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),r=Tt?2:1;_e(e,t.min),e.width=r*n.x,e.height=r*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Tt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ar.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,r=e.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,r=t.options.dashArray.split(/[, ]+/),i=[];for(n=0;n')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),cr={_initContainer:function(){this._container=oe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ar.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=lr("shape");he(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=lr("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ae(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,r=t.options,i=t._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(e||(e=t._stroke=lr("stroke")),i.appendChild(e),e.weight=r.weight+"px",e.color=r.color,e.opacity=r.opacity,r.dashArray?e.dashStyle=g(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=r.lineCap.replace("butt","flat"),e.joinstyle=r.lineJoin):e&&(i.removeChild(e),t._stroke=null),r.fill?(n||(n=t._fill=lr("fill")),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),r=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+r+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ue(t._container)},_bringToBack:function(t){le(t._container)}},hr=Mt?lr:Y,fr=ar.extend({getEvents:function(){var t=ar.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=hr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=hr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ae(this._container),Se(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){ar.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),_e(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=hr("path");t.options.className&&he(e,t.options.className),t.options.interactive&&he(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ae(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),r="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",i=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+r+2*n+",0 "+r+2*-n+",0 ";this._setPath(t,i)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ue(t._path)},_bringToBack:function(t){le(t._path)}});function dr(t){return Et||Mt?new fr(t):null}Mt&&fr.include(cr),Ge.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ur(t)||dr(t)}});var pr=$n.extend({initialize:function(t,e){$n.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});fr.create=hr,fr.pointsToPath=X,Nn.geometryToLayer=Rn,Nn.coordsToLatLng=Bn,Nn.coordsToLatLngs=Fn,Nn.latLngToCoords=Un,Nn.latLngsToCoords=Zn,Nn.getFeature=Hn,Nn.asFeature=qn,Ge.mergeOptions({boxZoom:!0});var vr=en.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Se(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ae(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Yt(),we(),this._startPoint=this._map.mouseEventToContainerPoint(t),Me(document,{contextmenu:$e,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),he(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),n=e.getSize();_e(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ae(this._box),fe(this._container,"leaflet-crosshair")),Xt(),xe(),Se(document,{contextmenu:$e,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new $(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ge.addInitHook("addHandler","boxZoom",vr),Ge.mergeOptions({doubleClickZoom:!0});var mr=en.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),r=e.options.zoomDelta,i=t.originalEvent.shiftKey?n-r:n+r;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}});Ge.addInitHook("addHandler","doubleClickZoom",mr),Ge.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var gr=en.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new un(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}he(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){fe(this._map._container,"leaflet-grab"),fe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=N(this._map.options.maxBounds);this._offsetLimit=j(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-e+n)%t+e-n,o=(r+e+n)%t-e-n,a=Math.abs(i+n)0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});Ge.addInitHook("addHandler","scrollWheelZoom",yr),Ge.mergeOptions({tap:!0,tapTolerance:15});var br=en.extend({addHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Se(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(je(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new O(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&he(n,"leaflet-active"),this._holdTimeout=setTimeout(i((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Me(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Se(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&fe(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new O(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});xt&&!wt&&Ge.addInitHook("addHandler","tap",br),Ge.mergeOptions({touchZoom:xt&&!rt,bounceAtZoomLimits:!0});var wr=en.extend({addHooks:function(){he(this._map._container,"leaflet-touch-zoom"),Me(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){fe(this._map._container,"leaflet-touch-zoom"),Se(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Me(document,"touchmove",this._onTouchMove,this),Me(document,"touchend",this._onTouchEnd,this),je(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(r)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),E(this._animRequest);var s=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=C(s,this,!0),je(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),Se(document,"touchmove",this._onTouchMove),Se(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ge.addInitHook("addHandler","touchZoom",wr),Ge.BoxZoom=vr,Ge.DoubleClickZoom=mr,Ge.Drag=gr,Ge.Keyboard=_r,Ge.ScrollWheelZoom=yr,Ge.Tap=br,Ge.TouchZoom=wr,Object.freeze=e,t.version="1.5.1+build.2e3e0ffb",t.Control=Ye,t.control=Xe,t.Browser=St,t.Evented=A,t.Mixin=rn,t.Util=M,t.Class=P,t.Handler=en,t.extend=n,t.bind=i,t.stamp=a,t.setOptions=d,t.DomEvent=Ve,t.DomUtil=Ee,t.PosAnimation=We,t.Draggable=un,t.LineUtil=gn,t.PolyUtil=yn,t.Point=O,t.point=I,t.Bounds=z,t.bounds=j,t.Transformation=q,t.transformation=V,t.Projection=xn,t.LatLng=R,t.latLng=B,t.LatLngBounds=$,t.latLngBounds=N,t.CRS=U,t.GeoJSON=Nn,t.geoJSON=Wn,t.geoJson=Gn,t.Layer=Cn,t.LayerGroup=En,t.layerGroup=function(t,e){return new En(t,e)},t.FeatureGroup=Mn,t.featureGroup=function(t){return new Mn(t)},t.ImageOverlay=Yn,t.imageOverlay=function(t,e,n){return new Yn(t,e,n)},t.VideoOverlay=Xn,t.videoOverlay=function(t,e,n){return new Xn(t,e,n)},t.SVGOverlay=Kn,t.svgOverlay=function(t,e,n){return new Kn(t,e,n)},t.DivOverlay=Jn,t.Popup=Qn,t.popup=function(t,e){return new Qn(t,e)},t.Tooltip=tr,t.tooltip=function(t,e){return new tr(t,e)},t.Icon=Pn,t.icon=function(t){return new Pn(t)},t.DivIcon=er,t.divIcon=function(t){return new er(t)},t.Marker=On,t.marker=function(t,e){return new On(t,e)},t.TileLayer=rr,t.tileLayer=ir,t.GridLayer=nr,t.gridLayer=function(t){return new nr(t)},t.SVG=fr,t.svg=dr,t.Renderer=ar,t.Canvas=sr,t.canvas=ur,t.Path=Dn,t.CircleMarker=In,t.circleMarker=function(t,e){return new In(t,e)},t.Circle=zn,t.circle=function(t,e,n){return new zn(t,e,n)},t.Polyline=jn,t.polyline=function(t,e){return new jn(t,e)},t.Polygon=$n,t.polygon=function(t,e){return new $n(t,e)},t.Rectangle=pr,t.rectangle=function(t,e){return new pr(t,e)},t.Map=Ge,t.map=function(t,e){return new Ge(t,e)};var xr=window.L;t.noConflict=function(){return window.L=xr,this},window.L=t}(e)},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i=0&&h.splice(e,1)}function g(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return _(e,t.attrs),v(t,e),e}function _(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function y(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var a=c++;n=l||(l=g(e)),r=x.bind(null,n,a,!1),i=x.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",_(e,t.attrs),v(t,e),e}(e),r=k.bind(null,n,e),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(e),r=L.bind(null,n),i=function(){m(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var r=[],i=0;i1)for(var n=1;n0;)e[n]=arguments[n+1];if(g(Object.assign))return Object.assign.apply(Object,[t].concat(e));if(null==t)throw new TypeError("Cannot convert undefined or null to object");var r=Object(t);return e.forEach((function(t){null!=t&&Object.keys(t).forEach((function(e){r[e]=t[e]}))})),r},L=0,k="{id}",T=function(t,e){for(var n=Array.isArray(t)?t:b(t),r=0;r=0&&t.maxLength<524288&&(e=f("max:"+t.maxLength,e)),t.minLength>0&&(e=f("min:"+t.minLength,e)),"number"===t.type&&(e=f("decimal",e),""!==t.min&&(e=f("min_value:"+t.min,e)),""!==t.max&&(e=f("max_value:"+t.max,e))),e;if(function(t){return O(["date","week","month","datetime-local","time"],t.type)}(t)){var n=t.step&&Number(t.step)<60?"HH:mm:ss":"HH:mm";if("date"===t.type)return f("date_format:yyyy-MM-dd",e);if("datetime-local"===t.type)return f("date_format:yyyy-MM-ddT"+n,e);if("month"===t.type)return f("date_format:yyyy-MM",e);if("week"===t.type)return f("date_format:yyyy-[W]WW",e);if("time"===t.type)return f("date_format:"+n,e)}return e},A=function(t){return g(Object.values)?Object.values(t):Object.keys(t).map((function(e){return t[e]}))},O=function(t,e){return-1!==t.indexOf(e)},D=function(t){return Array.isArray(t)&&0===t.length},I=function(t,e,n){Object.defineProperty(t,e,{configurable:!1,writable:!0,value:n})},z="en",j=function(t){void 0===t&&(t={}),this.container={},this.merge(t)},$={locale:{configurable:!0}};$.locale.get=function(){return z},$.locale.set=function(t){z=t||"en"},j.prototype.hasLocale=function(t){return!!this.container[t]},j.prototype.setDateFormat=function(t,e){this.container[t]||(this.container[t]={}),this.container[t].dateFormat=e},j.prototype.getDateFormat=function(t){return this.container[t]&&this.container[t].dateFormat?this.container[t].dateFormat:null},j.prototype.getMessage=function(t,e,n){var r=null;return r=this.hasMessage(t,e)?this.container[t].messages[e]:this._getDefaultMessage(t),g(r)?r.apply(void 0,n):r},j.prototype.getFieldMessage=function(t,e,n,r){if(!this.hasLocale(t))return this.getMessage(t,n,r);var i=this.container[t].custom&&this.container[t].custom[e];if(!i||!i[n])return this.getMessage(t,n,r);var o=i[n];return g(o)?o.apply(void 0,r):o},j.prototype._getDefaultMessage=function(t){return this.hasMessage(t,"_default")?this.container[t].messages._default:this.container.en.messages._default},j.prototype.getAttribute=function(t,e,n){return void 0===n&&(n=""),this.hasAttribute(t,e)?this.container[t].attributes[e]:n},j.prototype.hasMessage=function(t,e){return!!(this.hasLocale(t)&&this.container[t].messages&&this.container[t].messages[e])},j.prototype.hasAttribute=function(t,e){return!!(this.hasLocale(t)&&this.container[t].attributes&&this.container[t].attributes[e])},j.prototype.merge=function(t){P(this.container,t)},j.prototype.setMessage=function(t,e,n){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].messages||(this.container[t].messages={}),this.container[t].messages[e]=n},j.prototype.setAttribute=function(t,e,n){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].attributes[e]=n},Object.defineProperties(j.prototype,$);var N={default:new j({en:{messages:{},attributes:{},custom:{}}})},R="default",B=function(){};B._checkDriverName=function(t){if(!t)throw v("you must provide a name to the dictionary driver")},B.setDriver=function(t,e){void 0===e&&(e=null),this._checkDriverName(t),e&&(N[t]=e),R=t},B.getDriver=function(){return N[R]};var F=function t(e,n){void 0===e&&(e=null),void 0===n&&(n=null),this.vmId=n||null,this.items=e&&e instanceof t?e.items:[]};F.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var t=this,e=0;return{next:function(){return{value:t.items[e++],done:e>t.items.length}}}},F.prototype.add=function(t){var e;(e=this.items).push.apply(e,this._normalizeError(t))},F.prototype._normalizeError=function(t){var e=this;return Array.isArray(t)?t.map((function(t){return t.scope=s(t.scope)?null:t.scope,t.vmId=s(t.vmId)?e.vmId||null:t.vmId,t})):(t.scope=s(t.scope)?null:t.scope,t.vmId=s(t.vmId)?this.vmId||null:t.vmId,[t])},F.prototype.regenerate=function(){this.items.forEach((function(t){t.msg=g(t.regenerate)?t.regenerate():t.msg}))},F.prototype.update=function(t,e){var n=C(this.items,(function(e){return e.id===t}));if(n){var r=this.items.indexOf(n);this.items.splice(r,1),n.scope=e.scope,this.items.push(n)}},F.prototype.all=function(t){var e=this;return this.items.filter((function(n){var r=!0,i=!0;return s(t)||(r=n.scope===t),s(e.vmId)||(i=n.vmId===e.vmId),i&&r})).map((function(t){return t.msg}))},F.prototype.any=function(t){var e=this;return!!this.items.filter((function(n){var r=!0,i=!0;return s(t)||(r=n.scope===t),s(e.vmId)||(i=n.vmId===e.vmId),i&&r})).length},F.prototype.clear=function(t){var e=this,n=s(this.vmId)?function(){return!0}:function(t){return t.vmId===e.vmId},r=function(e){return e.scope===t};0===arguments.length?r=function(){return!0}:s(t)&&(t=null);for(var i=0;i=9999&&(L=0,k=k.replace("{id}","_{id}")),L++,k.replace("{id}",String(L))),this.el=t.el,this.updated=!1,this.vmId=t.vmId,I(this,"dependencies",[]),I(this,"watchers",[]),I(this,"events",[]),this.delay=0,this.rules={},this.forceRequired=!1,this._cacheId(t),this.classNames=x({},st.classNames),t=x({},st,t),this._delay=s(t.delay)?0:t.delay,this.validity=t.validity,this.aria=t.aria,this.flags=t.flags||{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},I(this,"vm",t.vm),I(this,"componentInstance",t.component),this.ctorConfig=this.componentInstance?c("$options.$_veeValidate",this.componentInstance):void 0,this.update(t),this.initialValue=this.value,this.updated=!1},lt={validator:{configurable:!0},isRequired:{configurable:!0},isDisabled:{configurable:!0},alias:{configurable:!0},value:{configurable:!0},bails:{configurable:!0},rejectsFalse:{configurable:!0}};lt.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:{validate:function(){return Promise.resolve(!0)}}},lt.isRequired.get=function(){return!!this.rules.required||this.forceRequired},lt.isDisabled.get=function(){return!(!this.el||!this.el.disabled)},lt.alias.get=function(){if(this._alias)return this._alias;var t=null;return this.ctorConfig&&this.ctorConfig.alias&&(t=g(this.ctorConfig.alias)?this.ctorConfig.alias.call(this.componentInstance):this.ctorConfig.alias),!t&&this.el&&(t=o(this.el,"as")),!t&&this.componentInstance?this.componentInstance.$attrs&&this.componentInstance.$attrs["data-vv-as"]:t},lt.value.get=function(){if(g(this.getter))return this.getter()},lt.bails.get=function(){return this._bails},lt.rejectsFalse.get=function(){return this.componentInstance&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},ut.prototype.matches=function(t){var e=this;return!t||(t.id?this.id===t.id:!!(s(t.vmId)?function(){return!0}:function(t){return t===e.vmId})(t.vmId)&&(void 0===t.name&&void 0===t.scope||(void 0===t.scope?this.name===t.name:void 0===t.name?this.scope===t.scope:t.name===this.name&&t.scope===this.scope)))},ut.prototype._cacheId=function(t){this.el&&!t.targetOf&&(this.el._veeValidateId=this.id)},ut.prototype.waitFor=function(t){this._waitingFor=t},ut.prototype.isWaitingFor=function(t){return this._waitingFor===t},ut.prototype.update=function(t){var e,n,r,i=this;if(this.targetOf=t.targetOf||null,this.immediate=t.immediate||this.immediate||!1,this.persist=t.persist||this.persist||!1,!s(t.scope)&&t.scope!==this.scope&&g(this.validator.update)&&this.validator.update(this.id,{scope:t.scope}),this.scope=s(t.scope)?s(this.scope)?null:this.scope:t.scope,this.name=(s(t.name)?t.name:String(t.name))||this.name||null,this.rules=void 0!==t.rules?d(t.rules):this.rules,this._bails=void 0!==t.bails?t.bails:this._bails,this.model=t.model||this.model,this.listen=void 0!==t.listen?t.listen:this.listen,this.classes=!(!t.classes&&!this.classes)&&!this.componentInstance,this.classNames=m(t.classNames)?P(this.classNames,t.classNames):this.classNames,this.getter=g(t.getter)?t.getter:this.getter,this._alias=t.alias||this._alias,this.events=t.events?it(t.events):this.events,this.delay=(e=this.events,n=t.delay||this.delay,r=this._delay,"number"==typeof n?e.reduce((function(t,e){return t[e]=n,t}),{}):e.reduce((function(t,e){return"object"==typeof n&&e in n?(t[e]=n[e],t):"number"==typeof r?(t[e]=r,t):(t[e]=r&&r[e]||0,t)}),{})),this.updateDependencies(),this.addActionListeners(),void 0!==t.rules&&(this.flags.required=this.isRequired),0===Object.keys(t.rules||{}).length&&this.updated){var o=this.flags.validated;this.validator.validate("#"+this.id).then((function(){i.flags.validated=o}))}this.flags.validated&&void 0!==t.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.addValueListeners(),this.el&&(this.updateClasses(),this.updateAriaAttrs())},ut.prototype.reset=function(){var t=this;this._cancellationToken&&(this._cancellationToken.cancelled=!0,delete this._cancellationToken);var e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};Object.keys(this.flags).filter((function(t){return"required"!==t})).forEach((function(n){t.flags[n]=e[n]})),this.initialValue=this.value,this.flags.changed=!1,this.addValueListeners(),this.addActionListeners(),this.updateClasses(!0),this.updateAriaAttrs(),this.updateCustomValidity()},ut.prototype.setFlags=function(t){var e=this,n={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(t).forEach((function(r){e.flags[r]=t[r],n[r]&&void 0===t[n[r]]&&(e.flags[n[r]]=!t[r])})),void 0===t.untouched&&void 0===t.touched&&void 0===t.dirty&&void 0===t.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},ut.prototype.updateDependencies=function(){var t=this;this.dependencies.forEach((function(t){return t.field.destroy()})),this.dependencies=[];var e=Object.keys(this.rules).reduce((function(e,n){return et.isTargetRule(n)&&e.push({selector:t.rules[n][0],name:n}),e}),[]);e.length&&this.vm&&this.vm.$el&&e.forEach((function(e){var n=e.selector,r=e.name,i=t.vm.$refs[n],o=Array.isArray(i)?i[0]:i;if(o){var a={vm:t.vm,classes:t.classes,classNames:t.classNames,delay:t.delay,scope:t.scope,events:t.events.join("|"),immediate:t.immediate,targetOf:t.id};g(o.$watch)?(a.component=o,a.el=o.$el,a.getter=Q.resolveGetter(o.$el,o.$vnode)):(a.el=o,a.getter=Q.resolveGetter(o,{})),t.dependencies.push({name:r,field:new ut(a)})}}))},ut.prototype.unwatch=function(t){if(void 0===t&&(t=null),!t)return this.watchers.forEach((function(t){return t.unwatch()})),void(this.watchers=[]);this.watchers.filter((function(e){return t.test(e.tag)})).forEach((function(t){return t.unwatch()})),this.watchers=this.watchers.filter((function(e){return!t.test(e.tag)}))},ut.prototype.updateClasses=function(t){var e=this;if(void 0===t&&(t=!1),this.classes&&!this.isDisabled){var n=function(n){y(n,e.classNames.dirty,e.flags.dirty),y(n,e.classNames.pristine,e.flags.pristine),y(n,e.classNames.touched,e.flags.touched),y(n,e.classNames.untouched,e.flags.untouched),t&&(y(n,e.classNames.valid,!1),y(n,e.classNames.invalid,!1)),!s(e.flags.valid)&&e.flags.validated&&y(n,e.classNames.valid,e.flags.valid),!s(e.flags.invalid)&&e.flags.validated&&y(n,e.classNames.invalid,e.flags.invalid)};if(i(this.el)){var r=document.querySelectorAll('input[name="'+this.el.name+'"]');b(r).forEach(n)}else n(this.el)}},ut.prototype.addActionListeners=function(){var t=this;if(this.unwatch(/class/),this.el){var e=function(){t.flags.touched=!0,t.flags.untouched=!1,t.classes&&(y(t.el,t.classNames.touched,!0),y(t.el,t.classNames.untouched,!1)),t.unwatch(/^class_blur$/)},n=r(this.el)?"input":"change",o=function(){t.flags.dirty=!0,t.flags.pristine=!1,t.classes&&(y(t.el,t.classNames.pristine,!1),y(t.el,t.classNames.dirty,!0)),t.unwatch(/^class_input$/)};if(this.componentInstance&&g(this.componentInstance.$once))return this.componentInstance.$once("input",o),this.componentInstance.$once("blur",e),this.watchers.push({tag:"class_input",unwatch:function(){t.componentInstance.$off("input",o)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){t.componentInstance.$off("blur",e)}});if(this.el){at(this.el,n,o);var a=i(this.el)?"change":"blur";at(this.el,a,e),this.watchers.push({tag:"class_input",unwatch:function(){t.el.removeEventListener(n,o)}}),this.watchers.push({tag:"class_blur",unwatch:function(){t.el.removeEventListener(a,e)}})}}},ut.prototype.checkValueChanged=function(){return(null!==this.initialValue||""!==this.value||!r(this.el))&&this.value!==this.initialValue},ut.prototype._determineInputEvent=function(){return this.componentInstance?this.componentInstance.$options.model&&this.componentInstance.$options.model.event||"input":this.model&&this.model.lazy?"change":r(this.el)?"input":"change"},ut.prototype._determineEventList=function(t){var e=this;return!this.events.length||this.componentInstance||r(this.el)?[].concat(this.events).map((function(t){return"input"===t&&e.model&&e.model.lazy?"change":t})):this.events.map((function(e){return"input"===e?t:e}))},ut.prototype.addValueListeners=function(){var t=this;if(this.unwatch(/^input_.+/),this.listen&&this.el){var e={cancelled:!1},n=this.targetOf?function(){var e=t.validator._resolveField("#"+t.targetOf);e&&e.flags.validated&&t.validator.validate("#"+t.targetOf)}:function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];(0===n.length||rt(n[0]))&&(n[0]=t.value),t.flags.pending=!0,t._cancellationToken=e,t.validator.validate("#"+t.id,n[0])},r=this._determineInputEvent(),i=this._determineEventList(r);if(O(i,r)){var o=null,a=null,s=!1;if(this.model&&this.model.expression&&(o=this.vm,a=this.model.expression,s=!0),!a&&this.componentInstance&&this.componentInstance.$options.model&&(o=this.componentInstance,a=this.componentInstance.$options.model.prop||"value"),o&&a){var u=h(n,this.delay[r],e),l=o.$watch(a,u);this.watchers.push({tag:"input_model",unwatch:function(){t.vm.$nextTick((function(){l()}))}}),s&&(i=i.filter((function(t){return t!==r})))}}i.forEach((function(r){var i=h(n,t.delay[r],e);t._addComponentEventListener(r,i),t._addHTMLEventListener(r,i)}))}},ut.prototype._addComponentEventListener=function(t,e){var n=this;this.componentInstance&&(this.componentInstance.$on(t,e),this.watchers.push({tag:"input_vue",unwatch:function(){n.componentInstance.$off(t,e)}}))},ut.prototype._addHTMLEventListener=function(t,e){var n=this;if(this.el&&!this.componentInstance){var r=function(r){at(r,t,e),n.watchers.push({tag:"input_native",unwatch:function(){r.removeEventListener(t,e)}})};if(r(this.el),i(this.el)){var o=document.querySelectorAll('input[name="'+this.el.name+'"]');b(o).forEach((function(t){t._veeValidateId&&t!==n.el||r(t)}))}}},ut.prototype.updateAriaAttrs=function(){var t=this;if(this.aria&&this.el&&g(this.el.setAttribute)){var e=function(e){e.setAttribute("aria-required",t.isRequired?"true":"false"),e.setAttribute("aria-invalid",t.flags.invalid?"true":"false")};if(i(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');b(n).forEach(e)}else e(this.el)}},ut.prototype.updateCustomValidity=function(){this.validity&&this.el&&g(this.el.setCustomValidity)&&this.validator.errors&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},ut.prototype.destroy=function(){this._cancellationToken&&(this._cancellationToken.cancelled=!0),this.unwatch(),this.dependencies.forEach((function(t){return t.field.destroy()})),this.dependencies=[]},Object.defineProperties(ut.prototype,lt);var ct=function(t){void 0===t&&(t=[]),this.items=t||[],this.itemsById=this.items.reduce((function(t,e){return t[e.id]=e,t}),{})},ht={length:{configurable:!0}};ct.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var t=this,e=0;return{next:function(){return{value:t.items[e++],done:e>t.items.length}}}},ht.length.get=function(){return this.items.length},ct.prototype.find=function(t){return C(this.items,(function(e){return e.matches(t)}))},ct.prototype.findById=function(t){return this.itemsById[t]||null},ct.prototype.filter=function(t){return Array.isArray(t)?this.items.filter((function(e){return t.some((function(t){return e.matches(t)}))})):this.items.filter((function(e){return e.matches(t)}))},ct.prototype.map=function(t){return this.items.map(t)},ct.prototype.remove=function(t){var e=null;if(!(e=t instanceof ut?t:this.find(t)))return null;var n=this.items.indexOf(e);return this.items.splice(n,1),delete this.itemsById[e.id],e},ct.prototype.push=function(t){if(!(t instanceof ut))throw v("FieldBag only accepts instances of Field that has an id defined.");if(!t.id)throw v("Field id must be defined.");if(this.findById(t.id))throw v("Field with id "+t.id+" is already added.");this.items.push(t),this.itemsById[t.id]=t},Object.defineProperties(ct.prototype,ht);var ft=function(t,e){this.id=e._uid,this._base=t,this._paused=!1,this.errors=new F(t.errors,this.id)},dt={flags:{configurable:!0},rules:{configurable:!0},fields:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};dt.flags.get=function(){var t=this;return this._base.fields.items.filter((function(e){return e.vmId===t.id})).reduce((function(t,e){return e.scope&&(t["$"+e.scope]||(t["$"+e.scope]={}),t["$"+e.scope][e.name]=e.flags),t[e.name]=e.flags,t}),{})},dt.rules.get=function(){return this._base.rules},dt.fields.get=function(){return new ct(this._base.fields.filter({vmId:this.id}))},dt.dictionary.get=function(){return this._base.dictionary},dt.locale.get=function(){return this._base.locale},dt.locale.set=function(t){this._base.locale=t},ft.prototype.localize=function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];return(t=this._base).localize.apply(t,e)},ft.prototype.update=function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];return(t=this._base).update.apply(t,e)},ft.prototype.attach=function(t){var e=x({},t,{vmId:this.id});return this._base.attach(e)},ft.prototype.pause=function(){this._paused=!0},ft.prototype.resume=function(){this._paused=!1},ft.prototype.remove=function(t){return this._base.remove(t)},ft.prototype.detach=function(t,e){return this._base.detach(t,e,this.id)},ft.prototype.extend=function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];return(t=this._base).extend.apply(t,e)},ft.prototype.validate=function(t,e,n){return void 0===n&&(n={}),this._paused?Promise.resolve(!0):this._base.validate(t,e,x({},{vmId:this.id},n||{}))},ft.prototype.verify=function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];return(t=this._base).verify.apply(t,e)},ft.prototype.validateAll=function(t,e){return void 0===e&&(e={}),this._paused?Promise.resolve(!0):this._base.validateAll(t,x({},{vmId:this.id},e||{}))},ft.prototype.validateScopes=function(t){return void 0===t&&(t={}),this._paused?Promise.resolve(!0):this._base.validateScopes(x({},{vmId:this.id},t||{}))},ft.prototype.destroy=function(){delete this.id,delete this._base},ft.prototype.reset=function(t){return this._base.reset(Object.assign({},t||{},{vmId:this.id}))},ft.prototype.flag=function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];return(t=this._base).flag.apply(t,e.concat([this.id]))},ft.prototype._resolveField=function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];return(t=this._base)._resolveField.apply(t,e)},Object.defineProperties(ft.prototype,dt);var pt=null,vt=function(){return pt},mt={provide:function(){return this.$validator&&!E(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!E(this.$vnode)&&!1!==this.$options.$__veeInject){this.$parent||q(this.$options.$_veeValidate||{});var t=Z(this);(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=new ft(vt(),this));var e,n=(e=this.$options.inject,!(!m(e)||!e.$validator));if(this.$validator||!t.inject||n||(this.$validator=new ft(vt(),this)),n||this.$validator){if(!n&&this.$validator)this.$options._base.util.defineReactive(this.$validator,"errors",this.$validator.errors);this.$options.computed||(this.$options.computed={}),this.$options.computed[t.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[t.fieldsBagName||"fields"]=function(){return this.$validator.fields.items.reduce((function(t,e){return e.scope?(t["$"+e.scope]||(t["$"+e.scope]={}),t["$"+e.scope][e.name]=e.flags,t):(t[e.name]=e.flags,t)}),{})}}}},beforeDestroy:function(){this.$validator&&this._uid===this.$validator.id&&this.$validator.errors.clear()}};function gt(t,e){return e&&e.$validator?e.$validator.fields.findById(t._veeValidateId):null}var _t={bind:function(t,e,n){var r=n.context.$validator;if(r){var i=Q.generate(t,e,n);r.attach(i)}},inserted:function(t,e,n){var r=gt(t,n.context),i=Q.resolveScope(t,e,n);r&&i!==r.scope&&(r.update({scope:i}),r.updated=!1)},update:function(t,e,n){var r=gt(t,n.context);if(!(!r||r.updated&&u(e.value,e.oldValue))){var i=Q.resolveScope(t,e,n),o=Q.resolveRules(t,e,n);r.update({scope:i,rules:o})}},unbind:function(t,e,n){var r=n.context,i=gt(t,r);i&&r.$validator.detach(i)}},yt=function(t,e,n){void 0===e&&(e={fastExit:!0}),void 0===n&&(n=null),this.errors=new F,this.fields=new ct,this._createFields(t),this.paused=!1,this.fastExit=!!s(e&&e.fastExit)||e.fastExit,this.$vee=n||{_vm:{$nextTick:function(t){return g(t)?t():Promise.resolve()},$emit:function(){},$off:function(){}}}},bt={rules:{configurable:!0},dictionary:{configurable:!0},flags:{configurable:!0},locale:{configurable:!0}},wt={rules:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};wt.rules.get=function(){return et.rules},bt.rules.get=function(){return et.rules},bt.dictionary.get=function(){return B.getDriver()},wt.dictionary.get=function(){return B.getDriver()},bt.flags.get=function(){return this.fields.items.reduce((function(t,e){var n;return e.scope?(t["$"+e.scope]=((n={})[e.name]=e.flags,n),t):(t[e.name]=e.flags,t)}),{})},bt.locale.get=function(){return yt.locale},bt.locale.set=function(t){yt.locale=t},wt.locale.get=function(){return B.getDriver().locale},wt.locale.set=function(t){var e=t!==B.getDriver().locale;B.getDriver().locale=t,e&&yt.$vee&&yt.$vee._vm&&yt.$vee._vm.$emit("localeChanged")},yt.create=function(t,e){return new yt(t,e)},yt.extend=function(t,e,n){void 0===n&&(n={}),yt._guardExtend(t,e);var r=e.options||{};yt._merge(t,{validator:e,paramNames:n&&n.paramNames||e.paramNames,options:x({hasTarget:!1,immediate:!0},r,n||{})})},yt.remove=function(t){et.remove(t)},yt.prototype.localize=function(t,e){yt.localize(t,e)},yt.localize=function(t,e){var n;if(m(t))B.getDriver().merge(t);else{if(e){var r=t||e.name;e=x({},e),B.getDriver().merge(((n={})[r]=e,n))}t&&(yt.locale=t)}},yt.prototype.attach=function(t){var e=this,n={name:t.name,scope:t.scope,persist:!0},r=t.persist?this.fields.find(n):null;r&&(t.flags=r.flags,r.destroy(),this.fields.remove(r));var i=t.initialValue,o=new ut(t);return this.fields.push(o),o.immediate?this.$vee._vm.$nextTick((function(){return e.validate("#"+o.id,i||o.value,{vmId:t.vmId})})):this._validate(o,i||o.value,{initial:!0}).then((function(t){o.flags.valid=t.valid,o.flags.invalid=!t.valid})),o},yt.prototype.flag=function(t,e,n){void 0===n&&(n=null);var r=this._resolveField(t,void 0,n);r&&e&&r.setFlags(e)},yt.prototype.detach=function(t,e,n){var r=g(t.destroy)?t:this._resolveField(t,e,n);r&&(r.persist||(r.destroy(),this.errors.remove(r.name,r.scope,r.vmId),this.fields.remove(r)))},yt.prototype.extend=function(t,e,n){void 0===n&&(n={}),yt.extend(t,e,n)},yt.prototype.reset=function(t){var e=this;return this.$vee._vm.$nextTick().then((function(){return e.$vee._vm.$nextTick()})).then((function(){e.fields.filter(t).forEach((function(n){n.waitFor(null),n.reset(),e.errors.remove(n.name,n.scope,t&&t.vmId)}))}))},yt.prototype.update=function(t,e){var n=e.scope;this._resolveField("#"+t)&&this.errors.update(t,{scope:n})},yt.prototype.remove=function(t){yt.remove(t)},yt.prototype.validate=function(t,e,n){var r=this;void 0===n&&(n={});var i=n.silent,o=n.vmId;if(this.paused)return Promise.resolve(!0);if(s(t))return this.validateScopes({silent:i,vmId:o});if("*"===t)return this.validateAll(void 0,{silent:i,vmId:o});if(/^(.+)\.\*$/.test(t)){var a=t.match(/^(.+)\.\*$/)[1];return this.validateAll(a)}var u=this._resolveField(t);if(!u)return this._handleFieldNotFound(t);i||(u.flags.pending=!0),void 0===e&&(e=u.value);var l=this._validate(u,e);return u.waitFor(l),l.then((function(t){return!i&&u.isWaitingFor(l)&&(u.waitFor(null),r._handleValidationResults([t],o)),t.valid}))},yt.prototype.pause=function(){return this.paused=!0,this},yt.prototype.resume=function(){return this.paused=!1,this},yt.prototype.validateAll=function(t,e){var n=this;void 0===e&&(e={});var r=e.silent,i=e.vmId;if(this.paused)return Promise.resolve(!0);var o=null,a=!1;return"string"==typeof t?o={scope:t,vmId:i}:m(t)?(o=Object.keys(t).map((function(t){return{name:t,vmId:i,scope:null}})),a=!0):o=Array.isArray(t)?t.map((function(t){return"object"==typeof t?Object.assign({vmId:i},t):{name:t,vmId:i}})):{scope:null,vmId:i},Promise.all(this.fields.filter(o).map((function(e){return n._validate(e,a?t[e.name]:e.value)}))).then((function(t){return r||n._handleValidationResults(t,i),t.every((function(t){return t.valid}))}))},yt.prototype.validateScopes=function(t){var e=this;void 0===t&&(t={});var n=t.silent,r=t.vmId;return this.paused?Promise.resolve(!0):Promise.all(this.fields.filter({vmId:r}).map((function(t){return e._validate(t,t.value)}))).then((function(t){return n||e._handleValidationResults(t,r),t.every((function(t){return t.valid}))}))},yt.prototype.verify=function(t,e,n){void 0===n&&(n={});var r={name:n&&n.name||"{field}",rules:d(e),bails:c("bails",n,!0),forceRequired:!1,get isRequired(){return!!this.rules.required||this.forceRequired}},i=Object.keys(r.rules).filter(et.isTargetRule);return i.length&&n&&m(n.values)&&(r.dependencies=i.map((function(t){var e=r.rules[t][0];return{name:t,field:{value:n.values[e]}}}))),this._validate(r,t).then((function(t){var e=[],n={};return t.errors.forEach((function(t){e.push(t.msg),n[t.rule]=t.msg})),{valid:t.valid,errors:e,failedRules:n}}))},yt.prototype.destroy=function(){this.$vee._vm.$off("localeChanged")},yt.prototype._createFields=function(t){var e=this;t&&Object.keys(t).forEach((function(n){var r=x({},{name:n,rules:t[n]});e.attach(r)}))},yt.prototype._getDateFormat=function(t){var e=null;return t.date_format&&Array.isArray(t.date_format)&&(e=t.date_format[0]),e||B.getDriver().getDateFormat(this.locale)},yt.prototype._formatErrorMessage=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r=null);var i=this._getFieldDisplayName(t),o=this._getLocalizedParams(e,r);return B.getDriver().getFieldMessage(this.locale,t.name,e.name,[i,o,n])},yt.prototype._convertParamObjectToArray=function(t,e){if(Array.isArray(t))return t;var n=et.getParamNames(e);return n&&m(t)?n.reduce((function(e,n){return n in t&&e.push(t[n]),e}),[]):t},yt.prototype._getLocalizedParams=function(t,e){void 0===e&&(e=null);var n=this._convertParamObjectToArray(t.params,t.name);return t.options.hasTarget&&n&&n[0]?[e||B.getDriver().getAttribute(this.locale,n[0],n[0])].concat(n.slice(1)):n},yt.prototype._getFieldDisplayName=function(t){return t.alias||B.getDriver().getAttribute(this.locale,t.name,t.name)},yt.prototype._convertParamArrayToObj=function(t,e){var n=et.getParamNames(e);if(!n)return t;if(m(t)){if(n.some((function(e){return-1!==Object.keys(t).indexOf(e)})))return t;t=[t]}return t.reduce((function(t,e,r){return t[n[r]]=e,t}),{})},yt.prototype._test=function(t,e,n){var r=this,i=et.getValidatorMethod(n.name),o=Array.isArray(n.params)?b(n.params):n.params;o||(o=[]);var a=null;if(!i||"function"!=typeof i)return Promise.reject(v("No such validator '"+n.name+"' exists."));if(n.options.hasTarget&&t.dependencies){var s=C(t.dependencies,(function(t){return t.name===n.name}));s&&(a=s.field.alias,o=[s.field.value].concat(o.slice(1)))}else"required"===n.name&&t.rejectsFalse&&(o=o.length?o:[!0]);if(n.options.isDate){var u=this._getDateFormat(t.rules);"date_format"!==n.name&&o.push(u)}var l=i(e,this._convertParamArrayToObj(o,n.name));return g(l.then)?l.then((function(e){var i=!0,o={};return Array.isArray(e)?i=e.every((function(t){return m(t)?t.valid:t})):(i=m(e)?e.valid:e,o=e.data),{valid:i,data:l.data,errors:i?[]:[r._createFieldError(t,n,o,a)]}})):(m(l)||(l={valid:l,data:{}}),{valid:l.valid,data:l.data,errors:l.valid?[]:[this._createFieldError(t,n,l.data,a)]})},yt._merge=function(t,e){var n=e.validator,r=e.options,i=e.paramNames,o=g(n)?n:n.validate;n.getMessage&&B.getDriver().setMessage(yt.locale,t,n.getMessage),et.add(t,{validate:o,options:r,paramNames:i})},yt._guardExtend=function(t,e){if(!g(e)&&!g(e.validate))throw v("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.")},yt.prototype._createFieldError=function(t,e,n,r){var i=this;return{id:t.id,vmId:t.vmId,field:t.name,msg:this._formatErrorMessage(t,e,n,r),rule:e.name,scope:t.scope,regenerate:function(){return i._formatErrorMessage(t,e,n,r)}}},yt.prototype._resolveField=function(t,e,n){if("#"===t[0])return this.fields.findById(t.slice(1));if(!s(e))return this.fields.find({name:t,scope:e,vmId:n});if(O(t,".")){var r=t.split("."),i=r[0],o=r.slice(1),a=this.fields.find({name:o.join("."),scope:i,vmId:n});if(a)return a}return this.fields.find({name:t,scope:null,vmId:n})},yt.prototype._handleFieldNotFound=function(t,e){var n=s(e)?t:(s(e)?"":e+".")+t;return Promise.reject(v('Validating a non-existent field: "'+n+'". Use "attach()" first.'))},yt.prototype._handleValidationResults=function(t,e){var n=this,r=t.map((function(t){return{id:t.id}}));this.errors.removeById(r.map((function(t){return t.id}))),t.forEach((function(t){n.errors.remove(t.field,t.scope,e)}));var i=t.reduce((function(t,e){return t.push.apply(t,e.errors),t}),[]);this.errors.add(i),this.fields.filter(r).forEach((function(e){var n=C(t,(function(t){return t.id===e.id}));e.setFlags({pending:!1,valid:n.valid,validated:!0})}))},yt.prototype._shouldSkip=function(t,e){return!1!==t.bails&&(!(!t.isDisabled||!H().useConstraintAttrs)||!t.isRequired&&(s(e)||""===e||D(e)))},yt.prototype._shouldBail=function(t){return void 0!==t.bails?t.bails:this.fastExit},yt.prototype._validate=function(t,e,n){var r=this;void 0===n&&(n={});var i=n.initial,o=Object.keys(t.rules).filter(et.isRequireRule);if(t.forceRequired=!1,o.forEach((function(n){var i=et.getOptions(n),o=r._test(t,e,{name:n,params:t.rules[n],options:i});if(g(o.then))throw v("Require rules cannot be async");if(!m(o))throw v("Require rules has to return an object (see docs)");!0===o.data.required&&(t.forceRequired=!0)})),this._shouldSkip(t,e))return Promise.resolve({valid:!0,id:t.id,field:t.name,scope:t.scope,errors:[]});var a=[],s=[],u=!1;return g(t.checkValueChanged)&&(t.flags.changed=t.checkValueChanged()),Object.keys(t.rules).filter((function(t){return!i||!et.has(t)||et.isImmediate(t)})).some((function(n){var i=et.getOptions(n),o=r._test(t,e,{name:n,params:t.rules[n],options:i});return g(o.then)?a.push(o):!o.valid&&r._shouldBail(t)?(s.push.apply(s,o.errors),u=!0):a.push(new Promise((function(t){return t(o)}))),u})),u?Promise.resolve({valid:!1,errors:s,id:t.id,field:t.name,scope:t.scope}):Promise.all(a).then((function(e){return e.reduce((function(t,e){var n;return e.valid||(n=t.errors).push.apply(n,e.errors),t.valid=t.valid&&e.valid,t}),{valid:!0,errors:s,id:t.id,field:t.name,scope:t.scope})}))},Object.defineProperties(yt.prototype,bt),Object.defineProperties(yt,wt);var xt=function(t){return m(t)?Object.keys(t).reduce((function(e,n){return e[n]=xt(t[n]),e}),{}):g(t)?t("{0}",["{1}","{2}","{3}"]):t},Lt=function(t,e){this.i18n=t,this.rootKey=e},kt={locale:{configurable:!0}};kt.locale.get=function(){return this.i18n.locale},kt.locale.set=function(t){p("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},Lt.prototype.getDateFormat=function(t){return this.i18n.getDateTimeFormat(t||this.locale)},Lt.prototype.setDateFormat=function(t,e){this.i18n.setDateTimeFormat(t||this.locale,e)},Lt.prototype.getMessage=function(t,e,n){var r=this.rootKey+".messages."+e,i=n;return Array.isArray(n)&&(i=[].concat.apply([],n)),this.i18n.te(r)?this.i18n.t(r,i):this.i18n.te(r,this.i18n.fallbackLocale)?this.i18n.t(r,this.i18n.fallbackLocale,i):this.i18n.t(this.rootKey+".messages._default",i)},Lt.prototype.getAttribute=function(t,e,n){void 0===n&&(n="");var r=this.rootKey+".attributes."+e;return this.i18n.te(r)?this.i18n.t(r):n},Lt.prototype.getFieldMessage=function(t,e,n,r){var i=this.rootKey+".custom."+e+"."+n;return this.i18n.te(i)?this.i18n.t(i,r):this.getMessage(t,n,r)},Lt.prototype.merge=function(t){var e=this;Object.keys(t).forEach((function(n){var r,i=P({},c(n+"."+e.rootKey,e.i18n.messages,{})),o=P(i,function(t){var e={};return t.messages&&(e.messages=xt(t.messages)),t.custom&&(e.custom=xt(t.custom)),t.attributes&&(e.attributes=t.attributes),s(t.dateFormat)||(e.dateFormat=t.dateFormat),e}(t[n]));e.i18n.mergeLocaleMessage(n,((r={})[e.rootKey]=o,r)),o.dateFormat&&e.i18n.setDateTimeFormat(n,o.dateFormat)}))},Lt.prototype.setMessage=function(t,e,n){var r,i;this.merge(((i={})[t]={messages:(r={},r[e]=n,r)},i))},Lt.prototype.setAttribute=function(t,e,n){var r,i;this.merge(((i={})[t]={attributes:(r={},r[e]=n,r)},i))},Object.defineProperties(Lt.prototype,kt);var Tt,Ct,Et,Mt={aggressive:function(){return{on:["input"]}},eager:function(t){return t.errors.length?{on:["input"]}:{on:["change","blur"]}},passive:function(){return{on:[]}},lazy:function(){return{on:["change"]}}},Pt=function(t,e){var n;this.configure(t),Et=this,e&&(Tt=e),this._validator=(n=new yt(null,{fastExit:t&&t.fastExit},this),pt=n,n),this._initVM(this.config),this._initI18n(this.config)},St={i18nDriver:{configurable:!0},config:{configurable:!0}},At={i18nDriver:{configurable:!0},config:{configurable:!0}};Pt.setI18nDriver=function(t,e){B.setDriver(t,e)},Pt.configure=function(t){q(t)},Pt.setMode=function(t,e){if(q({mode:t}),e){if(!g(e))throw new Error("A mode implementation must be a function");Mt[t]=e}},Pt.use=function(t,e){return void 0===e&&(e={}),g(t)?Et?void t({Validator:yt,ErrorBag:F,Rules:yt.rules},e):(Ct||(Ct=[]),void Ct.push({plugin:t,options:e})):p("The plugin must be a callable function")},Pt.install=function(t,e){Tt&&t===Tt||(Tt=t,Et=new Pt(e),yt.$vee=Et,function(){try{var t=Object.defineProperty({},"passive",{get:function(){ot=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(t){ot=!1}}(),Tt.mixin(mt),Tt.directive("validate",_t),Ct&&(Ct.forEach((function(t){var e=t.plugin,n=t.options;Pt.use(e,n)})),Ct=null))},St.i18nDriver.get=function(){return B.getDriver()},At.i18nDriver.get=function(){return B.getDriver()},St.config.get=function(){return H()},At.config.get=function(){return H()},Pt.prototype._initVM=function(t){var e=this;this._vm=new Tt({data:function(){return{errors:e._validator.errors,fields:e._validator.fields}}})},Pt.prototype._initI18n=function(t){var e=this,n=t.dictionary,r=t.i18n,i=t.i18nRootKey,o=t.locale,a=function(){n&&e.i18nDriver.merge(n),e._validator.errors.regenerate()};r?(Pt.setI18nDriver("i18n",new Lt(r,i)),r._vm.$watch("locale",a)):"undefined"!=typeof window&&this._vm.$on("localeChanged",a),n&&this.i18nDriver.merge(n),o&&!r&&this._validator.localize(o)},Pt.prototype.configure=function(t){q(t)},Object.defineProperties(Pt.prototype,St),Object.defineProperties(Pt,At),Pt.mixin=mt,Pt.directive=_t,Pt.Validator=yt,Pt.ErrorBag=F;var Ot,Dt={name:"en",messages:{_default:function(t){return"The "+t+" value is not valid"},after:function(t,e){var n=e[0];return"The "+t+" must be after "+(e[1]?"or equal to ":"")+n},alpha:function(t){return"The "+t+" field may only contain alphabetic characters"},alpha_dash:function(t){return"The "+t+" field may contain alpha-numeric characters as well as dashes and underscores"},alpha_num:function(t){return"The "+t+" field may only contain alpha-numeric characters"},alpha_spaces:function(t){return"The "+t+" field may only contain alphabetic characters as well as spaces"},before:function(t,e){var n=e[0];return"The "+t+" must be before "+(e[1]?"or equal to ":"")+n},between:function(t,e){return"The "+t+" field must be between "+e[0]+" and "+e[1]},confirmed:function(t){return"The "+t+" confirmation does not match"},credit_card:function(t){return"The "+t+" field is invalid"},date_between:function(t,e){return"The "+t+" must be between "+e[0]+" and "+e[1]},date_format:function(t,e){return"The "+t+" must be in the format "+e[0]},decimal:function(t,e){void 0===e&&(e=[]);var n=e[0];return void 0===n&&(n="*"),"The "+t+" field must be numeric and may contain"+(n&&"*"!==n?" "+n:"")+" decimal points"},digits:function(t,e){return"The "+t+" field must be numeric and contains exactly "+e[0]+" digits"},dimensions:function(t,e){return"The "+t+" field must be "+e[0]+" pixels by "+e[1]+" pixels"},email:function(t){return"The "+t+" field must be a valid email"},excluded:function(t){return"The "+t+" field must be a valid value"},ext:function(t){return"The "+t+" field must be a valid file"},image:function(t){return"The "+t+" field must be an image"},included:function(t){return"The "+t+" field must be a valid value"},integer:function(t){return"The "+t+" field must be an integer"},ip:function(t){return"The "+t+" field must be a valid ip address"},ip_or_fqdn:function(t){return"The "+t+" field must be a valid ip address or FQDN"},length:function(t,e){var n=e[0],r=e[1];return r?"The "+t+" length must be between "+n+" and "+r:"The "+t+" length must be "+n},max:function(t,e){return"The "+t+" field may not be greater than "+e[0]+" characters"},max_value:function(t,e){return"The "+t+" field must be "+e[0]+" or less"},mimes:function(t){return"The "+t+" field must have a valid file type"},min:function(t,e){return"The "+t+" field must be at least "+e[0]+" characters"},min_value:function(t,e){return"The "+t+" field must be "+e[0]+" or more"},numeric:function(t){return"The "+t+" field may only contain numeric characters"},regex:function(t){return"The "+t+" field format is invalid"},required:function(t){return"The "+t+" field is required"},required_if:function(t,e){return"The "+t+" field is required when the "+e[0]+" field has this value"},size:function(t,e){return"The "+t+" size must be less than "+function(t){var e=0===(t=1024*Number(t))?0:Math.floor(Math.log(t)/Math.log(1024));return 1*(t/Math.pow(1024,e)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][e]}(e[0])},url:function(t){return"The "+t+" field is not a valid URL"}},attributes:{}};function It(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}"undefined"!=typeof VeeValidate&&VeeValidate.Validator.localize(((Ot={})[Dt.name]=Dt,Ot));var zt=6e4;function jt(t){var e=new Date(t.getTime()),n=e.getTimezoneOffset();e.setSeconds(0,0);var r=e.getTime()%zt;return n*zt+r}var $t=36e5,Nt=6e4,Rt=2,Bt={dateTimeDelimeter:/[T ]/,plainTime:/:/,timeZoneDelimeter:/[Z ]/i,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Ft(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===t)return new Date(NaN);var n=e||{},r=null==n.additionalDigits?Rt:It(n.additionalDigits);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))return new Date(t.getTime());if("number"==typeof t||"[object Number]"===Object.prototype.toString.call(t))return new Date(t);if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var i=function(t){var e,n={},r=t.split(Bt.dateTimeDelimeter);Bt.plainTime.test(r[0])?(n.date=null,e=r[0]):(n.date=r[0],e=r[1],Bt.timeZoneDelimeter.test(n.date)&&(n.date=t.split(Bt.timeZoneDelimeter)[0],e=t.substr(n.date.length,t.length)));if(e){var i=Bt.timezone.exec(e);i?(n.time=e.replace(i[1],""),n.timezone=i[1]):n.time=e}return n}(t),o=function(t,e){var n,r=Bt.YYY[e],i=Bt.YYYYY[e];if(n=Bt.YYYY.exec(t)||i.exec(t)){var o=n[1];return{year:parseInt(o,10),restDateString:t.slice(o.length)}}if(n=Bt.YY.exec(t)||r.exec(t)){var a=n[1];return{year:100*parseInt(a,10),restDateString:t.slice(a.length)}}return{year:null}}(i.date,r),a=o.year,s=function(t,e){if(null===e)return null;var n,r,i,o;if(0===t.length)return(r=new Date(0)).setUTCFullYear(e),r;if(n=Bt.MM.exec(t))return r=new Date(0),i=parseInt(n[1],10)-1,Vt(e,i)?(r.setUTCFullYear(e,i),r):new Date(NaN);if(n=Bt.DDD.exec(t)){r=new Date(0);var a=parseInt(n[1],10);return function(t,e){if(e<1)return!1;var n=qt(t);if(n&&e>366)return!1;if(!n&&e>365)return!1;return!0}(e,a)?(r.setUTCFullYear(e,0,a),r):new Date(NaN)}if(n=Bt.MMDD.exec(t)){r=new Date(0),i=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Vt(e,i,s)?(r.setUTCFullYear(e,i,s),r):new Date(NaN)}if(n=Bt.Www.exec(t))return o=parseInt(n[1],10)-1,Wt(e,o)?Ut(e,o):new Date(NaN);if(n=Bt.WwwD.exec(t)){o=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return Wt(e,o,u)?Ut(e,o,u):new Date(NaN)}return null}(o.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var u,l=s.getTime(),c=0;if(i.time&&(c=function(t){var e,n,r;if(e=Bt.HH.exec(t))return Gt(n=parseFloat(e[1].replace(",",".")))?n%24*$t:NaN;if(e=Bt.HHMM.exec(t))return n=parseInt(e[1],10),r=parseFloat(e[2].replace(",",".")),Gt(n,r)?n%24*$t+r*Nt:NaN;if(e=Bt.HHMMSS.exec(t)){n=parseInt(e[1],10),r=parseInt(e[2],10);var i=parseFloat(e[3].replace(",","."));return Gt(n,r,i)?n%24*$t+r*Nt+1e3*i:NaN}return null}(i.time),isNaN(c)))return new Date(NaN);if(i.timezone){if(u=function(t){var e,n,r;if(e=Bt.timezoneZ.exec(t))return 0;if(e=Bt.timezoneHH.exec(t))return r=parseInt(e[2],10),Yt()?(n=r*$t,"+"===e[1]?-n:n):NaN;if(e=Bt.timezoneHHMM.exec(t)){r=parseInt(e[2],10);var i=parseInt(e[3],10);return Yt(r,i)?(n=r*$t+i*Nt,"+"===e[1]?-n:n):NaN}return 0}(i.timezone),isNaN(u))return new Date(NaN)}else u=jt(new Date(l+c)),u=jt(new Date(l+c+u));return new Date(l+c+u)}return new Date(NaN)}function Ut(t,e,n){e=e||0,n=n||0;var r=new Date(0);r.setUTCFullYear(t,0,4);var i=7*e+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var Zt=[31,28,31,30,31,30,31,31,30,31,30,31],Ht=[31,29,31,30,31,30,31,31,30,31,30,31];function qt(t){return t%400==0||t%4==0&&t%100!=0}function Vt(t,e,n){if(e<0||e>11)return!1;if(null!=n){if(n<1)return!1;var r=qt(t);if(r&&n>Ht[e])return!1;if(!r&&n>Zt[e])return!1}return!0}function Wt(t,e,n){return!(e<0||e>52)&&(null==n||!(n<0||n>6))}function Gt(t,e,n){return(null==t||!(t<0||t>=25))&&((null==e||!(e<0||e>=60))&&(null==n||!(n<0||n>=60)))}function Yt(t,e){return null==e||!(e<0||e>59)}function Xt(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ft(t,e);return!isNaN(n)}var Kt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Jt(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Qt={date:Jt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Jt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Jt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},te={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ee(t){return function(e,n){var r=n||{},i=r.width?String(r.width):t.defaultWidth;return("formatting"===(r.context?String(r.context):"standalone")&&t.formattingValues?t.formattingValues[i]||t.formattingValues[t.defaultFormattingWidth]:t.values[i]||t.values[t.defaultWidth])[t.argumentCallback?t.argumentCallback(e):e]}}function ne(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?c.findIndex((function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}}var re,ie={formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Kt[t]?Kt[t]:1===e?Kt[t].one:Kt[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Qt,formatRelative:function(t,e,n,r){return te[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ee({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ee({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:ee({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ee({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ee({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaulFormattingWidth:"wide"})},match:{ordinalNumber:(re={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},i=n.match(re.matchPattern);if(!i)return null;var o=i[0],a=n.match(re.parsePattern);if(!a)return null;var s=re.valueCallback?re.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:ne({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ne({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ne({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ne({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ne({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},oe=864e5;function ae(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ft(t,e),r=n.getUTCDay(),i=(r<1?7:0)+r-1;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function se(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ft(t,e),r=n.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(r+1,0,4),i.setUTCHours(0,0,0,0);var o=ae(i,e),a=new Date(0);a.setUTCFullYear(r,0,4),a.setUTCHours(0,0,0,0);var s=ae(a,e);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}var ue=6048e5;function le(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ft(t,e),r=ae(n,e).getTime()-function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=se(t,e),r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),ae(r,e)}(n,e).getTime();return Math.round(r/ue)+1}function ce(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:It(i),a=null==n.weekStartsOn?o:It(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Ft(t,n),u=s.getUTCDay(),l=(u=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=new Date(0);l.setUTCFullYear(r+1,0,u),l.setUTCHours(0,0,0,0);var c=ce(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=ce(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}var fe=6048e5;function de(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ft(t,e),r=ce(n,e).getTime()-function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:It(i),a=null==n.firstWeekContainsDate?o:It(n.firstWeekContainsDate),s=he(t,e),u=new Date(0);return u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0),ce(u,e)}(n,e).getTime();return Math.round(r/fe)+1}var pe="midnight",ve="noon",me="morning",ge="afternoon",_e="evening",ye="night",be={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n,r){var i=t.getUTCFullYear(),o=i>0?i:1-i;return"yy"===e?we(o%100,2):"yo"===e?n.ordinalNumber(o,{unit:"year"}):we(o,e.length)},Y:function(t,e,n,r){var i=he(t,r),o=i>0?i:1-i;return"YY"===e?we(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):we(o,e.length)},R:function(t,e,n,r){return we(se(t,r),e.length)},u:function(t,e,n,r){return we(t.getUTCFullYear(),e.length)},Q:function(t,e,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return we(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return we(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n,r){var i=t.getUTCMonth();switch(e){case"M":return String(i+1);case"MM":return we(i+1,2);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n,r){var i=t.getUTCMonth();switch(e){case"L":return String(i+1);case"LL":return we(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=de(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):we(i,e.length)},I:function(t,e,n,r){var i=le(t,r);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):we(i,e.length)},d:function(t,e,n,r){var i=t.getUTCDate();return"do"===e?n.ordinalNumber(i,{unit:"date"}):we(i,e.length)},D:function(t,e,n,r){var i=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ft(t,e),r=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var i=r-n.getTime();return Math.floor(i/oe)+1}(t,r);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):we(i,e.length)},E:function(t,e,n,r){var i=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return we(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return we(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n,r){var i=t.getUTCDay(),o=0===i?7:i;switch(e){case"i":return String(o);case"ii":return we(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?ve:0===i?pe:i/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?_e:i>=12?ge:i>=4?me:ye,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n,r){var i=t.getUTCHours()%12;return 0===i&&(i=12),"ho"===e?n.ordinalNumber(i,{unit:"hour"}):we(i,e.length)},H:function(t,e,n,r){var i=t.getUTCHours();return"Ho"===e?n.ordinalNumber(i,{unit:"hour"}):we(i,e.length)},K:function(t,e,n,r){var i=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):we(i,e.length)},k:function(t,e,n,r){var i=t.getUTCHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):we(i,e.length)},m:function(t,e,n,r){var i=t.getUTCMinutes();return"mo"===e?n.ordinalNumber(i,{unit:"minute"}):we(i,e.length)},s:function(t,e,n,r){var i=t.getUTCSeconds();return"so"===e?n.ordinalNumber(i,{unit:"second"}):we(i,e.length)},S:function(t,e,n,r){var i=e.length,o=t.getUTCMilliseconds();return we(Math.floor(o*Math.pow(10,i-3)),i)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Le(i);case"XXXX":case"XX":return xe(i);case"XXXXX":case"XXX":default:return xe(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Le(i);case"xxxx":case"xx":return xe(i);case"xxxxx":case"xxx":default:return xe(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ke(i,":");case"OOOO":default:return"GMT"+xe(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ke(i,":");case"zzzz":default:return"GMT"+xe(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return we(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return we((r._originalDate||t).getTime(),e.length)}};function we(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length0?"-":"+",i=Math.abs(t);return r+we(Math.floor(i/60),2)+n+we(i%60,2)}function Le(t,e){return t%60==0?(t>0?"-":"+")+we(Math.abs(t)/60,2):xe(t,e)}function ke(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+we(o,2)}function Te(t,e,n){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function Ce(t,e,n){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var Ee={p:Ce,P:function(t,e,n){var r,i=t.match(/(P+)(p+)?/),o=i[1],a=i[2];if(!a)return Te(t,e);switch(o){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"})}return r.replace("{{date}}",Te(o,e)).replace("{{time}}",Ce(a,e))}};function Me(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Ft(t,n).getTime(),i=It(e);return new Date(r+i)}(t,-It(e),n)}var Pe=["D","DD","YY","YYYY"];function Se(t){return-1!==Pe.indexOf(t)}function Ae(t){throw new RangeError("`options.awareOfUnicodeTokens` must be set to `true` to use `"+t+"` token; see: https://git.io/fxCyr")}var Oe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,De=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ie=/^'(.*?)'?$/,ze=/''/g;function je(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||ie,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:It(a),u=null==i.firstWeekContainsDate?s:It(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=o.options&&o.options.weekStartsOn,c=null==l?0:It(l),h=null==i.weekStartsOn?c:It(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var f=Ft(t,i);if(!Xt(f,i))return"Invalid Date";var d=Me(f,jt(f),i),p={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f};return r.match(De).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Ee[e])(t,o.formatLong,p):t})).join("").match(Oe).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return t.match(Ie)[1].replace(ze,"'");var n=be[e];return n?(!i.awareOfUnicodeTokens&&Se(t)&&Ae(t),n(d,t,o.localize,p)):t})).join("")}function $e(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Ft(t,n),i=Ft(e,n);return r.getTime()>i.getTime()}function Ne(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Ft(t,n),i=Ft(e,n);return r.getTime()=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Ft(t,n),l=It(e),c=((l%7+7)%70,i=r?e:1-e;if(i<=50)n=t||100;else{var o=i+50;n=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return r?n:1-n}var rn=[31,28,31,30,31,30,31,31,30,31,30,31],on=[31,29,31,30,31,30,31,31,30,31,30,31];function an(t){return t%400==0||t%4==0&&t%100!=0}var sn={G:{priority:140,parse:function(t,e,n,r){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}},set:function(t,e,n){return t.setUTCFullYear(1===e?10:-9,0,1),t.setUTCHours(0,0,0,0),t}},y:{priority:130,parse:function(t,e,n,r){var i=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Qe(4,t,i);case"yo":return n.ordinalNumber(t,{unit:"year",valueCallback:i});default:return Qe(e.length,t,i)}},validate:function(t,e,n){return e.isTwoDigitYear||e.year>0},set:function(t,e,n){var r=he(t,n);if(e.isTwoDigitYear){var i=nn(e.year,r);return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}var o=r>0?e.year:1-e.year;return t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t}},Y:{priority:130,parse:function(t,e,n,r){var i=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Qe(4,t,i);case"Yo":return n.ordinalNumber(t,{unit:"year",valueCallback:i});default:return Qe(e.length,t,i)}},validate:function(t,e,n){return e.isTwoDigitYear||e.year>0},set:function(t,e,n){var r=t.getUTCFullYear();if(e.isTwoDigitYear){var i=nn(e.year,r);return t.setUTCFullYear(i,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),ce(t,n)}var o=r>0?e.year:1-e.year;return t.setUTCFullYear(o,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),ce(t,n)}},R:{priority:130,parse:function(t,e,n,r){return tn("R"===e?4:e.length,t)},set:function(t,e,n){var r=new Date(0);return r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0),ae(r)}},u:{priority:130,parse:function(t,e,n,r){return tn("u"===e?4:e.length,t)},set:function(t,e,n){return t.setUTCFullYear(e,0,1),t.setUTCHours(0,0,0,0),t}},Q:{priority:120,parse:function(t,e,n,r){switch(e){case"Q":case"QQ":return Qe(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=1&&e<=4},set:function(t,e,n){return t.setUTCMonth(3*(e-1),1),t.setUTCHours(0,0,0,0),t}},q:{priority:120,parse:function(t,e,n,r){switch(e){case"q":case"qq":return Qe(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=1&&e<=4},set:function(t,e,n){return t.setUTCMonth(3*(e-1),1),t.setUTCHours(0,0,0,0),t}},M:{priority:110,parse:function(t,e,n,r){var i=function(t){return t-1};switch(e){case"M":return Xe(He.month,t,i);case"MM":return Qe(2,t,i);case"Mo":return n.ordinalNumber(t,{unit:"month",valueCallback:i});case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n){return t.setUTCMonth(e,1),t.setUTCHours(0,0,0,0),t}},L:{priority:110,parse:function(t,e,n,r){var i=function(t){return t-1};switch(e){case"L":return Xe(He.month,t,i);case"LL":return Qe(2,t,i);case"Lo":return n.ordinalNumber(t,{unit:"month",valueCallback:i});case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n){return t.setUTCMonth(e,1),t.setUTCHours(0,0,0,0),t}},w:{priority:100,parse:function(t,e,n,r){switch(e){case"w":return Xe(He.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return Qe(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=53},set:function(t,e,n){return ce(function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Ft(t,n),i=It(e),o=de(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*o),r}(t,e,n),n)}},I:{priority:100,parse:function(t,e,n,r){switch(e){case"I":return Xe(He.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return Qe(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=53},set:function(t,e,n){return ae(function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Ft(t,n),i=It(e),o=le(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*o),r}(t,e,n),n)}},d:{priority:90,parse:function(t,e,n,r){switch(e){case"d":return Xe(He.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return Qe(e.length,t)}},validate:function(t,e,n){var r=an(t.getUTCFullYear()),i=t.getUTCMonth();return r?e>=1&&e<=on[i]:e>=1&&e<=rn[i]},set:function(t,e,n){return t.setUTCDate(e),t.setUTCHours(0,0,0,0),t}},D:{priority:90,parse:function(t,e,n,r){switch(e){case"D":case"DD":return Xe(He.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return Qe(e.length,t)}},validate:function(t,e,n){return an(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365},set:function(t,e,n){return t.setUTCMonth(0,e),t.setUTCHours(0,0,0,0),t}},E:{priority:90,parse:function(t,e,n,r){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n){return(t=Be(t,e,n)).setUTCHours(0,0,0,0),t}},e:{priority:90,parse:function(t,e,n,r){var i=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Qe(e.length,t,i);case"eo":return n.ordinalNumber(t,{unit:"day",valueCallback:i});case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n){return(t=Be(t,e,n)).setUTCHours(0,0,0,0),t}},c:{priority:90,parse:function(t,e,n,r){var i=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Qe(e.length,t,i);case"co":return n.ordinalNumber(t,{unit:"day",valueCallback:i});case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n){return(t=Be(t,e,n)).setUTCHours(0,0,0,0),t}},i:{priority:90,parse:function(t,e,n,r){var i=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Qe(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return n.day(t,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(t,{width:"short",context:"formatting",valueCallback:i})||n.day(t,{width:"narrow",context:"formatting",valueCallback:i});case"iiiii":return n.day(t,{width:"narrow",context:"formatting",valueCallback:i});case"iiiiii":return n.day(t,{width:"short",context:"formatting",valueCallback:i})||n.day(t,{width:"narrow",context:"formatting",valueCallback:i});case"iiii":default:return n.day(t,{width:"wide",context:"formatting",valueCallback:i})||n.day(t,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(t,{width:"short",context:"formatting",valueCallback:i})||n.day(t,{width:"narrow",context:"formatting",valueCallback:i})}},validate:function(t,e,n){return e>=1&&e<=7},set:function(t,e,n){return(t=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=It(e);r%7==0&&(r-=7);var i=Ft(t,n),o=((r%7+7)%7<1?7:0)+r-i.getUTCDay();return i.setUTCDate(i.getUTCDate()+o),i}(t,e,n)).setUTCHours(0,0,0,0),t}},a:{priority:80,parse:function(t,e,n,r){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n){return t.setUTCHours(en(e),0,0,0),t}},b:{priority:80,parse:function(t,e,n,r){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n){return t.setUTCHours(en(e),0,0,0),t}},B:{priority:80,parse:function(t,e,n,r){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n){return t.setUTCHours(en(e),0,0,0),t}},h:{priority:70,parse:function(t,e,n,r){switch(e){case"h":return Xe(He.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return Qe(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=12},set:function(t,e,n){var r=t.getUTCHours()>=12;return r&&e<12?t.setUTCHours(e+12,0,0,0):r||12!==e?t.setUTCHours(e,0,0,0):t.setUTCHours(0,0,0,0),t}},H:{priority:70,parse:function(t,e,n,r){switch(e){case"H":return Xe(He.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return Qe(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=23},set:function(t,e,n){return t.setUTCHours(e,0,0,0),t}},K:{priority:70,parse:function(t,e,n,r){switch(e){case"K":return Xe(He.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return Qe(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n){return t.getUTCHours()>=12&&e<12?t.setUTCHours(e+12,0,0,0):t.setUTCHours(e,0,0,0),t}},k:{priority:70,parse:function(t,e,n,r){switch(e){case"k":return Xe(He.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return Qe(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=24},set:function(t,e,n){var r=e<=24?e%24:e;return t.setUTCHours(r,0,0,0),t}},m:{priority:60,parse:function(t,e,n,r){switch(e){case"m":return Xe(He.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return Qe(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=59},set:function(t,e,n){return t.setUTCMinutes(e,0,0),t}},s:{priority:50,parse:function(t,e,n,r){switch(e){case"s":return Xe(He.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return Qe(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=59},set:function(t,e,n){return t.setUTCSeconds(e,0),t}},S:{priority:40,parse:function(t,e,n,r){return Qe(e.length,t,(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))},set:function(t,e,n){return t.setUTCMilliseconds(e),t}},X:{priority:20,parse:function(t,e,n,r){switch(e){case"X":return Ke(qe,t);case"XX":return Ke(Ve,t);case"XXXX":return Ke(We,t);case"XXXXX":return Ke(Ye,t);case"XXX":default:return Ke(Ge,t)}},set:function(t,e,n){return new Date(t.getTime()-e)}},x:{priority:20,parse:function(t,e,n,r){switch(e){case"x":return Ke(qe,t);case"xx":return Ke(Ve,t);case"xxxx":return Ke(We,t);case"xxxxx":return Ke(Ye,t);case"xxx":default:return Ke(Ge,t)}},set:function(t,e,n){return new Date(t.getTime()-e)}},t:{priority:10,parse:function(t,e,n,r){return Je(t)},set:function(t,e,n){return new Date(1e3*e)}},T:{priority:10,parse:function(t,e,n,r){return Je(t)},set:function(t,e,n){return new Date(e)}}},un=20,ln=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,cn=/^'(.*?)'?$/,hn=/''/g,fn=/\S/;function dn(t){var e=new Date(0);return e.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),e}function pn(t,e){if("string"!=typeof t)return Xt(t)?t:null;var n=function(t,e,n,r){if(arguments.length<3)throw new TypeError("3 arguments required, but only "+arguments.length+" present");var i=String(t),o=String(e),a=r||{},s=a.locale||ie;if(!s.match)throw new RangeError("locale must contain match property");var u=s.options&&s.options.firstWeekContainsDate,l=null==u?1:It(u),c=null==a.firstWeekContainsDate?l:It(a.firstWeekContainsDate);if(!(c>=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=s.options&&s.options.weekStartsOn,f=null==h?0:It(h),d=null==a.weekStartsOn?f:It(a.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===o)return""===i?Ft(n,a):new Date(NaN);var p,v={firstWeekContainsDate:c,weekStartsOn:d,locale:s},m=[{priority:un,set:dn,index:0}],g=o.match(ln);for(p=0;p0&&fn.test(i))return new Date(NaN);var x=m.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,n){return n.indexOf(t)===e})).map((function(t){return m.filter((function(e){return e.priority===t})).reverse()})).map((function(t){return t[0]})),L=Ft(n,a);if(isNaN(L))return new Date(NaN);var k=Me(L,jt(L));for(p=0;p=t},Sn={validate:Pn,paramNames:["min","max"]},An={validate:function(t,e){var n=e.targetValue;return String(t)===String(n)},options:{hasTarget:!0},paramNames:["targetValue"]};function On(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Dn(t,e){return t(e={exports:{}},e.exports),e.exports}var In=Dn((function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!("string"==typeof t||t instanceof String)){var e;throw e=null===t?"null":"object"===(e=n(t))&&t.constructor&&t.constructor.hasOwnProperty("name")?t.constructor.name:"a ".concat(e),new TypeError("Expected string but received ".concat(e,"."))}},t.exports=e.default,t.exports.default=e.default}));On(In);var zn=On(Dn((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){(0,n.default)(t);var e=t.replace(/[- ]+/g,"");if(!r.test(e))return!1;for(var i,o,a,s=0,u=e.length-1;u>=0;u--)i=e.substring(u,u+1),o=parseInt(i,10),s+=a&&(o*=2)>=10?o%10+1:o,a=!a;return!(s%10!=0||!e)};var n=function(t){return t&&t.__esModule?t:{default:t}}(In);var r=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14})$/;t.exports=e.default,t.exports.default=e.default}))),jn={validate:function(t){return zn(String(t))}},$n={validate:function(t,e){void 0===e&&(e={});var n=e.min,r=e.max,i=e.inclusivity;void 0===i&&(i="()");var o=e.format;void 0===o&&(o=i,i="()");var a=pn(String(n),o),s=pn(String(r),o),u=pn(String(t),o);return!!(a&&s&&u)&&("()"===i?$e(u,a)&&Ne(u,s):"(]"===i?$e(u,a)&&(Re(u,s)||Ne(u,s)):"[)"===i?Ne(u,s)&&(Re(u,a)||$e(u,a)):Re(u,s)||Re(u,a)||Ne(u,s)&&$e(u,a))},options:{isDate:!0},paramNames:["min","max","inclusivity","format"]},Nn={validate:function(t,e){return!!pn(t,e.format)},options:{isDate:!0},paramNames:["format"]},Rn=function(t,e){void 0===e&&(e={});var n=e.decimals;void 0===n&&(n="*");var r=e.separator;if(void 0===r&&(r="."),s(t)||""===t)return!1;if(Array.isArray(t))return t.every((function(t){return Rn(t,{decimals:n,separator:r})}));if(0===Number(n))return/^-?\d*$/.test(t);if(!new RegExp("^[-+]?\\d*(\\"+r+"\\d"+("*"===n?"+":"{1,"+n+"}")+")?([eE]{1}[-]?\\d+)?$").test(t))return!1;var i=parseFloat(t);return i==i},Bn={validate:Rn,paramNames:["decimals","separator"]},Fn=function(t,e){var n=e[0];if(Array.isArray(t))return t.every((function(t){return Fn(t,[n])}));var r=String(t);return/^[0-9]*$/.test(r)&&r.length===Number(n)},Un={validate:Fn},Zn=/\.(jpg|svg|jpeg|png|bmp|gif)$/i,Hn={validate:function(t,e){var n=e[0],r=e[1],i=w(t).filter((function(t){return Zn.test(t.name)}));return 0!==i.length&&Promise.all(i.map((function(t){return function(t,e,n){var r=window.URL||window.webkitURL;return new Promise((function(i){var o=new Image;o.onerror=function(){return i({valid:!1})},o.onload=function(){return i({valid:o.width===Number(e)&&o.height===Number(n)})},o.src=r.createObjectURL(t)}))}(t,n,r)})))}},qn=Dn((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var n in e)void 0===t[n]&&(t[n]=e[n]);return t},t.exports=e.default,t.exports.default=e.default}));On(qn);var Vn=Dn((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var i,o;(0,n.default)(t),"object"===r(e)?(i=e.min||0,o=e.max):(i=arguments[1],o=arguments[2]);var a=encodeURI(t).split(/%..|./).length-1;return a>=i&&(void 0===o||a<=o)};var n=function(t){return t&&t.__esModule?t:{default:t}}(In);function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=e.default,t.exports.default=e.default}));On(Vn);var Wn=Dn((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,n.default)(t),(e=(0,r.default)(e,o)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));for(var i=t.split("."),a=0;a63)return!1;if(e.require_tld){var s=i.pop();if(!i.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(s))return!1}for(var u,l=0;l1&&void 0!==arguments[1]?arguments[1]:"";(0,n.default)(e);o=String(o);if(!o)return t(e,4)||t(e,6);if("4"===o)return!!r.test(e)&&e.split(".").sort((function(t,e){return t-e}))[3]<=255;if("6"===o){var a=e.split(":"),s=!1,u=t(a[a.length-1],4),l=u?7:8;if(a.length>l)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(a.shift(),a.shift(),s=!0):"::"===e.substr(e.length-2)&&(a.pop(),a.pop(),s=!0);for(var c=0;c0&&c=1:a.length===l}return!1};var n=function(t){return t&&t.__esModule?t:{default:t}}(In);var r=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,i=/^[0-9A-F]{1,4}$/i;t.exports=e.default,t.exports.default=e.default})),Xn=On(Yn),Kn=On(Dn((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if((0,n.default)(t),(e=(0,r.default)(e,u)).require_display_name||e.allow_display_name){var s=t.match(l);if(s)t=s[1];else if(e.require_display_name)return!1}var v=t.split("@"),m=v.pop(),g=v.join("@"),_=m.toLowerCase();if(e.domain_specific_validation&&("gmail.com"===_||"googlemail.com"===_)){var y=(g=g.toLowerCase()).split("+")[0];if(!(0,i.default)(y.replace(".",""),{min:6,max:30}))return!1;for(var b=y.split("."),w=0;w$/i,c=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,h=/^[a-z\d]+$/,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,d=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;t.exports=e.default,t.exports.default=e.default})));var Jn={validate:function(t,e){void 0===e&&(e={});var n=e.multiple;void 0===n&&(n=!1);var r=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===e.indexOf(r)&&(n[r]=t[r]);return n}(e,["multiple"]);n&&!Array.isArray(t)&&(t=String(t).split(",").map((function(t){return t.trim()})));var i=x({},r);return Array.isArray(t)?t.every((function(t){return Kn(String(t),i)})):Kn(String(t),i)}},Qn=function(t,e){return Array.isArray(t)?t.every((function(t){return Qn(t,e)})):b(e).some((function(e){return e==t}))},tr={validate:Qn},er={validate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return!Qn.apply(void 0,t)}},nr={validate:function(t,e){var n=new RegExp(".("+e.join("|")+")$","i");return w(t).every((function(t){return n.test(t.name)}))}},rr={validate:function(t){return(Array.isArray(t)?t:[t]).every((function(t){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(t.name)}))}},ir={validate:function(t){return Array.isArray(t)?t.every((function(t){return/^-?[0-9]+$/.test(String(t))})):/^-?[0-9]+$/.test(String(t))}},or={validate:function(t,e){void 0===e&&(e={});var n=e.version;return void 0===n&&(n=4),s(t)&&(t=""),Array.isArray(t)?t.every((function(t){return Xn(t,n)})):Xn(t,n)},paramNames:["version"]},ar={validate:function(t){return s(t)&&(t=""),Array.isArray(t)?t.every((function(t){return Xn(t,"")||Gn(t)})):Xn(t,"")||Gn(t)}},sr={validate:function(t,e){return void 0===e&&(e=[]),t===e[0]}},ur={validate:function(t,e){return void 0===e&&(e=[]),t!==e[0]}},lr={validate:function(t,e){var n=e[0],r=e[1];return void 0===r&&(r=void 0),!s(t)&&(n=Number(n),"number"==typeof t&&(t=String(t)),t.length||(t=b(t)),function(t,e,n){return void 0===n?t.length===e:(n=Number(n),t.length>=e&&t.length<=n)}(t,n,r))}},cr=function(t,e){var n=e[0];return s(t)?n>=0:Array.isArray(t)?t.every((function(t){return cr(t,[n])})):String(t).length<=n},hr={validate:cr},fr=function(t,e){var n=e[0];return!s(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return fr(t,[n])})):Number(t)<=n)},dr={validate:fr},pr={validate:function(t,e){var n=new RegExp(e.join("|").replace("*",".+")+"$","i");return w(t).every((function(t){return n.test(t.type)}))}},vr=function(t,e){var n=e[0];return!s(t)&&(Array.isArray(t)?t.every((function(t){return vr(t,[n])})):String(t).length>=n)},mr={validate:vr},gr=function(t,e){var n=e[0];return!s(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return gr(t,[n])})):Number(t)>=n)},_r={validate:gr},yr=/^[٠١٢٣٤٥٦٧٨٩]+$/,br=/^[0-9]+$/,wr={validate:function(t){var e=function(t){var e=String(t);return br.test(e)||yr.test(e)};return Array.isArray(t)?t.every(e):e(t)}},xr=function(t,e){var n=e.expression;return"string"==typeof n&&(n=new RegExp(n)),Array.isArray(t)?t.every((function(t){return xr(t,{expression:n})})):n.test(String(t))},Lr={validate:xr,paramNames:["expression"]},kr={validate:function(t,e){void 0===e&&(e=[]);var n=e[0];return void 0===n&&(n=!1),!s(t)&&!D(t)&&((!1!==t||!n)&&!!String(t).trim().length)}},Tr={validate:function(t,e){void 0===e&&(e=[]);var n=e[0],r=e.slice(1).includes(String(n).trim());if(!r)return{valid:!0,data:{required:r}};var i=D(t)||[!1,null,void 0].includes(t);return{valid:!(i=i||!String(t).trim().length),data:{required:r}}},options:{hasTarget:!0,computesRequired:!0}},Cr={validate:function(t,e){var n=e[0];if(isNaN(n))return!1;var r=1024*Number(n);return w(t).every((function(t){return t.size<=r}))}},Er=On(Dn((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if((0,n.default)(t),!t||t.length>=2083||/[\s<>]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;var a,l,h,f,d,p,v,m;if(e=(0,o.default)(e,s),v=t.split("#"),t=v.shift(),v=t.split("?"),t=v.shift(),(v=t.split("://")).length>1){if(a=v.shift().toLowerCase(),e.require_valid_protocol&&-1===e.protocols.indexOf(a))return!1}else{if(e.require_protocol)return!1;if("//"===t.substr(0,2)){if(!e.allow_protocol_relative_urls)return!1;v[0]=t.substr(2)}}if(""===(t=v.join("://")))return!1;if(v=t.split("/"),""===(t=v.shift())&&!e.require_host)return!0;if((v=t.split("@")).length>1){if(e.disallow_auth)return!1;if((l=v.shift()).indexOf(":")>=0&&l.split(":").length>2)return!1}f=v.join("@"),p=null,m=null;var g=f.match(u);g?(h="",m=g[1],p=g[2]||null):(v=f.split(":"),h=v.shift(),v.length&&(p=v.join(":")));if(null!==p&&(d=parseInt(p,10),!/^[0-9]+$/.test(p)||d<=0||d>65535))return!1;if(!((0,i.default)(h)||(0,r.default)(h,e)||m&&(0,i.default)(m,6)))return!1;if(h=h||m,e.host_whitelist&&!c(h,e.host_whitelist))return!1;if(e.host_blacklist&&c(h,e.host_blacklist))return!1;return!0};var n=a(In),r=a(Wn),i=a(Yn),o=a(qn);function a(t){return t&&t.__esModule?t:{default:t}}var s={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},u=/^\[([^\]]+)\](?::([0-9]+))?$/;function l(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function c(t,e){for(var n=0;n0&&this.syncValue(e[0]),this.validateSilent().then((function(e){return t.applyResult(e),e}))},validateSilent:function(){var t,e,n=this;return this.setFlags({pending:!0}),Or.verify(this.value,this.rules,{name:this.name,values:(t=this,e=t.$_veeObserver.refs,t.fieldDeps.reduce((function(t,n){return e[n]?(t[n]=e[n].value,t):t}),{})),bails:this.bails}).then((function(t){return n.setFlags({pending:!1}),n.isRequired||n.setFlags({valid:t.valid,invalid:!t.valid}),t}))},applyResult:function(t){var e=t.errors,n=t.failedRules;this.messages=e,this.failedRules=x({},n),this.setFlags({valid:!e.length,changed:this.value!==this.initialValue,invalid:!!e.length,validated:!0})},registerField:function(){Or||(Or=vt()||new yt(null,{fastExit:H().fastExit})),function(t){s(t.id)&&t.id===t.vid&&(t.id=Dr,Dr++);var e=t.id,n=t.vid;if(t.isDeactivated||e===n&&t.$_veeObserver.refs[e])return;e!==n&&t.$_veeObserver.refs[e]===t&&t.$_veeObserver.unsubscribe({vid:e});t.$_veeObserver.subscribe(t),t.id=n}(this)}}};function zr(t){return{errors:t.messages,flags:t.flags,classes:t.classes,valid:t.isValid,failedRules:t.failedRules,reset:function(){return t.reset()},validate:function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.validate.apply(t,e)},aria:{"aria-invalid":t.flags.invalid?"true":"false","aria-required":t.isRequired?"true":"false"}}}function jr(t){return(g(t.mode)?t.mode:Mt[t.mode])({errors:t.messages,value:t.value,flags:t.flags})}function $r(t){this.initialized||(this.initialValue=t.value);var e=function(t,e){return!(t._ignoreImmediate||!t.immediate)||(t.value!==e.value||(!!t._needsValidation||!t.initialized&&void 0===e.value))}(this,t);this._needsValidation=!1,this.value=t.value,this._ignoreImmediate=!0,e&&this.validateSilent().then(this.immediate||this.flags.validated?this.applyResult:function(t){return t})}function Nr(t){var e=t.$veeHandler,n=jr(t);return e&&t.$veeDebounce===t.debounce||(e=h((function(){t.$nextTick((function(){var e=t.validateSilent();t._pendingValidation=e,e.then((function(n){e===t._pendingValidation&&(t.applyResult(n),t._pendingValidation=null)}))}))}),n.debounce||t.debounce),t.$veeHandler=e,t.$veeDebounce=t.debounce),{onInput:function(e){t.syncValue(e),t.setFlags({dirty:!0,pristine:!1})},onBlur:function(){t.setFlags({touched:!0,untouched:!1})},onValidate:e}}function Rr(t){var e=V(t);this._inputEventName=this._inputEventName||K(t,e),$r.call(this,e);var n=Nr(this),r=n.onInput,i=n.onBlur,o=n.onValidate;X(t,this._inputEventName,r),X(t,"blur",i),this.normalizedEvents.forEach((function(e){X(t,e,o)})),this.initialized=!0}var Br={pristine:"every",dirty:"some",touched:"some",untouched:"every",valid:"every",invalid:"some",pending:"some",validated:"every"};var Fr=0,Ur={name:"ValidationObserver",provide:function(){return{$_veeObserver:this}},inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver?this.$vnode.context.$_veeObserver:null}}},props:{tag:{type:String,default:"span"},slim:{type:Boolean,default:!1}},data:function(){return{vid:"obs_"+Fr++,refs:{},observers:[],persistedStore:{}}},computed:{ctx:function(){var t=this,e={errors:{},validate:function(e){var n=t.validate(e);return{then:function(t){return n.then((function(e){return e&&g(t)?Promise.resolve(t()):Promise.resolve(e)}))}}},reset:function(){return t.reset()}};return A(this.refs).concat(Object.keys(this.persistedStore).map((function(e){return{vid:e,flags:t.persistedStore[e].flags,messages:t.persistedStore[e].errors}})),this.observers).reduce((function(t,e){return Object.keys(Br).forEach((function(n){var r,i,o=e.flags||e.ctx;n in t?t[n]=(r=t[n],i=o[n],[r,i][Br[n]]((function(t){return t}))):t[n]=o[n]})),t.errors[e.vid]=e.messages||A(e.ctx.errors).reduce((function(t,e){return t.concat(e)}),[]),t}),e)}},created:function(){this.$_veeObserver&&this.$_veeObserver.subscribe(this,"observer")},activated:function(){this.$_veeObserver&&this.$_veeObserver.subscribe(this,"observer")},deactivated:function(){this.$_veeObserver&&this.$_veeObserver.unsubscribe(this,"observer")},beforeDestroy:function(){this.$_veeObserver&&this.$_veeObserver.unsubscribe(this,"observer")},render:function(t){var e=this.$slots.default||this.$scopedSlots.default||[];return g(e)&&(e=e(this.ctx)),this.slim?J(t,e):t(this.tag,{on:this.$listeners,attrs:this.$attrs},e)},methods:{subscribe:function(t,e){var n;void 0===e&&(e="provider"),"observer"!==e?(this.refs=Object.assign({},this.refs,((n={})[t.vid]=t,n)),t.persist&&this.persistedStore[t.vid]&&this.restoreProviderState(t)):this.observers.push(t)},unsubscribe:function(t,e){var n=t.vid;void 0===e&&(e="provider"),"provider"===e&&this.removeProvider(n);var r=T(this.observers,(function(t){return t.vid===n}));-1!==r&&this.observers.splice(r,1)},validate:function(t){void 0===t&&(t={silent:!1});var e=t.silent;return Promise.all(A(this.refs).map((function(t){return t[e?"validateSilent":"validate"]().then((function(t){return t.valid}))})).concat(this.observers.map((function(t){return t.validate({silent:e})})))).then((function(t){return t.every((function(t){return t}))}))},reset:function(){var t=this;return Object.keys(this.persistedStore).forEach((function(e){t.$delete(t.persistedStore,e)})),A(this.refs).concat(this.observers).forEach((function(t){return t.reset()}))},restoreProviderState:function(t){var e=this.persistedStore[t.vid];t.setFlags(e.flags),t.applyResult(e),this.$delete(this.persistedStore,t.vid)},removeProvider:function(t){var e,n=this.refs[t];n&&n.persist&&(this.persistedStore=x({},this.persistedStore,((e={})[t]={flags:n.flags,errors:n.messages,failedRules:n.failedRules},e))),this.$delete(this.refs,t)}}};Object.keys(Pr).forEach((function(t){yt.extend(t,Pr[t].validate,x({},Pr[t].options,{paramNames:Pr[t].paramNames}))})),yt.localize({en:Dt});Pt.version="2.2.15",Pt.mapFields=function(t){if(!t)return function(){return Ar(this.$validator.flags)};var e=function(t){return Array.isArray(t)?t.reduce((function(t,e){return O(e,".")?t[e.split(".")[1]]=e:t[e]=e,t}),{}):t}(t);return Object.keys(e).reduce((function(t,n){var r=e[n];return t[n]=function(){if(this.$validator.flags[r])return this.$validator.flags[r];if("*"===e[n])return Ar(this.$validator.flags,!1);if(r.indexOf(".")<=0)return{};var t=r.split("."),i=t[0],o=t.slice(1);return i=this.$validator.flags["$"+i],"*"===(o=o.join("."))&&i?Ar(i):i&&i[o]?i[o]:{}},t}),{})},Pt.ValidationProvider=Ir,Pt.ValidationObserver=Ur,Pt.withValidation=function(t,e){void 0===e&&(e=null);var n=g(t)?t.options:t;n.$__veeInject=!1;var r={name:(n.name||"AnonymousHoc")+"WithValidation",props:x({},Ir.props),data:Ir.data,computed:x({},Ir.computed),methods:x({},Ir.methods),$__veeInject:!1,beforeDestroy:Ir.beforeDestroy,inject:Ir.inject};e||(e=function(t){return t});var i=n.model&&n.model.event||"input";return r.render=function(t){var r;this.registerField();var o=zr(this),a=x({},this.$listeners),s=V(this.$vnode);this._inputEventName=this._inputEventName||K(this.$vnode,s),$r.call(this,s);var u=Nr(this),l=u.onInput,c=u.onBlur,h=u.onValidate;Y(a,i,l),Y(a,"blur",c),this.normalizedEvents.forEach((function(t,e){Y(a,t,h)}));var f,d,p=(G(this.$vnode)||{prop:"value"}).prop,v=x({},this.$attrs,((r={})[p]=s.value,r),e(o));return t(n,{attrs:this.$attrs,props:v,on:a},(f=this.$slots,d=this.$vnode.context,Object.keys(f).reduce((function(t,e){return f[e].forEach((function(t){t.context||(f[e].context=d,t.data||(t.data={}),t.data.slot=e)})),t.concat(f[e])}),[])))},r},e.a=Pt},function(t,e,n){t.exports=n(24)},function(t,e,n){"use strict";(function(e,n){var r=Object.freeze({});function i(t){return null==t}function o(t){return null!=t}function a(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function u(t){return null!==t&&"object"==typeof t}var l=Object.prototype.toString;function c(t){return"[object Object]"===l.call(t)}function h(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return o(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||c(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function p(t){var e=parseFloat(t);return isNaN(e)?t:e}function v(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function b(t,e){return y.call(t,e)}function w(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var x=/-(\w)/g,L=w((function(t){return t.replace(x,(function(t,e){return e?e.toUpperCase():""}))})),k=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),T=/\B([A-Z])/g,C=w((function(t){return t.replace(T,"-$1").toLowerCase()})),E=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function M(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function P(t,e){for(var n in e)t[n]=e[n];return t}function S(t){for(var e={},n=0;n0,J=Y&&Y.indexOf("edge/")>0,Q=(Y&&Y.indexOf("android"),Y&&/iphone|ipad|ipod|ios/.test(Y)||"ios"===G),tt=(Y&&/chrome\/\d+/.test(Y),Y&&/phantomjs/.test(Y),Y&&Y.match(/firefox\/(\d+)/)),et={}.watch,nt=!1;if(V)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener("test-passive",null,rt)}catch(r){}var it=function(){return void 0===Z&&(Z=!V&&!W&&void 0!==e&&e.process&&"server"===e.process.env.VUE_ENV),Z},ot=V&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function at(t){return"function"==typeof t&&/native code/.test(t.toString())}var st,ut="undefined"!=typeof Symbol&&at(Symbol)&&"undefined"!=typeof Reflect&&at(Reflect.ownKeys);st="undefined"!=typeof Set&&at(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var lt=A,ct=0,ht=function(){this.id=ct++,this.subs=[]};ht.prototype.addSub=function(t){this.subs.push(t)},ht.prototype.removeSub=function(t){_(this.subs,t)},ht.prototype.depend=function(){ht.target&&ht.target.addDep(this)},ht.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e-1)if(o&&!b(i,"default"))a=!1;else if(""===a||a===C(t)){var u=Ft(String,i.type);(u<0||s0&&(ce((u=t(u,(n||"")+"_"+r))[0])&&ce(c)&&(h[l]=_t(c.text+u[0].text),u.shift()),h.push.apply(h,u)):s(u)?ce(c)?h[l]=_t(c.text+u):""!==u&&h.push(_t(u)):ce(u)&&ce(c)?h[l]=_t(c.text+u.text):(a(e._isVList)&&o(u.tag)&&i(u.key)&&o(n)&&(u.key="__vlist"+n+"_"+r+"__"),h.push(u)));return h}(t):void 0}function ce(t){return o(t)&&o(t.text)&&!1===t.isComment}function he(t,e){if(t){for(var n=Object.create(null),r=ut?Reflect.ownKeys(t):Object.keys(t),i=0;i0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==r&&s===n.$key&&!o&&!n.$hasNormal)return n;for(var u in i={},t)t[u]&&"$"!==u[0]&&(i[u]=ve(e,u,t[u]))}else i={};for(var l in e)l in i||(i[l]=me(e,l));return t&&Object.isExtensible(t)&&(t._normalized=i),U(i,"$stable",a),U(i,"$key",s),U(i,"$hasNormal",o),i}function ve(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:le(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function me(t,e){return function(){return t[e]}}function ge(t,e){var n,r,i,a,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,i=t.length;rdocument.createEvent("Event").timeStamp&&(cn=function(){return hn.now()})}function fn(){var t,e;for(ln=cn(),sn=!0,nn.sort((function(t,e){return t.id-e.id})),un=0;unun&&nn[n].id>t.id;)n--;nn.splice(n+1,0,t)}else nn.push(t);an||(an=!0,ee(fn))}}(this)},pn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||u(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){Ut(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},pn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},pn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},pn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||_(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var vn={enumerable:!0,configurable:!0,get:A,set:A};function mn(t,e,n){vn.get=function(){return this[e][n]},vn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,vn)}var gn={lazy:!0};function _n(t,e,n){var r=!it();"function"==typeof n?(vn.get=r?yn(e):bn(n),vn.set=A):(vn.get=n.get?r&&!1!==n.cache?yn(e):bn(n.get):A,vn.set=n.set||A),Object.defineProperty(t,e,vn)}function yn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ht.target&&e.depend(),e.value}}function bn(t){return function(){return t.call(this,this)}}function wn(t,e,n,r){return c(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}var xn=0;function Ln(t){var e=t.options;if(t.super){var n=Ln(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var i in n)n[i]!==r[i]&&(e||(e={}),e[i]=n[i]);return e}(t);r&&P(t.extendOptions,r),(e=t.options=jt(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function kn(t){this._init(t)}function Tn(t){return t&&(t.Ctor.options.name||t.tag)}function Cn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,"[object RegExp]"===l.call(n)&&t.test(e));var n}function En(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=Tn(a.componentOptions);s&&!e(s)&&Mn(n,o,r,i)}}}function Mn(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,_(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=xn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=jt(Ln(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Xe(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,i=n&&n.context;t.$slots=fe(e._renderChildren,i),t.$scopedSlots=r,t._c=function(e,n,r,i){return Fe(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Fe(t,e,n,r,i,!0)};var o=n&&n.data;Et(t,"$attrs",o&&o.attrs||r,null,!0),Et(t,"$listeners",e._parentListeners||r,null,!0)}(e),en(e,"beforeCreate"),function(t){var e=he(t.$options.inject,t);e&&(kt(!1),Object.keys(e).forEach((function(n){Et(t,n,e[n])})),kt(!0))}(e),function(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[];t.$parent&&kt(!1);var o=function(o){i.push(o);var a=Nt(o,e,n,t);Et(r,o,a),o in t||mn(t,"_props",o)};for(var a in e)o(a);kt(!0)}(t,e.props),e.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?A:E(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;c(e=t._data="function"==typeof e?function(t,e){dt();try{return t.call(e,e)}catch(t){return Ut(t,e,"data()"),{}}finally{pt()}}(e,t):e||{})||(e={});for(var n,r=Object.keys(e),i=t.$options.props,o=(t.$options.methods,r.length);o--;){var a=r[o];i&&b(i,a)||(void 0,36!==(n=(a+"").charCodeAt(0))&&95!==n&&mn(t,"_data",a))}Ct(e,!0)}(t):Ct(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=it();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;r||(n[i]=new pn(t,a||A,A,gn)),i in t||_n(t,i,o)}}(t,e.computed),e.watch&&e.watch!==et&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i1?M(e):e;for(var n=M(arguments,1),r='event handler for "'+t+'"',i=0,o=e.length;iparseInt(this.max)&&Mn(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:lt,extend:P,mergeOptions:jt,defineReactive:Et},t.set=Mt,t.delete=Pt,t.nextTick=ee,t.observable=function(t){return Ct(t),t},t.options=Object.create(null),N.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,P(t.options.components,Sn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=M(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=jt(this.options,t),this}}(t),function(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name,a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=jt(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)mn(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)_n(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,N.forEach((function(t){a[t]=n[t]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=P({},a.options),i[r]=a,a}}(t),function(t){N.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(kn),Object.defineProperty(kn.prototype,"$isServer",{get:it}),Object.defineProperty(kn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(kn,"FunctionalRenderContext",{value:Oe}),kn.version="2.6.10";var An=v("style,class"),On=v("input,textarea,option,select,progress"),Dn=function(t,e,n){return"value"===n&&On(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},In=v("contenteditable,draggable,spellcheck"),zn=v("events,caret,typing,plaintext-only"),jn=function(t,e){return Fn(e)||"false"===e?"false":"contenteditable"===t&&zn(e)?e:"true"},$n=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Nn="http://www.w3.org/1999/xlink",Rn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Bn=function(t){return Rn(t)?t.slice(6,t.length):""},Fn=function(t){return null==t||!1===t};function Un(t,e){return{staticClass:Zn(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Zn(t,e){return t?e?t+" "+e:t:e||""}function Hn(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,i=t.length;r-1?vr(t,e,n):$n(e)?Fn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):In(e)?t.setAttribute(e,jn(e,n)):Rn(e)?Fn(n)?t.removeAttributeNS(Nn,Bn(e)):t.setAttributeNS(Nn,e,n):vr(t,e,n)}function vr(t,e,n){if(Fn(n))t.removeAttribute(e);else{if(X&&!K&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var mr={create:dr,update:dr};function gr(t,e){var n=e.elm,r=e.data,a=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(a)||i(a.staticClass)&&i(a.class)))){var s=function(t){for(var e=t.data,n=t,r=t;o(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=Un(r.data,e));for(;o(n=n.parent);)n&&n.data&&(e=Un(e,n.data));return function(t,e){return o(t)||o(e)?Zn(t,Hn(e)):""}(e.staticClass,e.class)}(e),u=n._transitionClasses;o(u)&&(s=Zn(s,Hn(u))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var _r,yr,br,wr,xr,Lr,kr={create:gr,update:gr},Tr=/[\w).+\-_$\]]/;function Cr(t){var e,n,r,i,o,a=!1,s=!1,u=!1,l=!1,c=0,h=0,f=0,d=0;for(r=0;r=0&&" "===(v=t.charAt(p));p--);v&&Tr.test(v)||(l=!0)}}else void 0===i?(d=r+1,i=t.slice(0,r).trim()):m();function m(){(o||(o=[])).push(t.slice(d,r).trim()),d=r+1}if(void 0===i?i=t.slice(0,r).trim():0!==d&&m(),o)for(r=0;r-1?{exp:t.slice(0,wr),key:'"'+t.slice(wr+1)+'"'}:{exp:t,key:null};for(yr=t,wr=xr=Lr=0;!Zr();)Hr(br=Ur())?Vr(br):91===br&&qr(br);return{exp:t.slice(0,xr),key:t.slice(xr+1,Lr)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function Ur(){return yr.charCodeAt(++wr)}function Zr(){return wr>=_r}function Hr(t){return 34===t||39===t}function qr(t){var e=1;for(xr=wr;!Zr();)if(Hr(t=Ur()))Vr(t);else if(91===t&&e++,93===t&&e--,0===e){Lr=wr;break}}function Vr(t){for(var e=t;!Zr()&&(t=Ur())!==e;);}var Wr,Gr="__r",Yr="__c";function Xr(t,e,n){var r=Wr;return function i(){null!==e.apply(null,arguments)&&Qr(t,i,n,r)}}var Kr=Wt&&!(tt&&Number(tt[1])<=53);function Jr(t,e,n,r){if(Kr){var i=ln,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=i||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}Wr.addEventListener(t,e,nt?{capture:n,passive:r}:n)}function Qr(t,e,n,r){(r||Wr).removeEventListener(t,e._wrapper||e,n)}function ti(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};Wr=e.elm,function(t){if(o(t[Gr])){var e=X?"change":"input";t[e]=[].concat(t[Gr],t[e]||[]),delete t[Gr]}o(t[Yr])&&(t.change=[].concat(t[Yr],t.change||[]),delete t[Yr])}(n),ae(n,r,Jr,Qr,Xr,e.context),Wr=void 0}}var ei,ni={create:ti,update:ti};function ri(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,a=e.elm,s=t.data.domProps||{},u=e.data.domProps||{};for(n in o(u.__ob__)&&(u=e.data.domProps=P({},u)),s)n in u||(a[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var l=i(r)?"":String(r);ii(a,l)&&(a.value=l)}else if("innerHTML"===n&&Wn(a.tagName)&&i(a.innerHTML)){(ei=ei||document.createElement("div")).innerHTML=""+r+"";for(var c=ei.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}else if(r!==s[n])try{a[n]=r}catch(t){}}}}function ii(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return p(n)!==p(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var oi={create:ri,update:ri},ai=w((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function si(t){var e=ui(t.style);return t.staticStyle?P(t.staticStyle,e):e}function ui(t){return Array.isArray(t)?S(t):"string"==typeof t?ai(t):t}var li,ci=/^--/,hi=/\s*!important$/,fi=function(t,e,n){if(ci.test(e))t.style.setProperty(e,n);else if(hi.test(n))t.style.setProperty(C(e),n.replace(hi,""),"important");else{var r=pi(e);if(Array.isArray(n))for(var i=0,o=n.length;i-1?e.split(gi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function yi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(gi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function bi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&P(e,wi(t.name||"v")),P(e,t),e}return"string"==typeof t?wi(t):void 0}}var wi=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),xi=V&&!K,Li="transition",ki="animation",Ti="transition",Ci="transitionend",Ei="animation",Mi="animationend";xi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ti="WebkitTransition",Ci="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ei="WebkitAnimation",Mi="webkitAnimationEnd"));var Pi=V?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Si(t){Pi((function(){Pi(t)}))}function Ai(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),_i(t,e))}function Oi(t,e){t._transitionClasses&&_(t._transitionClasses,e),yi(t,e)}function Di(t,e,n){var r=zi(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Li?Ci:Mi,u=0,l=function(){t.removeEventListener(s,c),n()},c=function(e){e.target===t&&++u>=a&&l()};setTimeout((function(){u0&&(n=Li,c=a,h=o.length):e===ki?l>0&&(n=ki,c=l,h=u.length):h=(n=(c=Math.max(a,l))>0?a>l?Li:ki:null)?n===Li?o.length:u.length:0,{type:n,timeout:c,propCount:h,hasTransform:n===Li&&Ii.test(r[Ti+"Property"])}}function ji(t,e){for(;t.length1}function Ui(t,e){!0!==e.data.show&&Ni(e)}var Zi=function(t){var e,n,r={},u=t.modules,l=t.nodeOps;for(e=0;ep?y(t,i(n[g+1])?null:n[g+1].elm,n,d,g,r):d>g&&w(0,e,f,p)}(f,v,g,n,c):o(g)?(o(t.text)&&l.setTextContent(f,""),y(f,null,g,0,g.length-1,n)):o(v)?w(0,v,0,v.length-1):o(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),o(p)&&o(d=p.hook)&&o(d=d.postpatch)&&d(t,e)}}}function T(t,e,n){if(a(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==o&&(a.selected=o);else if(I(Gi(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Wi(t,e){return e.every((function(e){return!I(e,t)}))}function Gi(t){return"_value"in t?t._value:t.value}function Yi(t){t.target.composing=!0}function Xi(t){t.target.composing&&(t.target.composing=!1,Ki(t.target,"input"))}function Ki(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Ji(t){return!t.componentInstance||t.data&&t.data.transition?t:Ji(t.componentInstance._vnode)}var Qi={model:Hi,show:{bind:function(t,e,n){var r=e.value,i=(n=Ji(n)).data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,Ni(n,(function(){t.style.display=o}))):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Ji(n)).data&&n.data.transition?(n.data.show=!0,r?Ni(n,(function(){t.style.display=t.__vOriginalDisplay})):Ri(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}}},to={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function eo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?eo(Ve(e.children)):t}function no(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[L(o)]=i[o];return e}function ro(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var io=function(t){return t.tag||qe(t)},oo=function(t){return"show"===t.name},ao={name:"transition",props:to,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(io)).length){var r=this.mode,i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var o=eo(i);if(!o)return i;if(this._leaving)return ro(t,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var u=(o.data||(o.data={})).transition=no(this),l=this._vnode,c=eo(l);if(o.data.directives&&o.data.directives.some(oo)&&(o.data.show=!0),c&&c.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(o,c)&&!qe(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var h=c.data.transition=P({},u);if("out-in"===r)return this._leaving=!0,se(h,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),ro(t,i);if("in-out"===r){if(qe(o))return l;var f,d=function(){f()};se(u,"afterEnter",d),se(u,"enterCancelled",d),se(h,"delayLeave",(function(t){f=t}))}}return i}}},so=P({tag:String,moveClass:String},to);function uo(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function lo(t){t.data.newPos=t.elm.getBoundingClientRect()}function co(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete so.mode;var ho={Transition:ao,TransitionGroup:{props:so,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var i=Je(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,i(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=no(this),s=0;s-1?Xn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Xn[t]=/HTMLUnknownElement/.test(e.toString())},P(kn.options.directives,Qi),P(kn.options.components,ho),kn.prototype.__patch__=V?Zi:A,kn.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=gt),en(t,"beforeMount"),r=function(){t._update(t._render(),n)},new pn(t,r,A,{before:function(){t._isMounted&&!t._isDestroyed&&en(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,en(t,"mounted")),t}(this,t=t&&V?Jn(t):void 0,e)},V&&setTimeout((function(){B.devtools&&ot&&ot.emit("init",kn)}),0);var fo,po=/\{\{((?:.|\r?\n)+?)\}\}/g,vo=/[-.*+?^${}()|[\]\/\\]/g,mo=w((function(t){var e=t[0].replace(vo,"\\$&"),n=t[1].replace(vo,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")})),go={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=$r(t,"class");n&&(t.staticClass=JSON.stringify(n));var r=jr(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}},_o={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=$r(t,"style");n&&(t.staticStyle=JSON.stringify(ai(n)));var r=jr(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},yo=v("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),bo=v("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wo=v("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),xo=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Lo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ko="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+F.source+"]*",To="((?:"+ko+"\\:)?"+ko+")",Co=new RegExp("^<"+To),Eo=/^\s*(\/?)>/,Mo=new RegExp("^<\\/"+To+"[^>]*>"),Po=/^]+>/i,So=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},zo=/&(?:lt|gt|quot|amp|#39);/g,jo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,$o=v("pre,textarea",!0),No=function(t,e){return t&&$o(t)&&"\n"===e[0]};function Ro(t,e){var n=e?jo:zo;return t.replace(n,(function(t){return Io[t]}))}var Bo,Fo,Uo,Zo,Ho,qo,Vo,Wo,Go=/^@|^v-on:/,Yo=/^v-|^@|^:/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Ko=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Jo=/^\(|\)$/g,Qo=/^\[.*\]$/,ta=/:(.*)$/,ea=/^:|^\.|^v-bind:/,na=/\.[^.\]]+(?=[^\]]*$)/g,ra=/^v-slot(:|$)|^#/,ia=/[\r\n]/,oa=/\s+/g,aa=w((function(t){return(fo=fo||document.createElement("div")).innerHTML=t,fo.textContent})),sa="_empty_";function ua(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:pa(e),rawAttrsMap:{},parent:n,children:[]}}function la(t,e){var n,r;(r=jr(n=t,"key"))&&(n.key=r),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=jr(t,"ref");e&&(t.ref=e,t.refInFor=function(t){for(var e=t;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=$r(t,"scope"),t.slotScope=e||$r(t,"slot-scope")):(e=$r(t,"slot-scope"))&&(t.slotScope=e);var n=jr(t,"slot");if(n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||Ar(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot"))),"template"===t.tag){var r=Nr(t,ra);if(r){var i=fa(r),o=i.name,a=i.dynamic;t.slotTarget=o,t.slotTargetDynamic=a,t.slotScope=r.value||sa}}else{var s=Nr(t,ra);if(s){var u=t.scopedSlots||(t.scopedSlots={}),l=fa(s),c=l.name,h=l.dynamic,f=u[c]=ua("template",[],t);f.slotTarget=c,f.slotTargetDynamic=h,f.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=f,!0})),f.slotScope=s.value||sa,t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=jr(t,"name"))}(t),function(t){var e;(e=jr(t,"is"))&&(t.component=e),null!=$r(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var i=0;i-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),zr(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Fr(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Fr(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Fr(e,"$$c")+"}",null,!0)}(t,r,i);else if("input"===o&&"radio"===a)!function(t,e,n){var r=n&&n.number,i=jr(t,"value")||"null";Sr(t,"checked","_q("+e+","+(i=r?"_n("+i+")":i)+")"),zr(t,"change",Fr(e,i),null,!0)}(t,r,i);else if("input"===o||"textarea"===o)!function(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,u=!o&&"range"!==r,l=o?"change":"range"===r?Gr:"input",c="$event.target.value";s&&(c="$event.target.value.trim()"),a&&(c="_n("+c+")");var h=Fr(e,c);u&&(h="if($event.target.composing)return;"+h),Sr(t,"value","("+e+")"),zr(t,l,h,null,!0),(s||a)&&zr(t,"blur","$forceUpdate()")}(t,r,i);else if(!B.isReservedTag(o))return Br(t,r,i),!1;return!0},text:function(t,e){e.value&&Sr(t,"textContent","_s("+e.value+")",e)},html:function(t,e){e.value&&Sr(t,"innerHTML","_s("+e.value+")",e)}},isPreTag:function(t){return"pre"===t},isUnaryTag:yo,mustUseProp:Dn,canBeLeftOpenTag:bo,isReservedTag:Gn,getTagNamespace:Yn,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(ba)},xa=w((function(t){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));var La=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/,ka=/\([^)]*?\);*$/,Ta=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ca={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ea={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ma=function(t){return"if("+t+")return null;"},Pa={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ma("$event.target !== $event.currentTarget"),ctrl:Ma("!$event.ctrlKey"),shift:Ma("!$event.shiftKey"),alt:Ma("!$event.altKey"),meta:Ma("!$event.metaKey"),left:Ma("'button' in $event && $event.button !== 0"),middle:Ma("'button' in $event && $event.button !== 1"),right:Ma("'button' in $event && $event.button !== 2")};function Sa(t,e){var n=e?"nativeOn:":"on:",r="",i="";for(var o in t){var a=Aa(t[o]);t[o]&&t[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function Aa(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map((function(t){return Aa(t)})).join(",")+"]";var e=Ta.test(t.value),n=La.test(t.value),r=Ta.test(t.value.replace(ka,""));if(t.modifiers){var i="",o="",a=[];for(var s in t.modifiers)if(Pa[s])o+=Pa[s],Ca[s]&&a.push(s);else if("exact"===s){var u=t.modifiers;o+=Ma(["ctrl","shift","alt","meta"].filter((function(t){return!u[t]})).map((function(t){return"$event."+t+"Key"})).join("||"))}else a.push(s);return a.length&&(i+=function(t){return"if(!$event.type.indexOf('key')&&"+t.map(Oa).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(e?"return "+t.value+"($event)":n?"return ("+t.value+")($event)":r?"return "+t.value:t.value)+"}"}return e||n?t.value:"function($event){"+(r?"return "+t.value:t.value)+"}"}function Oa(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=Ca[t],r=Ea[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Da={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:A},Ia=function(t){this.options=t,this.warn=t.warn||Mr,this.transforms=Pr(t.modules,"transformCode"),this.dataGenFns=Pr(t.modules,"genData"),this.directives=P(P({},Da),t.directives);var e=t.isReservedTag||O;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function za(t,e){var n=new Ia(e);return{render:"with(this){return "+(t?ja(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function ja(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return $a(t,e);if(t.once&&!t.onceProcessed)return Na(t,e);if(t.for&&!t.forProcessed)return Ba(t,e);if(t.if&&!t.ifProcessed)return Ra(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=Ha(t,e),i="_t("+n+(r?","+r:""),o=t.attrs||t.dynamicAttrs?Wa((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:L(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];return!o&&!a||r||(i+=",null"),o&&(i+=","+o),a&&(i+=(o?"":",null")+","+a),i+")"}(t,e);var n;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:Ha(e,n,!0);return"_c("+t+","+Fa(e,n)+(r?","+r:"")+")"}(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=Fa(t,e));var i=t.inlineTemplate?null:Ha(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o>>0}(a):"")+")"}(t,t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var o=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=za(n,e.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(t){return"function(){"+t+"}"})).join(",")+"]}"}}(t,e);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b("+n+',"'+t.tag+'",'+Wa(t.dynamicAttrs)+")"),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Ua(t){return 1===t.type&&("slot"===t.tag||t.children.some(Ua))}function Za(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Ra(t,e,Za,"null");if(t.for&&!t.forProcessed)return Ba(t,e,Za);var r=t.slotScope===sa?"":String(t.slotScope),i="function("+r+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(Ha(t,e)||"undefined")+":undefined":Ha(t,e)||"undefined":ja(t,e))+"}",o=r?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+i+o+"}"}function Ha(t,e,n,r,i){var o=t.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return""+(r||ja)(a,e)+s}var u=n?function(t,e){for(var n=0,r=0;r]*>)","i")),f=t.replace(h,(function(t,n,r){return l=r.length,Oo(c)||"noscript"===c||(n=n.replace(//g,"$1").replace(//g,"$1")),No(c,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));u+=t.length-f.length,t=f,C(c,u-l,u)}else{var d=t.indexOf("<");if(0===d){if(So.test(t)){var p=t.indexOf("--\x3e");if(p>=0){e.shouldKeepComment&&e.comment(t.substring(4,p),u,u+p+3),L(p+3);continue}}if(Ao.test(t)){var v=t.indexOf("]>");if(v>=0){L(v+2);continue}}var m=t.match(Po);if(m){L(m[0].length);continue}var g=t.match(Mo);if(g){var _=u;L(g[0].length),C(g[1],_,u);continue}var y=k();if(y){T(y),No(y.tagName,t)&&L(1);continue}}var b=void 0,w=void 0,x=void 0;if(d>=0){for(w=t.slice(d);!(Mo.test(w)||Co.test(w)||So.test(w)||Ao.test(w)||(x=w.indexOf("<",1))<0);)d+=x,w=t.slice(d);b=t.substring(0,d)}d<0&&(b=t),b&&L(b.length),e.chars&&b&&e.chars(b,u-b.length,u)}if(t===n){e.chars&&e.chars(t);break}}function L(e){u+=e,t=t.substring(e)}function k(){var e=t.match(Co);if(e){var n,r,i={tagName:e[1],attrs:[],start:u};for(L(e[0].length);!(n=t.match(Eo))&&(r=t.match(Lo)||t.match(xo));)r.start=u,L(r[0].length),r.end=u,i.attrs.push(r);if(n)return i.unarySlash=n[1],L(n[0].length),i.end=u,i}}function T(t){var n=t.tagName,u=t.unarySlash;o&&("p"===r&&wo(n)&&C(r),s(n)&&r===n&&C(n));for(var l=a(n)||!!u,c=t.attrs.length,h=new Array(c),f=0;f=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var l=i.length-1;l>=a;l--)e.end&&e.end(i[l].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,o):"p"===s&&(e.start&&e.start(t,[],!1,n,o),e.end&&e.end(t,n,o))}C()}(t,{warn:Bo,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,o,a,c,h){var f=r&&r.ns||Wo(t);X&&"svg"===f&&(o=function(t){for(var e=[],n=0;nu&&(s.push(o=t.slice(u,i)),a.push(JSON.stringify(o)));var l=Cr(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),u=i+r[0].length}return u':'
',Ja.innerHTML.indexOf(" ")>0}var ns=!!V&&es(!1),rs=!!V&&es(!0),is=w((function(t){var e=Jn(t);return e&&e.innerHTML})),os=kn.prototype.$mount;kn.prototype.$mount=function(t,e){if((t=t&&Jn(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=is(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var i=ts(r,{outputSourceRange:!1,shouldDecodeNewlines:ns,shouldDecodeNewlinesForHref:rs,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return os.call(this,t,e)},kn.compile=ts,t.exports=kn}).call(this,n(4),n(13).setImmediate)},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(14),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(4))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,l={},c=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(t){var e=h.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){u.headers[t]=r.merge(o)})),t.exports=u}).call(this,n(8))},function(t,e,n){"use strict";var r=n(1),i=n(31),o=n(16),a=n(33),s=n(34),u=n(20);t.exports=function(t){return new Promise((function(e,l){var c=t.data,h=t.headers;r.isFormData(c)&&delete h["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",p=t.auth.password||"";h.Authorization="Basic "+btoa(d+":"+p)}if(f.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f};i(e,l,r),f=null}},f.onabort=function(){f&&(l(u("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){l(u("Network Error",t,null,f)),f=null},f.ontimeout=function(){l(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var v=n(35),m=(t.withCredentials||s(t.url))&&t.xsrfCookieName?v.read(t.xsrfCookieName):void 0;m&&(h[t.xsrfHeaderName]=m)}if("setRequestHeader"in f&&r.forEach(h,(function(t,e){void 0===c&&"content-type"===e.toLowerCase()?delete h[e]:f.setRequestHeader(e,t)})),t.withCredentials&&(f.withCredentials=!0),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),l(t),f=null)})),void 0===c&&(c=null),f.send(c)}))}},function(t,e,n){"use strict";var r=n(32);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){e=e||{};var n={};return r.forEach(["url","method","params","data"],(function(t){void 0!==e[t]&&(n[t]=e[t])})),r.forEach(["headers","auth","proxy"],(function(i){r.isObject(e[i])?n[i]=r.deepMerge(t[i],e[i]):void 0!==e[i]?n[i]=e[i]:r.isObject(t[i])?n[i]=r.deepMerge(t[i]):void 0!==t[i]&&(n[i]=t[i])})),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])})),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},,function(t,e,n){"use strict";var r=n(1),i=n(15),o=n(26),a=n(21);function s(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=s(n(18));u.Axios=o,u.create=function(t){return s(a(u.defaults,t))},u.Cancel=n(22),u.CancelToken=n(38),u.isCancel=n(17),u.all=function(t){return Promise.all(t)},u.spread=n(39),t.exports=u,t.exports.default=u},function(t,e){t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},function(t,e,n){"use strict";var r=n(1),i=n(16),o=n(27),a=n(28),s=n(21);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method=t.method?t.method.toLowerCase():"get";var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},u.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,n){return this.request(r.merge(n||{},{method:t,url:e}))}})),r.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,n,i){return this.request(r.merge(i||{},{method:t,url:e,data:n}))}})),t.exports=u},function(t,e,n){"use strict";var r=n(1);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(29),o=n(17),a=n(18),s=n(36),u=n(37);function l(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return l(t),t.baseURL&&!s(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return l(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(l(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(20);t.exports=function(t,e,n){var i=n.config.validateStatus;!i||i(n.status)?t(n):e(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(1),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},function(t,e,n){"use strict";var r=n(1);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(1);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(22);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var i,o=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(t,e,n){(function(t,r){var i;(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="__lodash_hash_undefined__",c=500,h="__lodash_placeholder__",f=1,d=2,p=4,v=1,m=2,g=1,_=2,y=4,b=8,w=16,x=32,L=64,k=128,T=256,C=512,E=30,M="...",P=800,S=16,A=1,O=2,D=1/0,I=9007199254740991,z=17976931348623157e292,j=NaN,$=4294967295,N=$-1,R=$>>>1,B=[["ary",k],["bind",g],["bindKey",_],["curry",b],["curryRight",w],["flip",C],["partial",x],["partialRight",L],["rearg",T]],F="[object Arguments]",U="[object Array]",Z="[object AsyncFunction]",H="[object Boolean]",q="[object Date]",V="[object DOMException]",W="[object Error]",G="[object Function]",Y="[object GeneratorFunction]",X="[object Map]",K="[object Number]",J="[object Null]",Q="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ut="[object ArrayBuffer]",lt="[object DataView]",ct="[object Float32Array]",ht="[object Float64Array]",ft="[object Int8Array]",dt="[object Int16Array]",pt="[object Int32Array]",vt="[object Uint8Array]",mt="[object Uint8ClampedArray]",gt="[object Uint16Array]",_t="[object Uint32Array]",yt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xt=/&(?:amp|lt|gt|quot|#39);/g,Lt=/[&<>"']/g,kt=RegExp(xt.source),Tt=RegExp(Lt.source),Ct=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,Mt=/<%=([\s\S]+?)%>/g,Pt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,St=/^\w*$/,At=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ot=/[\\^$.*+?()[\]{}|]/g,Dt=RegExp(Ot.source),It=/^\s+|\s+$/g,zt=/^\s+/,jt=/\s+$/,$t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Nt=/\{\n\/\* \[wrapped with (.+)\] \*/,Rt=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ft=/\\(\\)?/g,Ut=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Zt=/\w*$/,Ht=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Vt=/^\[object .+?Constructor\]$/,Wt=/^0o[0-7]+$/i,Gt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xt=/($^)/,Kt=/['\n\r\u2028\u2029\\]/g,Jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Qt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Qt+"]",ne="["+Jt+"]",re="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+Qt+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ue="[^\\ud800-\\udfff]",le="(?:\\ud83c[\\udde6-\\uddff]){2}",ce="[\\ud800-\\udbff][\\udc00-\\udfff]",he="[A-Z\\xc0-\\xd6\\xd8-\\xde]",fe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",pe="(?:"+ne+"|"+se+")"+"?",ve="[\\ufe0e\\ufe0f]?"+pe+("(?:\\u200d(?:"+[ue,le,ce].join("|")+")[\\ufe0e\\ufe0f]?"+pe+")*"),me="(?:"+[ie,le,ce].join("|")+")"+ve,ge="(?:"+[ue+ne+"?",ne,le,ce,te].join("|")+")",_e=RegExp("['’]","g"),ye=RegExp(ne,"g"),be=RegExp(se+"(?="+se+")|"+ge+ve,"g"),we=RegExp([he+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+fe,"$"].join("|")+")",he+"?"+fe+"+(?:['’](?:d|ll|m|re|s|t|ve))?",he+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,me].join("|"),"g"),xe=RegExp("[\\u200d\\ud800-\\udfff"+Jt+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ke=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Te=-1,Ce={};Ce[ct]=Ce[ht]=Ce[ft]=Ce[dt]=Ce[pt]=Ce[vt]=Ce[mt]=Ce[gt]=Ce[_t]=!0,Ce[F]=Ce[U]=Ce[ut]=Ce[H]=Ce[lt]=Ce[q]=Ce[W]=Ce[G]=Ce[X]=Ce[K]=Ce[Q]=Ce[et]=Ce[nt]=Ce[rt]=Ce[at]=!1;var Ee={};Ee[F]=Ee[U]=Ee[ut]=Ee[lt]=Ee[H]=Ee[q]=Ee[ct]=Ee[ht]=Ee[ft]=Ee[dt]=Ee[pt]=Ee[X]=Ee[K]=Ee[Q]=Ee[et]=Ee[nt]=Ee[rt]=Ee[it]=Ee[vt]=Ee[mt]=Ee[gt]=Ee[_t]=!0,Ee[W]=Ee[G]=Ee[at]=!1;var Me={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,Se=parseInt,Ae="object"==typeof t&&t&&t.Object===Object&&t,Oe="object"==typeof self&&self&&self.Object===Object&&self,De=Ae||Oe||Function("return this")(),Ie=e&&!e.nodeType&&e,ze=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,je=ze&&ze.exports===Ie,$e=je&&Ae.process,Ne=function(){try{var t=ze&&ze.require&&ze.require("util").types;return t||$e&&$e.binding&&$e.binding("util")}catch(t){}}(),Re=Ne&&Ne.isArrayBuffer,Be=Ne&&Ne.isDate,Fe=Ne&&Ne.isMap,Ue=Ne&&Ne.isRegExp,Ze=Ne&&Ne.isSet,He=Ne&&Ne.isTypedArray;function qe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ve(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Je(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function wn(t,e){for(var n=t.length;n--&&un(e,t[n],0)>-1;);return n}var xn=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ln=dn({"&":"&","<":"<",">":">",'"':""","'":"'"});function kn(t){return"\\"+Me[t]}function Tn(t){return xe.test(t)}function Cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function En(t,e){return function(n){return t(e(n))}}function Mn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"});var In=function t(e){var n,r=(e=null==e?De:In.defaults(De.Object(),e,In.pick(De,ke))).Array,i=e.Date,Jt=e.Error,Qt=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=Qt.prototype,se=ee.prototype,ue=e["__core-js_shared__"],le=ae.toString,ce=se.hasOwnProperty,he=0,fe=(n=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,pe=le.call(ee),ve=De._,me=ne("^"+le.call(ce).replace(Ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ge=je?e.Buffer:o,be=e.Symbol,xe=e.Uint8Array,Me=ge?ge.allocUnsafe:o,Ae=En(ee.getPrototypeOf,ee),Oe=ee.create,Ie=se.propertyIsEnumerable,ze=oe.splice,$e=be?be.isConcatSpreadable:o,Ne=be?be.iterator:o,on=be?be.toStringTag:o,dn=function(){try{var t=Ro(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),zn=e.clearTimeout!==De.clearTimeout&&e.clearTimeout,jn=i&&i.now!==De.Date.now&&i.now,$n=e.setTimeout!==De.setTimeout&&e.setTimeout,Nn=te.ceil,Rn=te.floor,Bn=ee.getOwnPropertySymbols,Fn=ge?ge.isBuffer:o,Un=e.isFinite,Zn=oe.join,Hn=En(ee.keys,ee),qn=te.max,Vn=te.min,Wn=i.now,Gn=e.parseInt,Yn=te.random,Xn=oe.reverse,Kn=Ro(e,"DataView"),Jn=Ro(e,"Map"),Qn=Ro(e,"Promise"),tr=Ro(e,"Set"),er=Ro(e,"WeakMap"),nr=Ro(ee,"create"),rr=er&&new er,ir={},or=ha(Kn),ar=ha(Jn),sr=ha(Qn),ur=ha(tr),lr=ha(er),cr=be?be.prototype:o,hr=cr?cr.valueOf:o,fr=cr?cr.toString:o;function dr(t){if(Ms(t)&&!gs(t)&&!(t instanceof gr)){if(t instanceof mr)return t;if(ce.call(t,"__wrapped__"))return fa(t)}return new mr(t)}var pr=function(){function t(){}return function(e){if(!Es(e))return{};if(Oe)return Oe(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function mr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function gr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=$,this.__views__=[]}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function zr(t,e,n,r,i,a){var s,u=e&f,l=e&d,c=e&p;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!Es(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&ce.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return no(t,s)}else{var v=Uo(t),m=v==G||v==Y;if(ws(t))return Xi(t,u);if(v==Q||v==F||m&&!i){if(s=l||m?{}:Ho(t),!u)return l?function(t,e){return ro(t,Fo(t),e)}(t,function(t,e){return t&&ro(e,ou(e),t)}(s,t)):function(t,e){return ro(t,Bo(t),e)}(t,Ar(s,t))}else{if(!Ee[v])return i?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case ut:return Ki(t);case H:case q:return new r(+t);case lt:return function(t,e){var n=e?Ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case ct:case ht:case ft:case dt:case pt:case vt:case mt:case gt:case _t:return Ji(t,n);case X:return new r;case K:case rt:return new r(t);case et:return function(t){var e=new t.constructor(t.source,Zt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case nt:return new r;case it:return i=t,hr?ee(hr.call(i)):{}}var i}(t,v,u)}}a||(a=new xr);var g=a.get(t);if(g)return g;a.set(t,s),Ds(t)?t.forEach((function(r){s.add(zr(r,e,n,r,t,a))})):Ps(t)&&t.forEach((function(r,i){s.set(i,zr(r,e,n,i,t,a))}));var _=h?o:(c?l?Oo:Ao:l?ou:iu)(t);return We(_||t,(function(r,i){_&&(r=t[i=r]),Mr(s,i,zr(r,e,n,i,t,a))})),s}function jr(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function $r(t,e,n){if("function"!=typeof t)throw new ie(u);return ia((function(){t.apply(o,n)}),e)}function Nr(t,e,n,r){var i=-1,o=Ke,s=!0,u=t.length,l=[],c=e.length;if(!u)return l;n&&(e=Qe(e,gn(n))),r?(o=Je,s=!1):e.length>=a&&(o=yn,s=!1,e=new wr(e));t:for(;++i-1},yr.prototype.set=function(t,e){var n=this.__data__,r=Pr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},br.prototype.clear=function(){this.size=0,this.__data__={hash:new _r,map:new(Jn||yr),string:new _r}},br.prototype.delete=function(t){var e=$o(this,t).delete(t);return this.size-=e?1:0,e},br.prototype.get=function(t){return $o(this,t).get(t)},br.prototype.has=function(t){return $o(this,t).has(t)},br.prototype.set=function(t,e){var n=$o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,l),this},wr.prototype.has=function(t){return this.__data__.has(t)},xr.prototype.clear=function(){this.__data__=new yr,this.size=0},xr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},xr.prototype.get=function(t){return this.__data__.get(t)},xr.prototype.has=function(t){return this.__data__.has(t)},xr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof yr){var r=n.__data__;if(!Jn||r.length0&&n(s)?e>1?Hr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var qr=so(),Vr=so(!0);function Wr(t,e){return t&&qr(t,e,iu)}function Gr(t,e){return t&&Vr(t,e,iu)}function Yr(t,e){return Xe(e,(function(e){return ks(t[e])}))}function Xr(t,e){for(var n=0,r=(e=Vi(e,t)).length;null!=t&&ne}function ti(t,e){return null!=t&&ce.call(t,e)}function ei(t,e){return null!=t&&e in ee(t)}function ni(t,e,n){for(var i=n?Je:Ke,a=t[0].length,s=t.length,u=s,l=r(s),c=1/0,h=[];u--;){var f=t[u];u&&e&&(f=Qe(f,gn(e))),c=Vn(f.length,c),l[u]=!n&&(e||a>=120&&f.length>=120)?new wr(u&&f):o}f=t[0];var d=-1,p=l[0];t:for(;++d=s)return u;var l=n[r];return u*("desc"==l?-1:1)}}return t.index-e.index}(t,e,n)}))}function _i(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)s!==t&&ze.call(s,u,1),ze.call(t,u,1);return t}function bi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Vo(i)?ze.call(t,i,1):Ni(t,i)}}return t}function wi(t,e){return t+Rn(Yn()*(e-t+1))}function xi(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=Rn(e/2))&&(t+=t)}while(e);return n}function Li(t,e){return oa(ta(t,e,Su),t+"")}function ki(t){return kr(du(t))}function Ti(t,e){var n=du(t);return ua(n,Ir(e,0,n.length))}function Ci(t,e,n,r){if(!Es(t))return t;for(var i=-1,a=(e=Vi(e,t)).length,s=a-1,u=t;null!=u&&++io?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i>>1,a=t[o];null!==a&&!zs(a)&&(n?a<=e:a=a){var c=e?null:Lo(t);if(c)return Pn(c);s=!1,i=yn,l=new wr}else l=e?[]:u;t:for(;++r=r?t:Si(t,e,n)}var Yi=zn||function(t){return De.clearTimeout(t)};function Xi(t,e){if(e)return t.slice();var n=t.length,r=Me?Me(n):new t.constructor(n);return t.copy(r),r}function Ki(t){var e=new t.constructor(t.byteLength);return new xe(e).set(new xe(t)),e}function Ji(t,e){var n=e?Ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Qi(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=zs(t),s=e!==o,u=null===e,l=e==e,c=zs(e);if(!u&&!c&&!a&&t>e||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&t1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Wo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r-1?i[a?e[s]:s]:o}}function fo(t){return So((function(e){var n=e.length,r=n,i=mr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(u);if(i&&!s&&"wrapper"==Io(a))var s=new mr([],!0)}for(r=s?r:n;++r1&&b.reverse(),f&&c<_&&(b.length=c),this&&this!==De&&this instanceof g&&(C=y||co(C)),C.apply(T,b)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Wr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function mo(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ji(n),r=ji(r)):(n=zi(n),r=zi(r)),i=t(n,r)}return i}}function go(t){return So((function(e){return e=Qe(e,gn(jo())),Li((function(n){var r=this;return t(e,(function(t){return qe(t,r,n)}))}))}))}function _o(t,e){var n=(e=e===o?" ":ji(e)).length;if(n<2)return n?xi(e,t):e;var r=xi(e,Nn(t/An(e)));return Tn(e)?Gi(On(r),0,t).join(""):r.slice(0,t)}function yo(t){return function(e,n,i){return i&&"number"!=typeof i&&Wo(e,n,i)&&(n=i=o),e=Bs(e),n===o?(n=e,e=0):n=Bs(n),function(t,e,n,i){for(var o=-1,a=qn(Nn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?eu))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var h=-1,f=!0,d=n&m?new wr:o;for(a.set(t,e),a.set(e,t);++h-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace($t,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return We(B,(function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(Nt);return e?e[1].split(Rt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Wn(),i=S-(r-n);if(n=r,i>0){if(++e>=P)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ua(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,Oa(t,n)}));function Ra(t){var e=dr(t);return e.__chain__=!0,e}function Ba(t,e){return e(t)}var Fa=So((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Dr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof gr&&Vo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Ba,args:[i],thisArg:o}),new mr(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)}));var Ua=io((function(t,e,n){ce.call(t,n)?++t[n]:Or(t,n,1)}));var Za=ho(ma),Ha=ho(ga);function qa(t,e){return(gs(t)?We:Rr)(t,jo(e,3))}function Va(t,e){return(gs(t)?Ge:Br)(t,jo(e,3))}var Wa=io((function(t,e,n){ce.call(t,n)?t[n].push(e):Or(t,n,[e])}));var Ga=Li((function(t,e,n){var i=-1,o="function"==typeof e,a=ys(t)?r(t.length):[];return Rr(t,(function(t){a[++i]=o?qe(e,t,n):ri(t,e,n)})),a})),Ya=io((function(t,e,n){Or(t,n,e)}));function Xa(t,e){return(gs(t)?Qe:fi)(t,jo(e,3))}var Ka=io((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Ja=Li((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Wo(t,e[0],e[1])?e=[]:n>2&&Wo(e[0],e[1],e[2])&&(e=[e[0]]),gi(t,Hr(e,1),[])})),Qa=jn||function(){return De.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,To(t,k,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(u);return t=Fs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Li((function(t,e,n){var r=g;if(n.length){var i=Mn(n,zo(ns));r|=x}return To(t,r,e,n,i)})),rs=Li((function(t,e,n){var r=g|_;if(n.length){var i=Mn(n,zo(rs));r|=x}return To(e,r,t,n,i)}));function is(t,e,n){var r,i,a,s,l,c,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new ie(u);function v(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function m(t){var n=t-c;return c===o||n>=e||n<0||d&&t-h>=a}function g(){var t=Qa();if(m(t))return _(t);l=ia(g,function(t){var n=e-(t-c);return d?Vn(n,a-(t-h)):n}(t))}function _(t){return l=o,p&&r?v(t):(r=i=o,s)}function y(){var t=Qa(),n=m(t);if(r=arguments,i=this,c=t,n){if(l===o)return function(t){return h=t,l=ia(g,e),f?v(t):s}(c);if(d)return Yi(l),l=ia(g,e),v(c)}return l===o&&(l=ia(g,e)),s}return e=Zs(e)||0,Es(n)&&(f=!!n.leading,a=(d="maxWait"in n)?qn(Zs(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),y.cancel=function(){l!==o&&Yi(l),h=0,r=c=i=l=o},y.flush=function(){return l===o?s:_(Qa())},y}var os=Li((function(t,e){return $r(t,1,e)})),as=Li((function(t,e,n){return $r(t,Zs(e)||0,n)}));function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(u);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||br),n}function us(t){if("function"!=typeof t)throw new ie(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=br;var ls=Wi((function(t,e){var n=(e=1==e.length&&gs(e[0])?Qe(e[0],gn(jo())):Qe(Hr(e,1),gn(jo()))).length;return Li((function(r){for(var i=-1,o=Vn(r.length,n);++i=e})),ms=ii(function(){return arguments}())?ii:function(t){return Ms(t)&&ce.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,_s=Re?gn(Re):function(t){return Ms(t)&&Jr(t)==ut};function ys(t){return null!=t&&Cs(t.length)&&!ks(t)}function bs(t){return Ms(t)&&ys(t)}var ws=Fn||Zu,xs=Be?gn(Be):function(t){return Ms(t)&&Jr(t)==q};function Ls(t){if(!Ms(t))return!1;var e=Jr(t);return e==W||e==V||"string"==typeof t.message&&"string"==typeof t.name&&!As(t)}function ks(t){if(!Es(t))return!1;var e=Jr(t);return e==G||e==Y||e==Z||e==tt}function Ts(t){return"number"==typeof t&&t==Fs(t)}function Cs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function Es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ms(t){return null!=t&&"object"==typeof t}var Ps=Fe?gn(Fe):function(t){return Ms(t)&&Uo(t)==X};function Ss(t){return"number"==typeof t||Ms(t)&&Jr(t)==K}function As(t){if(!Ms(t)||Jr(t)!=Q)return!1;var e=Ae(t);if(null===e)return!0;var n=ce.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&le.call(n)==pe}var Os=Ue?gn(Ue):function(t){return Ms(t)&&Jr(t)==et};var Ds=Ze?gn(Ze):function(t){return Ms(t)&&Uo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Ms(t)&&Jr(t)==rt}function zs(t){return"symbol"==typeof t||Ms(t)&&Jr(t)==it}var js=He?gn(He):function(t){return Ms(t)&&Cs(t.length)&&!!Ce[Jr(t)]};var $s=bo(hi),Ns=bo((function(t,e){return t<=e}));function Rs(t){if(!t)return[];if(ys(t))return Is(t)?On(t):no(t);if(Ne&&t[Ne])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ne]());var e=Uo(t);return(e==X?Cn:e==nt?Pn:du)(t)}function Bs(t){return t?(t=Zs(t))===D||t===-D?(t<0?-1:1)*z:t==t?t:0:0===t?t:0}function Fs(t){var e=Bs(t),n=e%1;return e==e?n?e-n:e:0}function Us(t){return t?Ir(Fs(t),0,$):0}function Zs(t){if("number"==typeof t)return t;if(zs(t))return j;if(Es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=qt.test(t);return n||Wt.test(t)?Se(t.slice(2),n?2:8):Ht.test(t)?j:+t}function Hs(t){return ro(t,ou(t))}function qs(t){return null==t?"":ji(t)}var Vs=oo((function(t,e){if(Ko(e)||ys(e))ro(e,iu(e),t);else for(var n in e)ce.call(e,n)&&Mr(t,n,e[n])})),Ws=oo((function(t,e){ro(e,ou(e),t)})),Gs=oo((function(t,e,n,r){ro(e,ou(e),t,r)})),Ys=oo((function(t,e,n,r){ro(e,iu(e),t,r)})),Xs=So(Dr);var Ks=Li((function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Wo(e[0],e[1],i)&&(r=1);++n1),e})),ro(t,Oo(t),n),r&&(n=zr(n,f|d|p,Mo));for(var i=e.length;i--;)Ni(n,e[i]);return n}));var lu=So((function(t,e){return null==t?{}:function(t,e){return _i(t,e,(function(e,n){return tu(t,n)}))}(t,e)}));function cu(t,e){if(null==t)return{};var n=Qe(Oo(t),(function(t){return[t]}));return e=jo(e),_i(t,n,(function(t,n){return e(t,n[0])}))}var hu=ko(iu),fu=ko(ou);function du(t){return null==t?[]:_n(t,iu(t))}var pu=lo((function(t,e,n){return e=e.toLowerCase(),t+(n?vu(e):e)}));function vu(t){return Lu(qs(t).toLowerCase())}function mu(t){return(t=qs(t))&&t.replace(Yt,xn).replace(ye,"")}var gu=lo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),_u=lo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),yu=uo("toLowerCase");var bu=lo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var wu=lo((function(t,e,n){return t+(n?" ":"")+Lu(e)}));var xu=lo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Lu=uo("toUpperCase");function ku(t,e,n){return t=qs(t),(e=n?o:e)===o?function(t){return Le.test(t)}(t)?function(t){return t.match(we)||[]}(t):function(t){return t.match(Bt)||[]}(t):t.match(e)||[]}var Tu=Li((function(t,e){try{return qe(t,o,e)}catch(t){return Ls(t)?t:new Jt(t)}})),Cu=So((function(t,e){return We(e,(function(e){e=ca(e),Or(t,e,ns(t[e],t))})),t}));function Eu(t){return function(){return t}}var Mu=fo(),Pu=fo(!0);function Su(t){return t}function Au(t){return ui("function"==typeof t?t:zr(t,f))}var Ou=Li((function(t,e){return function(n){return ri(n,t,e)}})),Du=Li((function(t,e){return function(n){return ri(t,n,e)}}));function Iu(t,e,n){var r=iu(e),i=Yr(e,r);null!=n||Es(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Yr(e,iu(e)));var o=!(Es(n)&&"chain"in n&&!n.chain),a=ks(t);return We(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=no(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})})),t}function zu(){}var ju=go(Qe),$u=go(Ye),Nu=go(rn);function Ru(t){return Go(t)?fn(ca(t)):function(t){return function(e){return Xr(e,t)}}(t)}var Bu=yo(),Fu=yo(!0);function Uu(){return[]}function Zu(){return!1}var Hu=mo((function(t,e){return t+e}),0),qu=xo("ceil"),Vu=mo((function(t,e){return t/e}),1),Wu=xo("floor");var Gu,Yu=mo((function(t,e){return t*e}),1),Xu=xo("round"),Ku=mo((function(t,e){return t-e}),0);return dr.after=function(t,e){if("function"!=typeof e)throw new ie(u);return t=Fs(t),function(){if(--t<1)return e.apply(this,arguments)}},dr.ary=ts,dr.assign=Vs,dr.assignIn=Ws,dr.assignInWith=Gs,dr.assignWith=Ys,dr.at=Xs,dr.before=es,dr.bind=ns,dr.bindAll=Cu,dr.bindKey=rs,dr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},dr.chain=Ra,dr.chunk=function(t,e,n){e=(n?Wo(t,e,n):e===o)?1:qn(Fs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=r(Nn(i/e));ai?0:i+n),(r=r===o||r>i?i:Fs(r))<0&&(r+=i),r=n>r?0:Us(r);n>>0)?(t=qs(t))&&("string"==typeof e||null!=e&&!Os(e))&&!(e=ji(e))&&Tn(t)?Gi(On(t),0,n):t.split(e,n):[]},dr.spread=function(t,e){if("function"!=typeof t)throw new ie(u);return e=null==e?0:qn(Fs(e),0),Li((function(n){var r=n[e],i=Gi(n,0,e);return r&&tn(i,r),qe(t,this,i)}))},dr.tail=function(t){var e=null==t?0:t.length;return e?Si(t,1,e):[]},dr.take=function(t,e,n){return t&&t.length?Si(t,0,(e=n||e===o?1:Fs(e))<0?0:e):[]},dr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Si(t,(e=r-(e=n||e===o?1:Fs(e)))<0?0:e,r):[]},dr.takeRightWhile=function(t,e){return t&&t.length?Bi(t,jo(e,3),!1,!0):[]},dr.takeWhile=function(t,e){return t&&t.length?Bi(t,jo(e,3)):[]},dr.tap=function(t,e){return e(t),t},dr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(u);return Es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},dr.thru=Ba,dr.toArray=Rs,dr.toPairs=hu,dr.toPairsIn=fu,dr.toPath=function(t){return gs(t)?Qe(t,ca):zs(t)?[t]:no(la(qs(t)))},dr.toPlainObject=Hs,dr.transform=function(t,e,n){var r=gs(t),i=r||ws(t)||js(t);if(e=jo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Es(t)&&ks(o)?pr(Ae(t)):{}}return(i?We:Wr)(t,(function(t,r,i){return e(n,t,r,i)})),n},dr.unary=function(t){return ts(t,1)},dr.union=Ma,dr.unionBy=Pa,dr.unionWith=Sa,dr.uniq=function(t){return t&&t.length?$i(t):[]},dr.uniqBy=function(t,e){return t&&t.length?$i(t,jo(e,2)):[]},dr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?$i(t,o,e):[]},dr.unset=function(t,e){return null==t||Ni(t,e)},dr.unzip=Aa,dr.unzipWith=Oa,dr.update=function(t,e,n){return null==t?t:Ri(t,e,qi(n))},dr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ri(t,e,qi(n),r)},dr.values=du,dr.valuesIn=function(t){return null==t?[]:_n(t,ou(t))},dr.without=Da,dr.words=ku,dr.wrap=function(t,e){return cs(qi(e),t)},dr.xor=Ia,dr.xorBy=za,dr.xorWith=ja,dr.zip=$a,dr.zipObject=function(t,e){return Zi(t||[],e||[],Mr)},dr.zipObjectDeep=function(t,e){return Zi(t||[],e||[],Ci)},dr.zipWith=Na,dr.entries=hu,dr.entriesIn=fu,dr.extend=Ws,dr.extendWith=Gs,Iu(dr,dr),dr.add=Hu,dr.attempt=Tu,dr.camelCase=pu,dr.capitalize=vu,dr.ceil=qu,dr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=Zs(n))==n?n:0),e!==o&&(e=(e=Zs(e))==e?e:0),Ir(Zs(t),e,n)},dr.clone=function(t){return zr(t,p)},dr.cloneDeep=function(t){return zr(t,f|p)},dr.cloneDeepWith=function(t,e){return zr(t,f|p,e="function"==typeof e?e:o)},dr.cloneWith=function(t,e){return zr(t,p,e="function"==typeof e?e:o)},dr.conformsTo=function(t,e){return null==e||jr(t,e,iu(e))},dr.deburr=mu,dr.defaultTo=function(t,e){return null==t||t!=t?e:t},dr.divide=Vu,dr.endsWith=function(t,e,n){t=qs(t),e=ji(e);var r=t.length,i=n=n===o?r:Ir(Fs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},dr.eq=ds,dr.escape=function(t){return(t=qs(t))&&Tt.test(t)?t.replace(Lt,Ln):t},dr.escapeRegExp=function(t){return(t=qs(t))&&Dt.test(t)?t.replace(Ot,"\\$&"):t},dr.every=function(t,e,n){var r=gs(t)?Ye:Fr;return n&&Wo(t,e,n)&&(e=o),r(t,jo(e,3))},dr.find=Za,dr.findIndex=ma,dr.findKey=function(t,e){return an(t,jo(e,3),Wr)},dr.findLast=Ha,dr.findLastIndex=ga,dr.findLastKey=function(t,e){return an(t,jo(e,3),Gr)},dr.floor=Wu,dr.forEach=qa,dr.forEachRight=Va,dr.forIn=function(t,e){return null==t?t:qr(t,jo(e,3),ou)},dr.forInRight=function(t,e){return null==t?t:Vr(t,jo(e,3),ou)},dr.forOwn=function(t,e){return t&&Wr(t,jo(e,3))},dr.forOwnRight=function(t,e){return t&&Gr(t,jo(e,3))},dr.get=Qs,dr.gt=ps,dr.gte=vs,dr.has=function(t,e){return null!=t&&Zo(t,e,ti)},dr.hasIn=tu,dr.head=ya,dr.identity=Su,dr.includes=function(t,e,n,r){t=ys(t)?t:du(t),n=n&&!r?Fs(n):0;var i=t.length;return n<0&&(n=qn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&un(t,e,n)>-1},dr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Fs(n);return i<0&&(i=qn(r+i,0)),un(t,e,i)},dr.inRange=function(t,e,n){return e=Bs(e),n===o?(n=e,e=0):n=Bs(n),function(t,e,n){return t>=Vn(e,n)&&t=-I&&t<=I},dr.isSet=Ds,dr.isString=Is,dr.isSymbol=zs,dr.isTypedArray=js,dr.isUndefined=function(t){return t===o},dr.isWeakMap=function(t){return Ms(t)&&Uo(t)==at},dr.isWeakSet=function(t){return Ms(t)&&Jr(t)==st},dr.join=function(t,e){return null==t?"":Zn.call(t,e)},dr.kebabCase=gu,dr.last=La,dr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Fs(n))<0?qn(r+i,0):Vn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,cn,i,!0)},dr.lowerCase=_u,dr.lowerFirst=yu,dr.lt=$s,dr.lte=Ns,dr.max=function(t){return t&&t.length?Ur(t,Su,Qr):o},dr.maxBy=function(t,e){return t&&t.length?Ur(t,jo(e,2),Qr):o},dr.mean=function(t){return hn(t,Su)},dr.meanBy=function(t,e){return hn(t,jo(e,2))},dr.min=function(t){return t&&t.length?Ur(t,Su,hi):o},dr.minBy=function(t,e){return t&&t.length?Ur(t,jo(e,2),hi):o},dr.stubArray=Uu,dr.stubFalse=Zu,dr.stubObject=function(){return{}},dr.stubString=function(){return""},dr.stubTrue=function(){return!0},dr.multiply=Yu,dr.nth=function(t,e){return t&&t.length?mi(t,Fs(e)):o},dr.noConflict=function(){return De._===this&&(De._=ve),this},dr.noop=zu,dr.now=Qa,dr.pad=function(t,e,n){t=qs(t);var r=(e=Fs(e))?An(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return _o(Rn(i),n)+t+_o(Nn(i),n)},dr.padEnd=function(t,e,n){t=qs(t);var r=(e=Fs(e))?An(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Yn();return Vn(t+i*(e-t+Pe("1e-"+((i+"").length-1))),e)}return wi(t,e)},dr.reduce=function(t,e,n){var r=gs(t)?en:pn,i=arguments.length<3;return r(t,jo(e,4),n,i,Rr)},dr.reduceRight=function(t,e,n){var r=gs(t)?nn:pn,i=arguments.length<3;return r(t,jo(e,4),n,i,Br)},dr.repeat=function(t,e,n){return e=(n?Wo(t,e,n):e===o)?1:Fs(e),xi(qs(t),e)},dr.replace=function(){var t=arguments,e=qs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},dr.result=function(t,e,n){var r=-1,i=(e=Vi(e,t)).length;for(i||(i=1,t=o);++rI)return[];var n=$,r=Vn(t,$);e=jo(e),t-=$;for(var i=mn(r,e);++n=a)return t;var u=n-An(r);if(u<1)return r;var l=s?Gi(s,0,u).join(""):t.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),Os(i)){if(t.slice(u).search(i)){var c,h=l;for(i.global||(i=ne(i.source,qs(Zt.exec(i))+"g")),i.lastIndex=0;c=i.exec(h);)var f=c.index;l=l.slice(0,f===o?u:f)}}else if(t.indexOf(ji(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},dr.unescape=function(t){return(t=qs(t))&&kt.test(t)?t.replace(xt,Dn):t},dr.uniqueId=function(t){var e=++he;return qs(t)+e},dr.upperCase=xu,dr.upperFirst=Lu,dr.each=qa,dr.eachRight=Va,dr.first=ya,Iu(dr,(Gu={},Wr(dr,(function(t,e){ce.call(dr.prototype,e)||(Gu[e]=t)})),Gu),{chain:!1}),dr.VERSION="4.17.15",We(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){dr[t].placeholder=dr})),We(["drop","take"],(function(t,e){gr.prototype[t]=function(n){n=n===o?1:qn(Fs(n),0);var r=this.__filtered__&&!e?new gr(this):this.clone();return r.__filtered__?r.__takeCount__=Vn(n,r.__takeCount__):r.__views__.push({size:Vn(n,$),type:t+(r.__dir__<0?"Right":"")}),r},gr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),We(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=n==A||3==n;gr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:jo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),We(["head","last"],(function(t,e){var n="take"+(e?"Right":"");gr.prototype[t]=function(){return this[n](1).value()[0]}})),We(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");gr.prototype[t]=function(){return this.__filtered__?new gr(this):this[n](1)}})),gr.prototype.compact=function(){return this.filter(Su)},gr.prototype.find=function(t){return this.filter(t).head()},gr.prototype.findLast=function(t){return this.reverse().find(t)},gr.prototype.invokeMap=Li((function(t,e){return"function"==typeof t?new gr(this):this.map((function(n){return ri(n,t,e)}))})),gr.prototype.reject=function(t){return this.filter(us(jo(t)))},gr.prototype.slice=function(t,e){t=Fs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new gr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=Fs(e))<0?n.dropRight(-e):n.take(e-t)),n)},gr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},gr.prototype.toArray=function(){return this.take($)},Wr(gr.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=dr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(dr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof gr,l=s[0],c=u||gs(e),h=function(t){var e=i.apply(dr,tn([t],s));return r&&f?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,d=!!this.__actions__.length,p=a&&!f,v=u&&!d;if(!a&&c){e=v?e:new gr(this);var m=t.apply(e,s);return m.__actions__.push({func:Ba,args:[h],thisArg:o}),new mr(m,f)}return p&&v?t.apply(this,s):(m=this.thru(h),p?r?m.value()[0]:m.value():m)})})),We(["pop","push","shift","sort","splice","unshift"],(function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);dr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n]((function(n){return e.apply(gs(n)?n:[],t)}))}})),Wr(gr.prototype,(function(t,e){var n=dr[e];if(n){var r=n.name+"";ce.call(ir,r)||(ir[r]=[]),ir[r].push({name:e,func:n})}})),ir[po(o,_).name]=[{name:"wrapper",func:o}],gr.prototype.clone=function(){var t=new gr(this.__wrapped__);return t.__actions__=no(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=no(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=no(this.__views__),t},gr.prototype.reverse=function(){if(this.__filtered__){var t=new gr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},gr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},dr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=fa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},dr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gr){var e=t;return this.__actions__.length&&(e=new gr(this)),(e=e.reverse()).__actions__.push({func:Ba,args:[Ea],thisArg:o}),new mr(e,this.__chain__)}return this.thru(Ea)},dr.prototype.toJSON=dr.prototype.valueOf=dr.prototype.value=function(){return Fi(this.__wrapped__,this.__actions__)},dr.prototype.first=dr.prototype.head,Ne&&(dr.prototype[Ne]=function(){return this}),dr}();De._=In,(i=function(){return In}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(4),n(55)(t))},function(t,e,n){var r=n(75);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(7)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(79);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(7)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(89);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(7)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(92);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(7)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(94);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(7)(r,i);r.locals&&(t.exports=r.locals)},,,,,,,,function(t,e,n){var r;"undefined"!=typeof self&&self,t.exports=(r=n(3),function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){t.exports=r},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r="undefined"!=typeof window?window.HTMLElement:Object,i=n(0),o=new(n.n(i).a),a=function(t,e,n,r,i,o,a,s){var u,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=[],l._compiled=!0),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(t,e){return u.call(e),c(t,e)}}else{var h=l.beforeCreate;l.beforeCreate=h?[].concat(h,u):[u]}return{exports:t,options:l}}({name:"toast",props:{message:{type:String,required:!0},type:{type:String,default:"success"},position:{type:String,default:"bottom-right"},duration:{type:Number,default:3e3},dismissible:{type:Boolean,default:!0},onClose:{type:Function,default:function(){}},queue:Boolean,container:{type:[Object,Function,r],default:null}},data:function(){return{isActive:!1,parentTop:null,parentBottom:null}},beforeMount:function(){this.setupContainer()},mounted:function(){this.showNotice(),o.$on("toast.clear",this.close)},methods:{setupContainer:function(){if(this.parentTop=document.querySelector(".notices.is-top"),this.parentBottom=document.querySelector(".notices.is-bottom"),!this.parentTop||!this.parentBottom){this.parentTop||(this.parentTop=document.createElement("div"),this.parentTop.className="notices is-top"),this.parentBottom||(this.parentBottom=document.createElement("div"),this.parentBottom.className="notices is-bottom");var t=this.container||document.body;t.appendChild(this.parentTop),t.appendChild(this.parentBottom),this.container&&(this.parentTop.classList.add("is-custom-parent"),this.parentBottom.classList.add("is-custom-parent"))}},shouldQueue:function(){return!!this.queue&&(this.parentTop.childElementCount>0||this.parentBottom.childElementCount>0)},close:function(){var t=this;clearTimeout(this.timer),this.isActive=!1,setTimeout((function(){var e;t.$destroy(),void 0!==(e=t.$el).remove?e.remove():e.parentNode.removeChild(e)}),150)},showNotice:function(){var t=this;this.shouldQueue()?setTimeout((function(){return t.showNotice()}),250):(this.correctParent.insertAdjacentElement("afterbegin",this.$el),this.isActive=!0,this.timer=setTimeout((function(){return t.close()}),this.duration))},onClick:function(){this.dismissible&&(this.onClose.apply(null,arguments),this.close())}},computed:{correctParent:function(){switch(this.position){case"top-right":case"top":case"top-left":return this.parentTop;case"bottom-right":case"bottom":case"bottom-left":return this.parentBottom}},transition:function(){switch(this.position){case"top-right":case"top":case"top-left":return{enter:"fadeInDown",leave:"fadeOut"};case"bottom-right":case"bottom":case"bottom-left":return{enter:"fadeInUp",leave:"fadeOut"}}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{"enter-active-class":t.transition.enter,"leave-active-class":t.transition.leave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"toast",class:["toast-"+t.type,"is-"+t.position],attrs:{role:"alert"},on:{click:t.onClick}},[n("p",{staticClass:"toast-text"},[t._v(t._s(t.message))])])])})).exports,s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{open:function(n){var r;"string"==typeof n&&(r=n);var i={message:r},o=Object.assign({},i,e,n);return new(t.extend(a))({el:document.createElement("div"),propsData:o})},clear:function(){o.$emit("toast.clear")},success:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:t,type:"success"},e))},error:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:t,type:"error"},e))},info:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:t,type:"info"},e))},warning:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:t,type:"warning"},e))},default:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:t,type:"default"},e))}}};n(1),a.install=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s(t,e);t.$toast=n,t.prototype.$toast=n},e.default=a}]).default)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},,function(t,e,n){var r=n(77);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(7)(r,i);r.locals&&(t.exports=r.locals)},function(t,e){t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){t.exports="/images/vendor/leaflet-draw/dist/spritesheet.svg?fd5728f2cf777b06b966d05c0c823dc9"},,,,,,,,,function(t,e,n){var r;!function(t){"use strict";var i="undefined"!=typeof window?window.CustomEvent:void 0;"undefined"!=typeof window&&"function"!=typeof i&&((i=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype,window.CustomEvent=i);var o=10,a=60,s=600,u=60,l=3600,c=36e3,h=24,f=0,d=1,p=2,v=3,m=4,g="secondTenths",_="seconds",y="minutes",b="hours",w="days",x={secondTenths:100,seconds:1e3,minutes:6e4,hours:36e5,days:864e5},L=t&&t.exports?n(87):void 0;function k(){return"undefined"!=typeof document}function T(){return L}function C(t,e){return(t%e+e)%e}function E(t,e,n){var r,i="";for(r=0;rE[v]||A.hours===E[v]&&(A.minutes>E[p]||A.minutes===E[p]&&A.seconds>=E[d])))}function V(t){var i,s;e=t&&"string"==typeof t.precision?t.precision:_,r=t&&"function"==typeof t.callback?t.callback:function(){},n=t&&!0===t.countdown?-1:1,S=t&&1==t.countdown,t&&"object"==typeof t.target&&(i=t.target,E=W(i)),t&&"object"==typeof t.startValues&&(s=t.startValues,P=W(s),A.secondTenths=P[f],A.seconds=P[d],A.minutes=P[p],A.hours=P[v],A.days=P[m],O.days=A.days,O.hours=O.days*h+A.hours,O.minutes=O.hours*u+A.minutes,O.seconds=O.minutes*a+A.seconds,O.secondTenths=O.seconds*o+A.secondTenths),E=E||!S?E:[0,0,0,0,0],j={precision:e,callback:r,countdown:"object"==typeof t&&1==t.countdown,target:E,startValues:P}}function W(t){var e,n,r,i,s,l;if("object"==typeof t)if(t instanceof Array){if(5!=t.length)throw new Error("Array size not valid");l=t}else l=[t.secondTenths||0,t.seconds||0,t.minutes||0,t.hours||0,t.days||0];for(var c=0;c=l?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0fc9":function(t,e,n){var r=n("3a38"),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},1654:function(t,e,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(t,e,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(t,e,n){var r=n("f772");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(t,e,n){var r=n("f772"),i=n("e53d").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"20fd":function(t,e,n){"use strict";var r=n("d9f6"),i=n("aebd");t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),i=n("32e9"),o=n("79e5"),a=n("be13"),s=n("2b4c"),u=n("520a"),l=s("species"),c=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),h=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=s(t),d=!o((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=d?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[l]=function(){return n}),n[f](""),!e})):void 0;if(!d||!p||"replace"===t&&!c||"split"===t&&!h){var v=/./[f],m=n(a,f,""[t],(function(t,e,n,r,i){return e.exec===u?d&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),g=m[0],_=m[1];r(String.prototype,t,g),i(RegExp.prototype,f,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),i=n("7726").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),i=n("2b4c")("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},"241e":function(t,e,n){var r=n("25eb");t.exports=function(t){return Object(r(t))}},"25eb":function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},"294c":function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},"2aba":function(t,e,n){var r=n("7726"),i=n("32e9"),o=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),u=(""+s).split("toString");n("8378").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var l="function"==typeof n;l&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(l&&(o(n,a)||i(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},"2b4c":function(t,e,n){var r=n("5537")("wks"),i=n("ca5a"),o=n("7726").Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),i=n("d2c8");r(r.P+r.F*n("5147")("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"30f1":function(t,e,n){"use strict";var r=n("b8e3"),i=n("63b6"),o=n("9138"),a=n("35e8"),s=n("481b"),u=n("8f60"),l=n("45f2"),c=n("53e2"),h=n("5168")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,p,v,m,g){u(n,e,p);var _,y,b,w=function(t){if(!f&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",L="values"==v,k=!1,T=t.prototype,C=T[h]||T["@@iterator"]||v&&T[v],E=C||w(v),M=v?L?w("entries"):E:void 0,P="Array"==e&&T.entries||C;if(P&&(b=c(P.call(new t)))!==Object.prototype&&b.next&&(l(b,x,!0),r||"function"==typeof b[h]||a(b,h,d)),L&&C&&"values"!==C.name&&(k=!0,E=function(){return C.call(this)}),r&&!g||!f&&!k&&T[h]||a(T,h,E),s[e]=E,s[x]=d,v)if(_={values:L?E:w("values"),keys:m?E:w("keys"),entries:M},g)for(y in _)y in T||o(T,y,_[y]);else i(i.P+i.F*(f||k),e,_);return _}},"32a6":function(t,e,n){var r=n("241e"),i=n("c3a1");n("ce7e")("keys",(function(){return function(t){return i(r(t))}}))},"32e9":function(t,e,n){var r=n("86cc"),i=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"32fc":function(t,e,n){var r=n("e53d").document;t.exports=r&&r.documentElement},"335c":function(t,e,n){var r=n("6b4c");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"355d":function(t,e){e.f={}.propertyIsEnumerable},"35e8":function(t,e,n){var r=n("d9f6"),i=n("aebd");t.exports=n("8e60")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"36c3":function(t,e,n){var r=n("335c"),i=n("25eb");t.exports=function(t){return r(i(t))}},3702:function(t,e,n){var r=n("481b"),i=n("5168")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},"3a38":function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"40c3":function(t,e,n){var r=n("6b4c"),i=n("5168")("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"45f2":function(t,e,n){var r=n("d9f6").f,i=n("07e3"),o=n("5168")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"469f":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("7d7b")},"481b":function(t,e){t.exports={}},"4aa6":function(t,e,n){t.exports=n("dc62")},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"4ee1":function(t,e,n){var r=n("5168")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},"50ed":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},5168:function(t,e,n){var r=n("dbdb")("wks"),i=n("62a0"),o=n("e53d").Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},5176:function(t,e,n){t.exports=n("51b6")},"51b6":function(t,e,n){n("a3c3"),t.exports=n("584a").Object.assign},"520a":function(t,e,n){"use strict";var r,i,o=n("0bfb"),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,l=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(t){var e,n,r,i,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),l&&(e=u.lastIndex),r=a.call(u,t),l&&r&&(u.lastIndex=u.global?r.index+r[0].length:e),c&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i1?arguments[1]:void 0,m=void 0!==v,g=0,_=c(f);if(m&&(v=r(v,p>2?arguments[2]:void 0,2)),null==_||d==Array&&s(_))for(n=new d(e=u(f.length));e>g;g++)l(n,g,m?v(f[g],g):f[g]);else for(h=_.call(f),n=new d;!(i=h.next()).done;g++)l(n,g,m?a(h,v,[i.value,g],!0):i.value);return n.length=g,n}})},"54a1":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("95d5")},5537:function(t,e,n){var r=n("8378"),i=n("7726"),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(t,e,n){var r=n("dbdb")("keys"),i=n("62a0");t.exports=function(t){return r[t]||(r[t]=i(t))}},"584a":function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"5b4e":function(t,e,n){var r=n("36c3"),i=n("b447"),o=n("0fc9");t.exports=function(t){return function(e,n,a){var s,u=r(e),l=i(u.length),c=o(a,l);if(t&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},"5ca1":function(t,e,n){var r=n("7726"),i=n("8378"),o=n("32e9"),a=n("2aba"),s=n("9b43"),u=function(t,e,n){var l,c,h,f,d=t&u.F,p=t&u.G,v=t&u.S,m=t&u.P,g=t&u.B,_=p?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,y=p?i:i[e]||(i[e]={}),b=y.prototype||(y.prototype={});for(l in p&&(n=e),n)h=((c=!d&&_&&void 0!==_[l])?_:n)[l],f=g&&c?s(h,r):m&&"function"==typeof h?s(Function.call,h):h,_&&a(_,l,h,t&u.U),y[l]!=h&&o(y,l,f),m&&b[l]!=h&&(b[l]=h)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"5d73":function(t,e,n){t.exports=n("469f")},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"62a0":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"63b6":function(t,e,n){var r=n("e53d"),i=n("584a"),o=n("d864"),a=n("35e8"),s=n("07e3"),u=function(t,e,n){var l,c,h,f=t&u.F,d=t&u.G,p=t&u.S,v=t&u.P,m=t&u.B,g=t&u.W,_=d?i:i[e]||(i[e]={}),y=_.prototype,b=d?r:p?r[e]:(r[e]||{}).prototype;for(l in d&&(n=e),n)(c=!f&&b&&void 0!==b[l])&&s(_,l)||(h=c?b[l]:n[l],_[l]=d&&"function"!=typeof b[l]?n[l]:m&&c?o(h,r):g&&b[l]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):v&&"function"==typeof h?o(Function.call,h):h,v&&((_.virtual||(_.virtual={}))[l]=h,t&u.R&&y&&!y[l]&&a(y,l,h)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},6762:function(t,e,n){"use strict";var r=n("5ca1"),i=n("c366")(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var r=n("626a"),i=n("be13");t.exports=function(t){return r(i(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"6b4c":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6c1c":function(t,e,n){n("c367");for(var r=n("e53d"),i=n("35e8"),o=n("481b"),a=n("5168")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u=l?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(t,e,n){t.exports=n("d2d5")},"77f1":function(t,e,n){var r=n("4588"),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},"794b":function(t,e,n){t.exports=!n("8e60")&&!n("294c")((function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a}))},"79aa":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},"7cd6":function(t,e,n){var r=n("40c3"),i=n("5168")("iterator"),o=n("481b");t.exports=n("584a").getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},"7d7b":function(t,e,n){var r=n("e4ae"),i=n("7cd6");t.exports=n("584a").getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},"7e90":function(t,e,n){var r=n("d9f6"),i=n("e4ae"),o=n("c3a1");t.exports=n("8e60")?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},8378:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},8436:function(t,e){t.exports=function(){}},"86cc":function(t,e,n){var r=n("cb7c"),i=n("c69a"),o=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8aae":function(t,e,n){n("32a6"),t.exports=n("584a").Object.keys},"8e60":function(t,e,n){t.exports=!n("294c")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"8f60":function(t,e,n){"use strict";var r=n("a159"),i=n("aebd"),o=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},9003:function(t,e,n){var r=n("6b4c");t.exports=Array.isArray||function(t){return"Array"==r(t)}},9138:function(t,e,n){t.exports=n("35e8")},9306:function(t,e,n){"use strict";var r=n("c3a1"),i=n("9aa9"),o=n("355d"),a=n("241e"),s=n("335c"),u=Object.assign;t.exports=!u||n("294c")((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r}))?function(t,e){for(var n=a(t),u=arguments.length,l=1,c=i.f,h=o.f;u>l;)for(var f,d=s(arguments[l++]),p=c?r(d).concat(c(d)):r(d),v=p.length,m=0;v>m;)h.call(d,f=p[m++])&&(n[f]=d[f]);return n}:u},9427:function(t,e,n){var r=n("63b6");r(r.S,"Object",{create:n("a159")})},"95d5":function(t,e,n){var r=n("40c3"),i=n("5168")("iterator"),o=n("481b");t.exports=n("584a").isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||o.hasOwnProperty(r(e))}},"9aa9":function(t,e){e.f=Object.getOwnPropertySymbols},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),i=Array.prototype;null==i[r]&&n("32e9")(i,r,{}),t.exports=function(t){i[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a159:function(t,e,n){var r=n("e4ae"),i=n("7e90"),o=n("1691"),a=n("5559")("IE_PROTO"),s=function(){},u=function(){var t,e=n("1ec9")("iframe"),r=o.length;for(e.style.display="none",n("32fc").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("