Ultimate CSV Importer - Version 6.2.3

Version Description

Download this release

Release Info

Developer smackcoders
Plugin Icon 128x128 Ultimate CSV Importer
Version 6.2.3
Comparing to
See all releases

Code changes from version 6.2.2 to 6.2.3

Files changed (2) hide show
  1. Readme.txt +12 -6
  2. assets/js/admin-v6.1.js +8948 -21
Readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Import and Export WordPress Data as CSV or XML ===
2
  Contributors: smackcoders, smacksupport
3
  Requires at least: 5.0
4
- Tested up to: 5.6
5
- Stable tag: 6.2.2
6
- Version: 6.2.2
7
  Requires PHP: 5.2.4
8
  Author: smackcoders
9
  Author URI: http://profiles.wordpress.org/smackcoders/
@@ -82,12 +82,12 @@ Custom Field – WordPress default Text and Text area fields.
82
  BBPress Plugin - Topic, Reply, and Forum Import.
83
  LearnPress Plugin - Courses, Lessons, Quizzes, Orders and Questions Import.
84
  WooCommerce - Products with categories, attributes, tags, and Images Import.
85
- All in One SEO Plugin - SEO Fields Import.
86
  WP Customer Reviews – Reviews Import.
87
  MultiLanguage by Websoft.
88
  Post Expirator Plugin.
89
  WooCommerce Product Bundles Plugin.
90
- Rank Math SEO – Best SEO Plugin for WordPress
91
 
92
  = Highlights =
93
  * High performance, much comparable & much faster than all the other available plugins.
@@ -206,6 +206,10 @@ Import to WordPress done in different methods based on content source type, plat
206
 
207
 
208
  == Changelog ==
 
 
 
 
209
  = 6.2.2 =
210
  * Added: Import support for Rank Math SEO Plugin.
211
 
@@ -683,6 +687,8 @@ Import to WordPress done in different methods based on content source type, plat
683
  * Initial release version. Tested and found works well without any issues.
684
 
685
  == Upgrade Notice ==
 
 
686
  = 6.2.2 =
687
  * Added: Upgrade now for latest updates.
688
  = 6.2.1 =
@@ -888,4 +894,4 @@ Import to WordPress done in different methods based on content source type, plat
888
  = 1.0.1 =
889
  * Added features to import multiple tags and categories with different delimiters.
890
  = 1.0.0 =
891
- * Initial release of plugin.
1
  === Import and Export WordPress Data as CSV or XML ===
2
  Contributors: smackcoders, smacksupport
3
  Requires at least: 5.0
4
+ Tested up to: 5.7
5
+ Stable tag: 6.2.3
6
+ Version: 6.2.3
7
  Requires PHP: 5.2.4
8
  Author: smackcoders
9
  Author URI: http://profiles.wordpress.org/smackcoders/
82
  BBPress Plugin - Topic, Reply, and Forum Import.
83
  LearnPress Plugin - Courses, Lessons, Quizzes, Orders and Questions Import.
84
  WooCommerce - Products with categories, attributes, tags, and Images Import.
85
+ All in One SEO Plugin - .SEO Fields Import.
86
  WP Customer Reviews – Reviews Import.
87
  MultiLanguage by Websoft.
88
  Post Expirator Plugin.
89
  WooCommerce Product Bundles Plugin.
90
+
91
 
92
  = Highlights =
93
  * High performance, much comparable & much faster than all the other available plugins.
206
 
207
 
208
  == Changelog ==
209
+ = 6.2.3 =
210
+ * Added: Compatibility for WordPress 5.7
211
+ * Added: Import support for Rank Math SEO PRO Plugin.
212
+
213
  = 6.2.2 =
214
  * Added: Import support for Rank Math SEO Plugin.
215
 
687
  * Initial release version. Tested and found works well without any issues.
688
 
689
  == Upgrade Notice ==
690
+ = 6.2.3 =
691
+ * Added: Upgrade now for latest updates.
692
  = 6.2.2 =
693
  * Added: Upgrade now for latest updates.
694
  = 6.2.1 =
894
  = 1.0.1 =
895
  * Added features to import multiple tags and categories with different delimiters.
896
  = 1.0.0 =
897
+ * Initial release of plugin.
assets/js/admin-v6.1.js CHANGED
@@ -1,361 +1,104712 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=455)}([function(e,t,n){"use strict";e.exports=n(255)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,"a",(function(){return r}))},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Et(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=m(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function _(e){var t=f(NaN);return null!=e?p(m(t),e):m(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=o.momentProperties=[],b=!1;function y(e,t){var n,r,o;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=m(t)),c(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)c(o=t[r=v[n]])||(e[r]=o);return e}function w(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,o.updateOffset(this),b=!1)}function k(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function x(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var n=!0;return p((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){var r,a,i,l=[];for(a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(i in r+="\n["+a+"] ",arguments[0])s(arguments[0],i)&&(r+=i+": "+arguments[0][i]+", ");r=r.slice(0,-2)}else r=arguments[a];l.push(r)}x(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var E,T={};function S(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),T[e]||(x(t),T[e]=!0)}function D(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function L(e,t){var n,r=p({},e);for(n in t)s(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&i(e[n])&&(r[n]=p({},r[n]));return r}function C(e){null!=e&&this.set(e)}function P(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var O=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,A={},I={};function R(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(I[e]=o),t&&(I[t[0]]=function(){return P(o.apply(this,arguments),t[1],t[2])}),n&&(I[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function Y(e,t){return e.isValid()?(t=j(t,e.localeData()),A[t]=A[t]||function(e){var t,n,r,o=e.match(O);for(t=0,n=o.length;t<n;t++)I[o[t]]?o[t]=I[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,a="";for(r=0;r<n;r++)a+=D(o[r])?o[r].call(t,e):o[r];return a}}(t),A[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(N.lastIndex=0;n>=0&&N.test(e);)e=e.replace(N,r),N.lastIndex=0,n-=1;return e}var F={};function H(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function z(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function B(e){var t,n,r={};for(n in e)s(e,n)&&(t=z(n))&&(r[t]=e[n]);return r}var U={};function V(e,t){U[e]=t}function W(e){return e%4==0&&e%100!=0||e%400==0}function q(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=q(t)),n}function J(e,t){return function(n){return null!=n?(Q(this,e,n),o.updateOffset(this,t),this):K(this,e)}}function K(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&W(e.year())&&1===e.month()&&29===e.date()?(n=G(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),ke(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var X,$=/\d/,Z=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,re=/\d\d?/,oe=/\d\d\d\d?/,ae=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,se=/\d{1,4}/,le=/[+-]?\d{1,6}/,ce=/\d+/,ue=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,pe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function fe(e,t,n){X[e]=D(t)?t:function(e,r){return e&&n?n:t}}function me(e,t){return s(X,e)?X[e](t._strict,t._locale):new RegExp(ge(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function ge(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}X={};var _e,ve={};function be(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),u(t)&&(r=function(e,n){n[t]=G(e)}),n=0;n<e.length;n++)ve[e[n]]=r}function ye(e,t){be(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function we(e,t,n){null!=t&&s(ve,e)&&ve[e](t,n._a,n,e)}function ke(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?W(e)?29:28:31-r%7%2}_e=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},R("M",["MM",2],"Mo",(function(){return this.month()+1})),R("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),R("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),H("month","M"),V("month",8),fe("M",re),fe("MM",re,Z),fe("MMM",(function(e,t){return t.monthsShortRegex(e)})),fe("MMMM",(function(e,t){return t.monthsRegex(e)})),be(["M","MM"],(function(e,t){t[1]=G(e)-1})),be(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[1]=o:m(n).invalidMonth=e}));var xe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Me="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ee=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te=pe,Se=pe;function De(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=_e.call(this._shortMonthsParse,i))?o:null:-1!==(o=_e.call(this._longMonthsParse,i))?o:null:"MMM"===t?-1!==(o=_e.call(this._shortMonthsParse,i))||-1!==(o=_e.call(this._longMonthsParse,i))?o:null:-1!==(o=_e.call(this._longMonthsParse,i))||-1!==(o=_e.call(this._shortMonthsParse,i))?o:null}function Le(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=G(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),ke(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ce(e){return null!=e?(Le(this,e),o.updateOffset(this,!0),this):K(this,"Month")}function Pe(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],a=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),a.sort(e),t=0;t<12;t++)r[t]=ge(r[t]),o[t]=ge(o[t]);for(t=0;t<24;t++)a[t]=ge(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Oe(e){return W(e)?366:365}R("Y",0,0,(function(){var e=this.year();return e<=9999?P(e,4):"+"+e})),R(0,["YY",2],0,(function(){return this.year()%100})),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),H("year","y"),V("year",1),fe("Y",ue),fe("YY",re,Z),fe("YYYY",se,te),fe("YYYYY",le,ne),fe("YYYYYY",le,ne),be(["YYYYY","YYYYYY"],0),be("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):G(e)})),be("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),be("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return G(e)+(G(e)>68?1900:2e3)};var Ne=J("FullYear",!0);function Ae(e,t,n,r,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,a,i),s}function Ie(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Re(e,t,n){var r=7+t-n;return-(7+Ie(e,0,r).getUTCDay()-t)%7+r-1}function Ye(e,t,n,r,o){var a,i,s=1+7*(t-1)+(7+n-r)%7+Re(e,r,o);return s<=0?i=Oe(a=e-1)+s:s>Oe(e)?(a=e+1,i=s-Oe(e)):(a=e,i=s),{year:a,dayOfYear:i}}function je(e,t,n){var r,o,a=Re(e.year(),t,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?r=i+Fe(o=e.year()-1,t,n):i>Fe(e.year(),t,n)?(r=i-Fe(e.year(),t,n),o=e.year()+1):(o=e.year(),r=i),{week:r,year:o}}function Fe(e,t,n){var r=Re(e,t,n),o=Re(e+1,t,n);return(Oe(e)-r+o)/7}function He(e,t){return e.slice(t,7).concat(e.slice(0,t))}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),V("week",5),V("isoWeek",5),fe("w",re),fe("ww",re,Z),fe("W",re),fe("WW",re,Z),ye(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=G(e)})),R("d",0,"do","day"),R("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),R("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),R("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),V("day",11),V("weekday",11),V("isoWeekday",11),fe("d",re),fe("e",re),fe("E",re),fe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),fe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),fe("dddd",(function(e,t){return t.weekdaysRegex(e)})),ye(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:m(n).invalidWeekday=e})),ye(["d","e","E"],(function(e,t,n,r){t[r]=G(e)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ue="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ve=pe,We=pe,qe=pe;function Ge(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=_e.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=_e.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=_e.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=_e.call(this._weekdaysParse,i))||-1!==(o=_e.call(this._shortWeekdaysParse,i))||-1!==(o=_e.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=_e.call(this._shortWeekdaysParse,i))||-1!==(o=_e.call(this._weekdaysParse,i))||-1!==(o=_e.call(this._minWeekdaysParse,i))?o:null:-1!==(o=_e.call(this._minWeekdaysParse,i))||-1!==(o=_e.call(this._weekdaysParse,i))||-1!==(o=_e.call(this._shortWeekdaysParse,i))?o:null}function Je(){function e(e,t){return t.length-e.length}var t,n,r,o,a,i=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=ge(this.weekdaysMin(n,"")),o=ge(this.weekdaysShort(n,"")),a=ge(this.weekdays(n,"")),i.push(r),s.push(o),l.push(a),c.push(r),c.push(o),c.push(a);i.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Qe(e,t){R(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Xe(e,t){return t._meridiemParse}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,Ke),R("k",["kk",2],0,(function(){return this.hours()||24})),R("hmm",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)})),R("hmmss",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),R("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),R("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),H("hour","h"),V("hour",13),fe("a",Xe),fe("A",Xe),fe("H",re),fe("h",re),fe("k",re),fe("HH",re,Z),fe("hh",re,Z),fe("kk",re,Z),fe("hmm",oe),fe("hmmss",ae),fe("Hmm",oe),fe("Hmmss",ae),be(["H","HH"],3),be(["k","kk"],(function(e,t,n){var r=G(e);t[3]=24===r?0:r})),be(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),be(["h","hh"],(function(e,t,n){t[3]=G(e),m(n).bigHour=!0})),be("hmm",(function(e,t,n){var r=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r)),m(n).bigHour=!0})),be("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r,2)),t[5]=G(e.substr(o)),m(n).bigHour=!0})),be("Hmm",(function(e,t,n){var r=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r))})),be("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r,2)),t[5]=G(e.substr(o))}));var $e,Ze=J("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xe,monthsShort:Me,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:Ue,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ot(e){return e?e.toLowerCase().replace("_","-"):e}function at(t){var r=null;if(void 0===tt[t]&&void 0!==e&&e&&e.exports)try{r=$e._abbr,n(290)("./"+t),it(r)}catch(e){tt[t]=null}return tt[t]}function it(e,t){var n;return e&&((n=c(t)?lt(e):st(e,t))?$e=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),$e._abbr}function st(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new C(L(r,t)),nt[e]&&nt[e].forEach((function(e){st(e.name,e.config)})),it(e),tt[e]}return delete tt[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return $e;if(!a(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,r,o,a=0;a<e.length;){for(t=(o=ot(e[a]).split("-")).length,n=(n=ot(e[a+1]))?n.split("-"):null;t>0;){if(r=at(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&rt(o,n)>=t-1)break;t--}a++}return $e}(e)}function ct(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>ke(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}var ut=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ft=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],mt=/^\/?Date\((-?\d+)/i,gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,_t={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,n,r,o,a,i,s=e._i,l=ut.exec(s)||dt.exec(s);if(l){for(m(e).iso=!0,t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(l[1])){o=pt[t][0],r=!1!==pt[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(l[3])){a=(l[2]||" ")+ft[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(l[4]){if(!ht.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=o+(a||"")+(i||""),xt(e)}else e._isValid=!1}function bt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function yt(e){var t,n,r,o,a,i,s,l,c=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(n=c[4],r=c[3],o=c[2],a=c[5],i=c[6],s=c[7],l=[bt(n),Me.indexOf(r),parseInt(o,10),parseInt(a,10),parseInt(i,10)],s&&l.push(parseInt(s,10)),t=l,!function(e,t,n){return!e||Be.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return _t[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(c[8],c[9],c[10]),e._d=Ie.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function wt(e,t,n){return null!=e?e:null!=t?t:n}function kt(e){var t,n,r,a,i,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,o,a,i,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,i=4,n=wt(t.GG,e._a[0],je(Tt(),1,4).year),r=wt(t.W,1),((o=wt(t.E,1))<1||o>7)&&(l=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,c=je(Tt(),a,i),n=wt(t.gg,e._a[0],c.year),r=wt(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(l=!0)):o=a),r<1||r>Fe(n,a,i)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(s=Ye(n,r,o,a,i),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(i=wt(e._a[0],r[0]),(e._dayOfYear>Oe(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Ie(i,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ie:Ae).apply(null,s),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(m(e).weekdayMismatch=!0)}}function xt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],m(e).empty=!0;var t,n,r,a,i,s,l=""+e._i,c=l.length,u=0;for(r=j(e._f,e._locale).match(O)||[],t=0;t<r.length;t++)a=r[t],(n=(l.match(me(a,e))||[])[0])&&((i=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(i),l=l.slice(l.indexOf(n)+n.length),u+=n.length),I[a]?(n?m(e).empty=!1:m(e).unusedTokens.push(a),we(a,n,e)):e._strict&&!n&&m(e).unusedTokens.push(a);m(e).charsLeftOver=c-u,l.length>0&&m(e).unusedInput.push(l),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=m(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),kt(e),ct(e)}else yt(e);else vt(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new w(ct(t)):(d(t)?e._d=t:a(n)?function(e){var t,n,r,o,a,i,s=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)a=0,i=!1,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],xt(t),g(t)&&(i=!0),a+=m(t).charsLeftOver,a+=10*m(t).unusedTokens.length,m(t).score=a,s?a<r&&(r=a,n=t):(null==r||a<r||i)&&(r=a,n=t,i&&(s=!0));p(e,n||t)}(e):n?xt(e):function(e){var t=e._i;c(t)?e._d=new Date(o.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=mt.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,yt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),kt(e)):i(t)?function(e){if(!e._d){var t=B(e._i),n=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),kt(e)}}(e):u(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function Et(e,t,n,r,o){var s,c={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=n,c._i=e,c._f=t,c._strict=r,(s=new w(ct(Mt(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Tt(e,t,n,r){return Et(e,t,n,r,!1)}o.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var St=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Dt=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Lt(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Ct=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pt(e){var t=B(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1;for(t in e)if(s(e,t)&&(-1===_e.call(Ct,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Ct.length;++n)if(e[Ct[n]]){if(r)return!1;parseFloat(e[Ct[n]])!==G(e[Ct[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*c+1e3*l*60*60,this._days=+i+7*a,this._months=+o+3*r+12*n,this._data={},this._locale=lt(),this._bubble()}function Ot(e){return e instanceof Pt}function Nt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function At(e,t){R(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+P(~~(e/60),2)+t+P(~~e%60,2)}))}At("Z",":"),At("ZZ",""),fe("Z",he),fe("ZZ",he),be(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Rt(he,e)}));var It=/([\+\-]|\d\d)/gi;function Rt(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(It)||["-",0,0])[1]+G(n[2]))?0:"+"===n[0]?r:-r}function Yt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(k(e)||d(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):Tt(e).local()}function jt(e){return-Math.round(e._d.getTimezoneOffset())}function Ft(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Ht=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Bt(e,t){var n,r,o,a,i,l,c=e,d=null;return Ot(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(c={},t?c[t]=+e:c.milliseconds=+e):(d=Ht.exec(e))?(n="-"===d[1]?-1:1,c={y:0,d:G(d[2])*n,h:G(d[3])*n,m:G(d[4])*n,s:G(d[5])*n,ms:G(Nt(1e3*d[6]))*n}):(d=zt.exec(e))?(n="-"===d[1]?-1:1,c={y:Ut(d[2],n),M:Ut(d[3],n),w:Ut(d[4],n),d:Ut(d[5],n),h:Ut(d[6],n),m:Ut(d[7],n),s:Ut(d[8],n)}):null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(a=Tt(c.from),i=Tt(c.to),o=a.isValid()&&i.isValid()?(i=Yt(i,a),a.isBefore(i)?l=Vt(a,i):((l=Vt(i,a)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(c={}).ms=o.milliseconds,c.M=o.months),r=new Pt(c),Ot(e)&&s(e,"_locale")&&(r._locale=e._locale),Ot(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Ut(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Vt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Wt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),qt(this,Bt(n,r),e),this}}function qt(e,t,n,r){var a=t._milliseconds,i=Nt(t._days),s=Nt(t._months);e.isValid()&&(r=null==r||r,s&&Le(e,K(e,"Month")+s*n),i&&Q(e,"Date",K(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),r&&o.updateOffset(e,i||s))}Bt.fn=Pt.prototype,Bt.invalid=function(){return Bt(NaN)};var Gt=Wt(1,"add"),Jt=Wt(-1,"subtract");function Kt(e){return"string"==typeof e||e instanceof String}function Qt(e){return k(e)||d(e)||Kt(e)||u(e)||function(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Kt(e)})).length),t&&n}(e)||function(e){var t,n,r=i(e)&&!l(e),o=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<a.length;t+=1)n=a[t],o=o||s(e,n);return r&&o}(e)||null==e}function Xt(e){var t,n=i(e)&&!l(e),r=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=r||s(e,o[t]);return n&&r}function $t(e,t){if(e.date()<t.date())return-$t(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Zt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var en=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function tn(){return this._locale}function nn(e,t){return(e%t+t)%t}function rn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function on(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function an(e,t){return t.erasAbbrRegex(e)}function sn(){var e,t,n=[],r=[],o=[],a=[],i=this.eras();for(e=0,t=i.length;e<t;++e)r.push(ge(i[e].name)),n.push(ge(i[e].abbr)),o.push(ge(i[e].narrow)),a.push(ge(i[e].name)),a.push(ge(i[e].abbr)),a.push(ge(i[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function ln(e,t){R(0,[e,e.length],0,t)}function cn(e,t,n,r,o){var a;return null==e?je(this,r,o).year:(t>(a=Fe(e,r,o))&&(t=a),un.call(this,e,t,n,r,o))}function un(e,t,n,r,o){var a=Ye(e,t,n,r,o),i=Ie(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),fe("N",an),fe("NN",an),fe("NNN",an),fe("NNNN",(function(e,t){return t.erasNameRegex(e)})),fe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?m(n).era=o:m(n).invalidEra=e})),fe("y",ce),fe("yy",ce),fe("yyy",ce),fe("yyyy",ce),fe("yo",(function(e,t){return t._eraYearOrdinalRegex||ce})),be(["y","yy","yyy","yyyy"],0),be(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,o):t[0]=parseInt(e,10)})),R(0,["gg",2],0,(function(){return this.weekYear()%100})),R(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ln("gggg","weekYear"),ln("ggggg","weekYear"),ln("GGGG","isoWeekYear"),ln("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),V("weekYear",1),V("isoWeekYear",1),fe("G",ue),fe("g",ue),fe("GG",re,Z),fe("gg",re,Z),fe("GGGG",se,te),fe("gggg",se,te),fe("GGGGG",le,ne),fe("ggggg",le,ne),ye(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=G(e)})),ye(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),R("Q",0,"Qo","quarter"),H("quarter","Q"),V("quarter",7),fe("Q",$),be("Q",(function(e,t){t[1]=3*(G(e)-1)})),R("D",["DD",2],"Do","date"),H("date","D"),V("date",9),fe("D",re),fe("DD",re,Z),fe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),be(["D","DD"],2),be("Do",(function(e,t){t[2]=G(e.match(re)[0])}));var dn=J("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),V("dayOfYear",4),fe("DDD",ie),fe("DDDD",ee),be(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=G(e)})),R("m",["mm",2],0,"minute"),H("minute","m"),V("minute",14),fe("m",re),fe("mm",re,Z),be(["m","mm"],4);var hn=J("Minutes",!1);R("s",["ss",2],0,"second"),H("second","s"),V("second",15),fe("s",re),fe("ss",re,Z),be(["s","ss"],5);var pn,fn,mn=J("Seconds",!1);for(R("S",0,0,(function(){return~~(this.millisecond()/100)})),R(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),R(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),R(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),R(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),R(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),R(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),H("millisecond","ms"),V("millisecond",16),fe("S",ie,$),fe("SS",ie,Z),fe("SSS",ie,ee),pn="SSSS";pn.length<=9;pn+="S")fe(pn,ce);function gn(e,t){t[6]=G(1e3*("0."+e))}for(pn="S";pn.length<=9;pn+="S")be(pn,gn);fn=J("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var _n=w.prototype;function vn(e){return e}_n.add=Gt,_n.calendar=function(e,t){1===arguments.length&&(arguments[0]?Qt(arguments[0])?(e=arguments[0],t=void 0):Xt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Tt(),r=Yt(n,this).startOf("day"),a=o.calendarFormat(this,r)||"sameElse",i=t&&(D(t[a])?t[a].call(this,n):t[a]);return this.format(i||this.localeData().calendar(a,this,Tt(n)))},_n.clone=function(){return new w(this)},_n.diff=function(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(!(r=Yt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=z(t)){case"year":a=$t(this,r)/12;break;case"month":a=$t(this,r);break;case"quarter":a=$t(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:q(a)},_n.endOf=function(e){var t,n;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?on:rn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},_n.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=Y(this,e);return this.localeData().postformat(t)},_n.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?Bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.fromNow=function(e){return this.from(Tt(),e)},_n.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?Bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.toNow=function(e){return this.to(Tt(),e)},_n.get=function(e){return D(this[e=z(e)])?this[e]():this},_n.invalidAt=function(){return m(this).overflow},_n.isAfter=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},_n.isBefore=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},_n.isBetween=function(e,t,n,r){var o=k(e)?e:Tt(e),a=k(t)?t:Tt(t);return!!(this.isValid()&&o.isValid()&&a.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n)))},_n.isSame=function(e,t){var n,r=k(e)?e:Tt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},_n.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},_n.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},_n.isValid=function(){return g(this)},_n.lang=en,_n.locale=Zt,_n.localeData=tn,_n.max=Dt,_n.min=St,_n.parsingFlags=function(){return p({},m(this))},_n.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:U[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=B(e));for(n=0;n<r.length;n++)this[r[n].unit](e[r[n].unit])}else if(D(this[e=z(e)]))return this[e](t);return this},_n.startOf=function(e){var t,n;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?on:rn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=nn(t,6e4);break;case"second":t=this._d.valueOf(),t-=nn(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},_n.subtract=Jt,_n.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},_n.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},_n.toDate=function(){return new Date(this.valueOf())},_n.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Y(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Y(n,"Z")):Y(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},_n.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",o="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(_n[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),_n.toJSON=function(){return this.isValid()?this.toISOString():null},_n.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},_n.unix=function(){return Math.floor(this.valueOf()/1e3)},_n.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},_n.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},_n.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},_n.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},_n.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},_n.eraYear=function(){var e,t,n,r,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return(this.year()-o(a[e].since).year())*n+a[e].offset;return this.year()},_n.year=Ne,_n.isLeapYear=function(){return W(this.year())},_n.weekYear=function(e){return cn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},_n.isoWeekYear=function(e){return cn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},_n.quarter=_n.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},_n.month=Ce,_n.daysInMonth=function(){return ke(this.year(),this.month())},_n.week=_n.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},_n.isoWeek=_n.isoWeeks=function(e){var t=je(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},_n.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},_n.weeksInWeekYear=function(){var e=this.localeData()._week;return Fe(this.weekYear(),e.dow,e.doy)},_n.isoWeeksInYear=function(){return Fe(this.year(),1,4)},_n.isoWeeksInISOWeekYear=function(){return Fe(this.isoWeekYear(),1,4)},_n.date=dn,_n.day=_n.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},_n.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},_n.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},_n.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},_n.hour=_n.hours=Ze,_n.minute=_n.minutes=hn,_n.second=_n.seconds=mn,_n.millisecond=_n.milliseconds=fn,_n.utcOffset=function(e,t,n){var r,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Rt(he,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=jt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==e&&(!t||this._changeInProgress?qt(this,Bt(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:jt(this)},_n.utc=function(e){return this.utcOffset(0,e)},_n.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(jt(this),"m")),this},_n.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Rt(de,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},_n.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},_n.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},_n.isLocal=function(){return!!this.isValid()&&!this._isUTC},_n.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},_n.isUtc=Ft,_n.isUTC=Ft,_n.zoneAbbr=function(){return this._isUTC?"UTC":""},_n.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_n.dates=M("dates accessor is deprecated. Use date instead.",dn),_n.months=M("months accessor is deprecated. Use month instead",Ce),_n.years=M("years accessor is deprecated. Use year instead",Ne),_n.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),_n.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return y(t,this),(t=Mt(t))._a?(e=t._isUTC?f(t._a):Tt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,o=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&G(e[r])!==G(t[r]))&&i++;return i+a}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var bn=C.prototype;function yn(e,t,n,r){var o=lt(),a=f().set(r,t);return o[n](a,e)}function wn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return yn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=yn(e,r,n,"month");return o}function kn(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,a=lt(),i=e?a._week.dow:0,s=[];if(null!=n)return yn(t,(n+i)%7,r,"day");for(o=0;o<7;o++)s[o]=yn(t,(o+i)%7,r,"day");return s}bn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return D(r)?r.call(t,n):r},bn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(O).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},bn.invalidDate=function(){return this._invalidDate},bn.ordinal=function(e){return this._ordinal.replace("%d",e)},bn.preparse=vn,bn.postformat=vn,bn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return D(o)?o(e,t,n,r):o.replace(/%d/i,e)},bn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return D(n)?n(t):n.replace(/%s/i,t)},bn.set=function(e){var t,n;for(n in e)s(e,n)&&(D(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},bn.eras=function(e,t){var n,r,a,i=this._eras||lt("en")._eras;for(n=0,r=i.length;n<r;++n){switch(typeof i[n].since){case"string":a=o(i[n].since).startOf("day"),i[n].since=a.valueOf()}switch(typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=o(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}}return i},bn.erasParse=function(e,t,n){var r,o,a,i,s,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(a=l[r].name.toUpperCase(),i=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(i===e)return l[r];break;case"NNNN":if(a===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([a,i,s].indexOf(e)>=0)return l[r]},bn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?o(e.since).year():o(e.since).year()+(t-e.offset)*n},bn.erasAbbrRegex=function(e){return s(this,"_erasAbbrRegex")||sn.call(this),e?this._erasAbbrRegex:this._erasRegex},bn.erasNameRegex=function(e){return s(this,"_erasNameRegex")||sn.call(this),e?this._erasNameRegex:this._erasRegex},bn.erasNarrowRegex=function(e){return s(this,"_erasNarrowRegex")||sn.call(this),e?this._erasNarrowRegex:this._erasRegex},bn.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ee).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},bn.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ee.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},bn.monthsParse=function(e,t,n){var r,o,a;if(this._monthsParseExact)return De.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},bn.monthsRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Se),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},bn.monthsShortRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Te),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},bn.week=function(e){return je(e,this._week.dow,this._week.doy).week},bn.firstDayOfYear=function(){return this._week.doy},bn.firstDayOfWeek=function(){return this._week.dow},bn.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?He(n,this._week.dow):e?n[e.day()]:n},bn.weekdaysMin=function(e){return!0===e?He(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},bn.weekdaysShort=function(e){return!0===e?He(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},bn.weekdaysParse=function(e,t,n){var r,o,a;if(this._weekdaysParseExact)return Ge.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},bn.weekdaysRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Ve),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},bn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=We),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},bn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},bn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},bn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},it("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===G(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=M("moment.lang is deprecated. Use moment.locale instead.",it),o.langData=M("moment.langData is deprecated. Use moment.localeData instead.",lt);var xn=Math.abs;function Mn(e,t,n,r){var o=Bt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function Tn(e){return 4800*e/146097}function Sn(e){return 146097*e/4800}function Dn(e){return function(){return this.as(e)}}var Ln=Dn("ms"),Cn=Dn("s"),Pn=Dn("m"),On=Dn("h"),Nn=Dn("d"),An=Dn("w"),In=Dn("M"),Rn=Dn("Q"),Yn=Dn("y");function jn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Fn=jn("milliseconds"),Hn=jn("seconds"),zn=jn("minutes"),Bn=jn("hours"),Un=jn("days"),Vn=jn("months"),Wn=jn("years"),qn=Math.round,Gn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Kn=Math.abs;function Qn(e){return(e>0)-(e<0)||+e}function Xn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,a,i,s,l=Kn(this._milliseconds)/1e3,c=Kn(this._days),u=Kn(this._months),d=this.asSeconds();return d?(e=q(l/60),t=q(e/60),l%=60,e%=60,n=q(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",a=Qn(this._months)!==Qn(d)?"-":"",i=Qn(this._days)!==Qn(d)?"-":"",s=Qn(this._milliseconds)!==Qn(d)?"-":"",o+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(c?i+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var $n=Pt.prototype;return $n.isValid=function(){return this._isValid},$n.abs=function(){var e=this._data;return this._milliseconds=xn(this._milliseconds),this._days=xn(this._days),this._months=xn(this._months),e.milliseconds=xn(e.milliseconds),e.seconds=xn(e.seconds),e.minutes=xn(e.minutes),e.hours=xn(e.hours),e.months=xn(e.months),e.years=xn(e.years),this},$n.add=function(e,t){return Mn(this,e,t,1)},$n.subtract=function(e,t){return Mn(this,e,t,-1)},$n.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=z(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Tn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Sn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},$n.asMilliseconds=Ln,$n.asSeconds=Cn,$n.asMinutes=Pn,$n.asHours=On,$n.asDays=Nn,$n.asWeeks=An,$n.asMonths=In,$n.asQuarters=Rn,$n.asYears=Yn,$n.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*G(this._months/12):NaN},$n._bubble=function(){var e,t,n,r,o,a=this._milliseconds,i=this._days,s=this._months,l=this._data;return a>=0&&i>=0&&s>=0||a<=0&&i<=0&&s<=0||(a+=864e5*En(Sn(s)+i),i=0,s=0),l.milliseconds=a%1e3,e=q(a/1e3),l.seconds=e%60,t=q(e/60),l.minutes=t%60,n=q(t/60),l.hours=n%24,i+=q(n/24),o=q(Tn(i)),s+=o,i-=En(Sn(o)),r=q(s/12),s%=12,l.days=i,l.months=s,l.years=r,this},$n.clone=function(){return Bt(this)},$n.get=function(e){return e=z(e),this.isValid()?this[e+"s"]():NaN},$n.milliseconds=Fn,$n.seconds=Hn,$n.minutes=zn,$n.hours=Bn,$n.days=Un,$n.weeks=function(){return q(this.days()/7)},$n.months=Vn,$n.years=Wn,$n.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,a=Gn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(a=Object.assign({},Gn,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),n=this.localeData(),r=function(e,t,n,r){var o=Bt(e).abs(),a=qn(o.as("s")),i=qn(o.as("m")),s=qn(o.as("h")),l=qn(o.as("d")),c=qn(o.as("M")),u=qn(o.as("w")),d=qn(o.as("y")),h=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,Jn.apply(null,h)}(this,!o,a,n),o&&(r=n.pastFuture(+this,r)),n.postformat(r)},$n.toISOString=Xn,$n.toString=Xn,$n.toJSON=Xn,$n.locale=Zt,$n.localeData=tn,$n.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xn),$n.lang=en,R("X",0,0,"unix"),R("x",0,0,"valueOf"),fe("x",ue),fe("X",/[+-]?\d+(\.\d{1,3})?/),be("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),be("x",(function(e,t,n){n._d=new Date(G(e))})),
2
- //! moment.js
3
- o.version="2.29.1",t=Tt,o.fn=_n,o.min=function(){var e=[].slice.call(arguments,0);return Lt("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Lt("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=f,o.unix=function(e){return Tt(1e3*e)},o.months=function(e,t){return wn(e,t,"months")},o.isDate=d,o.locale=it,o.invalid=_,o.duration=Bt,o.isMoment=k,o.weekdays=function(e,t,n){return kn(e,t,n,"weekdays")},o.parseZone=function(){return Tt.apply(null,arguments).parseZone()},o.localeData=lt,o.isDuration=Ot,o.monthsShort=function(e,t){return wn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return kn(e,t,n,"weekdaysMin")},o.defineLocale=st,o.updateLocale=function(e,t){if(null!=t){var n,r,o=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(L(tt[e]._config,t)):(null!=(r=at(e))&&(o=r._config),t=L(o,t),null==r&&(t.abbr=e),(n=new C(t)).parentLocale=tt[e],tt[e]=n),it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===it()&&it(e)):null!=tt[e]&&delete tt[e]);return tt[e]},o.locales=function(){return E(tt)},o.weekdaysShort=function(e,t,n){return kn(e,t,n,"weekdaysShort")},o.normalizeUnits=z,o.relativeTimeRounding=function(e){return void 0===e?qn:"function"==typeof e&&(qn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==Gn[e]&&(void 0===t?Gn[e]:(Gn[e]=t,"s"===e&&(Gn.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=_n,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}).call(this,n(64)(e))},function(e,t,n){e.exports=n(261)},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(2);function o(e){Object(r.a)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){"use strict";function r(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)}n.d(t,"a",(function(){return r}))},function(e,t){function n(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function s(e){n(i,o,a,s,l,"next",e)}function l(e){n(i,o,a,s,l,"throw",e)}s(void 0)}))}}},function(e,t,n){e.exports=n(262)},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";t.__esModule=!0;var r=l(n(279));t.ToastContainer=r.default;var o=n(91);t.Bounce=o.Bounce,t.Slide=o.Slide,t.Zoom=o.Zoom,t.Flip=o.Flip;var a=n(34);t.ToastPosition=a.POSITION,t.ToastType=a.TYPE;var i=l(n(289));t.toast=i.default;var s=l(n(92));function l(e){return e&&e.__esModule?e:{default:e}}t.cssTransition=s.default},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(259);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(260),o=n(10);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";var r=n(84),o=n(263),a=Object.prototype.toString;function i(e){return"[object Array]"===a.call(e)}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===a.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(5),o=n(7),a=n(2);function i(e,t){Object(a.a)(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,l=null==s?0:Object(o.a)(s),c=null==n.weekStartsOn?l:Object(o.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(r.default)(e),d=u.getDay(),h=(d<c?7:0)+d-c;return u.setDate(u.getDate()-h),u.setHours(0,0,0,0),u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(7),o=n(5),a=n(2);function i(e,t){Object(a.a)(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,l=null==s?0:Object(r.a)(s),c=null==n.weekStartsOn?l:Object(r.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(o.default)(e),d=u.getUTCDay(),h=(d<c?7:0)+d-c;return u.setUTCDate(u.getUTCDate()-h),u.setUTCHours(0,0,0,0),u}},function(e,t,n){e.exports=n(280)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));function r(e){return e.getTime()%6e4}function o(e){var t=new Date(e.getTime()),n=Math.ceil(t.getTimezoneOffset());return t.setSeconds(0,0),6e4*n+(n>0?(6e4+r(t))%6e4:r(t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),o=n(2);function a(e){Object(o.a)(1,arguments);var t=1,n=Object(r.default)(e),a=n.getUTCDay(),i=(a<t?7:0)+a-t;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s}));var r=["D","DD"],o=["YY","YYYY"];function a(e){return-1!==r.indexOf(e)}function i(e){return-1!==o.indexOf(e)}function s(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Draggable",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"Droppable",{enumerable:!0,get:function(){return o.default}});var r=a(n(447)),o=a(n(448));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(241),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";
4
- /*!
5
- * react-filepond v5.0.0
6
- * A handy FilePond adapter component for React
7
- *
8
- * Copyright (c) 2018 PQINA
9
- * https://pqina.nl/filepond
10
- *
11
- * Licensed under the MIT license.
12
- */Object.defineProperty(t,"__esModule",{value:!0}),t.File=t.FilePond=t.registerPlugin=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),i=(r=a)&&r.__esModule?r:{default:r},s=n(446);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.registerPlugin=s.registerPlugin;var d=(0,s.supported)(),h=function(e){return e?i.default.Children.map(e,(function(e){var t=e.props;if(t.src){var n={};return t.origin&&(n.type=t.origin),t.name&&(n.file={name:t.name,size:t.size,type:t.type}),t.metadata&&(n.metadata=t.metadata),{source:t.src,options:n}}return t.source&&t.type?{source:t.source,options:{type:t.type}}:t.source})):[]},p=["setOptions","on","off","onOnce","appendTo","insertAfter","insertBefore","isAttachedTo","replaceElement","restoreElement","destroy"];t.FilePond=function(e){function t(){return l(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this;d&&(this._pond=(0,s.create)(this._element,Object.assign({},this.props,{files:h(this.props.children)})),Object.keys(this._pond).filter((function(e){return!p.includes(e)})).forEach((function(t){e[t]=e._pond[t]})))}},{key:"componentWillUnmount",value:function(){this._pond&&this._pond.destroy()}},{key:"componentDidUpdate",value:function(e){if(this._pond){var t=Object.assign({},this.props),n=h(e.children),r=h(this.props.children);JSON.stringify(n)!==JSON.stringify(r)&&(t.files=r),this._pond.setOptions(t)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.className,i=t.allowMultiple,s=t.required,l=t.captureMethod,c=t.acceptedFileTypes;return(0,a.createElement)("div",{className:"filepond--wrapper"},(0,a.createElement)("input",{type:"file",name:r,id:n,accept:c,multiple:i,required:s,className:o,capture:l,ref:function(t){return e._element=t}}))}}]),t}(i.default.Component),t.File=function(e){function t(){return l(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),t}(i.default.Component)},function(e,t,n){var r=n(366),o=n(371);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(5),o=n(2);function a(e){Object(o.a)(1,arguments);var t=Object(r.default)(e);return t.setHours(0,0,0,0),t}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(7),o=n(5),a=n(2);function i(e,t){Object(a.a)(2,arguments);var n=Object(o.default)(e).getTime(),i=Object(r.a)(t);return new Date(n+i)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(7),o=n(5),a=n(18),i=n(2);function s(e,t){Object(i.a)(1,arguments);var n=Object(o.default)(e,t),s=n.getUTCFullYear(),l=t||{},c=l.locale,u=c&&c.options&&c.options.firstWeekContainsDate,d=null==u?1:Object(r.a)(u),h=null==l.firstWeekContainsDate?d:Object(r.a)(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(s+1,0,h),p.setUTCHours(0,0,0,0);var f=Object(a.a)(p,t),m=new Date(0);m.setUTCFullYear(s,0,h),m.setUTCHours(0,0,0,0);var g=Object(a.a)(m,t);return n.getTime()>=f.getTime()?s+1:n.getTime()>=g.getTime()?s:s-1}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";
13
- /*!
14
- * cookie
15
- * Copyright(c) 2012-2014 Roman Shtylman
16
- * Copyright(c) 2015 Douglas Christopher Wilson
17
- * MIT Licensed
18
- */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},i=e.split(a),l=o.decode||r,c=0;c<i.length;c++){var u=i[c],d=u.indexOf("=");if(!(d<0)){var h=u.substr(0,d).trim(),p=u.substr(++d,u.length).trim();'"'==p[0]&&(p=p.slice(1,-1)),null==n[h]&&(n[h]=s(p,l))}}return n},t.serialize=function(e,t,n){var r=n||{},a=r.encode||o;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!i.test(e))throw new TypeError("argument name is invalid");var s=a(t);if(s&&!i.test(s))throw new TypeError("argument val is invalid");var l=e+"="+s;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c))throw new Error("maxAge should be a Number");l+="; Max-Age="+Math.floor(c)}if(r.domain){if(!i.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!i.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");l+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;default:throw new TypeError("option sameSite is invalid")}}return l};var r=decodeURIComponent,o=encodeURIComponent,a=/; */,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";t.__esModule=!0,t.ACTION=t.TYPE=t.POSITION=void 0;t.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"};t.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};t.ACTION={SHOW:0,CLEAR:1,DID_MOUNT:2,WILL_UNMOUNT:3,ON_CHANGE:4}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(341);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";var r=n(230),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),a=Object.prototype.toString,i=Array.prototype.concat,s=Object.defineProperty,l=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),c=function(e,t,n,r){var o;(!(t in e)||"function"==typeof(o=r)&&"[object Function]"===a.call(o)&&r())&&(l?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},a=r(t);o&&(a=i.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;s<a.length;s+=1)c(e,a[s],t[a[s]],n[a[s]])};u.supportsDescriptors=!!l,e.exports=u},function(e,t,n){var r=n(47),o=n(367),a=n(368),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(256)},function(e,t,n){(function(e){!function(t,n,r,o,a,i,s,l,c,u,d,h,p,f,m,g,_,v,b,y,w,k,x,M,E,T,S,D,L,C,P,O,N,A,I,R,Y,j,F,H,z,B,U,V,W,q,G,J,K,Q,X,$,Z,ee,te,ne,re,oe,ae,ie,se,le){"use strict";function ce(e){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t,n){return t&&de(e.prototype,t),n&&de(e,n),e}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(){return(fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function be(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ye(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?be(e):t}function we(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ve(e);if(t){var o=ve(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ye(this,n)}}function ke(e,t){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 xe(e,t){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"})}}n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n,r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r,o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o,a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a,i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i,s=s&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s,l=l&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l,c=c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c,u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,d=d&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d,h=h&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h,p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p,f=f&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f,m=m&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m,g=g&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_,v=v&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v,b=b&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b,y=y&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y,w=w&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w,k=k&&Object.prototype.hasOwnProperty.call(k,"default")?k.default:k,x=x&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x,M=M&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M,E=E&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E,T=T&&Object.prototype.hasOwnProperty.call(T,"default")?T.default:T,S=S&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S,D=D&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D,L=L&&Object.prototype.hasOwnProperty.call(L,"default")?L.default:L,C=C&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C,P=P&&Object.prototype.hasOwnProperty.call(P,"default")?P.default:P,O=O&&Object.prototype.hasOwnProperty.call(O,"default")?O.default:O,N=N&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N,A=A&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A,I=I&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I,R=R&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R,Y=Y&&Object.prototype.hasOwnProperty.call(Y,"default")?Y.default:Y,j=j&&Object.prototype.hasOwnProperty.call(j,"default")?j.default:j,F=F&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F,H=H&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H,z=z&&Object.prototype.hasOwnProperty.call(z,"default")?z.default:z,B=B&&Object.prototype.hasOwnProperty.call(B,"default")?B.default:B,U=U&&Object.prototype.hasOwnProperty.call(U,"default")?U.default:U,V=V&&Object.prototype.hasOwnProperty.call(V,"default")?V.default:V,W=W&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W,q=q&&Object.prototype.hasOwnProperty.call(q,"default")?q.default:q,G=G&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G,J=J&&Object.prototype.hasOwnProperty.call(J,"default")?J.default:J,K=K&&Object.prototype.hasOwnProperty.call(K,"default")?K.default:K,Q=Q&&Object.prototype.hasOwnProperty.call(Q,"default")?Q.default:Q,X=X&&Object.prototype.hasOwnProperty.call(X,"default")?X.default:X,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$,Z=Z&&Object.prototype.hasOwnProperty.call(Z,"default")?Z.default:Z,ee=ee&&Object.prototype.hasOwnProperty.call(ee,"default")?ee.default:ee,te=te&&Object.prototype.hasOwnProperty.call(te,"default")?te.default:te,ne=ne&&Object.prototype.hasOwnProperty.call(ne,"default")?ne.default:ne,re=re&&Object.prototype.hasOwnProperty.call(re,"default")?re.default:re,oe=oe&&Object.prototype.hasOwnProperty.call(oe,"default")?oe.default:oe,ae=ae&&Object.prototype.hasOwnProperty.call(ae,"default")?ae.default:ae,ie=ie&&Object.prototype.hasOwnProperty.call(ie,"default")?ie.default:ie,se=se&&Object.prototype.hasOwnProperty.call(se,"default")?se.default:se;var Me={p:xe,P:function(e,t){var n,r=e.match(/(P+)(p+)?/),o=r[1],a=r[2];if(!a)return ke(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",ke(o,t)).replace("{{time}}",xe(a,t))}},Ee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function Te(e){var t=e?"string"==typeof e||e instanceof String?ie(e):oe(e):new Date;return De(t)?t:null}function Se(e,t,n,r){var o=null,a=Ve(n)||Ue(),i=!0;return Array.isArray(t)?(t.forEach((function(t){var n=ae(e,t,new Date,{locale:a});r&&(i=De(n)&&e===s(n,t,{awareOfUnicodeTokens:!0})),De(n)&&i&&(o=n)})),o):(o=ae(e,t,new Date,{locale:a}),r?i=De(o)&&e===s(o,t,{awareOfUnicodeTokens:!0}):De(o)||(t=t.match(Ee).map((function(e){var t=e[0];return"p"===t||"P"===t?a?(0,Me[t])(e,a.formatLong):t:e})).join(""),e.length>0&&(o=ae(e,t.slice(0,e.length),new Date)),De(o)||(o=new Date(e))),De(o)&&i?o:null)}function De(e){return i(e)&&te(e,new Date("1/1/1000"))}function Le(e,t,n){if("en"===n)return s(e,t,{awareOfUnicodeTokens:!0});var r=Ve(n);return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!r&&Ue()&&Ve(Ue())&&(r=Ve(Ue())),s(e,t,{locale:r||null,awareOfUnicodeTokens:!0})}function Ce(e,t){var n=t.hour,r=void 0===n?0:n,o=t.minute,a=void 0===o?0:o,i=t.second;return O(P(C(e,void 0===i?0:i),a),r)}function Pe(e,t){var n=t&&Ve(t)||Ue()&&Ve(Ue());return E(e,n?{locale:n}:null)}function Oe(e,t){return Le(e,"ddd",t)}function Ne(e){return B(e)}function Ae(e,t){var n=Ve(t||Ue());return U(e,{locale:n})}function Ie(e){return V(e)}function Re(e){return W(e)}function Ye(e,t){return e&&t?Z(e,t):!e&&!t}function je(e,t){return e&&t?$(e,t):!e&&!t}function Fe(e,t){return e&&t?ee(e,t):!e&&!t}function He(e,t){return e&&t?X(e,t):!e&&!t}function ze(e,t){return e&&t?Q(e,t):!e&&!t}function Be(e,t,n){var r,o=B(t),a=G(n);try{r=re(e,{start:o,end:a})}catch(e){r=!1}return r}function Ue(){return("undefined"!=typeof window?window:e).__localeId__}function Ve(t){if("string"==typeof t){var n="undefined"!=typeof window?window:e;return n.__localeData__?n.__localeData__[t]:null}return t}function We(e,t){return Le(N(Te(),e),"LLLL",t)}function qe(e,t){return Le(N(Te(),e),"LLL",t)}function Ge(e,t){return Le(A(Te(),e),"QQQ",t)}function Je(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,o=t.excludeDates,a=t.includeDates,i=t.filterDate;return et(e,{minDate:n,maxDate:r})||o&&o.some((function(t){return He(e,t)}))||a&&!a.some((function(t){return He(e,t)}))||i&&!i(Te(e))||!1}function Ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.excludeDates;return n&&n.some((function(t){return He(e,t)}))||!1}function Qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,o=t.excludeDates,a=t.includeDates,i=t.filterDate;return et(e,{minDate:n,maxDate:r})||o&&o.some((function(t){return je(e,t)}))||a&&!a.some((function(t){return je(e,t)}))||i&&!i(Te(e))||!1}function Xe(e,t,n,r){var o=D(e),a=T(e),i=D(t),s=T(t),l=D(r);return o===i&&o===l?a<=n&&n<=s:o<i?l===o&&a<=n||l===i&&s>=n||l<i&&l>o:void 0}function $e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,o=t.excludeDates,a=t.includeDates,i=t.filterDate;return et(e,{minDate:n,maxDate:r})||o&&o.some((function(t){return Fe(e,t)}))||a&&!a.some((function(t){return Fe(e,t)}))||i&&!i(Te(e))||!1}function Ze(e,t,n,r){var o=D(e),a=S(e),i=D(t),s=S(t),l=D(r);return o===i&&o===l?a<=n&&n<=s:o<i?l===o&&a<=n||l===i&&s>=n||l<i&&l>o:void 0}function et(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&j(e,n)<0||r&&j(e,r)>0}function tt(e,t){for(var n=t.length,r=0;r<n;r++)if(k(t[r])===k(e)&&w(t[r])===w(e))return!0;return!1}function nt(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var o,a=Te(),i=O(P(a,w(e)),k(e)),s=O(P(a,w(n)),k(n)),l=O(P(a,w(r)),k(r));try{o=!re(i,{start:s,end:l})}catch(e){o=!1}return o}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.includeDates,o=v(e,1);return n&&F(n,o)>0||r&&r.every((function(e){return F(e,o)>0}))||!1}function ot(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.includeDates,o=h(e,1);return n&&F(o,n)>0||r&&r.every((function(e){return F(o,e)>0}))||!1}function at(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.includeDates,o=b(e,1);return n&&z(n,o)>0||r&&r.every((function(e){return z(e,o)>0}))||!1}function it(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.includeDates,o=p(e,1);return n&&z(o,n)>0||r&&r.every((function(e){return z(o,e)>0}))||!1}function st(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter((function(e){return j(e,t)>=0}));return R(r)}return n?R(n):t}function lt(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter((function(e){return j(e,t)<=0}));return Y(r)}return n?Y(n):t}function ct(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,o=e.length;r<o;r++){var i=e[r];if(a(i)){var s=Le(i,"MM.dd.yyyy"),l=n.get(s)||[];l.includes(t)||(l.push(t),n.set(s,l))}else if("object"===ce(i)){var c=Object.keys(i),u=c[0],d=i[c[0]];if("string"==typeof u&&d.constructor===Array)for(var h=0,p=d.length;h<p;h++){var f=Le(d[h],"MM.dd.yyyy"),m=n.get(f)||[];m.includes(u)||(m.push(u),n.set(f,m))}}}return n}function ut(e,t,n,r,o){for(var a=o.length,i=[],s=0;s<a;s++){var u=l(c(e,k(o[s])),w(o[s])),d=l(e,(n+1)*r);te(u,t)&&ne(u,d)&&i.push(o[s])}return i}function dt(e){return e<10?"0".concat(e):"".concat(e)}function ht(e,t,n,r){for(var o=[],a=0;a<2*t+1;a++){var i=e+t-a,s=!0;n&&(s=D(n)<=i),r&&s&&(s=D(r)>=i),s&&o.push(i)}return o}var pt=se(function(e){_e(r,e);var t=we(r);function r(e){var o;ue(this,r),pe(be(o=t.call(this,e)),"renderOptions",(function(){var e=o.props.year,t=o.state.yearsList.map((function(t){return n.createElement("div",{className:e===t?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:t,onClick:o.onChange.bind(be(o),t)},e===t?n.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",t)})),r=o.props.minDate?D(o.props.minDate):null,a=o.props.maxDate?D(o.props.maxDate):null;return a&&o.state.yearsList.find((function(e){return e===a}))||t.unshift(n.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:o.incrementYears},n.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),r&&o.state.yearsList.find((function(e){return e===r}))||t.push(n.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:o.decrementYears},n.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),t})),pe(be(o),"onChange",(function(e){o.props.onChange(e)})),pe(be(o),"handleClickOutside",(function(){o.props.onCancel()})),pe(be(o),"shiftYears",(function(e){var t=o.state.yearsList.map((function(t){return t+e}));o.setState({yearsList:t})})),pe(be(o),"incrementYears",(function(){return o.shiftYears(1)})),pe(be(o),"decrementYears",(function(){return o.shiftYears(-1)}));var a=e.yearDropdownItemNumber,i=e.scrollableYearDropdown,s=a||(i?10:5);return o.state={yearsList:ht(o.props.year,s,o.props.minDate,o.props.maxDate)},o}return he(r,[{key:"render",value:function(){var e=o({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return n.createElement("div",{className:e},this.renderOptions())}}]),r}(n.Component)),ft=function(e){_e(r,e);var t=we(r);function r(){var e;ue(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return pe(be(e=t.call.apply(t,[this].concat(a))),"state",{dropdownVisible:!1}),pe(be(e),"renderSelectOptions",(function(){for(var t=e.props.minDate?D(e.props.minDate):1900,r=e.props.maxDate?D(e.props.maxDate):2100,o=[],a=t;a<=r;a++)o.push(n.createElement("option",{key:a,value:a},a));return o})),pe(be(e),"onSelectChange",(function(t){e.onChange(t.target.value)})),pe(be(e),"renderSelectMode",(function(){return n.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())})),pe(be(e),"renderReadView",(function(t){return n.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(t){return e.toggleDropdown(t)}},n.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),n.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))})),pe(be(e),"renderDropdown",(function(){return n.createElement(pt,{key:"dropdown",year:e.props.year,onChange:e.onChange,onCancel:e.toggleDropdown,minDate:e.props.minDate,maxDate:e.props.maxDate,scrollableYearDropdown:e.props.scrollableYearDropdown,yearDropdownItemNumber:e.props.yearDropdownItemNumber})})),pe(be(e),"renderScrollMode",(function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n})),pe(be(e),"onChange",(function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)})),pe(be(e),"toggleDropdown",(function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},(function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)}))})),pe(be(e),"handleYearChange",(function(t,n){e.onSelect(t,n),e.setOpen()})),pe(be(e),"onSelect",(function(t,n){e.props.onSelect&&e.props.onSelect(t,n)})),pe(be(e),"setOpen",(function(){e.props.setOpen&&e.props.setOpen(!0)})),e}return he(r,[{key:"render",value:function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode()}return n.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)}}]),r}(n.Component),mt=se(function(e){_e(r,e);var t=we(r);function r(){var e;ue(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return pe(be(e=t.call.apply(t,[this].concat(a))),"renderOptions",(function(){return e.props.monthNames.map((function(t,r){return n.createElement("div",{className:e.props.month===r?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(be(e),r)},e.props.month===r?n.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)}))})),pe(be(e),"onChange",(function(t){return e.props.onChange(t)})),pe(be(e),"handleClickOutside",(function(){return e.props.onCancel()})),e}return he(r,[{key:"render",value:function(){return n.createElement("div",{className:"react-datepicker__month-dropdown"},this.renderOptions())}}]),r}(n.Component)),gt=function(e){_e(r,e);var t=we(r);function r(){var e;ue(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return pe(be(e=t.call.apply(t,[this].concat(a))),"state",{dropdownVisible:!1}),pe(be(e),"renderSelectOptions",(function(e){return e.map((function(e,t){return n.createElement("option",{key:t,value:t},e)}))})),pe(be(e),"renderSelectMode",(function(t){return n.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(t){return e.onChange(t.target.value)}},e.renderSelectOptions(t))})),pe(be(e),"renderReadView",(function(t,r){return n.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},n.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),n.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},r[e.props.month]))})),pe(be(e),"renderDropdown",(function(t){return n.createElement(mt,{key:"dropdown",month:e.props.month,monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown})})),pe(be(e),"renderScrollMode",(function(t){var n=e.state.dropdownVisible,r=[e.renderReadView(!n,t)];return n&&r.unshift(e.renderDropdown(t)),r})),pe(be(e),"onChange",(function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)})),pe(be(e),"toggleDropdown",(function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})})),e}return he(r,[{key:"render",value:function(){var e,t=this,r=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(e){return qe(e,t.props.locale)}:function(e){return We(e,t.props.locale)});switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode(r);break;case"select":e=this.renderSelectMode(r)}return n.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},e)}}]),r}(n.Component);function _t(e,t){for(var n=[],r=Ie(e),o=Ie(t);!te(r,o);)n.push(Te(r)),r=h(r,1);return n}var vt=se(function(e){_e(r,e);var t=we(r);function r(e){var o;return ue(this,r),pe(be(o=t.call(this,e)),"renderOptions",(function(){return o.state.monthYearsList.map((function(e){var t=L(e),r=Ye(o.props.date,e)&&je(o.props.date,e);return n.createElement("div",{className:r?"react-datepicker__month-year-option --selected_month-year":"react-datepicker__month-year-option",key:t,onClick:o.onChange.bind(be(o),t)},r?n.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Le(e,o.props.dateFormat))}))})),pe(be(o),"onChange",(function(e){return o.props.onChange(e)})),pe(be(o),"handleClickOutside",(function(){o.props.onCancel()})),o.state={monthYearsList:_t(o.props.minDate,o.props.maxDate)},o}return he(r,[{key:"render",value:function(){var e=o({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return n.createElement("div",{className:e},this.renderOptions())}}]),r}(n.Component)),bt=function(e){_e(r,e);var t=we(r);function r(){var e;ue(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return pe(be(e=t.call.apply(t,[this].concat(a))),"state",{dropdownVisible:!1}),pe(be(e),"renderSelectOptions",(function(){for(var t=Ie(e.props.minDate),r=Ie(e.props.maxDate),o=[];!te(t,r);){var a=L(t);o.push(n.createElement("option",{key:a,value:a},Le(t,e.props.dateFormat,e.props.locale))),t=h(t,1)}return o})),pe(be(e),"onSelectChange",(function(t){e.onChange(t.target.value)})),pe(be(e),"renderSelectMode",(function(){return n.createElement("select",{value:L(Ie(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())})),pe(be(e),"renderReadView",(function(t){var r=Le(e.props.date,e.props.dateFormat,e.props.locale);return n.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:function(t){return e.toggleDropdown(t)}},n.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),n.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},r))})),pe(be(e),"renderDropdown",(function(){return n.createElement(vt,{key:"dropdown",date:e.props.date,dateFormat:e.props.dateFormat,onChange:e.onChange,onCancel:e.toggleDropdown,minDate:e.props.minDate,maxDate:e.props.maxDate,scrollableMonthYearDropdown:e.props.scrollableMonthYearDropdown})})),pe(be(e),"renderScrollMode",(function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n})),pe(be(e),"onChange",(function(t){e.toggleDropdown();var n=Te(parseInt(t));Ye(e.props.date,n)&&je(e.props.date,n)||e.props.onChange(n)})),pe(be(e),"toggleDropdown",(function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})})),e}return he(r,[{key:"render",value:function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode()}return n.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)}}]),r}(n.Component),yt=function(e){_e(r,e);var t=we(r);function r(){var e;ue(this,r);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return pe(be(e=t.call.apply(t,[this].concat(i))),"dayEl",n.createRef()),pe(be(e),"handleClick",(function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)})),pe(be(e),"handleMouseEnter",(function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)})),pe(be(e),"handleOnKeyDown",(function(t){" "===t.key&&(t.preventDefault(),t.key="Enter"),e.props.handleOnKeyDown(t)})),pe(be(e),"isSameDay",(function(t){return He(e.props.day,t)})),pe(be(e),"isKeyboardSelected",(function(){return!e.props.disabledKeyboardNavigation&&!e.props.inline&&!e.isSameDay(e.props.selected)&&e.isSameDay(e.props.preSelection)})),pe(be(e),"isDisabled",(function(){return Je(e.props.day,e.props)})),pe(be(e),"isExcluded",(function(){return Ke(e.props.day,e.props)})),pe(be(e),"getHighLightedClass",(function(t){var n=e.props,r=n.day,o=n.highlightDates;if(!o)return!1;var a=Le(r,"MM.dd.yyyy");return o.get(a)})),pe(be(e),"isInRange",(function(){var t=e.props,n=t.day,r=t.startDate,o=t.endDate;return!(!r||!o)&&Be(n,r,o)})),pe(be(e),"isInSelectingRange",(function(){var t=e.props,n=t.day,r=t.selectsStart,o=t.selectsEnd,a=t.selectingDate,i=t.startDate,s=t.endDate;return!(!r&&!o||!a||e.isDisabled())&&(r&&s&&(ne(a,s)||ze(a,s))?Be(n,a,s):!(!o||!i||!te(a,i)&&!ze(a,i))&&Be(n,i,a))})),pe(be(e),"isSelectingRangeStart",(function(){if(!e.isInSelectingRange())return!1;var t=e.props,n=t.day,r=t.selectingDate,o=t.startDate;return He(n,t.selectsStart?r:o)})),pe(be(e),"isSelectingRangeEnd",(function(){if(!e.isInSelectingRange())return!1;var t=e.props,n=t.day,r=t.selectingDate,o=t.endDate;return He(n,t.selectsEnd?r:o)})),pe(be(e),"isRangeStart",(function(){var t=e.props,n=t.day,r=t.startDate,o=t.endDate;return!(!r||!o)&&He(r,n)})),pe(be(e),"isRangeEnd",(function(){var t=e.props,n=t.day,r=t.startDate,o=t.endDate;return!(!r||!o)&&He(o,n)})),pe(be(e),"isWeekend",(function(){var t=x(e.props.day);return 0===t||6===t})),pe(be(e),"isOutsideMonth",(function(){return void 0!==e.props.month&&e.props.month!==T(e.props.day)})),pe(be(e),"getClassNames",(function(t){var n=e.props.dayClassName?e.props.dayClassName(t):void 0;return o("react-datepicker__day",n,"react-datepicker__day--"+Oe(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSameDay(e.props.selected),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isSameDay(Te()),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isOutsideMonth()},e.getHighLightedClass("react-datepicker__day--highlighted"))})),pe(be(e),"getAriaLabel",(function(){var t=e.props,n=t.day,r=t.ariaLabelPrefixWhenEnabled,o=void 0===r?"Choose":r,a=t.ariaLabelPrefixWhenDisabled,i=void 0===a?"Not available":a,s=e.isDisabled()||e.isExcluded()?i:o;return"".concat(s," ").concat(Le(n,"PPPP"))})),pe(be(e),"getTabIndex",(function(t,n){var r=t||e.props.selected,o=n||e.props.preSelection;return e.isKeyboardSelected()||e.isSameDay(r)&&He(o,r)?0:-1})),pe(be(e),"handleFocusDay",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1;0===e.getTabIndex()&&!t.isInputFocused&&e.isSameDay(e.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(n=!0),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(n=!0)),n&&e.dayEl.current.focus()})),pe(be(e),"render",(function(){return n.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"button","aria-disabled":e.isDisabled()},e.props.renderDayContents?e.props.renderDayContents(M(e.props.day),e.props.day):M(e.props.day))})),e}return he(r,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(e){this.handleFocusDay(e)}}]),r}(n.Component),wt=function(e){_e(r,e);var t=we(r);function r(){var e;ue(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return pe(be(e=t.call.apply(t,[this].concat(o))),"handleClick",(function(t){e.props.onClick&&e.props.onClick(t)})),e}return he(r,[{key:"render",value:function(){var e=this.props,t=e.weekNumber,r=e.ariaLabelPrefix,a=void 0===r?"week ":r,i={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!e.onClick};return n.createElement("div",{className:o(i),"aria-label":"".concat(a," ").concat(this.props.weekNumber),onClick:this.handleClick},t)}}]),r}(n.Component),kt=function(e){_e(r,e);var t=we(r);function r(){var e;ue(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return pe(be(e=t.call.apply(t,[this].concat(a))),"handleDayClick",(function(t,n){e.props.onDayClick&&e.props.onDayClick(t,n)})),pe(be(e),"handleDayMouseEnter",(function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)})),pe(be(e),"handleWeekClick",(function(t,n,r){"function"==typeof e.props.onWeekSelect&&e.props.onWeekSelect(t,n,r),e.props.shouldCloseOnSelect&&e.props.setOpen(!1)})),pe(be(e),"formatWeekNumber",(function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):Pe(t,e.props.locale)})),pe(be(e),"renderDays",(function(){var t=Ae(e.props.day,e.props.locale),r=[],o=e.formatWeekNumber(t);if(e.props.showWeekNumber){var a=e.props.onWeekSelect?e.handleWeekClick.bind(be(e),t,o):void 0;r.push(n.createElement(wt,{key:"W",weekNumber:o,onClick:a,ariaLabelPrefix:e.props.ariaLabelPrefix}))}return r.concat([0,1,2,3,4,5,6].map((function(r){var o=u(t,r);return n.createElement(yt,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:o.valueOf(),day:o,month:e.props.month,onClick:e.handleDayClick.bind(be(e),o),onMouseEnter:e.handleDayMouseEnter.bind(be(e),o),minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,inline:e.props.inline,highlightDates:e.props.highlightDates,selectingDate:e.props.selectingDate,filterDate:e.props.filterDate,preSelection:e.props.preSelection,selected:e.props.selected,selectsStart:e.props.selectsStart,selectsEnd:e.props.selectsEnd,startDate:e.props.startDate,endDate:e.props.endDate,dayClassName:e.props.dayClassName,renderDayContents:e.props.renderDayContents,disabledKeyboardNavigation:e.props.disabledKeyboardNavigation,handleOnKeyDown:e.props.handleOnKeyDown,isInputFocused:e.props.isInputFocused,containerRef:e.props.containerRef})})))})),e}return he(r,[{key:"render",value:function(){return n.createElement("div",{className:"react-datepicker__week"},this.renderDays())}}],[{key:"defaultProps",get:function(){return{shouldCloseOnSelect:!0}}}]),r}(n.Component),xt=function(e){_e(r,e);var t=we(r);function r(){var e;ue(this,r);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return pe(be(e=t.call.apply(t,[this].concat(i))),"handleDayClick",(function(t,n){e.props.onDayClick&&e.props.onDayClick(t,n,e.props.orderInDisplay)})),pe(be(e),"handleDayMouseEnter",(function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)})),pe(be(e),"handleMouseLeave",(function(){e.props.onMouseLeave&&e.props.onMouseLeave()})),pe(be(e),"isRangeStartMonth",(function(t){var n=e.props,r=n.day,o=n.startDate,a=n.endDate;return!(!o||!a)&&je(N(r,t),o)})),pe(be(e),"isRangeStartQuarter",(function(t){var n=e.props,r=n.day,o=n.startDate,a=n.endDate;return!(!o||!a)&&Fe(A(r,t),o)})),pe(be(e),"isRangeEndMonth",(function(t){var n=e.props,r=n.day,o=n.startDate,a=n.endDate;return!(!o||!a)&&je(N(r,t),a)})),pe(be(e),"isRangeEndQuarter",(function(t){var n=e.props,r=n.day,o=n.startDate,a=n.endDate;return!(!o||!a)&&Fe(A(r,t),a)})),pe(be(e),"isWeekInMonth",(function(t){var n=e.props.day,r=u(t,6);return je(t,n)||je(r,n)})),pe(be(e),"renderWeeks",(function(){for(var t=[],r=e.props.fixedHeight,o=Ae(Ie(e.props.day),e.props.locale),a=0,i=!1;t.push(n.createElement(kt,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,chooseDayAriaLabelPrefix:e.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:e.props.disabledDayAriaLabelPrefix,key:a,day:o,month:T(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,onWeekSelect:e.props.onWeekSelect,formatWeekNumber:e.props.formatWeekNumber,locale:e.props.locale,minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,inline:e.props.inline,highlightDates:e.props.highlightDates,selectingDate:e.props.selectingDate,filterDate:e.props.filterDate,preSelection:e.props.preSelection,selected:e.props.selected,selectsStart:e.props.selectsStart,selectsEnd:e.props.selectsEnd,showWeekNumber:e.props.showWeekNumbers,startDate:e.props.startDate,endDate:e.props.endDate,dayClassName:e.props.dayClassName,setOpen:e.props.setOpen,shouldCloseOnSelect:e.props.shouldCloseOnSelect,disabledKeyboardNavigation:e.props.disabledKeyboardNavigation,renderDayContents:e.props.renderDayContents,handleOnKeyDown:e.props.handleOnKeyDown,isInputFocused:e.props.isInputFocused,containerRef:e.props.containerRef})),!i;){a++,o=d(o,1);var s=r&&a>=6,l=!r&&!e.isWeekInMonth(o);if(s||l){if(!e.props.peekNextMonth)break;i=!0}}return t})),pe(be(e),"onMonthClick",(function(t,n){e.handleDayClick(Ie(N(e.props.day,n)),t)})),pe(be(e),"onQuarterClick",(function(t,n){e.handleDayClick(Re(A(e.props.day,n)),t)})),pe(be(e),"getMonthClassNames",(function(t){var n=e.props,r=n.day,a=n.startDate,i=n.endDate,s=n.selected,l=n.minDate,c=n.maxDate;return o("react-datepicker__month-text","react-datepicker__month-".concat(t),{"react-datepicker__month--disabled":(l||c)&&Qe(N(r,t),e.props),"react-datepicker__month--selected":T(r)===t&&D(r)===D(s),"react-datepicker__month--in-range":Xe(a,i,t,r),"react-datepicker__month--range-start":e.isRangeStartMonth(t),"react-datepicker__month--range-end":e.isRangeEndMonth(t)})})),pe(be(e),"getQuarterClassNames",(function(t){var n=e.props,r=n.day,a=n.startDate,i=n.endDate,s=n.selected,l=n.minDate,c=n.maxDate;return o("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter--disabled":(l||c)&&$e(A(r,t),e.props),"react-datepicker__quarter--selected":S(r)===t&&D(r)===D(s),"react-datepicker__quarter--in-range":Ze(a,i,t,r),"react-datepicker__quarter--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter--range-end":e.isRangeEndQuarter(t)})})),pe(be(e),"renderMonths",(function(){var t=e.props,r=t.showFullMonthYearPicker,o=t.locale;return[[0,1,2],[3,4,5],[6,7,8],[9,10,11]].map((function(t,a){return n.createElement("div",{className:"react-datepicker__month-wrapper",key:a},t.map((function(t,a){return n.createElement("div",{key:a,onClick:function(n){e.onMonthClick(n,t)},className:e.getMonthClassNames(t)},r?We(t,o):qe(t,o))})))}))})),pe(be(e),"renderQuarters",(function(){return n.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map((function(t,r){return n.createElement("div",{key:r,onClick:function(n){e.onQuarterClick(n,t)},className:e.getQuarterClassNames(t)},Ge(t,e.props.locale))})))})),pe(be(e),"getClassNames",(function(){var t=e.props,n=t.selectingDate,r=t.selectsStart,a=t.selectsEnd,i=t.showMonthYearPicker,s=t.showQuarterYearPicker;return o("react-datepicker__month",{"react-datepicker__month--selecting-range":n&&(r||a)},{"react-datepicker__monthPicker":i},{"react-datepicker__quarterPicker":s})})),e}return he(r,[{key:"render",value:function(){var e=this.props,t=e.showMonthYearPicker,r=e.showQuarterYearPicker,o=e.day,a=e.ariaLabelPrefix,i=void 0===a?"month ":a;return n.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(i," ").concat(Le(o,"yyyy-MM"))},t?this.renderMonths():r?this.renderQuarters():this.renderWeeks())}}]),r}(n.Component),Mt=function(e){_e(r,e);var t=we(r);function r(){var e;ue(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return pe(be(e=t.call.apply(t,[this].concat(a))),"state",{height:null}),pe(be(e),"handleClick",(function(t){(e.props.minTime||e.props.maxTime)&&nt(t,e.props)||e.props.excludeTimes&&tt(t,e.props.excludeTimes)||e.props.includeTimes&&!tt(t,e.props.includeTimes)||e.props.onChange(t)})),pe(be(e),"liClasses",(function(t,n,r){var o=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t,n,r):void 0];return e.props.selected&&n===k(t)&&r===w(t)&&o.push("react-datepicker__time-list-item--selected"),((e.props.minTime||e.props.maxTime)&&nt(t,e.props)||e.props.excludeTimes&&tt(t,e.props.excludeTimes)||e.props.includeTimes&&!tt(t,e.props.includeTimes))&&o.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(60*k(t)+w(t))%e.props.intervals!=0&&o.push("react-datepicker__time-list-item--injected"),o.join(" ")})),pe(be(e),"renderTimes",(function(){for(var t=[],r=e.props.format?e.props.format:"p",o=e.props.intervals,a=e.props.selected||e.props.openToDate||Te(),i=k(a),s=w(a),c=Ne(Te()),u=1440/o,d=e.props.injectTimes&&e.props.injectTimes.sort((function(e,t){return e-t})),h=0;h<u;h++){var p=l(c,h*o);if(t.push(p),d){var f=ut(c,p,h,o,d);t=t.concat(f)}}return t.map((function(t,o){return n.createElement("li",{key:o,onClick:e.handleClick.bind(be(e),t),className:e.liClasses(t,i,s),ref:function(n){i===k(t)&&s>=w(t)&&(e.centerLi=n)}},Le(t,r,e.props.locale))}))})),e}return he(r,[{key:"componentDidMount",value:function(){this.list.scrollTop=r.calcCenterPosition(this.props.monthRef?this.props.monthRef.clientHeight-this.header.clientHeight:this.list.clientHeight,this.centerLi),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})}},{key:"render",value:function(){var e=this,t=this.state.height;return n.createElement("div",{className:"react-datepicker__time-container ".concat(this.props.todayButton?"react-datepicker__time-container--with-today-button":"")},n.createElement("div",{className:"react-datepicker__header react-datepicker__header--time",ref:function(t){e.header=t}},n.createElement("div",{className:"react-datepicker-time__header"},this.props.timeCaption)),n.createElement("div",{className:"react-datepicker__time"},n.createElement("div",{className:"react-datepicker__time-box"},n.createElement("ul",{className:"react-datepicker__time-list",ref:function(t){e.list=t},style:t?{height:t}:{}},this.renderTimes()))))}}],[{key:"defaultProps",get:function(){return{intervals:30,onTimeChange:function(){},todayButton:null,timeCaption:"Time"}}}]),r}(n.Component);pe(Mt,"calcCenterPosition",(function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)}));var Et=function(e){_e(r,e);var t=we(r);function r(e){var n;return ue(this,r),pe(be(n=t.call(this,e)),"handleYearClick",(function(e,t){n.props.onDayClick&&n.props.onDayClick(e,t)})),pe(be(n),"onYearClick",(function(e,t){var r;n.handleYearClick((r=I(n.props.date,t),q(r)),e)})),n}return he(r,[{key:"render",value:function(){for(var e=this,t=[],r=this.props.date,o=function(r,o){t.push(n.createElement("div",{onClick:function(t){e.onYearClick(t,r)},className:"react-datepicker__year-container-text",key:r},r))},a=D(r)-11,i=0;a<=D(r);a++,i++)o(a);return n.createElement("div",{className:"react-datepicker__year-container"},t)}}]),r}(n.Component),Tt=function(e){_e(r,e);var t=we(r);function r(e){var o;return ue(this,r),pe(be(o=t.call(this,e)),"onTimeChange",(function(e){o.setState({time:e});var t=new Date;t.setHours(e.split(":")[0]),t.setMinutes(e.split(":")[1]),o.props.onChange(t)})),pe(be(o),"renderTimeInput",(function(){var e=o.state.time,t=o.props,r=t.timeString,a=t.customTimeInput;return a?n.cloneElement(a,{value:e,onChange:o.onTimeChange}):n.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",required:!0,value:e,onChange:function(e){o.onTimeChange(e.target.value||r)}})})),o.state={time:o.props.timeString},o}return he(r,[{key:"render",value:function(){return n.createElement("div",{className:"react-datepicker__input-time-container"},n.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),n.createElement("div",{className:"react-datepicker-time__input-container"},n.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))}}]),r}(n.Component);function St(e){var t=e.className,r=e.children,o=e.showPopperArrow,a=e.arrowProps,i=void 0===a?{}:a;return n.createElement("div",{className:t},o&&n.createElement("div",fe({className:"react-datepicker__triangle"},i)),r)}var Dt=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Lt=function(e){_e(r,e);var t=we(r);function r(e){var a;return ue(this,r),pe(be(a=t.call(this,e)),"handleClickOutside",(function(e){a.props.onClickOutside(e)})),pe(be(a),"setClickOutsideRef",(function(){return a.containerRef.current})),pe(be(a),"handleDropdownFocus",(function(e){(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(e.className||"").split(/\s+/);return Dt.some((function(e){return t.indexOf(e)>=0}))})(e.target)&&a.props.onDropdownFocus()})),pe(be(a),"getDateInView",(function(){var e=a.props,t=e.preSelection,n=e.selected,r=e.openToDate,o=st(a.props),i=lt(a.props),s=Te();return r||n||t||(o&&ne(s,o)?o:i&&te(s,i)?i:s)})),pe(be(a),"increaseMonth",(function(){a.setState((function(e){var t=e.date;return{date:h(t,1)}}),(function(){return a.handleMonthChange(a.state.date)}))})),pe(be(a),"decreaseMonth",(function(){a.setState((function(e){var t=e.date;return{date:v(t,1)}}),(function(){return a.handleMonthChange(a.state.date)}))})),pe(be(a),"handleDayClick",(function(e,t,n){return a.props.onSelect(e,t,n)})),pe(be(a),"handleDayMouseEnter",(function(e){a.setState({selectingDate:e}),a.props.onDayMouseEnter&&a.props.onDayMouseEnter(e)})),pe(be(a),"handleMonthMouseLeave",(function(){a.setState({selectingDate:null}),a.props.onMonthMouseLeave&&a.props.onMonthMouseLeave()})),pe(be(a),"handleYearChange",(function(e){a.props.onYearChange&&a.props.onYearChange(e)})),pe(be(a),"handleMonthChange",(function(e){a.props.onMonthChange&&a.props.onMonthChange(e),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(e),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(e)})),pe(be(a),"handleMonthYearChange",(function(e){a.handleYearChange(e),a.handleMonthChange(e)})),pe(be(a),"changeYear",(function(e){a.setState((function(t){var n=t.date;return{date:I(n,e)}}),(function(){return a.handleYearChange(a.state.date)}))})),pe(be(a),"changeMonth",(function(e){a.setState((function(t){var n=t.date;return{date:N(n,e)}}),(function(){return a.handleMonthChange(a.state.date)}))})),pe(be(a),"changeMonthYear",(function(e){a.setState((function(t){var n=t.date;return{date:I(N(n,T(e)),D(e))}}),(function(){return a.handleMonthYearChange(a.state.date)}))})),pe(be(a),"header",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.state.date,t=Ae(e,a.props.locale),r=[];return a.props.showWeekNumbers&&r.push(n.createElement("div",{key:"W",className:"react-datepicker__day-name"},a.props.weekLabel||"#")),r.concat([0,1,2,3,4,5,6].map((function(e){var r=u(t,e),i=a.formatWeekday(r,a.props.locale),s=a.props.weekDayClassName?a.props.weekDayClassName(r):void 0;return n.createElement("div",{key:e,className:o("react-datepicker__day-name",s)},i)})))})),pe(be(a),"formatWeekday",(function(e,t){return a.props.formatWeekDay?function(e,t,n){return t(Le(e,"EEEE",n))}(e,a.props.formatWeekDay,t):a.props.useWeekdaysShort?function(e,t){return Le(e,"EEE",t)}(e,t):function(e,t){return Le(e,"EEEEEE",t)}(e,t)})),pe(be(a),"decreaseYear",(function(){a.setState((function(e){var t=e.date;return{date:b(t,a.props.showYearPicker?11:1)}}),(function(){return a.handleYearChange(a.state.date)}))})),pe(be(a),"renderPreviousButton",(function(){if(!a.props.renderCustomHeader){var e=a.props.showMonthYearPicker?at(a.state.date,a.props):rt(a.state.date,a.props);if((a.props.forceShowMonthNavigation||a.props.showDisabledMonthNavigation||!e)&&!a.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--previous"],r=a.decreaseMonth;(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker)&&(r=a.decreaseYear),e&&a.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--previous--disabled"),r=null);var o=a.props.showMonthYearPicker||a.props.showQuarterYearPicker,i=a.props,s=i.previousMonthAriaLabel,l=void 0===s?"Previous Month":s,c=i.previousYearAriaLabel,u=void 0===c?"Previous Year":c;return n.createElement("button",{type:"button",className:t.join(" "),onClick:r,"aria-label":o?u:l},o?a.props.previousYearButtonLabel:a.props.previousMonthButtonLabel)}}})),pe(be(a),"increaseYear",(function(){a.setState((function(e){var t=e.date;return{date:p(t,a.props.showYearPicker?11:1)}}),(function(){return a.handleYearChange(a.state.date)}))})),pe(be(a),"renderNextButton",(function(){if(!a.props.renderCustomHeader){var e=a.props.showMonthYearPicker?it(a.state.date,a.props):ot(a.state.date,a.props);if((a.props.forceShowMonthNavigation||a.props.showDisabledMonthNavigation||!e)&&!a.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--next"];a.props.showTimeSelect&&t.push("react-datepicker__navigation--next--with-time"),a.props.todayButton&&t.push("react-datepicker__navigation--next--with-today-button");var r=a.increaseMonth;(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker)&&(r=a.increaseYear),e&&a.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--next--disabled"),r=null);var o=a.props.showMonthYearPicker||a.props.showQuarterYearPicker,i=a.props,s=i.nextMonthAriaLabel,l=void 0===s?"Next Month":s,c=i.nextYearAriaLabel,u=void 0===c?"Next Year":c;return n.createElement("button",{type:"button",className:t.join(" "),onClick:r,"aria-label":o?u:l},o?a.props.nextYearButtonLabel:a.props.nextMonthButtonLabel)}}})),pe(be(a),"renderCurrentMonth",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.state.date,t=["react-datepicker__current-month"];return a.props.showYearDropdown&&t.push("react-datepicker__current-month--hasYearDropdown"),a.props.showMonthDropdown&&t.push("react-datepicker__current-month--hasMonthDropdown"),a.props.showMonthYearDropdown&&t.push("react-datepicker__current-month--hasMonthYearDropdown"),n.createElement("div",{className:t.join(" ")},Le(e,a.props.dateFormat,a.props.locale))})),pe(be(a),"renderYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a.props.showYearDropdown&&!e)return n.createElement(ft,{adjustDateOnChange:a.props.adjustDateOnChange,date:a.state.date,onSelect:a.props.onSelect,setOpen:a.props.setOpen,dropdownMode:a.props.dropdownMode,onChange:a.changeYear,minDate:a.props.minDate,maxDate:a.props.maxDate,year:D(a.state.date),scrollableYearDropdown:a.props.scrollableYearDropdown,yearDropdownItemNumber:a.props.yearDropdownItemNumber})})),pe(be(a),"renderMonthDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a.props.showMonthDropdown&&!e)return n.createElement(gt,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,onChange:a.changeMonth,month:T(a.state.date),useShortMonthInDropdown:a.props.useShortMonthInDropdown})})),pe(be(a),"renderMonthYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a.props.showMonthYearDropdown&&!e)return n.createElement(bt,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,dateFormat:a.props.dateFormat,onChange:a.changeMonthYear,minDate:a.props.minDate,maxDate:a.props.maxDate,date:a.state.date,scrollableMonthYearDropdown:a.props.scrollableMonthYearDropdown})})),pe(be(a),"renderTodayButton",(function(){if(a.props.todayButton&&!a.props.showTimeSelectOnly)return n.createElement("div",{className:"react-datepicker__today-button",onClick:function(e){return a.props.onSelect(B(Te()),e)}},a.props.todayButton)})),pe(be(a),"renderDefaultHeader",(function(e){var t=e.monthDate,r=e.i;return n.createElement("div",{className:"react-datepicker__header"},a.renderCurrentMonth(t),n.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(a.props.dropdownMode),onFocus:a.handleDropdownFocus},a.renderMonthDropdown(0!==r),a.renderMonthYearDropdown(0!==r),a.renderYearDropdown(0!==r)),n.createElement("div",{className:"react-datepicker__day-names"},a.header(t)))})),pe(be(a),"renderCustomHeader",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.monthDate,r=e.i;if(0!==r&&void 0!==r)return null;var o=rt(a.state.date,a.props),i=ot(a.state.date,a.props),s=at(a.state.date,a.props),l=it(a.state.date,a.props),c=!a.props.showMonthYearPicker&&!a.props.showQuarterYearPicker&&!a.props.showYearPicker;return n.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:a.props.onDropdownFocus},a.props.renderCustomHeader(ge(ge({},a.state),{},{changeMonth:a.changeMonth,changeYear:a.changeYear,decreaseMonth:a.decreaseMonth,increaseMonth:a.increaseMonth,decreaseYear:a.decreaseYear,increaseYear:a.increaseYear,prevMonthButtonDisabled:o,nextMonthButtonDisabled:i,prevYearButtonDisabled:s,nextYearButtonDisabled:l})),c&&n.createElement("div",{className:"react-datepicker__day-names"},a.header(t)))})),pe(be(a),"renderYearHeader",(function(){return n.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a.props.showYearPicker?"".concat(D(a.state.date)-11," - ").concat(D(a.state.date)):D(a.state.date))})),pe(be(a),"renderHeader",(function(e){switch(!0){case void 0!==a.props.renderCustomHeader:return a.renderCustomHeader(e);case a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker:return a.renderYearHeader(e);default:return a.renderDefaultHeader(e)}})),pe(be(a),"renderMonths",(function(){if(!a.props.showTimeSelectOnly&&!a.props.showYearPicker){for(var e=[],t=a.props.showPreviousMonths?a.props.monthsShown-1:0,r=v(a.state.date,t),o=0;o<a.props.monthsShown;++o){var i=o-a.props.monthSelectedIn,s=h(r,i),l="month-".concat(o);e.push(n.createElement("div",{key:l,ref:function(e){a.monthContainer=e},className:"react-datepicker__month-container"},a.renderHeader({monthDate:s,i:o}),n.createElement(xt,{chooseDayAriaLabelPrefix:a.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:a.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:a.props.weekAriaLabelPrefix,onChange:a.changeMonthYear,day:s,dayClassName:a.props.dayClassName,monthClassName:a.props.monthClassName,onDayClick:a.handleDayClick,handleOnKeyDown:a.props.handleOnKeyDown,onDayMouseEnter:a.handleDayMouseEnter,onMouseLeave:a.handleMonthMouseLeave,onWeekSelect:a.props.onWeekSelect,orderInDisplay:o,formatWeekNumber:a.props.formatWeekNumber,locale:a.props.locale,minDate:a.props.minDate,maxDate:a.props.maxDate,excludeDates:a.props.excludeDates,highlightDates:a.props.highlightDates,selectingDate:a.state.selectingDate,includeDates:a.props.includeDates,inline:a.props.inline,fixedHeight:a.props.fixedHeight,filterDate:a.props.filterDate,preSelection:a.props.preSelection,selected:a.props.selected,selectsStart:a.props.selectsStart,selectsEnd:a.props.selectsEnd,showWeekNumbers:a.props.showWeekNumbers,startDate:a.props.startDate,endDate:a.props.endDate,peekNextMonth:a.props.peekNextMonth,setOpen:a.props.setOpen,shouldCloseOnSelect:a.props.shouldCloseOnSelect,renderDayContents:a.props.renderDayContents,disabledKeyboardNavigation:a.props.disabledKeyboardNavigation,showMonthYearPicker:a.props.showMonthYearPicker,showFullMonthYearPicker:a.props.showFullMonthYearPicker,showYearPicker:a.props.showYearPicker,showQuarterYearPicker:a.props.showQuarterYearPicker,isInputFocused:a.props.isInputFocused,containerRef:a.containerRef})))}return e}})),pe(be(a),"renderYears",(function(){if(!a.props.showTimeSelectOnly)return a.props.showYearPicker?n.createElement("div",{className:"react-datepicker__year"},a.renderHeader(),n.createElement(Et,{onDayClick:a.handleDayClick,date:a.state.date})):void 0})),pe(be(a),"renderTimeSection",(function(){if(a.props.showTimeSelect&&(a.state.monthContainer||a.props.showTimeSelectOnly))return n.createElement(Mt,{selected:a.props.selected,openToDate:a.props.openToDate,onChange:a.props.onTimeChange,timeClassName:a.props.timeClassName,format:a.props.timeFormat,includeTimes:a.props.includeTimes,intervals:a.props.timeIntervals,minTime:a.props.minTime,maxTime:a.props.maxTime,excludeTimes:a.props.excludeTimes,timeCaption:a.props.timeCaption,todayButton:a.props.todayButton,showMonthDropdown:a.props.showMonthDropdown,showMonthYearDropdown:a.props.showMonthYearDropdown,showYearDropdown:a.props.showYearDropdown,withPortal:a.props.withPortal,monthRef:a.state.monthContainer,injectTimes:a.props.injectTimes,locale:a.props.locale})})),pe(be(a),"renderInputTimeSection",(function(){var e=new Date(a.props.selected),t="".concat(dt(e.getHours()),":").concat(dt(e.getMinutes()));if(a.props.showTimeInput)return n.createElement(Tt,{timeString:t,timeInputLabel:a.props.timeInputLabel,onChange:a.props.onTimeChange,customTimeInput:a.props.customTimeInput})})),a.containerRef=n.createRef(),a.state={date:a.getDateInView(),selectingDate:null,monthContainer:null},a}return he(r,null,[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null}}}]),he(r,[{key:"componentDidMount",value:function(){this.props.showTimeSelect&&(this.assignMonthContainer=void this.setState({monthContainer:this.monthContainer}))}},{key:"componentDidUpdate",value:function(e){this.props.preSelection&&!He(this.props.preSelection,e.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!He(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var e=this.props.container||St;return n.createElement("div",{ref:this.containerRef},n.createElement(e,{className:o("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}]),r}(n.Component),Ct=function(e){return!e.disabled&&-1!==e.tabIndex},Pt=function(e){_e(r,e);var t=we(r);function r(e){var o;return ue(this,r),pe(be(o=t.call(this,e)),"getTabChildren",(function(){return Array.prototype.slice.call(o.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(Ct)})),pe(be(o),"handleFocusStart",(function(e){var t=o.getTabChildren();t&&t.length>1&&t[t.length-1].focus()})),pe(be(o),"handleFocusEnd",(function(e){var t=o.getTabChildren();t&&t.length>1&&t[0].focus()})),o.tabLoopRef=n.createRef(),o}return he(r,null,[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),he(r,[{key:"render",value:function(){return this.props.enableTabLoop?n.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},n.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,n.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}]),r}(n.Component),Ot=function(e){_e(r,e);var t=we(r);function r(){return ue(this,r),t.apply(this,arguments)}return he(r,[{key:"render",value:function(){var e,t=this.props,r=t.className,a=t.wrapperClassName,i=t.hidePopper,s=t.popperComponent,l=t.popperModifiers,c=t.popperPlacement,u=t.popperProps,d=t.targetComponent,h=t.enableTabLoop,p=t.popperOnKeyDown;if(!i){var f=o("react-datepicker-popper",r);e=n.createElement(le.Popper,fe({modifiers:l,placement:c},u),(function(e){var t=e.ref,r=e.style,o=e.placement,a=e.arrowProps;return n.createElement(Pt,{enableTabLoop:h},n.createElement("div",fe({ref:t,style:r},{className:f,"data-placement":o,onKeyDown:p}),n.cloneElement(s,{arrowProps:a})))}))}this.props.popperContainer&&(e=n.createElement(this.props.popperContainer,{},e));var m=o("react-datepicker-wrapper",a);return n.createElement(le.Manager,{className:"react-datepicker-manager"},n.createElement(le.Reference,null,(function(e){var t=e.ref;return n.createElement("div",{ref:t,className:m},d)})),e)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:{preventOverflow:{enabled:!0,escapeWithReference:!0,boundariesElement:"viewport"}},popperProps:{},popperPlacement:"bottom-start"}}}]),r}(n.Component),Nt=se(Lt),At=function(e){_e(r,e);var t=we(r);function r(e){var i;return ue(this,r),pe(be(i=t.call(this,e)),"getPreSelection",(function(){return i.props.openToDate?i.props.openToDate:i.props.selectsEnd&&i.props.startDate?i.props.startDate:i.props.selectsStart&&i.props.endDate?i.props.endDate:Te()})),pe(be(i),"calcInitialState",(function(){var e=i.getPreSelection(),t=st(i.props),n=lt(i.props),r=t&&ne(e,t)?t:n&&te(e,n)?n:e;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:i.props.selected?i.props.selected:r,highlightDates:ct(i.props.highlightDates),focused:!1}})),pe(be(i),"clearPreventFocusTimeout",(function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)})),pe(be(i),"setFocus",(function(){i.input&&i.input.focus&&i.input.focus()})),pe(be(i),"setBlur",(function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()})),pe(be(i),"setOpen",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.setState({open:e,preSelection:e&&i.state.open?i.state.preSelection:i.calcInitialState().preSelection,lastPreSelectChange:Rt},(function(){e||i.setState((function(e){return{focused:!!t&&e.focused}}),(function(){!t&&i.setBlur(),i.setState({inputValue:null})}))}))})),pe(be(i),"inputOk",(function(){return a(i.state.preSelection)})),pe(be(i),"isCalendarOpen",(function(){return void 0===i.props.open?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open})),pe(be(i),"handleFocus",(function(e){i.state.preventFocus||(i.props.onFocus(e),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})})),pe(be(i),"cancelFocusInput",(function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null})),pe(be(i),"deferFocusInput",(function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout((function(){return i.setFocus()}),1)})),pe(be(i),"handleDropdownFocus",(function(){i.cancelFocusInput()})),pe(be(i),"handleBlur",(function(e){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(e),i.setState({focused:!1})})),pe(be(i),"handleCalendarClickOutside",(function(e){i.props.inline||i.setOpen(!1),i.props.onClickOutside(e),i.props.withPortal&&e.preventDefault()})),pe(be(i),"handleChange",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if(!i.props.onChangeRaw||(i.props.onChangeRaw.apply(be(i),t),"function"==typeof r.isDefaultPrevented&&!r.isDefaultPrevented())){i.setState({inputValue:r.target.value,lastPreSelectChange:It});var o=Se(r.target.value,i.props.dateFormat,i.props.locale,i.props.strictParsing);!o&&r.target.value||i.setSelected(o,r,!0)}})),pe(be(i),"handleSelect",(function(e,t,n){i.setState({preventFocus:!0},(function(){return i.preventFocusTimeout=setTimeout((function(){return i.setState({preventFocus:!1})}),50),i.preventFocusTimeout})),i.setSelected(e,t,!1,n),!i.props.shouldCloseOnSelect||i.props.showTimeSelect?i.setPreSelection(e):i.props.inline||i.setOpen(!1)})),pe(be(i),"setSelected",(function(e,t,n,r){var o=e;null!==o&&Je(o,i.props)||(ze(i.props.selected,o)&&!i.props.allowSameDay||(null!==o&&(!i.props.selected||n&&(i.props.showTimeSelect||i.props.showTimeSelectOnly||i.props.showTimeInput)||(o=Ce(o,{hour:k(i.props.selected),minute:w(i.props.selected),second:y(i.props.selected)})),i.props.inline||i.setState({preSelection:o}),i.props.inline&&i.props.monthsShown>1&&!i.props.inlineFocusSelectedMonth&&i.setState({monthSelectedIn:r})),i.props.onChange(o,t)),i.props.onSelect(o,t),n||i.setState({inputValue:null}))})),pe(be(i),"setPreSelection",(function(e){var t=void 0!==i.props.minDate,n=void 0!==i.props.maxDate,r=!0;e&&(t&&n?r=Be(e,i.props.minDate,i.props.maxDate):t?r=te(e,i.props.minDate):n&&(r=ne(e,i.props.maxDate))),r&&i.setState({preSelection:e})})),pe(be(i),"handleTimeChange",(function(e){var t=Ce(i.props.selected?i.props.selected:i.getPreSelection(),{hour:k(e),minute:w(e)});i.setState({preSelection:t}),i.props.onChange(t),i.props.shouldCloseOnSelect&&i.setOpen(!1),i.props.showTimeInput&&i.setOpen(!0),i.setState({inputValue:null})})),pe(be(i),"onInputClick",(function(){i.props.disabled||i.props.readOnly||i.setOpen(!0),i.props.onInputClick()})),pe(be(i),"onInputKeyDown",(function(e){i.props.onKeyDown(e);var t=e.key;if(i.state.open||i.props.inline||i.props.preventOpenOnFocus){if(i.state.open){if("ArrowDown"===t||"ArrowUp"===t){e.preventDefault();var n=i.calendar.componentNode&&i.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(n&&n.focus())}var r=Te(i.state.preSelection);"Enter"===t?(e.preventDefault(),i.inputOk()&&i.state.lastPreSelectChange===Rt?(i.handleSelect(r,e),!i.props.shouldCloseOnSelect&&i.setPreSelection(r)):i.setOpen(!1)):"Escape"===t&&(e.preventDefault(),i.setOpen(!1)),i.inputOk()||i.props.onInputError({code:1,msg:"Date input not valid."})}}else"ArrowDown"!==t&&"ArrowUp"!==t&&"Enter"!==t||i.onInputClick()})),pe(be(i),"onDayKeyDown",(function(e){i.props.onKeyDown(e);var t=e.key,n=Te(i.state.preSelection);if("Enter"===t)e.preventDefault(),i.handleSelect(n,e),!i.props.shouldCloseOnSelect&&i.setPreSelection(n);else if("Escape"===t)e.preventDefault(),i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:"Date input not valid."});else if(!i.props.disabledKeyboardNavigation){var r;switch(t){case"ArrowLeft":r=g(n,1);break;case"ArrowRight":r=u(n,1);break;case"ArrowUp":r=_(n,1);break;case"ArrowDown":r=d(n,1);break;case"PageUp":r=v(n,1);break;case"PageDown":r=h(n,1);break;case"Home":r=b(n,1);break;case"End":r=p(n,1)}if(!r)return void(i.props.onInputError&&i.props.onInputError({code:1,msg:"Date input not valid."}));e.preventDefault(),i.setState({lastPreSelectChange:Rt}),i.props.adjustDateOnChange&&i.setSelected(r),i.setPreSelection(r)}})),pe(be(i),"onPopperKeyDown",(function(e){"Escape"===e.key&&(e.preventDefault(),i.setState({preventFocus:!0},(function(){i.setOpen(!1),setTimeout((function(){i.setFocus(),i.setState({preventFocus:!1})}))})))})),pe(be(i),"onClearClick",(function(e){e&&e.preventDefault&&e.preventDefault(),i.props.onChange(null,e),i.setState({inputValue:null})})),pe(be(i),"clear",(function(){i.onClearClick()})),pe(be(i),"renderCalendar",(function(){return i.props.inline||i.isCalendarOpen()?n.createElement(Nt,{ref:function(e){i.calendar=e},locale:i.props.locale,chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,adjustDateOnChange:i.props.adjustDateOnChange,setOpen:i.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,dateFormat:i.props.dateFormatCalendar,useWeekdaysShort:i.props.useWeekdaysShort,formatWeekDay:i.props.formatWeekDay,dropdownMode:i.props.dropdownMode,selected:i.props.selected,preSelection:i.state.preSelection,onSelect:i.handleSelect,onWeekSelect:i.props.onWeekSelect,openToDate:i.props.openToDate,minDate:i.props.minDate,maxDate:i.props.maxDate,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,startDate:i.props.startDate,endDate:i.props.endDate,excludeDates:i.props.excludeDates,filterDate:i.props.filterDate,onClickOutside:i.handleCalendarClickOutside,formatWeekNumber:i.props.formatWeekNumber,highlightDates:i.state.highlightDates,includeDates:i.props.includeDates,includeTimes:i.props.includeTimes,injectTimes:i.props.injectTimes,inline:i.props.inline,peekNextMonth:i.props.peekNextMonth,showMonthDropdown:i.props.showMonthDropdown,showPreviousMonths:i.props.showPreviousMonths,useShortMonthInDropdown:i.props.useShortMonthInDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showWeekNumbers:i.props.showWeekNumbers,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,forceShowMonthNavigation:i.props.forceShowMonthNavigation,showDisabledMonthNavigation:i.props.showDisabledMonthNavigation,scrollableYearDropdown:i.props.scrollableYearDropdown,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown,todayButton:i.props.todayButton,weekLabel:i.props.weekLabel,outsideClickIgnoreClass:"react-datepicker-ignore-onclickoutside",fixedHeight:i.props.fixedHeight,monthsShown:i.props.monthsShown,monthSelectedIn:i.state.monthSelectedIn,onDropdownFocus:i.handleDropdownFocus,onMonthChange:i.props.onMonthChange,onYearChange:i.props.onYearChange,dayClassName:i.props.dayClassName,weekDayClassName:i.props.weekDayClassName,monthClassName:i.props.monthClassName,timeClassName:i.props.timeClassName,showTimeSelect:i.props.showTimeSelect,showTimeSelectOnly:i.props.showTimeSelectOnly,onTimeChange:i.handleTimeChange,timeFormat:i.props.timeFormat,timeIntervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,timeCaption:i.props.timeCaption,className:i.props.calendarClassName,container:i.props.calendarContainer,yearDropdownItemNumber:i.props.yearDropdownItemNumber,previousMonthButtonLabel:i.props.previousMonthButtonLabel,nextMonthButtonLabel:i.props.nextMonthButtonLabel,previousYearButtonLabel:i.props.previousYearButtonLabel,nextYearButtonLabel:i.props.nextYearButtonLabel,timeInputLabel:i.props.timeInputLabel,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,renderCustomHeader:i.props.renderCustomHeader,popperProps:i.props.popperProps,renderDayContents:i.props.renderDayContents,onDayMouseEnter:i.props.onDayMouseEnter,onMonthMouseLeave:i.props.onMonthMouseLeave,showTimeInput:i.props.showTimeInput,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,showPopperArrow:i.props.showPopperArrow,excludeScrollbar:i.props.excludeScrollbar,handleOnKeyDown:i.onDayKeyDown,isInputFocused:i.state.focused,customTimeInput:i.props.customTimeInput,setPreSelection:i.setPreSelection},i.props.children):null})),pe(be(i),"renderDateInput",(function(){var e,t,r,a,s,l=o(i.props.className,pe({},"react-datepicker-ignore-onclickoutside",i.state.open)),c=i.props.customInput||n.createElement("input",{type:"text"}),u=i.props.customInputRef||"ref",d="string"==typeof i.props.value?i.props.value:"string"==typeof i.state.inputValue?i.state.inputValue:(t=i.props.selected,a=(r=i.props).dateFormat,s=r.locale,t&&Le(t,Array.isArray(a)?a[0]:a,s)||"");return n.cloneElement(c,(pe(e={},u,(function(e){i.input=e})),pe(e,"value",d),pe(e,"onBlur",i.handleBlur),pe(e,"onChange",i.handleChange),pe(e,"onClick",i.onInputClick),pe(e,"onFocus",i.handleFocus),pe(e,"onKeyDown",i.onInputKeyDown),pe(e,"id",i.props.id),pe(e,"name",i.props.name),pe(e,"autoFocus",i.props.autoFocus),pe(e,"placeholder",i.props.placeholderText),pe(e,"disabled",i.props.disabled),pe(e,"autoComplete",i.props.autoComplete),pe(e,"className",o(c.props.className,l)),pe(e,"title",i.props.title),pe(e,"readOnly",i.props.readOnly),pe(e,"required",i.props.required),pe(e,"tabIndex",i.props.tabIndex),pe(e,"aria-labelledby",i.props.ariaLabelledBy),e))})),pe(be(i),"renderClearButton",(function(){var e=i.props,t=e.isClearable,r=e.selected,o=e.clearButtonTitle,a=e.ariaLabelClose,s=void 0===a?"Close":a;return t&&null!=r?n.createElement("button",{type:"button",className:"react-datepicker__close-icon","aria-label":s,onClick:i.onClearClick,title:o,tabIndex:-1}):null})),i.state=i.calcInitialState(),i}return he(r,null,[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,renderDayContents:function(e){return e},inlineFocusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null}}}]),he(r,[{key:"componentDidUpdate",value:function(e,t){var n,r;e.inline&&(n=e.selected,r=this.props.selected,n&&r?T(n)!==T(r)||D(n)!==D(r):n!==r)&&this.setPreSelection(this.props.selected),void 0!==this.state.monthSelectedIn&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:ct(this.props.highlightDates)}),t.focused||ze(e.selected,this.props.selected)||this.setState({inputValue:null}),t.open!==this.state.open&&(!1===t.open&&!0===this.state.open&&this.props.onCalendarOpen(),!0===t.open&&!1===this.state.open&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout()}},{key:"render",value:function(){var e=this.renderCalendar();return this.props.inline&&!this.props.withPortal?e:this.props.withPortal?n.createElement("div",null,this.props.inline?null:n.createElement("div",{className:"react-datepicker__input-container"},this.renderDateInput(),this.renderClearButton()),this.state.open||this.props.inline?n.createElement("div",{className:"react-datepicker__portal"},e):null):n.createElement(Ot,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),popperModifiers:this.props.popperModifiers,targetComponent:n.createElement("div",{className:"react-datepicker__input-container"},this.renderDateInput(),this.renderClearButton()),popperContainer:this.props.popperContainer,popperComponent:e,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}]),r}(n.Component),It="input",Rt="navigate";t.CalendarContainer=St,t.default=At,t.getDefaultLocale=Ue,t.registerLocale=function(t,n){var r="undefined"!=typeof window?window:e;r.__localeData__||(r.__localeData__={}),r.__localeData__[t]=n},t.setDefaultLocale=function(t){("undefined"!=typeof window?window:e).__localeId__=t},Object.defineProperty(t,"__esModule",{value:!0})}(t,n(0),n(19),n(44),n(295),n(74),n(457),n(75),n(76),n(42),n(77),n(43),n(78),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(459),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(80),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(28),n(17),n(322),n(54),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(5),n(456),n(335),n(336),n(458))}).call(this,n(35))},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(7),o=n(5),a=n(2);function i(e,t){Object(a.a)(2,arguments);var n=Object(o.default)(e),i=Object(r.a)(t);return isNaN(i)?new Date(NaN):i?(n.setDate(n.getDate()+i),n):n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(7),o=n(5),a=n(2);function i(e,t){Object(a.a)(2,arguments);var n=Object(o.default)(e),i=Object(r.a)(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var s=n.getDate(),l=new Date(n.getTime());l.setMonth(n.getMonth()+i+1,0);var c=l.getDate();return s>=c?l:(n.setFullYear(l.getFullYear(),l.getMonth(),s),n)}},function(e,t,n){var r;
19
- /*!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  Copyright (c) 2017 Jed Watson.
21
  Licensed under the MIT License (MIT), see
22
  http://jedwatson.github.io/classnames
23
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===a)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(356),o=n(357),a=n(358),i=n(359),s=n(360);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(239);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(24).Symbol;e.exports=r},function(e,t,n){var r=n(27)(Object,"create");e.exports=r},function(e,t,n){var r=n(380);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(73);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(7),o=n(30),a=n(2);function i(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(o.a)(e,-n)}},function(e,t,n){"use strict";function r(e,t){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 o(e,t){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 a={p:o,P:function(e,t){var n,a=e.match(/(P+)(p+)?/),i=a[1],s=a[2];if(!s)return r(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",r(i,t)).replace("{{time}}",o(s,t))}};t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(5),o=n(21),a=n(2);function i(e){Object(a.a)(1,arguments);var t=Object(r.default)(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=Object(o.a)(i),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var c=Object(o.a)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(5),o=n(2);function a(e){Object(o.a)(1,arguments);var t=Object(r.default)(e),n=t.getMonth(),a=n-n%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}},function(e,t,n){var r;window,e.exports=(r=n(0),function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){e.exports=n(3)()},function(e,t){e.exports=r},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d}));var r=n(1),o=n.n(r),a=n(0),i=n.n(a);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,c(t).call(this,e))).editor=null,n.domContainer=o.a.createRef(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,o.a.Component),function(e,t,n){t&&l(e.prototype,t)}(t,[{key:"shouldComponentUpdate",value:function(e){return!!this.editor&&(this._shouldUpdateContent(e)&&this.editor.setData(e.data),"disabled"in e&&(this.editor.isReadOnly=e.disabled),!1)}},{key:"componentDidMount",value:function(){this._initializeEditor()}},{key:"componentWillUnmount",value:function(){this._destroyEditor()}},{key:"render",value:function(){return o.a.createElement("div",{ref:this.domContainer,dangerouslySetInnerHTML:{__html:this.props.data||""}})}},{key:"_initializeEditor",value:function(){var e=this;this.props.editor.create(this.domContainer.current,this.props.config).then((function(t){e.editor=t,"disabled"in e.props&&(t.isReadOnly=e.props.disabled),e.props.onInit&&e.props.onInit(t);var n=t.model.document,r=t.editing.view.document;n.on("change:data",(function(n){e.props.onChange&&e.props.onChange(n,t)})),r.on("focus",(function(n){e.props.onFocus&&e.props.onFocus(n,t)})),r.on("blur",(function(n){e.props.onBlur&&e.props.onBlur(n,t)}))})).catch((function(e){console.error(e)}))}},{key:"_destroyEditor",value:function(){var e=this;this.editor&&this.editor.destroy().then((function(){e.editor=null}))}},{key:"_shouldUpdateContent",value:function(e){return this.props.data!==e.data&&this.editor.getData()!==e.data}}]),t}();d.propTypes={editor:i.a.func.isRequired,data:i.a.string,config:i.a.object,onChange:i.a.func,onInit:i.a.func,onFocus:i.a.func,onBlur:i.a.func,disabled:i.a.bool},d.defaultProps={config:{}}},function(e,t,n){"use strict";var r=n(4);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}]).default)},function(e,t,n){var r;(r=window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})).en=Object.assign(r.en||{},{a:"Cannot upload file:",b:"Image toolbar",c:"Table toolbar",d:"Bold",e:"Italic",f:"Block quote",g:"Insert image or file",h:"Choose heading",i:"Heading",j:"image widget",k:"Full size image",l:"Side image",m:"Left aligned image",n:"Centered image",o:"Right aligned image",p:"Insert image",q:"Numbered List",r:"Bulleted List",s:"Insert table",t:"Header column",u:"Insert column left",v:"Insert column right",w:"Delete column",x:"Column",y:"Header row",z:"Insert row below",aa:"Insert row above",ab:"Delete row",ac:"Row",ad:"Merge cell up",ae:"Merge cell right",af:"Merge cell down",ag:"Merge cell left",ah:"Split cell vertically",ai:"Split cell horizontally",aj:"Merge cells",ak:"Enter image caption",al:"Upload failed",am:"media widget",an:"Insert media",ao:"The URL must not be empty.",ap:"This media URL is not supported.",aq:"Link",ar:"Could not obtain resized image URL.",as:"Selecting resized image failed",at:"Could not insert image at the current position.",au:"Inserting image failed",av:"Widget toolbar",aw:"Upload in progress",ax:"Open in a new tab",ay:"Downloadable",az:"Unlink",ba:"Edit link",bb:"Open link in new tab",bc:"This link has no URL",bd:"Save",be:"Cancel",bf:"Link URL",bg:"Paste the media URL in the input.",bh:"Tip: Paste the URL into the content to embed faster.",bi:"Media URL",bj:"Undo",bk:"Redo",bl:"Editor toolbar",bm:"Rich Text Editor, %0",bn:"Rich Text Editor",bo:"Dropdown toolbar",bp:"%0 of %1",bq:"Previous",br:"Next",bs:"Change image text alternative",bt:"Paragraph",bu:"Heading 1",bv:"Heading 2",bw:"Heading 3",bx:"Heading 4",by:"Heading 5",bz:"Heading 6",ca:"Text alternative"}),window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=91)}([function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));class r extends Error{constructor(e,t,n){e=o(e),n&&(e+=" "+JSON.stringify(n)),super(e),this.name="CKEditorError",this.context=t,this.data=n}is(e){return"CKEditorError"===e}}function o(e){const t=e.match(/^([^:]+):/);return t?e+` Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-${t[1]}\n`:e}},function(e,t,n){"use strict";var r={},o=function(){var e;return function(){return void 0===e&&(e=Boolean(window&&document&&document.all&&!window.atob)),e}}(),a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}();function i(e,t){for(var n=[],r={},o=0;o<e.length;o++){var a=e[o],i=t.base?a[0]+t.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};r[i]?r[i].parts.push(s):n.push(r[i]={id:i,parts:[s]})}return n}function s(e,t){for(var n=0;n<e.length;n++){var o=e[n],a=r[o.id],i=0;if(a){for(a.refs++;i<a.parts.length;i++)a.parts[i](o.parts[i]);for(;i<o.parts.length;i++)a.parts.push(p(o.parts[i],t))}else{for(var s=[];i<o.parts.length;i++)s.push(p(o.parts[i],t));r[o.id]={id:o.id,refs:1,parts:s}}}}function l(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var r=n.nc;r&&(e.attributes.nonce=r)}if(Object.keys(e.attributes).forEach((function(n){t.setAttribute(n,e.attributes[n])})),"function"==typeof e.insert)e.insert(t);else{var o=a(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var c=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function u(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}var d=null,h=0;function p(e,t){var n,r,o;if(t.singleton){var a=h++;n=d||(d=l(t)),r=u.bind(null,n,a,!1),o=u.bind(null,n,a,!0)}else n=l(t),r=function(e,t,n){var r=n.css,o=n.media,a=n.sourceMap;if(o&&e.setAttribute("media",o),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).attributes="object"==typeof t.attributes?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=i(e,t);return s(n,t),function(e){for(var o=[],a=0;a<n.length;a++){var l=n[a],c=r[l.id];c&&(c.refs--,o.push(c))}e&&s(i(e,t),t);for(var u=0;u<o.length;u++){var d=o[u];if(0===d.refs){for(var h=0;h<d.parts.length;h++)d.parts[h]();delete r[d.id]}}}}},,function(e,t,n){"use strict";var r=n(7),o="object"==typeof self&&self&&self.Object===Object&&self,a=r.a||o||Function("return this")();t.a=a},function(e,n,r){"use strict";(function(e){var o=r(7),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=i&&i.exports===a&&o.a.process,l=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();n.a=l}).call(this,r(8)(e))},function(e,n,r){"use strict";(function(e){var o=r(3),a=r(11),i=t&&!t.nodeType&&t,s=i&&"object"==typeof e&&e&&!e.nodeType&&e,l=s&&s.exports===i?o.a.Buffer:void 0,c=(l?l.isBuffer:void 0)||a.a;n.a=c}).call(this,r(8)(e))},function(e,t,n){"use strict";(function(e){var t=n(13),r=n(0);const o="object"==typeof window?window:e;if(o.CKEDITOR_VERSION)throw new r.b("ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated.",null);o.CKEDITOR_VERSION=t.a}).call(this,n(9))},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(9))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);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}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(68);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";t.a=function(){return!1}},function(e,n,r){"use strict";(function(e){var o=r(3),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=i&&i.exports===a?o.a.Buffer:void 0,l=s?s.allocUnsafe:void 0;n.a=function(e,t){if(t)return e.slice();var n=e.length,r=l?l(n):new e.constructor(n);return e.copy(r),r}}).call(this,r(8)(e))},function(e){e.exports=JSON.parse('{"a":"12.4.0"}')},function(e,t,n){var r=n(15);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.exports=".ck.ck-placeholder:before,.ck .ck-placeholder:before{content:attr(data-placeholder);pointer-events:none;cursor:text;color:var(--ck-color-engine-placeholder-text)}"},function(e,t,n){var r=n(17);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.exports=".ck-hidden{display:none!important}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{box-sizing:border-box;width:auto;height:auto;position:static}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999);--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#c4c4c4;--ck-color-base-action:#61b045;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#198cf0;--ck-color-base-active-focus:#0e7fe1;--ck-color-base-error:#db3700;--ck-color-focus-border:#47a4f5;--ck-color-focus-shadow:rgba(119,186,248,0.5);--ck-color-focus-disabled-shadow:rgba(119,186,248,0.3);--ck-color-focus-error-shadow:rgba(255,64,31,0.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,0.15);--ck-color-shadow-drop-active:rgba(0,0,0,0.2);--ck-color-shadow-inner:rgba(0,0,0,0.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#e6e6e6;--ck-color-button-default-active-background:#d9d9d9;--ck-color-button-default-active-shadow:#bfbfbf;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#dedede;--ck-color-button-on-hover-background:#c4c4c4;--ck-color-button-on-active-background:#bababa;--ck-color-button-on-active-shadow:#a1a1a1;--ck-color-button-on-disabled-background:#dedede;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#579e3d;--ck-color-button-action-active-background:#53973b;--ck-color-button-action-active-shadow:#498433;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#b0b0b0;--ck-color-switch-button-off-hover-background:#a3a3a3;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#579e3d;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,0.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:#c7c7c7;--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#5c5c5c;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-base-active);--ck-color-list-button-on-background-focus:var(--ck-color-base-active-focus);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-foreground);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,177,255,0.1);--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck.ck-reset_all,.ck.ck-reset_all *{border-collapse:collapse;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);color:var(--ck-color-text);text-align:left;white-space:nowrap;cursor:auto;float:none}.ck.ck-reset_all .ck-rtl *{text-align:right}.ck.ck-reset_all iframe{vertical-align:inherit}.ck.ck-reset_all textarea{white-space:pre-wrap}.ck.ck-reset_all input[type=password],.ck.ck-reset_all input[type=text],.ck.ck-reset_all textarea{cursor:text}.ck.ck-reset_all input[type=password][disabled],.ck.ck-reset_all input[type=text][disabled],.ck.ck-reset_all textarea[disabled]{cursor:default}.ck.ck-reset_all fieldset{padding:10px;border:2px groove #dfdee3}.ck.ck-reset_all button::-moz-focus-inner{padding:0;border:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}"},function(e,t,n){var r=n(19);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.exports=".ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0}.ck.ck-editor__editable_inline{overflow:auto;padding:0 var(--ck-spacing-standard);border:1px solid transparent}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>: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(e,t,n){var r=n(21);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(e,t,n){var r=n(23);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(25);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(27);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(29);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(31);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(33);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(35);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(37);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(39);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(41);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(43);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(45);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(47);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(49);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(51);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(53);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(55);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(57);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(59);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(61);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(63);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(65);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(67);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t){e.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(e,t,n){var r=n(70);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(72);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(74);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}"},function(e,t,n){var r=n(76);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(78);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(80);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(82);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(84);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.exports=".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}"},function(e,t,n){var r=n(86);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(88);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){var r=n(90);"string"==typeof r&&(r=[[e.i,r,""]]),n(1)(r,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t){e.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(e,t,n){"use strict";n.r(t);var r=n(3),o=r.a.Symbol,a=Object.prototype,i=a.hasOwnProperty,s=a.toString,l=o?o.toStringTag:void 0,c=Object.prototype.toString,u=o?o.toStringTag:void 0,d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=s.call(e);return r&&(t?e[l]=n:delete e[l]),o}(e):function(e){return c.call(e)}(e)},h=function(e,t){return function(n){return e(t(n))}},p=h(Object.getPrototypeOf,Object),f=function(e){return null!=e&&"object"==typeof e},m=Function.prototype,g=Object.prototype,_=m.toString,v=g.hasOwnProperty,b=_.call(Object),y=function(e){if(!f(e)||"[object Object]"!=d(e))return!1;var t=p(e);if(null===t)return!0;var n=v.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&_.call(n)==b},w=function(e,t){return e===t||e!=e&&t!=t},k=function(e,t){for(var n=e.length;n--;)if(w(e[n][0],t))return n;return-1},x=Array.prototype.splice;function M(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}M.prototype.clear=function(){this.__data__=[],this.size=0},M.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0||(n==t.length-1?t.pop():x.call(t,n,1),--this.size,0))},M.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return k(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var E=M,T=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},S=function(e){if(!T(e))return!1;var t=d(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},D=r.a["__core-js_shared__"],L=function(){var e=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),C=Function.prototype.toString,P=function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""},O=/^\[object .+?Constructor\]$/,N=Function.prototype,A=Object.prototype,I=N.toString,R=A.hasOwnProperty,Y=RegExp("^"+I.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=function(e){return!(!T(e)||function(e){return!!L&&L in e}(e))&&(S(e)?Y:O).test(P(e))},F=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0},H=F(r.a,"Map"),z=F(Object,"create"),B=Object.prototype.hasOwnProperty,U=Object.prototype.hasOwnProperty;function V(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}V.prototype.clear=function(){this.__data__=z?z(null):{},this.size=0},V.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},V.prototype.get=function(e){var t=this.__data__;if(z){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return B.call(t,e)?t[e]:void 0},V.prototype.has=function(e){var t=this.__data__;return z?void 0!==t[e]:U.call(t,e)},V.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=z&&void 0===t?"__lodash_hash_undefined__":t,this};var W=V,q=function(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map};function G(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}G.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new(H||E),string:new W}},G.prototype.delete=function(e){var t=q(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return q(this,e).get(e)},G.prototype.has=function(e){return q(this,e).has(e)},G.prototype.set=function(e,t){var n=q(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var J=G;function K(e){var t=this.__data__=new E(e);this.size=t.size}K.prototype.clear=function(){this.__data__=new E,this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},K.prototype.get=function(e){return this.__data__.get(e)},K.prototype.has=function(e){return this.__data__.has(e)},K.prototype.set=function(e,t){var n=this.__data__;if(n instanceof E){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(e,t),this.size=n.size,this};var Q=K,X=function(){try{var e=F(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),$=function(e,t,n){"__proto__"==t&&X?X(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Z=Object.prototype.hasOwnProperty,ee=function(e,t,n){var r=e[t];Z.call(e,t)&&w(r,n)&&(void 0!==n||t in e)||$(e,t,n)},te=function(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?$(n,s,l):ee(n,s,l)}return n},ne=function(e){return f(e)&&"[object Arguments]"==d(e)},re=Object.prototype,oe=re.hasOwnProperty,ae=re.propertyIsEnumerable,ie=ne(function(){return arguments}())?ne:function(e){return f(e)&&oe.call(e,"callee")&&!ae.call(e,"callee")},se=Array.isArray,le=n(5),ce=/^(?:0|[1-9]\d*)$/,ue=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ce.test(e))&&e>-1&&e%1==0&&e<t},de=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},he={};he["[object Float32Array]"]=he["[object Float64Array]"]=he["[object Int8Array]"]=he["[object Int16Array]"]=he["[object Int32Array]"]=he["[object Uint8Array]"]=he["[object Uint8ClampedArray]"]=he["[object Uint16Array]"]=he["[object Uint32Array]"]=!0,he["[object Arguments]"]=he["[object Array]"]=he["[object ArrayBuffer]"]=he["[object Boolean]"]=he["[object DataView]"]=he["[object Date]"]=he["[object Error]"]=he["[object Function]"]=he["[object Map]"]=he["[object Number]"]=he["[object Object]"]=he["[object RegExp]"]=he["[object Set]"]=he["[object String]"]=he["[object WeakMap]"]=!1;var pe=function(e){return function(t){return e(t)}},fe=n(4),me=fe.a&&fe.a.isTypedArray,ge=me?pe(me):function(e){return f(e)&&de(e.length)&&!!he[d(e)]},_e=Object.prototype.hasOwnProperty,ve=function(e,t){var n=se(e),r=!n&&ie(e),o=!n&&!r&&Object(le.a)(e),a=!n&&!r&&!o&&ge(e),i=n||r||o||a,s=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!_e.call(e,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ue(c,l))||s.push(c);return s},be=Object.prototype,ye=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||be)},we=h(Object.keys,Object),ke=Object.prototype.hasOwnProperty,xe=function(e){return null!=e&&de(e.length)&&!S(e)},Me=function(e){return xe(e)?ve(e):function(e){if(!ye(e))return we(e);var t=[];for(var n in Object(e))ke.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},Ee=Object.prototype.hasOwnProperty,Te=function(e){if(!T(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ye(e),n=[];for(var r in e)("constructor"!=r||!t&&Ee.call(e,r))&&n.push(r);return n},Se=function(e){return xe(e)?ve(e,!0):Te(e)},De=n(12),Le=function(){return[]},Ce=Object.prototype.propertyIsEnumerable,Pe=Object.getOwnPropertySymbols,Oe=Pe?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}(Pe(e),(function(t){return Ce.call(e,t)})))}:Le,Ne=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},Ae=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ne(t,Oe(e)),e=p(e);return t}:Le,Ie=function(e,t,n){var r=t(e);return se(e)?r:Ne(r,n(e))},Re=function(e){return Ie(e,Me,Oe)},Ye=function(e){return Ie(e,Se,Ae)},je=F(r.a,"DataView"),Fe=F(r.a,"Promise"),He=F(r.a,"Set"),ze=F(r.a,"WeakMap"),Be=P(je),Ue=P(H),Ve=P(Fe),We=P(He),qe=P(ze),Ge=d;(je&&"[object DataView]"!=Ge(new je(new ArrayBuffer(1)))||H&&"[object Map]"!=Ge(new H)||Fe&&"[object Promise]"!=Ge(Fe.resolve())||He&&"[object Set]"!=Ge(new He)||ze&&"[object WeakMap]"!=Ge(new ze))&&(Ge=function(e){var t=d(e),n="[object Object]"==t?e.constructor:void 0,r=n?P(n):"";if(r)switch(r){case Be:return"[object DataView]";case Ue:return"[object Map]";case Ve:return"[object Promise]";case We:return"[object Set]";case qe:return"[object WeakMap]"}return t});var Je=Ge,Ke=Object.prototype.hasOwnProperty,Qe=r.a.Uint8Array,Xe=function(e){var t=new e.constructor(e.byteLength);return new Qe(t).set(new Qe(e)),t},$e=/\w*$/,Ze=o?o.prototype:void 0,et=Ze?Ze.valueOf:void 0,tt=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Xe(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return function(e,t){var n=t?Xe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?Xe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,$e.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Set]":return new r;case"[object Symbol]":return function(e){return et?Object(et.call(e)):{}}(e)}},nt=Object.create,rt=function(){function e(){}return function(t){if(!T(t))return{};if(nt)return nt(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),ot=fe.a&&fe.a.isMap,at=ot?pe(ot):function(e){return f(e)&&"[object Map]"==Je(e)},it=fe.a&&fe.a.isSet,st=it?pe(it):function(e){return f(e)&&"[object Set]"==Je(e)},lt="[object Arguments]",ct="[object Function]",ut="[object Object]",dt={};dt[lt]=dt["[object Array]"]=dt["[object ArrayBuffer]"]=dt["[object DataView]"]=dt["[object Boolean]"]=dt["[object Date]"]=dt["[object Float32Array]"]=dt["[object Float64Array]"]=dt["[object Int8Array]"]=dt["[object Int16Array]"]=dt["[object Int32Array]"]=dt["[object Map]"]=dt["[object Number]"]=dt[ut]=dt["[object RegExp]"]=dt["[object Set]"]=dt["[object String]"]=dt["[object Symbol]"]=dt["[object Uint8Array]"]=dt["[object Uint8ClampedArray]"]=dt["[object Uint16Array]"]=dt["[object Uint32Array]"]=!0,dt["[object Error]"]=dt[ct]=dt["[object WeakMap]"]=!1;var ht=function e(t,n,r,o,a,i){var s,l=1&n,c=2&n,u=4&n;if(r&&(s=a?r(t,o,a,i):r(t)),void 0!==s)return s;if(!T(t))return t;var d=se(t);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ke.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!l)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(t,s)}else{var h=Je(t),f=h==ct||"[object GeneratorFunction]"==h;if(Object(le.a)(t))return Object(De.a)(t,l);if(h==ut||h==lt||f&&!a){if(s=c||f?{}:function(e){return"function"!=typeof e.constructor||ye(e)?{}:rt(p(e))}(t),!l)return c?function(e,t){return te(e,Ae(e),t)}(t,function(e,t){return e&&te(t,Se(t),e)}(s,t)):function(e,t){return te(e,Oe(e),t)}(t,function(e,t){return e&&te(t,Me(t),e)}(s,t))}else{if(!dt[h])return a?t:{};s=tt(t,h,l)}}i||(i=new Q);var m=i.get(t);if(m)return m;i.set(t,s),st(t)?t.forEach((function(o){s.add(e(o,n,r,o,t,i))})):at(t)&&t.forEach((function(o,a){s.set(a,e(o,n,r,a,t,i))}));var g=u?c?Ye:Re:c?keysIn:Me,_=d?void 0:g(t);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(_||t,(function(o,a){_&&(o=t[a=o]),ee(s,a,e(o,n,r,a,t,i))})),s},pt=function(e,t){return ht(e,5,t="function"==typeof t?t:void 0)},ft=function(e){return f(e)&&1===e.nodeType&&!y(e)};class mt{constructor(e,t){this._config={},t&&this.define(t),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}_setToTarget(e,t,n,r=!1){if(y(t))return void this._setObjectToTarget(e,t,r);const o=t.split(".");t=o.pop();for(const t of o)y(e[t])||(e[t]={}),e=e[t];if(y(n))return y(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,n,r);r&&void 0!==e[t]||(e[t]=n)}_getFromSource(e,t){const n=t.split(".");t=n.pop();for(const t of n){if(!y(e[t])){e=null;break}e=e[t]}return e?function(e){return pt(e,gt)}(e[t]):void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach(r=>{this._setToTarget(e,r,t[r],n)})}}function gt(e){return ft(e)?e:void 0}var _t=n(0);class vt{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=function e(){e.called=!0},this.off=function e(){e.called=!0}}}function bt(){let e="e";for(let t=0;t<8;t++)e+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e}var yt={get(e){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};n(6);const wt=Symbol("listeningTo"),kt=Symbol("emitterId");var xt={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){let r=!1;this.listenTo(this,e,(function(e,...n){r||(r=!0,e.off(),t.call(this,e,...n))}),n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,r={}){let o,a;this[wt]||(this[wt]={});const i=this[wt];Et(e)||Mt(e);const s=Et(e);(o=i[s])||(o=i[s]={emitter:e,callbacks:{}}),(a=o.callbacks[t])||(a=o.callbacks[t]=[]),a.push(n),function(e,t){const n=Tt(e);if(n[t])return;let r=t,o=null;const a=[];for(;""!==r&&!n[r];)n[r]={callbacks:[],childEvents:[]},a.push(n[r]),o&&n[r].childEvents.push(o),o=r,r=r.substr(0,r.lastIndexOf(":"));if(""!==r){for(const e of a)e.callbacks=n[r].callbacks.slice();n[r].childEvents.push(o)}}(e,t);const l=St(e,t),c=yt.get(r.priority),u={callback:n,priority:c};for(const e of l){let t=!1;for(let n=0;n<e.length;n++)if(e[n].priority<c){e.splice(n,0,u),t=!0;break}t||e.push(u)}},stopListening(e,t,n){const r=this[wt];let o=e&&Et(e);const a=r&&o&&r[o],i=a&&t&&a.callbacks[t];if(!(!r||e&&!a||t&&!i))if(n)Lt(e,t,n);else if(i){for(;n=i.pop();)Lt(e,t,n);delete a.callbacks[t]}else if(a){for(t in a.callbacks)this.stopListening(e,t);delete r[o]}else{for(o in r)this.stopListening(r[o].emitter);delete this[wt]}},fire(e,...t){const n=e instanceof vt?e:new vt(this,e),r=n.name;let o=function e(t,n){let r;return t._events&&(r=t._events[n])&&r.callbacks.length?r.callbacks:n.indexOf(":")>-1?e(t,n.substr(0,n.lastIndexOf(":"))):null}(this,r);if(n.path.push(this),o){const e=[n,...t];o=Array.from(o);for(let t=0;t<o.length&&(o[t].callback.apply(this,e),n.off.called&&(delete n.off.called,Lt(this,r,o[t].callback)),!n.stop.called);t++);}if(this._delegations){const e=this._delegations.get(r),o=this._delegations.get("*");e&&Dt(e,n,t),o&&Dt(o,n,t)}return n.return},delegate(...e){return{to:(t,n)=>{this._delegations||(this._delegations=new Map),e.forEach(e=>{const r=this._delegations.get(e);r?r.set(t,n):this._delegations.set(e,new Map([[t,n]]))})}}},stopDelegating(e,t){if(this._delegations)if(e)if(t){const n=this._delegations.get(e);n&&n.delete(t)}else this._delegations.delete(e);else this._delegations.clear()}};function Mt(e,t){e[kt]||(e[kt]=t||bt())}function Et(e){return e[kt]}function Tt(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function St(e,t){const n=Tt(e)[t];if(!n)return[];let r=[n.callbacks];for(let t=0;t<n.childEvents.length;t++){const o=St(e,n.childEvents[t]);r=r.concat(o)}return r}function Dt(e,t,n){for(let[r,o]of e){o?"function"==typeof o&&(o=o(t.name)):o=t.name;const e=new vt(t.source,o);e.path=[...t.path],r.fire(e,...n)}}function Lt(e,t,n){const r=St(e,t);for(const e of r)for(let t=0;t<e.length;t++)e[t].callback==n&&(e.splice(t,1),t--)}function Ct(e,...t){t.forEach(t=>{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach(n=>{if(n in e.prototype)return;const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable=!1,Object.defineProperty(e.prototype,n,r)})})}function Pt(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!=t[r])return r;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}var Ot=function(e){return ht(e,4)};class Nt{constructor(){this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new _t.b("view-node-not-found-in-parent: The node's parent does not contain this node.",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.parent instanceof Nt?this.parent.document:null}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),r=e.getAncestors(t);let o=0;for(;n[o]==r[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),r=Pt(t,n);switch(r){case"prefix":return!0;case"extension":return!1;default:return t[r]<n[r]}}isAfter(e){return this!=e&&this.root===e.root&&!this.isBefore(e)}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire("change:"+e,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=Ot(this);return delete e.parent,e}is(e){return"node"==e||"view:node"==e}}Ct(Nt,xt);class At extends Nt{constructor(e){super(),this._textData=e}is(e){return"text"==e||"view:text"==e||super.is(e)}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof At&&(this===e||this.data===e.data)}_clone(){return new At(this.data)}}class It{constructor(e,t,n){if(this.textNode=e,t<0||t>e.data.length)throw new _t.b("view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(n<0||t+n>e.data.length)throw new _t.b("view-textproxy-wrong-length: Given length value is incorrect.",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}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(e){return"textProxy"==e||"view:textProxy"==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this.textNode:this.parent;for(;null!==n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}}function Rt(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}function Yt(e){return!(!e||!e[Symbol.iterator])}class jt{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),t.classes&&("string"==typeof t.classes||t.classes instanceof RegExp)&&(t.classes=[t.classes]),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=Ft(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const r=Ft(n,e);r&&t.push({element:n,pattern:e,match:r})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function Ft(e,t){if("function"==typeof t)return t(e);const n={};return t.name&&(n.name=function(e,t){return e instanceof RegExp?e.test(t):e===t}(t.name,e.name),!n.name)||t.attributes&&(n.attributes=function(e,t){const n=[];for(const r in e){const o=e[r];if(!t.hasAttribute(r))return null;{const e=t.getAttribute(r);if(!0===o)n.push(r);else if(o instanceof RegExp){if(!o.test(e))return null;n.push(r)}else{if(e!==o)return null;n.push(r)}}}return n}(t.attributes,e),!n.attributes)?null:!(t.classes&&(n.classes=function(e,t){const n=[];for(const r of e)if(r instanceof RegExp){const e=t.getClassNames();for(const t of e)r.test(t)&&n.push(t);if(0===n.length)return null}else{if(!t.hasClass(r))return null;n.push(r)}return n}(t.classes,e),!n.classes))&&!(t.styles&&(n.styles=function(e,t){const n=[];for(const r in e){const o=e[r];if(!t.hasStyle(r))return null;{const e=t.getStyle(r);if(o instanceof RegExp){if(!o.test(e))return null;n.push(r)}else{if(e!==o)return null;n.push(r)}}}return n}(t.styles,e),!n.styles))&&n}class Ht extends Nt{constructor(e,t,n){if(super(),this.name=e,this._attrs=function(e){e=y(e)?Rt(e):new Map(e);for(const[t,n]of e)null===n?e.delete(t):"string"!=typeof n&&e.set(t,String(n));return e}(t),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Bt(this._classes,e),this._attrs.delete("class")}this._styles=new Map,this._attrs.has("style")&&(zt(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(e,t=null){const n=e.replace(/^view:/,"");return t?"element"==n&&t==this.name:"element"==n||n==this.name||super.is(e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}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(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"!=e)return this._attrs.get(e);if(this._styles.size>0){let e="";for(const[t,n]of this._styles)e+=`${t}:${n};`;return e}}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?this._styles.size>0:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Ht))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,n]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==n)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const[t,n]of this._styles)if(!e._styles.has(t)||e._styles.get(t)!==n)return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.get(e)}getStyleNames(){return this._styles.keys()}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new jt(...e);let n=this.parent;for(;n;){if(t.match(n))return n;n=n.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=Array.from(this._styles).map(e=>`${e[0]}:${e[1]}`).sort().join(";"),n=Array.from(this._attrs).map(e=>`${e[0]}="${e[1]}"`).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(""==t?"":` style="${t}"`)+(""==n?"":" "+n)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.name,this._attrs,t);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(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let n=0;const r=function(e){return"string"==typeof e?[new At(e)]:(Yt(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new At(e):e instanceof It?new At(e.data):e))}(t);for(const t of r)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){t=String(t),this._fireChange("attributes",this),"class"==e?Bt(this._classes,t):"style"==e?zt(this._styles,t):this._attrs.set(e,t)}_removeAttribute(e){return this._fireChange("attributes",this),"class"==e?this._classes.size>0&&(this._classes.clear(),!0):"style"==e?this._styles.size>0&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._classes.add(e))}_removeClass(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._classes.delete(e))}_setStyle(e,t){if(this._fireChange("attributes",this),y(e)){const t=Object.keys(e);for(const n of t)this._styles.set(n,e[n])}else this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._styles.delete(e))}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function zt(e,t){let n=null,r=0,o=0,a=null;if(e.clear(),""!==t){";"!=t.charAt(t.length-1)&&(t+=";");for(let i=0;i<t.length;i++){const s=t.charAt(i);if(null===n)switch(s){case":":a||(a=t.substr(r,i-r),o=i+1);break;case'"':case"'":n=s;break;case";":{const n=t.substr(o,i-o);a&&e.set(a.trim(),n.trim()),a=null,r=i+1;break}}else s===n&&(n=null)}}}function Bt(e,t){const n=t.split(/\s+/);e.clear(),n.forEach(t=>e.add(t))}class Ut extends Ht{constructor(e,t,n){super(e,t,n),this.getFillerOffset=Vt}is(e,t=null){const n=e&&e.replace(/^view:/,"");return t?"containerElement"==n&&t==this.name||super.is(e,t):"containerElement"==n||super.is(e)}}function Vt(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}var Wt=function(e){return e},qt=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Gt=Math.max,Jt=function(e){return function(){return e}},Kt=X?function(e,t){return X(e,"toString",{configurable:!0,enumerable:!1,value:Jt(t),writable:!0})}:Wt,Qt=Date.now,Xt=function(e){var t=0,n=0;return function(){var r=Qt(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Kt),$t=function(e,t){return Xt(function(e,t,n){return t=Gt(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Gt(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),qt(e,this,s)}}(e,t,Wt),e+"")},Zt=function(e){return $t((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&function(e,t,n){if(!T(n))return!1;var r=typeof t;return!!("number"==r?xe(n)&&ue(t,n.length):"string"==r&&t in n)&&w(n[t],e)}(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s)}return t}))}((function(e,t){te(t,Se(t),e)}));const en=Symbol("observableProperties"),tn=Symbol("boundObservables"),nn=Symbol("boundProperties"),rn={set(e,t){if(T(e))return void Object.keys(e).forEach(t=>{this.set(t,e[t])},this);an(this);const n=this[en];if(e in this&&!n.has(e))throw new _t.b("observable-set-cannot-override: Cannot override an existing property.",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>n.get(e),set(t){const r=n.get(e);let o=this.fire("set:"+e,e,t,r);void 0===o&&(o=t),r===o&&n.has(e)||(n.set(e,o),this.fire("change:"+e,e,o,r))}}),this[e]=t},bind(...e){if(!e.length||!cn(e))throw new _t.b("observable-bind-wrong-properties: All properties must be strings.",this);if(new Set(e).size!==e.length)throw new _t.b("observable-bind-duplicate-properties: Properties must be unique.",this);an(this);const t=this[nn];e.forEach(e=>{if(t.has(e))throw new _t.b("observable-bind-rebind: Cannot bind the same property more that once.",this)});const n=new Map;return e.forEach(e=>{const r={property:e,to:[]};t.set(e,r),n.set(e,r)}),{to:sn,toMany:ln,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!(en in this))return;const t=this[nn],n=this[tn];if(e.length){if(!cn(e))throw new _t.b("observable-unbind-wrong-properties: Properties must be strings.",this);e.forEach(e=>{const r=t.get(e);if(!r)return;let o,a,i,s;r.to.forEach(e=>{o=e[0],a=e[1],i=n.get(o),(s=i[a]).delete(r),s.size||delete i[a],Object.keys(i).length||(n.delete(o),this.stopListening(o,"change"))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,"change")}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new _t.b("observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.",this,{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)}}};Zt(rn,xt);var on=rn;function an(e){en in e||(Object.defineProperty(e,en,{value:new Map}),Object.defineProperty(e,tn,{value:new Map}),Object.defineProperty(e,nn,{value:new Map}))}function sn(...e){const t=function(...e){if(!e.length)throw new _t.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);const t={to:[]};let n;return"function"==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach(e=>{if("string"==typeof e)n.properties.push(e);else{if("object"!=typeof e)throw new _t.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);n={observable:e,properties:[]},t.to.push(n)}}),t}(...e),n=Array.from(this._bindings.keys()),r=n.length;if(!t.callback&&t.to.length>1)throw new _t.b("observable-bind-to-no-callback: Binding multiple observables only possible with callback.",this);if(r>1&&t.callback)throw new _t.b("observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.",this);t.to.forEach(e=>{if(e.properties.length&&e.properties.length!==r)throw new _t.b("observable-bind-to-properties-length: The number of properties must match.",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),function(e,t){t.forEach(t=>{const n=e[tn];let r;n.get(t.observable)||e.listenTo(t.observable,"change",(o,a)=>{(r=n.get(t.observable)[a])&&r.forEach(t=>{un(e,t.property)})})})}(this._observable,this._to),function(e){let t;e._bindings.forEach((n,r)=>{e._to.forEach(o=>{t=o.properties[n.callback?0:e._bindProperties.indexOf(r)],n.to.push([o.observable,t]),function(e,t,n,r){const o=e[tn],a=o.get(n),i=a||{};i[r]||(i[r]=new Set),i[r].add(t),a||o.set(n,i)}(e._observable,n,o.observable,t)})})}(this),this._bindProperties.forEach(e=>{un(this._observable,e)})}function ln(e,t,n){if(this._bindings.size>1)throw new _t.b("observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",this);this.to(...function(e,t){const n=e.map(e=>[e,t]);return Array.prototype.concat.apply([],n)}(e,t),n)}function cn(e){return e.every(e=>"string"==typeof e)}function un(e,t){const n=e[nn].get(t);let r;r=n.callback?n.callback.apply(e,n.to.map(e=>e[0][e[1]])):(r=n.to[0])[0][r[1]],e.hasOwnProperty(t)?e[t]=r:e.set(t,r)}const dn=Symbol("document");class hn extends Ut{constructor(e,t,n){super(e,t,n),this.set("isReadOnly",!1),this.set("isFocused",!1)}is(e,t=null){const n=e&&e.replace(/^view:/,"");return t?"editableElement"==n&&t==this.name||super.is(e,t):"editableElement"==n||super.is(e)}destroy(){this.stopListening()}get document(){return this.getCustomProperty(dn)}set _document(e){if(this.getCustomProperty(dn))throw new _t.b("view-editableelement-document-already-set: View document is already set.",this);this._setCustomProperty(dn,e),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",t=>t&&e.selection.editableElement==this),this.listenTo(e.selection,"change",()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}}Ct(hn,on);const pn=Symbol("rootName");class fn extends hn{constructor(e){super(e),this.rootName="main"}is(e,t=null){const n=e.replace(/^view:/,"");return t?"rootElement"==n&&t==this.name||super.is(e,t):"rootElement"==n||super.is(e)}get rootName(){return this.getCustomProperty(pn)}set rootName(e){this._setCustomProperty(pn,e)}set _name(e){this.name=e}}class mn{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new _t.b("view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new _t.b("view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this.position=gn._createAt(e.startPosition):this.position=gn._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,r;do{r=this.position,({done:t,value:n}=this.next())}while(!t&&e(n));t||(this.position=r)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let r;if(n instanceof At){if(e.isAtEnd)return this.position=gn._createAfter(n),this._next();r=n.data[e.offset]}else r=n.getChild(e.offset);if(r instanceof Ht)return this.shallow?e.offset++:e=new gn(r,0),this.position=e,this._formatReturnValue("elementStart",r,t,e,1);if(r instanceof At){if(this.singleCharacters)return e=new gn(r,0),this.position=e,this._next();{let n,o=r.data.length;return r==this._boundaryEndParent?(o=this.boundaries.end.offset,n=new It(r,0,o),e=gn._createAfter(n)):(n=new It(r,0,r.data.length),e.offset++),this.position=e,this._formatReturnValue("text",n,t,e,o)}}if("string"==typeof r){let r;r=this.singleCharacters?1:(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-e.offset;const o=new It(n,e.offset,r);return e.offset+=r,this.position=e,this._formatReturnValue("text",o,t,e,r)}return e=gn._createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,t,e)}_previous(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let r;if(n instanceof At){if(e.isAtStart)return this.position=gn._createBefore(n),this._previous();r=n.data[e.offset-1]}else r=n.getChild(e.offset-1);if(r instanceof Ht)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",r,t,e,1)):(e=new gn(r,r.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",r,t,e));if(r instanceof At){if(this.singleCharacters)return e=new gn(r,r.data.length),this.position=e,this._previous();{let n,o=r.data.length;if(r==this._boundaryStartParent){const t=this.boundaries.start.offset;o=(n=new It(r,t,r.data.length-t)).data.length,e=gn._createBefore(n)}else n=new It(r,0,r.data.length),e.offset--;return this.position=e,this._formatReturnValue("text",n,t,e,o)}}if("string"==typeof r){let r;if(this.singleCharacters)r=1;else{const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;r=e.offset-t}e.offset-=r;const o=new It(n,e.offset,r);return this.position=e,this._formatReturnValue("text",o,t,e,r)}return e=gn._createBefore(n),this.position=e,this._formatReturnValue("elementStart",n,t,e,1)}_formatReturnValue(e,t,n,r,o){return t instanceof It&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=gn._createAfter(t.textNode):(r=gn._createAfter(t.textNode),this.position=r)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=gn._createBefore(t.textNode):(r=gn._createBefore(t.textNode),this.position=r))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:r,length:o}}}}class gn{constructor(e,t){this.parent=e,this.offset=t}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 e=this.parent.is("text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof hn);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=gn._createAt(this),n=t.offset+e;return t.offset=n<0?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new mn(t);return n.skip(e),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let r=0;for(;t[r]==n[r]&&t[r];)r++;return 0===r?null:t[r-1]}is(e){return"position"==e||"view:position"==e}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],n=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const r=Pt(t,n);switch(r){case"prefix":return"before";case"extension":return"after";default:return t[r]<n[r]?"before":"after"}}getWalker(e={}){return e.startPosition=this,new mn(e)}clone(){return new gn(this.parent,this.offset)}static _createAt(e,t){if(e instanceof gn)return new this(e.parent,e.offset);{const n=e;if("end"==t)t=n.is("text")?n.data.length:n.childCount;else{if("before"==t)return this._createBefore(n);if("after"==t)return this._createAfter(n);if(0!==t&&!t)throw new _t.b("view-createPositionAt-offset-required: View#createPositionAt() requires the offset when the first parameter is a view item.",n)}return new gn(n,t)}}static _createAfter(e){if(e.is("textProxy"))return new gn(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new _t.b("view-position-after-root: You can not make position after root.",e,{root:e});return new gn(e.parent,e.index+1)}static _createBefore(e){if(e.is("textProxy"))return new gn(e.textNode,e.offsetInText);if(!e.parent)throw new _t.b("view-position-before-root: You can not make position before root.",e,{root:e});return new gn(e.parent,e.index)}}class _n{constructor(e,t=null){this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new mn({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(vn,{direction:"backward"}),t=this.end.getLastMatchingPosition(vn);return e.parent.is("text")&&e.isAtStart&&(e=gn._createBefore(e.parent)),t.parent.is("text")&&t.isAtEnd&&(t=gn._createAfter(t.parent)),new _n(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(vn);if(e.isAfter(this.end)||e.isEqual(this.end))return new _n(e,e);let t=this.end.getLastMatchingPosition(vn,{direction:"backward"});const n=e.nodeAfter,r=t.nodeBefore;return n&&n.is("text")&&(e=new gn(n,0)),r&&r.is("text")&&(t=new gn(r,r.data.length)),new _n(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),r=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&r}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new _n(this.start,e.start)),this.containsPosition(e.end)&&t.push(new _n(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new _n(t,n)}return null}getWalker(e={}){return e.boundaries=this,new mn(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}clone(){return new _n(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new mn(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new mn(e);yield t.position;for(const e of t)yield e.nextPosition}is(e){return"range"==e||"view:range"==e}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,n,r){return new this(new gn(e,t),new gn(n,r))}static _createFromPositionAndShift(e,t){const n=e,r=e.getShiftedBy(t);return t>0?new this(n,r):new this(r,n)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(gn._createBefore(e),t)}}function vn(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}function bn(e){let t=0;for(const n of e)t++;return t}class yn{constructor(e=null,t,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(e,t,n)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.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 e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const r of e._ranges)if(t.isEqual(r)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=bn(this.getRanges());if(t!=bn(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let r of e.getRanges())if(r=r.getTrimmed(),t.start.isEqual(r.start)&&t.end.isEqual(r.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange();let t=e.start.nodeAfter,n=e.end.nodeBefore;return e.start.parent.is("text")&&e.start.isAtEnd&&e.start.parent.nextSibling&&(t=e.start.parent.nextSibling),e.end.parent.is("text")&&e.end.isAtStart&&e.end.parent.previousSibling&&(n=e.end.parent.previousSibling),t instanceof Ht&&t==n?t:null}setTo(e,t,n){if(null===e)this._setRanges([]),this._setFakeOptions(t);else if(e instanceof yn||e instanceof wn)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof _n)this._setRanges([e],t&&t.backward),this._setFakeOptions(t);else if(e instanceof gn)this._setRanges([new _n(e)]),this._setFakeOptions(t);else if(e instanceof Nt){const r=!!n&&!!n.backward;let o;if(void 0===t)throw new _t.b("view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",this);o="in"==t?_n._createIn(e):"on"==t?_n._createOn(e):new _n(gn._createAt(e,t)),this._setRanges([o],r),this._setFakeOptions(n)}else{if(!Yt(e))throw new _t.b("view-selection-setTo-not-selectable: Cannot set selection to given place.",this);this._setRanges(e,t&&t.backward),this._setFakeOptions(t)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new _t.b("view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",this);const n=gn._createAt(e,t);if("same"==n.compareWith(this.focus))return;const r=this.anchor;this._ranges.pop(),"before"==n.compareWith(r)?this._addRange(new _n(n,r),!0):this._addRange(new _n(r,n)),this.fire("change")}is(e){return"selection"==e||"view:selection"==e}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof _n))throw new _t.b("view-selection-add-range-not-range: Selection range set to an object that is not an instance of view.Range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new _t.b("view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",this,{addedRange:e,intersectingRange:t});this._ranges.push(new _n(e.start,e.end))}}Ct(yn,xt);class wn{constructor(e=null,t,n){this._selection=new yn,this._selection.delegate("change").to(this),this._selection.setTo(e,t,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(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}is(e){return"selection"==e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setFocus(e,t){this._selection.setFocus(e,t)}}Ct(wn,xt);class kn{constructor(e={}){this._items=[],this._itemMap=new Map,this._idProperty=e.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(e,t){let n;const r=this._idProperty;if(r in e){if("string"!=typeof(n=e[r]))throw new _t.b("collection-add-invalid-id",this);if(this.get(n))throw new _t.b("collection-add-item-already-exists",this)}else e[r]=n=bt();if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new _t.b("collection-add-item-invalid-index",this);return this._items.splice(t,0,e),this._itemMap.set(n,e),this.fire("add",e,t),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new _t.b("collection-get-invalid-arg: Index or id must be given.",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,this._items.indexOf(t)}remove(e){let t,n,r,o=!1;const a=this._idProperty;if("string"==typeof e?(n=e,o=!(r=this._itemMap.get(n)),r&&(t=this._items.indexOf(r))):"number"==typeof e?(t=e,o=!(r=this._items[t]),r&&(n=r[a])):(n=(r=e)[a],o=-1==(t=this._items.indexOf(r))||!this._itemMap.get(n)),o)throw new _t.b("collection-remove-404: Item not found.",this);this._items.splice(t,1),this._itemMap.delete(n);const i=this._bindToInternalToExternalMap.get(r);return this._bindToInternalToExternalMap.delete(r),this._bindToExternalToInternalMap.delete(i),this.fire("remove",r,t),r}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(e){if(this._bindToCollection)throw new _t.b("collection-bind-to-rebind: The collection cannot be bound more than once.",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding(t=>new e(t))},using:e=>{"function"==typeof e?this._setUpBindToBinding(t=>e(t)):this._setUpBindToBinding(t=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(n,r,o)=>{const a=t._bindToCollection==this,i=t._bindToInternalToExternalMap.get(r);if(a&&i)this._bindToExternalToInternalMap.set(r,i),this._bindToInternalToExternalMap.set(i,r);else{const n=e(r);if(!n)return void this._skippedIndexesFromExternal.push(o);let a=o;for(const e of this._skippedIndexesFromExternal)o>e&&a--;for(const e of t._skippedIndexesFromExternal)a>=e&&a++;this._bindToExternalToInternalMap.set(r,n),this._bindToInternalToExternalMap.set(n,r),this.add(n,a);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)a<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const e of t)n(0,e,t.getIndex(e));this.listenTo(t,"add",n),this.listenTo(t,"remove",(e,t,n)=>{const r=this._bindToExternalToInternalMap.get(t);r&&this.remove(r),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(n<t&&e.push(t-1),n>t&&e.push(t),e),[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}Ct(kn,xt);class xn{constructor(){this.selection=new wn,this.roots=new kn({idProperty:"rootName"}),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map(e=>e.destroy()),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const n of this._postFixers)if(t=n(e))break}while(t)}}Ct(xn,on);class Mn extends Ht{constructor(e,t,n){super(e,t,n),this.getFillerOffset=En,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new _t.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(e,t=null){const n=e&&e.replace(/^view:/,"");return t?"attributeElement"==n&&t==this.name||super.is(e,t):"attributeElement"==n||super.is(e)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function En(){if(Tn(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Tn(e)>1)return null;e=e.parent}return!e||Tn(e)>1?null:this.childCount}function Tn(e){return Array.from(e.getChildren()).filter(e=>!e.is("uiElement")).length}Mn.DEFAULT_PRIORITY=10;class Sn extends Ht{constructor(e,t,n){super(e,t,n),this.getFillerOffset=Dn}is(e,t=null){const n=e.replace(/^view:/,"");return t?"emptyElement"==n&&t==this.name||super.is(e,t):"emptyElement"==n||super.is(e)}_insertChild(e,t){if(t&&(t instanceof Nt||Array.from(t).length>0))throw new _t.b("view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.",[this,t])}}function Dn(){return null}const Ln=navigator.userAgent.toLowerCase();var Cn=function(e){return e.indexOf("macintosh")>-1}(Ln),Pn=function(e){return!!e.match(/edge\/(\d+.?\d*)/)}(Ln),On=function(e){return!!e.match(/gecko\/\d+/)}(Ln),Nn=function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(Ln),An=function(e){return e.indexOf("android")>-1}(Ln);!function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}}();const In={"⌘":"ctrl","⇧":"shift","⌥":"alt"},Rn={ctrl:"⌘",shift:"⇧",alt:"⌥"},Yn=function(){const e={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 t=65;t<=90;t++)e[String.fromCharCode(t).toLowerCase()]=t;for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return e}();function jn(e){let t;if("string"==typeof e){if(!(t=Yn[e.toLowerCase()]))throw new _t.b("keyboard-unknown-key: Unknown key name.",null,{key:e})}else t=e.keyCode+(e.altKey?Yn.alt:0)+(e.ctrlKey?Yn.ctrl:0)+(e.shiftKey?Yn.shift:0);return t}function Fn(e){return"string"==typeof e&&(e=Hn(e)),e.map(e=>"string"==typeof e?jn(e):e).reduce((e,t)=>t+e,0)}function Hn(e){return e.split(/\s*\+\s*/)}class zn extends Ht{constructor(e,t,n){super(e,t,n),this.getFillerOffset=Bn}is(e,t=null){const n=e.replace(/^view:/,"");return t?"uiElement"==n&&t==this.name||super.is(e,t):"uiElement"==n||super.is(e)}_insertChild(e,t){if(t&&(t instanceof Nt||Array.from(t).length>0))throw new _t.b("view-uielement-cannot-add: Cannot add child nodes to UIElement instance.",this)}render(e){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function Bn(){return null}class Un{constructor(e){this._children=[],e&&this._insertChild(0,e)}[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(e){return"documentFragment"==e||"view:documentFragment"==e}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let n=0;const r=function(e){return"string"==typeof e?[new At(e)]:(Yt(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new At(e):e instanceof It?new At(e.data):e))}(t);for(const t of r)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire("change:"+e,t)}}Ct(Un,xt);class Vn{constructor(e){this.document=e,this._cloneGroups=new Map}setSelection(e,t,n){this.document.selection._setTo(e,t,n)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createText(e){return new At(e)}createAttributeElement(e,t,n={}){const r=new Mn(e,t);return n.priority&&(r._priority=n.priority),n.id&&(r._id=n.id),r}createContainerElement(e,t){return new Ut(e,t)}createEditableElement(e,t){const n=new hn(e,t);return n._document=this.document,n}createEmptyElement(e,t){return new Sn(e,t)}createUIElement(e,t,n){const r=new zn(e,t);return n&&(r.render=n),r}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){y(e)&&void 0===n&&(n=t),n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof gn?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new _t.b("view-writer-break-non-container-element: Trying to break an element which is not a container element.",this.document);if(!t.parent)throw new _t.b("view-writer-break-root: Trying to break root element.",this.document);if(e.isAtStart)return gn._createBefore(t);if(!e.isAtEnd){const n=t._clone(!1);this.insert(gn._createAfter(t),n);const r=new _n(e,gn._createAt(t,"end")),o=new gn(n,0);this.move(r,o)}return gn._createAfter(t)}mergeAttributes(e){const t=e.offset,n=e.parent;if(n.is("text"))return e;if(n.is("attributeElement")&&0===n.childCount){const e=n.parent,t=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new gn(e,t))}const r=n.getChild(t-1),o=n.getChild(t);if(!r||!o)return e;if(r.is("text")&&o.is("text"))return Kn(r,o);if(r.is("attributeElement")&&o.is("attributeElement")&&r.isSimilar(o)){const e=r.childCount;return r._appendChild(o.getChildren()),o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new gn(r,e))}return e}mergeContainers(e){const t=e.nodeBefore,n=e.nodeAfter;if(!(t&&n&&t.is("containerElement")&&n.is("containerElement")))throw new _t.b("view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.",this.document);const r=t.getChild(t.childCount-1),o=r instanceof At?gn._createAt(r,"end"):gn._createAt(t,"end");return this.move(_n._createIn(n),gn._createAt(t,"end")),this.remove(_n._createOn(n)),o}insert(e,t){!function e(t,n){for(const r of t){if(!Qn.some(e=>r instanceof e))throw new _t.b("view-writer-insert-invalid-node",n);r.is("text")||e(r.getChildren(),n)}}(t=Yt(t)?[...t]:[t],this.document);const n=Wn(e);if(!n)throw new _t.b("view-writer-invalid-position-container",this.document);const r=this._breakAttributes(e,!0),o=n._insertChild(r.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const a=r.getShiftedBy(o),i=this.mergeAttributes(r);if(0===o)return new _n(i,i);{i.isEqual(r)||a.offset--;const e=this.mergeAttributes(a);return new _n(i,e)}}remove(e){const t=e instanceof _n?e:_n._createOn(e);if($n(t,this.document),t.isCollapsed)return new Un;const{start:n,end:r}=this._breakAttributesRange(t,!0),o=n.parent,a=r.offset-n.offset,i=o._removeChildren(n.offset,a);for(const e of i)this._removeFromClonedElementsGroup(e);const s=this.mergeAttributes(n);return t.start=s,t.end=s.clone(),new Un(i)}clear(e,t){$n(e,this.document);const n=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const r of n){const n=r.item;let o;if(n.is("element")&&t.isSimilar(n))o=_n._createOn(n);else if(!r.nextPosition.isAfter(e.start)&&n.is("textProxy")){const e=n.getAncestors().find(e=>e.is("element")&&t.isSimilar(e));e&&(o=_n._createIn(e))}o&&(o.end.isAfter(e.end)&&(o.end=e.end),o.start.isBefore(e.start)&&(o.start=e.start),this.remove(o))}}move(e,t){let n;if(t.isAfter(e.end)){const r=(t=this._breakAttributes(t,!0)).parent,o=r.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=r.childCount-o}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof Mn))throw new _t.b("view-writer-wrap-invalid-attribute",this.document);if($n(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&!function(e){return Array.from(e.getChildren()).some(e=>!e.is("uiElement"))}(n.parent)&&(n=n.getLastMatchingPosition(e=>e.item.is("uiElement"))),n=this._wrapPosition(n,t);const r=this.document.selection;return r.isCollapsed&&r.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new _n(n)}return this._wrapRange(e,t)}unwrap(e,t){if(!(t instanceof Mn))throw new _t.b("view-writer-unwrap-invalid-attribute",this.document);if($n(e,this.document),e.isCollapsed)return e;const{start:n,end:r}=this._breakAttributesRange(e,!0),o=n.parent,a=this._unwrapChildren(o,n.offset,r.offset,t),i=this.mergeAttributes(a.start);i.isEqual(a.start)||a.end.offset--;const s=this.mergeAttributes(a.end);return new _n(i,s)}rename(e,t){const n=new Ut(e,t.getAttributes());return this.insert(gn._createAfter(t),n),this.move(_n._createIn(t),gn._createAt(n,0)),this.remove(_n._createOn(t)),n}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return gn._createAt(e,t)}createPositionAfter(e){return gn._createAfter(e)}createPositionBefore(e){return gn._createBefore(e)}createRange(e,t){return new _n(e,t)}createRangeOn(e){return _n._createOn(e)}createRangeIn(e){return _n._createIn(e)}createSelection(e,t,n){return new yn(e,t,n)}_wrapChildren(e,t,n,r){let o=t;const a=[];for(;o<n;){const t=e.getChild(o),n=t.is("text"),i=t.is("attributeElement"),s=t.is("emptyElement"),l=t.is("uiElement");if(i&&this._wrapAttributeElement(r,t))a.push(new gn(e,o));else if(n||s||l||i&&qn(r,t)){const n=r._clone();t._remove(),n._appendChild(t),e._insertChild(o,n),this._addToClonedElementsGroup(n),a.push(new gn(e,o))}else i&&this._wrapChildren(t,0,t.childCount,r);o++}let i=0;for(const e of a)e.offset-=i,e.offset!=t&&(this.mergeAttributes(e).isEqual(e)||(i++,n--));return _n._createFromParentsAndOffsets(e,t,e,n)}_unwrapChildren(e,t,n,r){let o=t;const a=[];for(;o<n;){const t=e.getChild(o);if(t.is("attributeElement"))if(t.isSimilar(r)){const r=t.getChildren(),i=t.childCount;t._remove(),e._insertChild(o,r),this._removeFromClonedElementsGroup(t),a.push(new gn(e,o),new gn(e,o+i)),o+=i,n+=i-1}else this._unwrapAttributeElement(r,t)?(a.push(new gn(e,o),new gn(e,o+1)),o++):(this._unwrapChildren(t,0,t.childCount,r),o++);else o++}let i=0;for(const e of a)e.offset-=i,e.offset!=t&&e.offset!=n&&(this.mergeAttributes(e).isEqual(e)||(i++,n--));return _n._createFromParentsAndOffsets(e,t,e,n)}_wrapRange(e,t){const{start:n,end:r}=this._breakAttributesRange(e,!0),o=n.parent,a=this._wrapChildren(o,n.offset,r.offset,t),i=this.mergeAttributes(a.start);i.isEqual(a.start)||a.end.offset--;const s=this.mergeAttributes(a.end);return new _n(i,s)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return Gn(e.clone());e.parent.is("text")&&(e=Jn(e));const n=this.createAttributeElement();n._priority=Number.POSITIVE_INFINITY,n.isSimilar=()=>!1,e.parent._insertChild(e.offset,n);const r=new _n(e,e.getShiftedBy(1));this.wrap(r,t);const o=new gn(n.parent,n.index);n._remove();const a=o.nodeBefore,i=o.nodeAfter;return a instanceof At&&i instanceof At?Kn(a,i):Gn(o)}_wrapAttributeElement(e,t){if(!Zn(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&t.hasAttribute(n)&&t.getAttribute(n)!==e.getAttribute(n))return!1;for(const n of e.getStyleNames())if(t.hasStyle(n)&&t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&(t.hasAttribute(n)||this.setAttribute(n,e.getAttribute(n),t));for(const n of e.getStyleNames())t.hasStyle(n)||this.setStyle(n,e.getStyle(n),t);for(const n of e.getClassNames())t.hasClass(n)||this.addClass(n,t);return!0}_unwrapAttributeElement(e,t){if(!Zn(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&(!t.hasAttribute(n)||t.getAttribute(n)!==e.getAttribute(n)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const n of e.getStyleNames())if(!t.hasStyle(n)||t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const n=e.start,r=e.end;if($n(e,this.document),e.isCollapsed){const n=this._breakAttributes(e.start,t);return new _n(n,n)}const o=this._breakAttributes(r,t),a=o.parent.childCount,i=this._breakAttributes(n,t);return o.offset+=o.parent.childCount-a,new _n(i,o)}_breakAttributes(e,t=!1){const n=e.offset,r=e.parent;if(e.parent.is("emptyElement"))throw new _t.b("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new _t.b("view-writer-cannot-break-ui-element",this.document);if(!t&&r.is("text")&&Xn(r.parent))return e.clone();if(Xn(r))return e.clone();if(r.is("text"))return this._breakAttributes(Jn(e),t);if(n==r.childCount){const e=new gn(r.parent,r.index+1);return this._breakAttributes(e,t)}if(0===n){const e=new gn(r.parent,r.index);return this._breakAttributes(e,t)}{const e=r.index+1,o=r._clone();r.parent._insertChild(e,o),this._addToClonedElementsGroup(o);const a=r.childCount-n,i=r._removeChildren(n,a);o._appendChild(i);const s=new gn(r.parent,e);return this._breakAttributes(s,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const n=this._cloneGroups.get(t);n&&n.delete(e)}}function Wn(e){let t=e.parent;for(;!Xn(t);){if(!t)return;t=t.parent}return t}function qn(e,t){return e.priority<t.priority||!(e.priority>t.priority)&&e.getIdentity()<t.getIdentity()}function Gn(e){const t=e.nodeBefore;if(t&&t.is("text"))return new gn(t,t.data.length);const n=e.nodeAfter;return n&&n.is("text")?new gn(n,0):e}function Jn(e){if(e.offset==e.parent.data.length)return new gn(e.parent.parent,e.parent.index+1);if(0===e.offset)return new gn(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new At(t)),new gn(e.parent.parent,e.parent.index+1)}function Kn(e,t){const n=e.data.length;return e._data+=t.data,t._remove(),new gn(e,n)}const Qn=[At,Mn,Ut,Sn,zn];function Xn(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function $n(e,t){const n=Wn(e.start),r=Wn(e.end);if(!n||!r||n!==r)throw new _t.b("view-writer-invalid-range-container",t)}function Zn(e,t){return null===e.id&&null===t.id}function er(e){return"[object Text]"==Object.prototype.toString.call(e)}const tr=e=>{const t=e.createElement("br");return t.dataset.ckeFiller=!0,t},nr=e=>e.createTextNode(" ");let rr="";for(let e=0;e<7;e++)rr+="​";function or(e){return er(e)&&e.data.substr(0,7)===rr}function ar(e){return 7==e.data.length&&or(e)}function ir(e){return or(e)?e.data.slice(7):e.data}const sr=new WeakMap;function lr(e,t){let n=sr.get(t);return n||(n=t(window.document),sr.set(t,n)),e.isEqualNode(n)}function cr(e,t){if(t.keyCode==Yn.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;or(t)&&n<=7&&e.collapse(t,0)}}}function ur(e,t,n,r=!1){n=n||function(e,t){return e===t},Array.isArray(e)||(e=Array.from(e)),Array.isArray(t)||(t=Array.from(t));const o=function(e,t,n){const r=dr(e,t,n);if(-1===r)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const o=dr(hr(e,r),hr(t,r),n);return{firstIndex:r,lastIndexOld:e.length-o,lastIndexNew:t.length-o}}(e,t,n);return r?function(e,t){const{firstIndex:n,lastIndexOld:r,lastIndexNew:o}=e;if(-1===n)return Array(t).fill("equal");let a=[];return n>0&&(a=a.concat(Array(n).fill("equal"))),o-n>0&&(a=a.concat(Array(o-n).fill("insert"))),r-n>0&&(a=a.concat(Array(r-n).fill("delete"))),o<t&&(a=a.concat(Array(t-o).fill("equal"))),a}(o,t.length):function(e,t){const n=[],{firstIndex:r,lastIndexOld:o,lastIndexNew:a}=t;return a-r>0&&n.push({index:r,type:"insert",values:e.slice(r,a)}),o-r>0&&n.push({index:r+(a-r),type:"delete",howMany:o-r}),n}(t,o)}function dr(e,t,n){for(let r=0;r<Math.max(e.length,t.length);r++)if(void 0===e[r]||void 0===t[r]||!n(e[r],t[r]))return r;return-1}function hr(e,t){return e.slice(t).reverse()}function pr(e,t,n){n=n||function(e,t){return e===t};const r=e.length,o=t.length;if(r>200||o>200||r+o>300)return pr.fastDiff(e,t,n,!0);let a,i;if(o<r){const n=e;e=t,t=n,a="delete",i="insert"}else a="insert",i="delete";const s=e.length,l=t.length,c=l-s,u={},d={};function h(r){const o=(void 0!==d[r-1]?d[r-1]:-1)+1,c=void 0!==d[r+1]?d[r+1]:-1,h=o>c?-1:1;u[r+h]&&(u[r]=u[r+h].slice(0)),u[r]||(u[r]=[]),u[r].push(o>c?a:i);let p=Math.max(o,c),f=p-r;for(;f<s&&p<l&&n(e[f],t[p]);)f++,p++,u[r].push("equal");return p}let p,f=0;do{for(p=-f;p<c;p++)d[p]=h(p);for(p=c+f;p>c;p--)d[p]=h(p);d[c]=h(c),f++}while(d[c]!==l);return u[c].slice(1)}function fr(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function mr(e){const t=e.parentNode;t&&t.removeChild(e)}function gr(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}pr.fastDiff=ur;class _r{constructor(e,t){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this.isFocused=!1,this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new _t.b("view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.",this);this.markedChildren.add(t)}}}render(){let e;for(const e of this.markedChildren)this._updateChildrenMappings(e);this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(e){const t=this.domConverter.viewPositionToDom(e),n=t.parent.ownerDocument;or(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=vr(n,t.parent,t.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=this.domConverter.mapViewToDom(e).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(e,t.ownerDocument,{withChildren:!1})),o=this._diffNodeLists(n,r),a=this._findReplaceActions(o,n,r);if(-1!==a.indexOf("replace")){const t={equal:0,insert:0,delete:0};for(const o of a)if("replace"===o){const o=t.equal+t.insert,a=t.equal+t.delete,i=e.getChild(o);i&&!i.is("uiElement")&&this._updateElementMappings(i,n[a]),mr(r[o]),t.equal++}else t[o]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("text")?gn._createBefore(this.selection.getFirstPosition().parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&er(t.parent)&&or(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!or(e))throw new _t.b("view-renderer-filler-was-lost: The inline filler node was lost.",this);ar(e)?e.parentNode.removeChild(e):e.data=e.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,n=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor(e=>e.hasAttribute("contenteditable"));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(n===t.getFillerOffset())return!1;const r=e.nodeBefore,o=e.nodeAfter;return!(r instanceof At||o instanceof At)}_updateText(e,t){const n=this.domConverter.findCorrespondingDomText(e),r=this.domConverter.viewToDom(e,n.ownerDocument),o=n.data;let a=r.data;const i=t.inlineFillerPosition;if(i&&i.parent==e.parent&&i.offset==e.index&&(a=rr+a),o!=a){const e=ur(o,a);for(const t of e)"insert"===t.type?n.insertData(t.index,t.values.join("")):n.deleteData(t.index,t.howMany)}}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(t.attributes).map(e=>e.name),r=e.getAttributeKeys();for(const n of r)t.setAttribute(n,e.getAttribute(n));for(const r of n)e.hasAttribute(r)||t.removeAttribute(r)}_updateChildren(e,t){const n=this.domConverter.mapViewToDom(e);if(!n)return;const r=t.inlineFillerPosition,o=this.domConverter.mapViewToDom(e).childNodes,a=Array.from(this.domConverter.viewChildrenToDom(e,n.ownerDocument,{bind:!0,inlineFillerPosition:r}));r&&r.parent===e&&vr(n.ownerDocument,a,r.offset);const i=this._diffNodeLists(o,a);let s=0;const l=new Set;for(const e of i)"insert"===e?(fr(n,s,a[s]),s++):"delete"===e?(l.add(o[s]),mr(o[s])):(this._markDescendantTextToSync(this.domConverter.domToView(a[s])),s++);for(const e of l)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return pr(e=function(e,t){const n=Array.from(e);return 0!=n.length&&t?(n[n.length-1]==t&&n.pop(),n):n}(e,this._fakeSelectionContainer),t,function(e,t,n){return t===n||(er(t)&&er(n)?t.data===n.data:!(!lr(t,e)||!lr(n,e)))}.bind(null,this.domConverter.blockFiller))}_findReplaceActions(e,t,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let r=[],o=[],a=[];const i={equal:0,insert:0,delete:0};for(const s of e)"insert"===s?a.push(n[i.equal+i.insert]):"delete"===s?o.push(t[i.equal+i.delete]):((r=r.concat(pr(o,a,br).map(e=>"equal"===e?"replace":e))).push("equal"),o=[],a=[]),i[s]++;return r.concat(pr(o,a,br).map(e=>"equal"===e?"replace":e))}_markDescendantTextToSync(e){if(e)if(e.is("text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;let n=this._fakeSelectionContainer;n||(this._fakeSelectionContainer=n=t.createElement("div"),Object.assign(n.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),n.textContent=" "),n.parentElement&&n.parentElement==e||e.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const r=t.getSelection(),o=t.createRange();r.removeAllRanges(),o.selectNodeContents(n),r.addRange(o),this.domConverter.bindFakeSelection(n,this.selection)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),r=this.domConverter.viewPositionToDom(this.selection.focus);e.focus(),t.collapse(n.parent,n.offset),t.extend(r.parent,r.offset),On&&function(e,t){const n=e.parent;if(n.nodeType!=Node.ELEMENT_NODE||e.offset!=n.childNodes.length-1)return;const r=n.childNodes[e.offset];r&&"BR"==r.tagName&&t.addRange(t.getRangeAt(0))}(r,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t)||!this.selection.isCollapsed&&this.selection.isSimilar(t))}_removeDomSelection(){for(const e of this.domDocuments)if(e.getSelection().rangeCount){const t=e.activeElement,n=this.domConverter.mapDomToView(t);t&&n&&e.getSelection().removeAllRanges()}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function vr(e,t,n){const r=t instanceof Array?t:t.childNodes,o=r[n];if(er(o))return o.data=rr+o.data,o;{const o=e.createTextNode(rr);return Array.isArray(t)?r.splice(n,0,o):fr(t,n,o),o}}function br(e,t){return gr(e)&&gr(t)&&!er(e)&&!er(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}Ct(_r,on);var yr={window:window,document:document};function wr(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function kr(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}class xr{constructor(e={}){this.blockFiller=e.blockFiller||tr,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(e,t){this._fakeSelectionMapping.set(e,new yn(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.childNodes))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,n={}){if(e.is("text")){const n=this._processDataFromViewText(e);return t.createTextNode(n)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let r;if(e.is("documentFragment"))r=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(r,e);else{if(e.is("uiElement"))return r=e.render(t),n.bind&&this.bindElements(r,e),r;r=t.createElement(e.name),n.bind&&this.bindElements(r,e);for(const t of e.getAttributeKeys())r.setAttribute(t,e.getAttribute(t))}if(n.withChildren||void 0===n.withChildren)for(const o of this.viewChildrenToDom(e,t,n))r.appendChild(o);return r}}*viewChildrenToDom(e,t,n={}){const r=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const a of e.getChildren())r===o&&(yield this.blockFiller(t)),yield this.viewToDom(a,t,n),o++;r===o&&(yield this.blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),r=document.createRange();return r.setStart(t.parent,t.offset),r.setEnd(n.parent,n.offset),r}viewPositionToDom(e){const t=e.parent;if(t.is("text")){const n=this.findCorrespondingDomText(t);if(!n)return null;let r=e.offset;return or(n)&&(r+=7),{parent:n,offset:r}}{let n,r,o;if(0===e.offset){if(!(n=this.mapViewToDom(t)))return null;o=n.childNodes[0]}else{const t=e.nodeBefore;if(!(r=t.is("text")?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore)))return null;n=r.parentNode,o=r.nextSibling}return er(o)&&or(o)?{parent:o,offset:7}:{parent:n,offset:r?wr(r)+1:0}}}domToView(e,t={}){if(lr(e,this.blockFiller))return null;const n=this.getParentUIElement(e,this._domToViewMapping);if(n)return n;if(er(e)){if(ar(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new At(t)}}if(this.isComment(e))return null;{if(this.mapDomToView(e))return this.mapDomToView(e);let n;if(this.isDocumentFragment(e))n=new Un,t.bind&&this.bindDocumentFragments(e,n);else{const r=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();n=new Ht(r),t.bind&&this.bindElements(e,n);const o=e.attributes;for(let e=o.length-1;e>=0;e--)n._setAttribute(o[e].name,o[e].value)}if(t.withChildren||void 0===t.withChildren)for(const r of this.domChildrenToView(e,t))n._appendChild(r);return n}}*domChildrenToView(e,t={}){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n],o=this.domToView(r,t);null!==o&&(yield o)}}domSelectionToView(e){if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;er(t)&&(t=t.parentNode);const n=this.fakeSelectionToView(t);if(n)return n}const t=this.isDomSelectionBackward(e),n=[];for(let t=0;t<e.rangeCount;t++){const r=e.getRangeAt(t),o=this.domRangeToView(r);o&&n.push(o)}return new yn(n,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),n=this.domPositionToView(e.endContainer,e.endOffset);return t&&n?new _n(t,n):null}domPositionToView(e,t){if(lr(e,this.blockFiller))return this.domPositionToView(e.parentNode,wr(e));const n=this.mapDomToView(e);if(n&&n.is("uiElement"))return gn._createBefore(n);if(er(e)){if(ar(e))return this.domPositionToView(e.parentNode,wr(e));const n=this.findCorrespondingViewText(e);let r=t;return n?(or(e)&&(r=(r-=7)<0?0:r),new gn(n,r)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new gn(t,0)}else{const n=e.childNodes[t-1],r=er(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(r&&r.parent)return new gn(r.parent,r.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(ar(e))return null;const t=this.getParentUIElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e)return e.nextSibling instanceof At?e.nextSibling:null}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof At?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=yr.window,r=[];Er(t,e=>{const{scrollLeft:t,scrollTop:n}=e;r.push([t,n])}),t.focus(),Er(t,e=>{const[t,n]=r.shift();e.scrollLeft=t,e.scrollTop=n}),yr.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getParentUIElement(e){const t=kr(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&n.is("uiElement"))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(er(e)&&or(e)&&t<7)return!1;if(this.isElement(e)&&or(e.childNodes[t]))return!1;const n=this.mapDomToView(e);return!n||!n.is("uiElement")}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return t;if(" "==t.charAt(0)){const n=this._getTouchingViewTextNode(e,!1);(!n||!this._nodeEndsWithSpace(n))&&n||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const n=this._getTouchingViewTextNode(e,!0);" "!=t.charAt(t.length-2)&&n&&" "!=n.data.charAt(0)||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(Mr(e,this.preElements))return ir(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const n=this._getTouchingInlineDomNode(e,!1),r=this._getTouchingInlineDomNode(e,!0),o=this._checkShouldLeftTrimDomText(n),a=this._checkShouldRightTrimDomText(e,r);return o&&(t=t.replace(/^ /,"")),a&&(t=t.replace(/ $/,"")),t=(t=ir(new Text(t))).replace(/ \u00A0/g," "),(/( |\u00A0)\u00A0$/.test(t)||!r||r.data&&" "==r.data.charAt(0))&&(t=t.replace(/\u00A0$/," ")),o&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e){return!e||!!ft(e)||/[^\S\u00A0]/.test(e.data.charAt(e.data.length-1))}_checkShouldRightTrimDomText(e,t){return!t&&!or(e)}_getTouchingViewTextNode(e,t){const n=new mn({startPosition:t?gn._createAfter(e):gn._createBefore(e),direction:t?"forward":"backward"});for(const e of n){if(e.item.is("containerElement"))return null;if(e.item.is("br"))return null;if(e.item.is("textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const n=t?"nextNode":"previousNode",r=e.ownerDocument,o=kr(e)[0],a=r.createTreeWalker(o,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:e=>er(e)||"BR"==e.tagName?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});a.currentNode=e;const i=a[n]();if(null!==i){const t=function(e,t){const n=kr(e),r=kr(t);let o=0;for(;n[o]==r[o]&&n[o];)o++;return 0===o?null:n[o-1]}(e,i);if(t&&!Mr(e,this.blockElements,t)&&!Mr(i,this.blockElements,t))return i}return null}}function Mr(e,t,n){let r=kr(e);return n&&(r=r.slice(r.indexOf(n)+1)),r.some(e=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function Er(e,t){for(;e&&e!=yr.document;)t(e),e=e.parentNode}function Tr(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}var Sr=Zt({},xt,{listenTo(e,...t){if(gr(e)||Tr(e)){const n=this._getProxyEmitter(e)||new Dr(e);n.attach(...t),e=n}xt.listenTo.call(this,e,...t)},stopListening(e,t,n){if(gr(e)||Tr(e)){const t=this._getProxyEmitter(e);if(!t)return;e=t}xt.stopListening.call(this,e,t,n),e instanceof Dr&&e.detach(t)},_getProxyEmitter(e){return function(e,t){return e[wt]&&e[wt][t]?e[wt][t].emitter:null}(this,Lr(e))}});class Dr{constructor(e){Mt(this,Lr(e)),this._domNode=e}}function Lr(e){return e["data-ck-expando"]||(e["data-ck-expando"]=bt())}Zt(Dr.prototype,xt,{attach(e,t,n={}){if(this._domListeners&&this._domListeners[e])return;const r=this._createDomListener(e,!!n.useCapture);this._domNode.addEventListener(e,r,!!n.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[e]=r},detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_createDomListener(e,t){const n=t=>{this.fire(e,t)};return n.removeListener=()=>{this._domNode.removeEventListener(e,n,t),delete this._domListeners[e]},n}});class Cr{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}function Pr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new J;++t<n;)this.add(e[t])}Ct(Cr,Sr),Pr.prototype.add=Pr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pr.prototype.has=function(e){return this.__data__.has(e)};var Or=Pr,Nr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Ar=function(e,t){return e.has(t)},Ir=function(e,t,n,r,o,a){var i=1&n,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var u=-1,d=!0,h=2&n?new Or:void 0;for(a.set(e,t),a.set(t,e);++u<s;){var p=e[u],f=t[u];if(r)var m=i?r(f,p,u,t,e,a):r(p,f,u,e,t,a);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!Nr(t,(function(e,t){if(!Ar(h,t)&&(p===e||o(p,e,n,r,a)))return h.push(t)}))){d=!1;break}}else if(p!==f&&!o(p,f,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d},Rr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Yr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},jr=o?o.prototype:void 0,Fr=jr?jr.valueOf:void 0,Hr=Object.prototype.hasOwnProperty,zr="[object Arguments]",Br="[object Array]",Ur="[object Object]",Vr=Object.prototype.hasOwnProperty,Wr=function(e,t,n,r,o,a){var i=se(e),s=se(t),l=i?Br:Je(e),c=s?Br:Je(t),u=(l=l==zr?Ur:l)==Ur,d=(c=c==zr?Ur:c)==Ur,h=l==c;if(h&&Object(le.a)(e)){if(!Object(le.a)(t))return!1;i=!0,u=!1}if(h&&!u)return a||(a=new Q),i||ge(e)?Ir(e,t,n,r,o,a):function(e,t,n,r,o,a,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new Qe(e),new Qe(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return w(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Rr;case"[object Set]":var l=1&r;if(s||(s=Yr),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=2,i.set(e,t);var u=Ir(s(e),s(t),r,o,a,i);return i.delete(e),u;case"[object Symbol]":if(Fr)return Fr.call(e)==Fr.call(t)}return!1}(e,t,l,n,r,o,a);if(!(1&n)){var p=u&&Vr.call(e,"__wrapped__"),f=d&&Vr.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,g=f?t.value():t;return a||(a=new Q),o(m,g,n,r,a)}}return!!h&&(a||(a=new Q),function(e,t,n,r,o,a){var i=1&n,s=Re(e),l=s.length;if(l!=Re(t).length&&!i)return!1;for(var c=l;c--;){var u=s[c];if(!(i?u in t:Hr.call(t,u)))return!1}var d=a.get(e);if(d&&a.get(t))return d==t;var h=!0;a.set(e,t),a.set(t,e);for(var p=i;++c<l;){var f=e[u=s[c]],m=t[u];if(r)var g=i?r(m,f,u,t,e,a):r(f,m,u,e,t,a);if(!(void 0===g?f===m||o(f,m,n,r,a):g)){h=!1;break}p||(p="constructor"==u)}if(h&&!p){var _=e.constructor,v=t.constructor;_!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof v&&v instanceof v)&&(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,o,a))},qr=function e(t,n,r,o,a){return t===n||(null==t||null==n||!f(t)&&!f(n)?t!=t&&n!=n:Wr(t,n,r,o,e,a))},Gr=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?qr(e,t,void 0,n):!!r};class Jr extends Cr{constructor(e){super(e),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.push(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,n=new Map,r=new Set;for(const n of e)if("childList"===n.type){const e=t.mapDomToView(n.target);if(e&&e.is("uiElement"))continue;e&&!this._isBogusBrMutation(n)&&r.add(e)}for(const o of e){const e=t.mapDomToView(o.target);if(!(e&&e.is("uiElement")||"characterData"!==o.type)){const e=t.findCorrespondingViewText(o.target);e&&!r.has(e.parent)?n.set(e,{type:"text",oldText:e.data,newText:ir(o.target),node:e}):!e&&or(o.target)&&r.add(t.mapDomToView(o.target.parentNode))}}const o=[];for(const e of n.values())this.renderer.markToSync("text",e.node),o.push(e);for(const e of r){const n=t.mapViewToDom(e),r=Array.from(e.getChildren()),a=Array.from(t.domChildrenToView(n,{withChildren:!1}));Gr(r,a,s)||(this.renderer.markToSync("children",e),o.push({type:"children",oldChildren:r,newChildren:a,node:e}))}const a=e[0].target.ownerDocument.getSelection();let i=null;if(a&&a.anchorNode){const e=t.domPositionToView(a.anchorNode,a.anchorOffset),n=t.domPositionToView(a.focusNode,a.focusOffset);e&&n&&(i=new yn(e)).setFocus(n)}function s(e,t){if(!Array.isArray(e))return e===t||!(!e.is("text")||!t.is("text"))&&e.data===t.data}this.document.fire("mutations",o,i),this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}class Kr{constructor(e,t,n){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,Zt(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Qr extends Cr{constructor(e){super(e),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach(t=>{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new Kr(this.view,t,n))}}class Xr extends Qr{constructor(e){super(e),this.domEventType=["keydown","keyup"]}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return jn(this)}})}}var $r=function(){return r.a.Date.now()},Zr=function(e){return"symbol"==typeof e||f(e)&&"[object Symbol]"==d(e)},eo=/^\s+|\s+$/g,to=/^[-+]0x[0-9a-f]+$/i,no=/^0b[01]+$/i,ro=/^0o[0-7]+$/i,oo=parseInt,ao=function(e){if("number"==typeof e)return e;if(Zr(e))return NaN;if(T(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=T(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(eo,"");var n=no.test(e);return n||ro.test(e)?oo(e.slice(2),n?2:8):to.test(e)?NaN:+e},io=Math.max,so=Math.min,lo=function(e,t,n){var r,o,a,i,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function f(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function m(){var e=$r();if(f(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?so(n,a-(e-c)):n}(e))}function g(e){return s=void 0,h&&r?p(e):(r=o=void 0,i)}function _(){var e=$r(),n=f(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?p(e):i}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),p(l)}return void 0===s&&(s=setTimeout(m,t)),i}return t=ao(t)||0,T(n)&&(u=!!n.leading,a=(d="maxWait"in n)?io(ao(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),_.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},_.flush=function(){return void 0===s?i:g($r())},_};class co extends Cr{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=lo(e=>this.document.fire("selectionChangeDone",e),200)}observe(){const e=this.document;e.on("keydown",(t,n)=>{e.selection.isFake&&function(e){return e==Yn.arrowright||e==Yn.arrowleft||e==Yn.arrowup||e==Yn.arrowdown}(n.keyCode)&&this.isEnabled&&(n.preventDefault(),this._handleSelectionMove(n.keyCode))},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new yn(t.getRanges(),{backward:t.isBackward,fake:!1});e!=Yn.arrowleft&&e!=Yn.arrowup||n.setTo(n.getFirstPosition()),e!=Yn.arrowright&&e!=Yn.arrowdown||n.setTo(n.getLastPosition());const r={oldSelection:t,newSelection:n,domSelection:null};this.document.fire("selectionChange",r),this._fireSelectionChangeDoneDebounced(r)}}class uo extends Cr{constructor(e){super(e),this.mutationObserver=e.getObserver(Jr),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=lo(e=>this.document.fire("selectionChangeDone",e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,"selectionchange",()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(!this.isEnabled||!this.document.isFocused&&!this.document.isReadOnly)return;this.mutationObserver.flush();const t=e.defaultView.getSelection(),n=this.domConverter.domSelectionToView(t);if(!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(t)||++this._loopbackCounter>60))if(this.selection.isSimilar(n))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:n,domSelection:t};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}_clearInfiniteLoop(){this._loopbackCounter=0}}class ho extends Qr{constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.forceRender(),50)}),t.on("blur",(n,r)=>{const o=t.selection.editableElement;null!==o&&o!==r.target||(t.isFocused=!1,e.forceRender())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class po extends Qr{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",()=>{t.isComposing=!0}),t.on("compositionend",()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}class fo extends Qr{constructor(e){super(e),this.domEventType=["beforeinput"]}onDomEvent(e){this.fire(e.type,e)}}function mo(e){return"[object Range]"==Object.prototype.toString.apply(e)}function go(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}const _o=["top","right","bottom","left","width","height"];class vo{constructor(e){const t=mo(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),ft(e)||t)bo(this,t?vo.getDomRangeRects(e)[0]:e.getBoundingClientRect());else if(Tr(e)){const{innerWidth:t,innerHeight:n}=e;bo(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else bo(this,e)}clone(){return new vo(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left)};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new vo(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!yo(e)){let n=e.parentNode||e.commonAncestorContainer;for(;n&&!yo(n);){const e=new vo(n),r=t.getIntersection(e);if(!r)return null;r.getArea()<t.getArea()&&(t=r),n=n.parentNode}}return t}isEqual(e){for(const t of _o)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}excludeScrollbarsAndBorders(){const e=this._source;let t,n;if(Tr(e))t=e.innerWidth-e.document.documentElement.clientWidth,n=e.innerHeight-e.document.documentElement.clientHeight;else{const r=go(this._source);t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight,this.moveBy(r.left,r.top)}return this.width-=t,this.right-=t,this.height-=n,this.bottom-=n,this}static getDomRangeRects(e){const t=[],n=Array.from(e.getClientRects());if(n.length)for(const e of n)t.push(new vo(e));else{let n=e.startContainer;er(n)&&(n=n.parentNode);const r=new vo(n.getBoundingClientRect());r.right=r.left,r.width=0,t.push(r)}return t}}function bo(e,t){for(const n of _o)e[n]=t[n]}function yo(e){return!!ft(e)&&e===e.ownerDocument.body}function wo({target:e,viewportOffset:t=0}){const n=Do(e);let r=n,o=null;for(;r;){let a;xo(a=Lo(r==n?e:o),()=>Co(e,r));const i=Co(e,r);if(ko(r,i,t),r.parent!=r){if(o=r.frameElement,r=r.parent,!o)return}else r=null}}function ko(e,t,n){const r=t.clone().moveBy(0,n),o=t.clone().moveBy(0,-n),a=new vo(e).excludeScrollbarsAndBorders();if(![o,r].every(e=>a.contains(e))){let{scrollX:i,scrollY:s}=e;Eo(o,a)?s-=a.top-t.top+n:Mo(r,a)&&(s+=t.bottom-a.bottom+n),To(t,a)?i-=a.left-t.left+n:So(t,a)&&(i+=t.right-a.right+n),e.scrollTo(i,s)}}function xo(e,t){const n=Do(e);let r,o;for(;e!=n.document.body;)o=t(),(r=new vo(e).excludeScrollbarsAndBorders()).contains(o)||(Eo(o,r)?e.scrollTop-=r.top-o.top:Mo(o,r)&&(e.scrollTop+=o.bottom-r.bottom),To(o,r)?e.scrollLeft-=r.left-o.left:So(o,r)&&(e.scrollLeft+=o.right-r.right)),e=e.parentNode}function Mo(e,t){return e.bottom>t.bottom}function Eo(e,t){return e.top<t.top}function To(e,t){return e.left<t.left}function So(e,t){return e.right>t.right}function Do(e){return mo(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Lo(e){if(mo(e)){let t=e.commonAncestorContainer;return er(t)&&(t=t.parentNode),t}return e.parentNode}function Co(e,t){const n=Do(e),r=new vo(e);if(n===t)return r;{let e=n;for(;e!=t;){const t=e.frameElement,n=new vo(t).excludeScrollbarsAndBorders();r.moveBy(n.left,n.top),e=e.parent}}return r}Object.assign({},{scrollViewportToShowTarget:wo,scrollAncestorsToShowTarget:function(e){xo(Lo(e),()=>new vo(e))}});class Po{constructor(){this.document=new xn,this.domConverter=new xr,this.domRoots=new Map,this.set("isRenderingInProgress",!1),this._renderer=new _r(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 Vn(this.document),this.addObserver(Jr),this.addObserver(uo),this.addObserver(ho),this.addObserver(Xr),this.addObserver(co),this.addObserver(po),An&&this.addObserver(fo),function(e){e.document.on("keydown",cr)}(this),function(e){e.document.on("keydown",(t,n)=>function(e,t,n){if(t.keyCode==Yn.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),r=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(r||t.shiftKey){const t=e.focusNode,o=e.focusOffset,a=n.domPositionToView(t,o);if(null===a)return;let i=!1;const s=a.getLastMatchingPosition(e=>(e.item.is("uiElement")&&(i=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))));if(i){const t=n.viewPositionToDom(s);r?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,n,e.domConverter))}(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(e,t="main"){const n=this.document.getRoot(t);n._name=e.tagName.toLowerCase();const r={};for(const{name:t,value:o}of Array.from(e.attributes))r[t]=o,"class"===t?this._writer.addClass(o.split(" "),n):this._writer.setAttribute(t,o,n);this._initialDomRootAttributes.set(e,r);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(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(e.ownerDocument),n.on("change:children",(e,t)=>this._renderer.markToSync("children",t)),n.on("change:attributes",(e,t)=>this._renderer.markToSync("attributes",t)),n.on("change:text",(e,t)=>this._renderer.markToSync("text",t)),n.on("change:isReadOnly",()=>this.change(o)),n.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const n of this._observers.values())n.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach(({name:e})=>t.removeAttribute(e));const n=this._initialDomRootAttributes.get(t);for(const e in n)t.setAttribute(e,n[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,n]of this.domRoots)t.observe(n,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&wo({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new _t.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 e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return gn._createAt(e,t)}createPositionAfter(e){return gn._createAfter(e)}createPositionBefore(e){return gn._createBefore(e)}createRange(e,t){return new _n(e,t)}createRangeOn(e){return _n._createOn(e)}createRangeIn(e){return _n._createIn(e)}createSelection(e,t,n){return new yn(e,t,n)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}function Oo(e){return y(e)?Rt(e):new Map(e)}Ct(Po,on);class No{constructor(e){this.parent=null,this._attrs=Oo(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new _t.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new _t.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.root==this?null:this.root.document||null}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),r=e.getAncestors(t);let o=0;for(;n[o]==r[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),r=Pt(t,n);switch(r){case"prefix":return!0;case"extension":return!1;default:return t[r]<n[r]}}isAfter(e){return this!=e&&this.root===e.root&&!this.isBefore(e)}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce((e,t)=>(e[t[0]]=t[1],e),{})),e}is(e){return"node"==e||"model:node"==e}_clone(){return new No(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=Oo(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}class Ao extends No{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}is(e){return"text"==e||"model:text"==e||super.is(e)}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Ao(this.data,this.getAttributes())}static fromJSON(e){return new Ao(e.data,e.attributes)}}class Io{constructor(e,t,n){if(this.textNode=e,t<0||t>e.offsetSize)throw new _t.b("model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(n<0||t+n>e.offsetSize)throw new _t.b("model-textproxy-wrong-length: Given length value is incorrect.",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}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(e){return"textProxy"==e||"model:textProxy"==e}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Ro{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((e,t)=>e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new _t.b("model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const n of this._nodes){if(e>=t&&e<t+n.offsetSize)return this.getNodeIndex(n);t+=n.offsetSize}if(t!=e)throw new _t.b("model-nodelist-offset-out-of-bounds: Given offset cannot be found in the node list.",this,{offset:e,nodeList:this});return this.length}_insertNodes(e,t){for(const e of t)if(!(e instanceof No))throw new _t.b("model-nodelist-insertNodes-not-node: Trying to insert an object which is not a Node instance.",this);this._nodes.splice(e,0,...t)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map(e=>e.toJSON())}}class Yo extends No{constructor(e,t,n){super(t),this.name=e,this._children=new Ro,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){const n=e.replace(/^model:/,"");return t?"element"==n&&t==this.name:"element"==n||n==this.name||super.is(e)}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map(e=>e._clone(!0)):null;return new Yo(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){return"string"==typeof e?[new Ao(e)]:(Yt(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new Ao(e):e instanceof Io?new Ao(e.data,e.getAttributes()):e))}(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}static fromJSON(e){let t=null;if(e.children){t=[];for(const n of e.children)n.name?t.push(Yo.fromJSON(n)):t.push(Ao.fromJSON(n))}return new Yo(e.name,e.attributes,t)}}class jo{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new _t.b("model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new _t.b("model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this.position=e.startPosition.clone():this.position=Ho._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.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(e){let t,n,r,o;do{r=this.position,o=this._visitedParent,({done:t,value:n}=this.next())}while(!t&&e(n));t||(this.position=r,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const r=t.textNode?t.textNode:t.nodeAfter;if(r instanceof Yo)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=r),this.position=t,Fo("elementStart",r,e,t,1);if(r instanceof Ao){let o;if(this.singleCharacters)o=1;else{let e=r.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offset<e&&(e=this.boundaries.end.offset),o=e-t.offset}const a=t.offset-r.startOffset,i=new Io(r,a,o);return t.offset+=o,this.position=t,Fo("text",i,e,t,o)}return t.path.pop(),t.offset++,this.position=t,this._visitedParent=n.parent,this.ignoreElementEnd?this._next():Fo("elementEnd",n,e,t)}_previous(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&0===t.offset)return{done:!0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};const r=t.textNode?t.textNode:t.nodeBefore;if(r instanceof Yo)return t.offset--,this.shallow?(this.position=t,Fo("elementStart",r,e,t,1)):(t.path.push(r.maxOffset),this.position=t,this._visitedParent=r,this.ignoreElementEnd?this._previous():Fo("elementEnd",r,e,t));if(r instanceof Ao){let o;if(this.singleCharacters)o=1;else{let e=r.startOffset;this._boundaryStartParent==n&&this.boundaries.start.offset>e&&(e=this.boundaries.start.offset),o=t.offset-e}const a=t.offset-r.startOffset,i=new Io(r,a-o,o);return t.offset-=o,this.position=t,Fo("text",i,e,t,o)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,Fo("elementStart",n,e,t,1)}}function Fo(e,t,n,r,o){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:r,length:o}}}class Ho{constructor(e,t,n="toNone"){if(!e.is("element")&&!e.is("documentFragment"))throw new _t.b("model-position-root-invalid: Position root invalid.",e);if(!(t instanceof Array)||0===t.length)throw new _t.b("model-position-path-incorrect-format: Position path must be an array with at least one item.",e,{path:t});t=e.getPath().concat(t),e=e.root,this.root=e,this.path=t,this.stickiness=n}get offset(){return function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}(this.path)}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)if(!(e=e.getChild(e.offsetToIndex(this.path[t]))))throw new _t.b("model-position-path-incorrect: The position's path is incorrect.",this,{position:this});if(e.is("text"))throw new _t.b("model-position-path-incorrect: The position's path is incorrect.",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){const e=this.parent.getChild(this.index);return e instanceof Ao&&e.startOffset<this.offset?e:null}get nodeAfter(){return null===this.textNode?this.parent.getChild(this.index):null}get nodeBefore(){return null===this.textNode?this.parent.getChild(this.index-1):null}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const t=Pt(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]<e.path[t]?"before":"after"}}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new jo(t);return n.skip(e),n.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonPath(e){if(this.root!=e.root)return[];const t=Pt(this.path,e.path),n="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,n)}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let r=0;for(;t[r]==n[r]&&t[r];)r++;return 0===r?null:t[r-1]}getShiftedBy(e){const t=this.clone(),n=t.offset+e;return t.offset=n<0?0:n,t}isAfter(e){return"after"==this.compareWith(e)}isBefore(e){return"before"==this.compareWith(e)}isEqual(e){return"same"==this.compareWith(e)}isTouching(e){let t=null,n=null;switch(this.compareWith(e)){case"same":return!0;case"before":t=Ho._createAt(this),n=Ho._createAt(e);break;case"after":t=Ho._createAt(e),n=Ho._createAt(this);break;default:return!1}let r=t.parent;for(;t.path.length+n.path.length;){if(t.isEqual(n))return!0;if(t.path.length>n.path.length){if(t.offset!==r.maxOffset)return!1;t.path=t.path.slice(0,-1),r=r.parent,t.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}is(e){return"position"==e||"model:position"==e}hasSameParentAs(e){return this.root===e.root&&"same"==Pt(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=Ho._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let n;return t.containsPosition(this)||t.start.isEqual(this)?(n=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(n=n._getTransformedByDeletion(e.deletionPosition,1))):n=this.isEqual(e.deletionPosition)?Ho._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),n}_getTransformedByDeletion(e,t){const n=Ho._createAt(this);if(this.root!=e.root)return n;if("same"==Pt(e.getParentPath(),this.getParentPath())){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;n.offset-=t}}else if("prefix"==Pt(e.getParentPath(),this.getParentPath())){const r=e.path.length-1;if(e.offset<=this.path[r]){if(e.offset+t>this.path[r])return null;n.path[r]-=t}}return n}_getTransformedByInsertion(e,t){const n=Ho._createAt(this);if(this.root!=e.root)return n;if("same"==Pt(e.getParentPath(),this.getParentPath()))(e.offset<this.offset||e.offset==this.offset&&"toPrevious"!=this.stickiness)&&(n.offset+=t);else if("prefix"==Pt(e.getParentPath(),this.getParentPath())){const r=e.path.length-1;e.offset<=this.path[r]&&(n.path[r]+=t)}return n}_getTransformedByMove(e,t,n){if(t=t._getTransformedByDeletion(e,n),e.isEqual(t))return Ho._createAt(this);const r=this._getTransformedByDeletion(e,n);return null===r||e.isEqual(this)&&"toNext"==this.stickiness||e.getShiftedBy(n).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(e,t):r._getTransformedByInsertion(t,n)}_getCombined(e,t){const n=e.path.length-1,r=Ho._createAt(t);return r.stickiness=this.stickiness,r.offset=r.offset+this.path[n]-e.offset,r.path=r.path.concat(this.path.slice(n+1)),r}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,t,n="toNone"){if(e instanceof Ho)return new Ho(e.root,e.path,e.stickiness);{const r=e;if("end"==t)t=r.maxOffset;else{if("before"==t)return this._createBefore(r,n);if("after"==t)return this._createAfter(r,n);if(0!==t&&!t)throw new _t.b("model-createPositionAt-offset-required: Model#createPositionAt() requires the offset when the first parameter is a model item.",[this,e])}if(!r.is("element")&&!r.is("documentFragment"))throw new _t.b("model-position-parent-incorrect: Position parent have to be a element or document fragment.",[this,e]);const o=r.getPath();return o.push(t),new this(r.root,o,n)}}static _createAfter(e,t){if(!e.parent)throw new _t.b("model-position-after-root: You cannot make a position after root.",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new _t.b("model-position-before-root: You cannot make a position before root.",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if("$graveyard"===e.root){const n=new Ho(t.graveyard,e.path);return n.stickiness=e.stickiness,n}if(!t.getRoot(e.root))throw new _t.b("model-position-fromjson-no-root: Cannot create position for document. Root with specified name does not exist.",t,{rootName:e.root});return new Ho(t.getRoot(e.root),e.path,e.stickiness)}}class zo{constructor(e,t=null){this.start=Ho._createAt(e),this.end=t?Ho._createAt(t):Ho._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new jo({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return"same"==Pt(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),r=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&r}containsItem(e){const t=Ho._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}is(e){return"range"==e||"model:range"==e}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new zo(this.start,e.start)),this.containsPosition(e.end)&&t.push(new zo(e.end,this.end))):t.push(new zo(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new zo(t,n)}return null}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,n=Ho._createAt(this.start);let r=n.parent;for(;n.path.length>t+1;){const t=r.maxOffset-n.offset;0!==t&&e.push(new zo(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,r=r.parent}for(;n.path.length<=this.end.path.length;){const t=this.end.path[n.path.length-1],r=t-n.offset;0!==r&&e.push(new zo(n,n.getShiftedBy(r))),n.offset=t,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new jo(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new jo(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new jo(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new zo(this.start,this.end)]}getTransformedByOperations(e){const t=[new zo(this.start,this.end)];for(const n of e)for(let e=0;e<t.length;e++){const r=t[e].getTransformedByOperation(n);t.splice(e,1,...r),e+=r.length-1}for(let e=0;e<t.length;e++){const n=t[e];for(let r=e+1;r<t.length;r++){const e=t[r];(n.containsRange(e)||e.containsRange(n)||n.isEqual(e))&&t.splice(r,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e,t=!1){return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e,t=!1){const n=e.sourcePosition,r=e.howMany,o=e.targetPosition;return this._getTransformedByMove(n,o,r,t)}_getTransformedBySplitOperation(e){const t=this.start._getTransformedBySplitOperation(e);let n=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(n=this.end.getShiftedBy(1)),t.root!=n.root&&(n=this.end.getShiftedBy(-1)),new zo(t,n)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new zo(this.start);let t=this.start._getTransformedByMergeOperation(e),n=this.end._getTransformedByMergeOperation(e);return t.root!=n.root&&(n=this.end.getShiftedBy(-1)),t.isAfter(n)?(e.sourcePosition.isBefore(e.targetPosition)?(t=Ho._createAt(n)).offset=0:(e.deletionPosition.isEqual(t)||(n=e.deletionPosition),t=e.targetPosition),new zo(t,n)):new zo(t,n)}_getTransformedByInsertion(e,t,n=!1){if(n&&this.containsPosition(e))return[new zo(this.start,e),new zo(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{const n=new zo(this.start,this.end);return n.start=n.start._getTransformedByInsertion(e,t),n.end=n.end._getTransformedByInsertion(e,t),[n]}}_getTransformedByMove(e,t,n,r=!1){if(this.isCollapsed){const r=this.start._getTransformedByMove(e,t,n);return[new zo(r)]}const o=zo._createFromPositionAndShift(e,n),a=t._getTransformedByDeletion(e,n);if(this.containsPosition(t)&&!r&&(o.containsPosition(this.start)||o.containsPosition(this.end))){const r=this.start._getTransformedByMove(e,t,n),o=this.end._getTransformedByMove(e,t,n);return[new zo(r,o)]}let i;const s=this.getDifference(o);let l=null;const c=this.getIntersection(o);if(1==s.length?l=new zo(s[0].start._getTransformedByDeletion(e,n),s[0].end._getTransformedByDeletion(e,n)):2==s.length&&(l=new zo(this.start,this.end._getTransformedByDeletion(e,n))),i=l?l._getTransformedByInsertion(a,n,null!==c||r):[],c){const e=new zo(c.start._getCombined(o.start,a),c.end._getCombined(o.start,a));2==i.length?i.splice(1,0,e):i.push(e)}return i}_getTransformedByDeletion(e,t){let n=this.start._getTransformedByDeletion(e,t),r=this.end._getTransformedByDeletion(e,t);return null==n&&null==r?null:(null==n&&(n=e),null==r&&(r=e),new zo(n,r))}static _createFromPositionAndShift(e,t){const n=e,r=e.getShiftedBy(t);return t>0?new this(n,r):new this(r,n)}static _createIn(e){return new this(Ho._createAt(e,0),Ho._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Ho._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new _t.b("range-create-from-ranges-empty-array: At least one range has to be passed.",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort((e,t)=>e.start.isAfter(t.start)?1:-1);const n=e.indexOf(t),r=new this(t.start,t.end);if(n>0)for(let t=n-1;e[t].end.isEqual(r.start);t++)r.start=Ho._createAt(e[t].start);for(let t=n+1;t<e.length&&e[t].start.isEqual(r.end);t++)r.end=Ho._createAt(e[t].end);return r}static fromJSON(e,t){return new this(Ho.fromJSON(e.start,t),Ho.fromJSON(e.end,t))}}class Bo{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",(e,t)=>{if(t.viewPosition)return;const n=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this._findPositionIn(n,t.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,t)=>{if(t.modelPosition)return;const n=this.findMappedViewAncestor(t.viewPosition),r=this._viewToModelMapping.get(n),o=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=Ho._createAt(r,o)},{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);if(this._viewToModelMapping.delete(e),this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);this._modelToViewMapping.get(t)==e&&this._modelToViewMapping.delete(t)}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const n=this._markerNameToElements.get(t)||new Set;n.add(e);const r=this._elementToMarkerNames.get(e)||new Set;r.add(t),this._markerNameToElements.set(t,n),this._elementToMarkerNames.set(e,r)}unbindElementFromMarkerName(e,t){const n=this._markerNameToElements.get(t);n&&(n.delete(e),0==n.size&&this._markerNameToElements.delete(t));const r=this._elementToMarkerNames.get(e);r&&(r.delete(t),0==r.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new zo(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new _n(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={isPhantom:!1}){const n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const n=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())n.add(t);else n.add(e);return n}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,n){if(n!=e)return this._toModelOffset(e.parent,e.index,n)+this._toModelOffset(e,t,e);if(e.is("text"))return t;let r=0;for(let n=0;n<t;n++)r+=this.getModelLength(e.getChild(n));return r}getModelLength(e){if(this._viewToModelLengthCallbacks.get(e.name))return this._viewToModelLengthCallbacks.get(e.name)(e);if(this._viewToModelMapping.has(e))return 1;if(e.is("text"))return e.data.length;if(e.is("uiElement"))return 0;{let t=0;for(const n of e.getChildren())t+=this.getModelLength(n);return t}}_findPositionIn(e,t){let n,r=0,o=0,a=0;if(e.is("text"))return new gn(e,t);for(;o<t;)n=e.getChild(a),o+=r=this.getModelLength(n),a++;return o==t?this._moveViewPositionToTextNode(new gn(e,a)):this._findPositionIn(n,t-(o-r))}_moveViewPositionToTextNode(e){const t=e.nodeBefore,n=e.nodeAfter;return t instanceof At?new gn(t,t.data.length):n instanceof At?new gn(n,0):e}}Ct(Bo,xt);class Uo{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=Vo(t),e instanceof Io&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=Vo(t),e instanceof Io&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=Vo(t),e instanceof Io&&(e=this._getSymbolForTextProxy(e));const n=this._consumable.get(e);if(void 0===n)return null;const r=n.get(t);return void 0===r?null:r}revert(e,t){t=Vo(t),e instanceof Io&&(e=this._getSymbolForTextProxy(e));const n=this.test(e,t);return!1===n?(this._consumable.get(e).set(t,!0),!0):!0!==n&&null}_getSymbolForTextProxy(e){let t=null;const n=this._textProxyRegistry.get(e.startOffset);if(n){const r=n.get(e.endOffset);r&&(t=r.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e.startOffset,e.endOffset,e.parent)),t}_addSymbolForTextProxy(e,t,n){const r=Symbol("textProxySymbol");let o,a;return(o=this._textProxyRegistry.get(e))||(o=new Map,this._textProxyRegistry.set(e,o)),(a=o.get(t))||(a=new Map,o.set(t,a)),a.set(n,r),r}}function Vo(e){const t=e.split(":");return t.length>1?t[0]+":"+t[1]:t[0]}class Wo{constructor(e){this.conversionApi=Zt({dispatcher:this},e)}convertChanges(e,t,n){for(const t of e.getMarkersToRemove())this.convertMarkerRemove(t.name,t.range,n);for(const t of e.getChanges())"insert"==t.type?this.convertInsert(zo._createFromPositionAndShift(t.position,t.length),n):"remove"==t.type?this.convertRemove(t.position,t.length,t.name,n):this.convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,n);for(const e of this.conversionApi.mapper.flushUnboundMarkerNames()){const r=t.get(e).getRange();this.convertMarkerRemove(e,r,n),this.convertMarkerAdd(e,r,n)}for(const t of e.getMarkersToAdd())this.convertMarkerAdd(t.name,t.range,n)}convertInsert(e,t){this.conversionApi.writer=t,this.conversionApi.consumable=this._createInsertConsumable(e);for(const t of e){const e=t.item,n={item:e,range:zo._createFromPositionAndShift(t.previousPosition,t.length)};this._testAndFire("insert",n);for(const t of e.getAttributeKeys())n.attributeKey=t,n.attributeOldValue=null,n.attributeNewValue=e.getAttribute(t),this._testAndFire("attribute:"+t,n)}this._clearConversionApi()}convertRemove(e,t,n,r){this.conversionApi.writer=r,this.fire("remove:"+n,{position:e,length:t},this.conversionApi),this._clearConversionApi()}convertAttribute(e,t,n,r,o){this.conversionApi.writer=o,this.conversionApi.consumable=this._createConsumableForRange(e,"attribute:"+t);for(const o of e){const e={item:o.item,range:zo._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:t,attributeOldValue:n,attributeNewValue:r};this._testAndFire("attribute:"+t,e)}this._clearConversionApi()}convertSelection(e,t,n){const r=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this.conversionApi.writer=n,this.conversionApi.consumable=this._createSelectionConsumable(e,r),this.fire("selection",{selection:e},this.conversionApi),e.isCollapsed){for(const t of r){const n=t.getRange();if(!qo(e.getFirstPosition(),t,this.conversionApi.mapper))continue;const r={item:e,markerName:t.name,markerRange:n};this.conversionApi.consumable.test(e,"addMarker:"+t.name)&&this.fire("addMarker:"+t.name,r,this.conversionApi)}for(const t of e.getAttributeKeys()){const n={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.conversionApi.consumable.test(e,"attribute:"+n.attributeKey)&&this.fire("attribute:"+n.attributeKey+":$text",n,this.conversionApi)}this._clearConversionApi()}}convertMarkerAdd(e,t,n){if(!t.root.document||"$graveyard"==t.root.rootName)return;this.conversionApi.writer=n;const r="addMarker:"+e,o=new Uo;if(o.add(t,r),this.conversionApi.consumable=o,this.fire(r,{markerName:e,markerRange:t},this.conversionApi),o.test(t,r)){this.conversionApi.consumable=this._createConsumableForRange(t,r);for(const n of t.getItems()){if(!this.conversionApi.consumable.test(n,r))continue;const o={item:n,range:zo._createOn(n),markerName:e,markerRange:t};this.fire(r,o,this.conversionApi)}this._clearConversionApi()}}convertMarkerRemove(e,t,n){t.root.document&&"$graveyard"!=t.root.rootName&&(this.conversionApi.writer=n,this.fire("removeMarker:"+e,{markerName:e,markerRange:t},this.conversionApi),this._clearConversionApi())}_createInsertConsumable(e){const t=new Uo;for(const n of e){const e=n.item;t.add(e,"insert");for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n)}return t}_createConsumableForRange(e,t){const n=new Uo;for(const r of e.getItems())n.add(r,t);return n}_createSelectionConsumable(e,t){const n=new Uo;n.add(e,"selection");for(const r of t)n.add(e,"addMarker:"+r.name);for(const t of e.getAttributeKeys())n.add(e,"attribute:"+t);return n}_testAndFire(e,t){if(!this.conversionApi.consumable.test(t.item,e))return;const n=t.item.name||"$text";this.fire(e+":"+n,t,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}}function qo(e,t,n){const r=t.getRange(),o=Array.from(e.getAncestors());return o.shift(),o.reverse(),!o.some(e=>{if(r.containsItem(e))return!!n.toViewElement(e).getCustomProperty("addHighlight")})}Ct(Wo,xt);class Go{constructor(e,t,n){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setTo(e,t,n)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.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(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const r of e._ranges)if(t.isEqual(r)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new zo(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new zo(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new zo(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(e,t,n){if(null===e)this._setRanges([]);else if(e instanceof Go)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof zo)this._setRanges([e],!!t&&!!t.backward);else if(e instanceof Ho)this._setRanges([new zo(e)]);else if(e instanceof No){const r=!!n&&!!n.backward;let o;if("in"==t)o=zo._createIn(e);else if("on"==t)o=zo._createOn(e);else{if(void 0===t)throw new _t.b("model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",[this,e]);o=new zo(Ho._createAt(e,t))}this._setRanges([o],r)}else{if(!Yt(e))throw new _t.b("model-selection-setTo-not-selectable: Cannot set the selection to the given place.",[this,e]);this._setRanges(e,t&&!!t.backward)}}_setRanges(e,t=!1){const n=(e=Array.from(e)).some(t=>{if(!(t instanceof zo))throw new _t.b("model-selection-set-ranges-not-range: Selection range set to an object that is not an instance of model.Range.",[this,e]);return this._ranges.every(e=>!e.isEqual(t))});if(e.length!==this._ranges.length||n){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0})}}setFocus(e,t){if(null===this.anchor)throw new _t.b("model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",[this,e]);const n=Ho._createAt(e,t);if("same"==n.compareWith(this.focus))return;const r=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(r)?(this._pushRange(new zo(n,r)),this._lastRangeBackward=!0):(this._pushRange(new zo(r,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),t=e.start.nodeAfter,n=e.end.nodeBefore;return t instanceof Yo&&t==n?t:null}is(e){return"selection"==e||"model:selection"==e}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const n=Ko(t.start,e);n&&(yield n);for(const n of t.getWalker())"elementEnd"==n.type&&Jo(n.item,e)&&(yield n.item);const r=Ko(t.end,e);r&&!t.end.isTouching(Ho._createAt(r,0))&&(yield r)}}*getTopMostBlocks(){const e=Array.from(this.getSelectedBlocks());for(const t of e){const n=Qo(t);n&&e.includes(n)||(yield t)}}containsEntireContent(e=this.anchor.root){const t=Ho._createAt(e,0),n=Ho._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new zo(e.start,e.end))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new _t.b("model-selection-range-intersects: Trying to add a range that intersects with another range in the selection.",[this,e],{addedRange:e,intersectingRange:this._ranges[t]})}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function Jo(e,t){return!t.has(e)&&(t.add(e),e.document.model.schema.isBlock(e)&&e.parent)}function Ko(e,t){const n=e.parent.document.model.schema,r=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const a=r.find(e=>!o&&!(o=n.isLimit(e))&&Jo(e,t));return r.forEach(e=>t.add(e)),a}function Qo(e){const t=e.document.model.schema;let n=e.parent;for(;n;){if(t.isBlock(n))return n;n=n.parent}}Ct(Go,xt);class Xo extends zo{constructor(e,t){super(e,t),function(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&function(e){const t=this.getTransformedByOperation(e),n=zo._createFromRanges(t),r=!n.isEqual(this),o=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let a=null;if(r){"$graveyard"==n.root.rootName&&(a="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",t,{deletionPosition:a})}else o&&this.fire("change:content",this.toRange(),{deletionPosition:a})}.call(this,n)},{priority:"low"})}.call(this)}detach(){this.stopListening()}is(e){return"liveRange"==e||"model:liveRange"==e||super.is(e)}toRange(){return new zo(this.start,this.end)}static fromRange(e){return new Xo(e.start,e.end)}}Ct(Xo,xt);const $o="selection:";class Zo{constructor(e){this._selection=new ea(e),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(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}is(e){return"selection"==e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return $o+e}static _isStoreAttributeKey(e){return e.startsWith($o)}}Ct(Zo,xt);class ea extends Go{constructor(e){super(),this.markers=new kn({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._fixGraveyardRangesData=[],this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this.listenTo(this._model,"applyOperation",(e,t)=>{const n=t[0];if(n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type){for(;this._fixGraveyardRangesData.length;){const{liveRange:e,sourcePosition:t}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(e,t)}this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1}))}},{priority:"lowest"}),this.on("change:range",()=>{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new _t.b("document-selection-wrong-position: Range from document selection starts or ends at incorrect position.",this,{range:e})}),this.listenTo(this._model.markers,"update",()=>this._updateMarkers()),this.listenTo(this._document,"change",(e,t)=>{!function(e,t){const n=e.document.differ;for(const r of n.getChanges()){if("insert"!=r.type)continue;const n=r.position.parent;r.length===n.maxOffset&&e.enqueueChange(t,e=>{const t=Array.from(n.getAttributeKeys()).filter(e=>e.startsWith($o));for(const r of t)e.removeAttribute(r,n)})}}(this._model,t)})}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 e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(e,t,n){super.setTo(e,t,n),this._updateAttributes(!0)}setFocus(e,t){super.setFocus(e,t),this._updateAttributes(!0)}setAttribute(e,t){if(this._setAttribute(e,t)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}overrideGravity(){const e=bt();return this._overriddenGravityRegister.add(e),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new _t.b("document-selection-gravity-wrong-restore: Attempting to restore the selection gravity for an unknown UID.",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const t=Xo.fromRange(e);return t.on("change:range",(e,n,r)=>{this._hasChangedRange=!0,t.root==this._document.graveyard&&this._fixGraveyardRangesData.push({liveRange:t,sourcePosition:r.deletionPosition})}),t}_updateMarkers(){const e=[];for(const t of this._model.markers){const n=t.getRange();for(const r of this.getRanges())n.containsRange(r,!r.isCollapsed)&&e.push(t)}for(const t of e)this.markers.has(t)||this.markers.add(t);for(const t of Array.from(this.markers))e.includes(t)||this.markers.remove(t)}_updateAttributes(e){const t=Oo(this._getSurroundingAttributes()),n=Oo(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const r=[];for(const[e,t]of this.getAttributes())n.has(e)&&n.get(e)===t||r.push(e);for(const[e]of n)this.hasAttribute(e)||r.push(e);r.length>0&&this.fire("change:attribute",{attributeKeys:r,directChange:!1})}_setAttribute(e,t,n=!0){const r=n?"normal":"low";return("low"!=r||"normal"!=this._attributePriority.get(e))&&super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,r),!0)}_removeAttribute(e,t=!0){const n=t?"normal":"low";return!("low"==n&&"normal"==this._attributePriority.get(e)||(this._attributePriority.set(e,n),!super.hasAttribute(e)||(this._attrs.delete(e),0)))}_setAttributesTo(e){const t=new Set;for(const[t,n]of this.getAttributes())e.get(t)!==n&&this._removeAttribute(t,!1);for(const[n,r]of e)this._setAttribute(n,r,!1)&&t.add(n);return t}*_getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())t.startsWith($o)&&(yield[t.substr($o.length),e.getAttribute(t)])}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let n=null;if(this.isCollapsed){const t=e.textNode?e.textNode:e.nodeBefore,r=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(n=ta(t)),n||(n=ta(r)),!this.isGravityOverridden&&!n){let e=t;for(;e&&!n;)n=ta(e=e.previousSibling)}if(!n){let e=r;for(;e&&!n;)n=ta(e=e.nextSibling)}n||(n=this._getStoredAttributes())}else{const e=this.getFirstRange();for(const r of e){if(r.item.is("element")&&t.isObject(r.item))break;if("text"==r.type){n=r.item.getAttributes();break}}}return n}_fixGraveyardSelection(e,t){const n=t.clone(),r=this._model.schema.getNearestSelectionRange(n),o=this._ranges.indexOf(e);if(this._ranges.splice(o,1),e.detach(),r){const e=this._prepareRange(r);this._ranges.splice(o,0,e)}}}function ta(e){return e instanceof Io||e instanceof Ao?e.getAttributes():null}class na{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}var ra=function(e){return ht(e,5)};class oa extends na{elementToElement(e){return this.add(function(e){return(e=ra(e)).view=ia(e.view,"container"),t=>{t.on("insert:"+e.model,function(e){return(t,n,r)=>{const o=e(n.item,r.writer);if(!o)return;if(!r.consumable.consume(n.item,"insert"))return;const a=r.mapper.toViewPosition(n.range.start);r.mapper.bindElements(n.item,o),r.writer.insert(a,o)}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}attributeToElement(e){return this.add(function(e){let t="attribute:"+((e=ra(e)).model.key?e.model.key:e.model);if(e.model.name&&(t+=":"+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=ia(e.view[t],"attribute");else e.view=ia(e.view,"attribute");const n=sa(e);return r=>{r.on(t,function(e){return(t,n,r)=>{const o=e(n.attributeOldValue,r.writer),a=e(n.attributeNewValue,r.writer);if(!o&&!a)return;if(!r.consumable.consume(n.item,t.name))return;const i=r.writer,s=i.document.selection;if(n.item instanceof Go||n.item instanceof Zo)i.wrap(s.getFirstRange(),a);else{let e=r.mapper.toViewRange(n.range);null!==n.attributeOldValue&&o&&(e=i.unwrap(e,o)),null!==n.attributeNewValue&&a&&i.wrap(e,a)}}}(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t="attribute:"+((e=ra(e)).model.key?e.model.key:e.model);if(e.model.name&&(t+=":"+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=la(e.view[t]);else e.view=la(e.view);const n=sa(e);return r=>{r.on(t,function(e){return(t,n,r)=>{const o=e(n.attributeOldValue,n),a=e(n.attributeNewValue,n);if(!o&&!a)return;if(!r.consumable.consume(n.item,t.name))return;const i=r.mapper.toViewElement(n.item),s=r.writer;if(!i)throw new _t.b("conversion-attribute-to-attribute-on-text: Trying to convert text node's attribute with attribute-to-attribute converter.",[n,r]);if(null!==n.attributeOldValue&&o)if("class"==o.key){const e=Array.isArray(o.value)?o.value:[o.value];for(const t of e)s.removeClass(t,i)}else if("style"==o.key){const e=Object.keys(o.value);for(const t of e)s.removeStyle(t,i)}else s.removeAttribute(o.key,i);if(null!==n.attributeNewValue&&a)if("class"==a.key){const e=Array.isArray(a.value)?a.value:[a.value];for(const t of e)s.addClass(t,i)}else if("style"==a.key){const e=Object.keys(a.value);for(const t of e)s.setStyle(t,a.value[t],i)}else s.setAttribute(a.key,a.value,i)}}(n),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){return(e=ra(e)).view=ia(e.view,"ui"),t=>{t.on("addMarker:"+e.model,function(e){return(t,n,r)=>{n.isOpening=!0;const o=e(n,r.writer);n.isOpening=!1;const a=e(n,r.writer);if(!o||!a)return;const i=n.markerRange;if(i.isCollapsed&&!r.consumable.consume(i,t.name))return;for(const e of i)if(!r.consumable.consume(e.item,t.name))return;const s=r.mapper,l=r.writer;l.insert(s.toViewPosition(i.start),o),r.mapper.bindElementToMarker(o,n.markerName),i.isCollapsed||(l.insert(s.toViewPosition(i.end),a),r.mapper.bindElementToMarker(a,n.markerName)),t.stop()}}(e.view),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,(e.view,(e,t,n)=>{const r=n.mapper.markerNameToElements(t.markerName);if(r){for(const e of r)n.mapper.unbindElementFromMarkerName(e,t.markerName),n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{t.on("addMarker:"+e.model,function(e){return(t,n,r)=>{if(!n.item)return;if(!(n.item instanceof Go||n.item instanceof Zo||n.item.is("textProxy")))return;const o=ca(e,n,r);if(!o)return;if(!r.consumable.consume(n.item,t.name))return;const a=aa(o),i=r.writer,s=i.document.selection;if(n.item instanceof Go||n.item instanceof Zo)i.wrap(s.getFirstRange(),a,s);else{const e=r.mapper.toViewRange(n.range),t=i.wrap(e,a);for(const e of t.getItems())if(e.is("attributeElement")&&e.isSimilar(a)){r.mapper.bindElementToMarker(e,n.markerName);break}}}}(e.view),{priority:e.converterPriority||"normal"}),t.on("addMarker:"+e.model,function(e){return(t,n,r)=>{if(!n.item)return;if(!(n.item instanceof Yo))return;const o=ca(e,n,r);if(!o)return;if(!r.consumable.test(n.item,t.name))return;const a=r.mapper.toViewElement(n.item);if(a&&a.getCustomProperty("addHighlight")){r.consumable.consume(n.item,t.name);for(const e of zo._createIn(n.item))r.consumable.consume(e.item,t.name);a.getCustomProperty("addHighlight")(a,o,r.writer),r.mapper.bindElementToMarker(a,n.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,function(e){return(t,n,r)=>{if(n.markerRange.isCollapsed)return;const o=ca(e,n,r);if(!o)return;const a=aa(o),i=r.mapper.markerNameToElements(n.markerName);if(i){for(const e of i)r.mapper.unbindElementFromMarkerName(e,n.markerName),e.is("attributeElement")?r.writer.unwrap(r.writer.createRangeOn(e),a):e.getCustomProperty("removeHighlight")(e,o.id,r.writer);r.writer.clearClonedElementsGroup(n.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}}function aa(e){const t=new Mn("span",e.attributes);return e.classes&&t._addClass(e.classes),e.priority&&(t._priority=e.priority),t._id=e.id,t}function ia(e,t){return"function"==typeof e?e:(n,r)=>function(e,t,n){let r;"string"==typeof e&&(e={name:e});const o=Object.assign({},e.attributes);if("container"==n)r=t.createContainerElement(e.name,o);else if("attribute"==n){const n={priority:e.priority||Mn.DEFAULT_PRIORITY};r=t.createAttributeElement(e.name,o,n)}else r=t.createUIElement(e.name,o);if(e.styles){const n=Object.keys(e.styles);for(const o of n)t.setStyle(o,e.styles[o],r)}if(e.classes){const n=e.classes;if("string"==typeof n)t.addClass(n,r);else for(const e of n)t.addClass(e,r)}return r}(e,r,t)}function sa(e){return e.model.values?(t,n)=>{const r=e.view[t];return r?r(t,n):null}:e.view}function la(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function ca(e,t,n){const r="function"==typeof e?e(t,n):e;return r?(r.priority||(r.priority=10),r.id||(r.id=t.markerName),r):null}class ua extends na{elementToElement(e){return this.add(da(e))}elementToAttribute(e){return this.add(function(e){pa(e=ra(e));const t=fa(e,!1),n=ha(e),r=n?"element:"+n:"element";return n=>{n.on(r,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=null;("string"==typeof(e=ra(e)).view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let n;return n="class"==t||"style"==t?{["class"==t?"classes":"styles"]:e.view.value}:{attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}},e.view.name&&(n.name=e.view.name),e.view=n,t}(e)),pa(e,t);const n=fa(e,!0);return t=>{t.on("element",n,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){return function(e){const t=e.model;e.model=(e,n)=>{const r="string"==typeof t?t:t(e);return n.createElement("$marker",{"data-name":r})}}(e=ra(e)),da(e)}(e))}}function da(e){const t=function(e){const t=e.view?new jt(e.view):null;return(n,r,o)=>{let a={};if(t){const e=t.match(r.viewItem);if(!e)return;a=e.match}a.name=!0;const i=function(e,t,n){return e instanceof Function?e(t,n):n.createElement(e)}(e.model,r.viewItem,o.writer);if(!i)return;if(!o.consumable.test(r.viewItem,a))return;const s=o.splitToAllowedParent(i,r.modelCursor);if(!s)return;o.writer.insert(i,s.position),o.convertChildren(r.viewItem,o.writer.createPositionAt(i,0)),o.consumable.consume(r.viewItem,a);const l=o.getSplitParts(i);r.modelRange=new zo(o.writer.createPositionBefore(i),o.writer.createPositionAfter(l[l.length-1])),s.cursorParent?r.modelCursor=o.writer.createPositionAt(s.cursorParent,0):r.modelCursor=r.modelRange.end}}(e=ra(e)),n=ha(e),r=n?"element:"+n:"element";return n=>{n.on(r,t,{priority:e.converterPriority||"normal"})}}function ha(e){return"string"==typeof e.view?e.view:"object"==typeof e.view&&"string"==typeof e.view.name?e.view.name:null}function pa(e,t=null){const n=null===t||(e=>e.getAttribute(t)),r="object"!=typeof e.model?e.model:e.model.key,o="object"!=typeof e.model||void 0===e.model.value?n:e.model.value;e.model={key:r,value:o}}function fa(e,t){const n=new jt(e.view);return(r,o,a)=>{const i=n.match(o.viewItem);if(!i)return;const s=e.model.key,l="function"==typeof e.model.value?e.model.value(o.viewItem):e.model.value;null!==l&&(function(e){return!("object"==typeof e.view&&!ha(e)||e.view.classes||e.view.attributes||e.view.styles)}(e)?i.match.name=!0:delete i.match.name,a.consumable.test(o.viewItem,i.match)&&(o.modelRange||(o=Object.assign(o,a.convertChildren(o.viewItem,o.modelCursor))),function(e,t,n,r){let o=!1;for(const a of Array.from(e.getItems({shallow:n})))r.schema.checkAttribute(a,t.key)&&(r.writer.setAttribute(t.key,t.value,a),o=!0);return o}(o.modelRange,{key:s,value:l},t,a)&&a.consumable.consume(o.viewItem,i.match)))}}class ma{constructor(e){this.model=e,this.view=new Po,this.mapper=new Bo,this.downcastDispatcher=new Wo({mapper:this.mapper});const t=this.model.document,n=t.selection,r=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(t,"change",()=>{this.view.change(e=>{this.downcastDispatcher.convertChanges(t.differ,r,e),this.downcastDispatcher.convertSelection(n,r,e)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(n,r)=>{const o=r.newSelection,a=new Go,i=[];for(const e of o.getRanges())i.push(t.toModelRange(e));a.setTo(i,{backward:o.isBackward}),a.isEqual(e.document.selection)||e.change(e=>{e.setSelection(a)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,"insert"))return;const r=n.writer,o=n.mapper.toViewPosition(t.range.start),a=r.createText(t.item.data);r.insert(o,a)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(e,t,n)=>{const r=n.mapper.toViewPosition(t.position),o=t.position.getShiftedBy(t.length),a=n.mapper.toViewPosition(o,{isPhantom:!0}),i=n.writer.createRange(r,a),s=n.writer.remove(i.getTrimmed());for(const e of n.writer.createRangeIn(s).getItems())n.mapper.unbindViewElement(e)},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const r=n.writer,o=r.document.selection;for(const e of o.getRanges())e.isCollapsed&&e.end.parent.document&&n.writer.mergeAttributes(e.start);r.setSelection(null)},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const r=t.selection;if(r.isCollapsed)return;if(!n.consumable.consume(r,"selection"))return;const o=[];for(const e of r.getRanges()){const t=n.mapper.toViewRange(e);o.push(t)}n.writer.setSelection(o,{backward:r.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const r=t.selection;if(!r.isCollapsed)return;if(!n.consumable.consume(r,"selection"))return;const o=n.writer,a=r.getFirstPosition(),i=n.mapper.toViewPosition(a),s=o.breakAttributes(i);o.setSelection(s)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(e=>{if("$graveyard"==e.rootName)return null;const t=new fn(e.name);return t.rootName=e.rootName,t._document=this.view.document,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}}Ct(ma,on);class ga{constructor(e,t=[]){this._editor=e,this._availablePlugins=new Map,this._plugins=new Map;for(const e of t)this._availablePlugins.set(e,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){const t="plugincollection-plugin-not-loaded: The requested plugin is not loaded.";let n=e;throw"function"==typeof e&&(n=e.pluginName||e.name),new _t.b(t,this._editor,{plugin:n})}return t}has(e){return this._plugins.has(e)}init(e,t=[]){const n=this,r=this._editor,o=new Set,a=[],i=d(e),s=d(t),l=function(e){const t=[];for(const n of e)u(n)||t.push(n);return t.length?t:null}(e);if(l){const e="plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";return console.error(Object(_t.a)(e),{plugins:l}),Promise.reject(new _t.b(e,this._editor,{plugins:l}))}return Promise.all(i.map((function e(i){if(!s.includes(i)&&!n._plugins.has(i)&&!o.has(i))return function(i){return new Promise(s=>{o.add(i),i.requires&&i.requires.forEach(n=>{const o=u(n);if(t.includes(o))throw new _t.b("plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.",r,{plugin:o,requiredBy:i});e(o)});const l=new i(r);n._add(i,l),a.push(l),s()})}(i).catch(e=>{throw console.error(Object(_t.a)("plugincollection-load: It was not possible to load the plugin."),{plugin:i}),e})}))).then(()=>c(a,"init")).then(()=>c(a,"afterInit")).then(()=>a);function c(e,t){return e.reduce((e,n)=>n[t]?e.then(n[t].bind(n)):e,Promise.resolve())}function u(e){return"function"==typeof e?e:n._availablePlugins.get(e)}function d(e){return e.map(e=>u(e)).filter(e=>!!e)}}destroy(){const e=Array.from(this).map(([,e])=>e).filter(e=>"function"==typeof e.destroy).map(e=>e.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const n=e.pluginName;if(n){if(this._plugins.has(n))throw new _t.b("plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e});this._plugins.set(n,t)}}}Ct(ga,xt);class _a{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new _t.b("commandcollection-command-not-found: Command does not exist.",this,{commandName:e});n.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const va=["ar","fa","he","ku","ug"];class ba{constructor(e={}){this.uiLanguage=e.uiLanguage||"en",this.contentLanguage=e.contentLanguage||this.uiLanguage,this.uiLanguageDirection=ya(this.uiLanguage),this.contentLanguageDirection=ya(this.contentLanguage),this.t=(...e)=>this._t(...e)}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(e,t){let n=function(e,t){const n=Object.keys(window.CKEDITOR_TRANSLATIONS).length;return 1===n&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0!==n&&function(e,t){return e in window.CKEDITOR_TRANSLATIONS&&t in window.CKEDITOR_TRANSLATIONS[e]}(e,t)?window.CKEDITOR_TRANSLATIONS[e][t].replace(/ \[context: [^\]]+\]$/,""):t.replace(/ \[context: [^\]]+\]$/,"")}(this.uiLanguage,e);return t&&(n=n.replace(/%(\d+)/g,(e,n)=>n<t.length?t[n]:e)),n}}function ya(e){return va.includes(e)?"rtl":"ltr"}class wa{constructor(){this._consumables=new Map}add(e,t){let n;e.is("text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?n=this._consumables.get(e):(n=new ka,this._consumables.set(e,n)),n.add(t))}test(e,t){const n=this._consumables.get(e);return void 0===n?null:e.is("text")||e.is("documentFragment")?n:n.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const n=this._consumables.get(e);void 0!==n&&(e.is("text")||e.is("documentFragment")?this._consumables.set(e,!0):n.revert(t))}static consumablesFromElement(e){const t={name:!0,attributes:[],classes:[],styles:[]},n=e.getAttributeKeys();for(const e of n)"style"!=e&&"class"!=e&&t.attributes.push(e);const r=e.getClassNames();for(const e of r)t.classes.push(e);const o=e.getStyleNames();for(const e of o)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new wa),e.is("text"))return t.add(e),t;e.is("element")&&t.add(e,wa.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const n of e.getChildren())t=wa.createFrom(n,t);return t}}class ka{constructor(){this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const n=this._test(t,e[t]);if(!0!==n)return n}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t in this._consumables)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const n=se(t)?t:[t],r=this._consumables[e];for(const t of n){if("attributes"===e&&("class"===t||"style"===t))throw new _t.b("viewconsumable-invalid-attribute: Classes and styles should be handled separately.",this);r.set(t,!0)}}_test(e,t){const n=se(t)?t:[t],r=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){const e=r.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",n=this._test(e,[...this._consumables[e].keys()]);if(!0!==n)return n}return!0}_consume(e,t){const n=se(t)?t:[t],r=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t)r.set(t,!1);else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const n=se(t)?t:[t],r=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t)!1===r.get(t)&&r.set(t,!0);else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class xa{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,t)=>{t[0]=new Ma(t[0])},{priority:"highest"}),this.on("checkChild",(e,t)=>{t[0]=new Ma(t[0]),t[1]=this.getDefinition(t[1])},{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new _t.b("schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new _t.b("schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:e.is&&(e.is("text")||e.is("textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!(!t||!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!(!t||!t.isObject)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const n=this.getDefinition(e.last);return!!n&&n.allowAttributes.includes(t)}checkMerge(e,t=null){if(e instanceof Ho){const t=e.nodeBefore,n=e.nodeAfter;if(!(t instanceof Yo))throw new _t.b("schema-check-merge-no-element-before: The node before the merge position must be an element.",this);if(!(n instanceof Yo))throw new _t.b("schema-check-merge-no-element-after: The node after the merge position must be an element.",this);return this.checkMerge(t,n)}for(const n of t.getChildren())if(!this.checkChild(e,n))return!1;return!0}addChildCheck(e){this.on("checkChild",(t,[n,r])=>{if(!r)return;const o=e(n,r);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",(t,[n,r])=>{const o=e(n,r);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;for(t=e instanceof Ho?e.parent:(e instanceof zo?[e]:Array.from(e.getRanges())).reduce((e,t)=>{const n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n},null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const n=[...e.getFirstPosition().getAncestors(),new Ao("",e.getAttributes())];return this.checkAttribute(n,t)}{const n=e.getRanges();for(const e of n)for(const n of e)if(this.checkAttribute(n.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const n of e)yield*this._getValidRangesForRange(n,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new zo(e);let n,r;"both"!=t&&"backward"!=t||(n=new jo({startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(r=new jo({startPosition:e}));for(const e of function*(e,t){let n=!1;for(;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}(n,r)){const t=e.walker==n?"elementEnd":"elementStart",r=e.value;if(r.type==t&&this.isObject(r.item))return zo._createOn(r.item);if(this.checkChild(r.nextPosition,"$text"))return new zo(r.nextPosition)}return null}findAllowedParent(e,t){let n=e.parent;for(;n;){if(this.checkChild(n,t))return n;if(this.isLimit(n))return null;n=n.parent}return null}removeDisallowedAttributes(e,t){for(const n of e){for(const e of n.getAttributeKeys())this.checkAttribute(n,e)||t.removeAttribute(e,n);n.is("element")&&this.removeDisallowedAttributes(n.getChildren(),t)}}createContext(e){return new Ma(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,n=Object.keys(t);for(const r of n)e[r]=Ea(t[r],r);for(const t of n)Ta(e,t);for(const t of n)Sa(e,t);for(const t of n)Da(e,t),La(e,t);for(const t of n)Ca(e,t),Pa(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,n=t.length-1){const r=t.getItem(n);if(e.allowIn.includes(r.name)){if(0==n)return!0;{const e=this.getDefinition(r);return this._checkContextMatch(e,t,n-1)}}return!1}*_getValidRangesForRange(e,t){let n=e.start,r=e.start;for(const o of e.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(zo._createIn(o),t)),this.checkAttribute(o,t)||(n.isEqual(r)||(yield new zo(n,r)),n=Ho._createAfter(o)),r=Ho._createAfter(o);n.isEqual(r)||(yield new zo(n,r))}}Ct(xa,on);class Ma{constructor(e){if(e instanceof Ma)return e;"string"==typeof e?e=[e]:Array.isArray(e)||(e=e.getAncestors({includeSelf:!0})),e[0]&&"string"!=typeof e[0]&&e[0].is("documentFragment")&&e.shift(),this._items=e.map(Aa)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Ma([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}}function Ea(e,t){const n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return function(e,t){for(const n of e){const e=Object.keys(n).filter(e=>e.startsWith("is"));for(const r of e)t[r]=n[r]}}(e,n),Oa(e,n,"allowIn"),Oa(e,n,"allowContentOf"),Oa(e,n,"allowWhere"),Oa(e,n,"allowAttributes"),Oa(e,n,"allowAttributesOf"),Oa(e,n,"inheritTypesFrom"),function(e,t){for(const n of e){const e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,n),n}function Ta(e,t){for(const n of e[t].allowContentOf)e[n]&&Na(e,n).forEach(e=>{e.allowIn.push(t)});delete e[t].allowContentOf}function Sa(e,t){for(const n of e[t].allowWhere){const r=e[n];if(r){const n=r.allowIn;e[t].allowIn.push(...n)}}delete e[t].allowWhere}function Da(e,t){for(const n of e[t].allowAttributesOf){const r=e[n];if(r){const n=r.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf}function La(e,t){const n=e[t];for(const t of n.inheritTypesFrom){const r=e[t];if(r){const e=Object.keys(r).filter(e=>e.startsWith("is"));for(const t of e)t in n||(n[t]=r[t])}}delete n.inheritTypesFrom}function Ca(e,t){const n=e[t],r=n.allowIn.filter(t=>e[t]);n.allowIn=Array.from(new Set(r))}function Pa(e,t){const n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function Oa(e,t,n){for(const r of e)"string"==typeof r[n]?t[n].push(r[n]):Array.isArray(r[n])&&t[n].push(...r[n])}function Na(e,t){const n=e[t];return function(e){return Object.keys(e).map(t=>e[t])}(e).filter(e=>e.allowIn.includes(n.name))}function Aa(e){return"string"==typeof e?{name:e,*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}class Ia{constructor(e={}){this._splitParts=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},e),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(e,t,n=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let n;for(const r of new Ma(e)){const e={};for(const t of r.getAttributeKeys())e[t]=r.getAttribute(t);const o=t.createElement(r.name,e);n&&t.append(o,n),n=Ho._createAt(o,0)}return n}(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=wa.createFrom(e),this.conversionApi.store={};const{modelRange:r}=this._convertItem(e,this._modelCursor),o=t.createDocumentFragment();if(r){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,o);o.markers=function(e,t){const n=new Set,r=new Map,o=zo._createIn(e).getItems();for(const e of o)"$marker"==e.name&&n.add(e);for(const e of n){const n=e.getAttribute("data-name"),o=t.createPositionBefore(e);r.has(n)?r.get(n).end=o.clone():r.set(n,new zo(o.clone())),t.remove(e)}return r}(o,t)}return this._modelCursor=null,this._splitParts.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(e,t){const n=Object.assign({viewItem:e,modelCursor:t,modelRange:null});if(e.is("element")?this.fire("element:"+e.name,n,this.conversionApi):e.is("text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof zo))throw new _t.b("view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){const n=new zo(t);let r=t;for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,r);e.modelRange instanceof zo&&(n.end=e.modelRange.end,r=e.modelCursor)}return{modelRange:n,modelCursor:r}}_splitToAllowedParent(e,t){const n=this.conversionApi.schema.findAllowedParent(t,e);if(!n)return null;if(n===t.parent)return{position:t};if(this._modelCursor.parent.getAncestors().includes(n))return null;const r=this.conversionApi.writer.split(t,n),o=[];for(const e of r.range.getWalker())if("elementEnd"==e.type)o.push(e.item);else{const t=o.pop(),n=e.item;this._registerSplitPair(t,n)}return{position:r.position,cursorParent:r.range.end.parent}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const n=this._splitParts.get(e);this._splitParts.set(t,n),n.push(t)}_getSplitParts(e){return this._splitParts.has(e)?this._splitParts.get(e):[e]}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}Ct(Ia,xt);class Ra{constructor(e,t){this.model=e,this.processor=t,this.mapper=new Bo,this.downcastDispatcher=new Wo({mapper:this.mapper}),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,"insert"))return;const r=n.writer,o=n.mapper.toViewPosition(t.range.start),a=r.createText(t.item.data);r.insert(o,a)},{priority:"lowest"}),this.upcastDispatcher=new Ia({schema:e.schema}),this.upcastDispatcher.on("text",(e,t,n)=>{if(n.schema.checkChild(t.modelCursor,"$text")&&n.consumable.consume(t.viewItem)){const e=n.writer.createText(t.viewItem.data);n.writer.insert(e,t.modelCursor),t.modelRange=zo._createFromPositionAndShift(t.modelCursor,e.offsetSize),t.modelCursor=t.modelRange.end}},{priority:"lowest"}),this.upcastDispatcher.on("element",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:r}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=r}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:r}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=r}},{priority:"lowest"}),this.decorate("init"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"})}get(e){const{rootName:t="main",trim:n="empty"}=e||{};if(!this._checkIfRootsExists([t]))throw new _t.b("datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.",this);const r=this.model.document.getRoot(t);return"empty"!==n||this.model.hasContent(r,{ignoreWhitespaces:!0})?this.stringify(r):""}stringify(e){const t=this.toView(e);return this.processor.toData(t)}toView(e){this.mapper.clearBindings();const t=zo._createIn(e),n=new Un,r=new Vn(new xn);if(this.mapper.bindElements(e,n),this.downcastDispatcher.convertInsert(t,r),!e.is("documentFragment")){const t=function(e){const t=[],n=e.root.document;if(!n)return[];const r=zo._createIn(e);for(const e of n.model.markers){const n=r.getIntersection(e.getRange());n&&t.push([e.name,n])}return t}(e);for(const[e,n]of t)this.downcastDispatcher.convertMarkerAdd(e,n,r)}return n}init(e){if(this.model.document.version)throw new _t.b("datacontroller-init-document-not-empty: Trying to set initial data to not empty document.",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new _t.b("datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.",this);return this.model.enqueueChange("transparent",e=>{for(const n of Object.keys(t)){const r=this.model.document.getRoot(n);e.insert(this.parse(t[n],r),r,0)}}),Promise.resolve()}set(e){let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new _t.b("datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.",this);this.model.enqueueChange("transparent",e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const n of Object.keys(t)){const r=this.model.document.getRoot(n);e.remove(e.createRangeIn(r)),e.insert(this.parse(t[n],r),r,0)}})}parse(e,t="$root"){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t="$root"){return this.model.change(n=>this.upcastDispatcher.convert(e,n,t))}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRootNames().includes(t))return!1;return!0}}Ct(Ra,on);class Ya{constructor(e,t){this._helpers=new Map,this._downcast=Array.isArray(e)?e:[e],this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Array.isArray(t)?t:[t],this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const n=this._downcast.includes(t);if(!this._upcast.includes(t)&&!n)throw new _t.b("conversion-add-alias-dispatcher-not-registered: Trying to register and alias for a dispatcher that nas not been registered.",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:n})}for(e){if(!this._helpers.has(e))throw new _t.b("conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:n}of ja(e))this.for("upcast").elementToElement({model:t,view:n,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:n}of ja(e))this.for("upcast").elementToAttribute({view:n,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:n}of ja(e))this.for("upcast").attributeToAttribute({view:n,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:n}){if(this._helpers.has(e))throw new _t.b("conversion-group-exists: Trying to register a group name that has already been registered.",this);const r=n?new oa(t):new ua(t);this._helpers.set(e,r)}}function*ja(e){if(e.model.values)for(const t of e.model.values)yield*Fa({key:e.model.key,value:t},e.view[t],e.upcastAlso?e.upcastAlso[t]:void 0);else yield*Fa(e.model,e.view,e.upcastAlso)}function*Fa(e,t,n){if(yield{model:e,view:t},n){n=Array.isArray(n)?n:[n];for(const t of n)yield{model:e,view:t}}}class Ha{constructor(e="default"){this.operations=[],this.type=e}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class za{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e){return new this(e.baseVersion)}}class Ba{constructor(e){this.markers=new Map,this._children=new Ro,e&&this._insertChild(0,e)}[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(e){return"documentFragment"==e||"model:documentFragment"==e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const n of e)n.name?t.push(Yo.fromJSON(n)):t.push(Ao.fromJSON(n));return new Ba(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){return"string"==typeof e?[new Ao(e)]:(Yt(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new Ao(e):e instanceof Io?new Ao(e.data,e.getAttributes()):e))}(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}}function Ua(e,t){const n=(t=qa(t)).reduce((e,t)=>e+t.offsetSize,0),r=e.parent;Ja(e);const o=e.index;return r._insertChild(o,t),Ga(r,o+t.length),Ga(r,o),new zo(e,e.getShiftedBy(n))}function Va(e){if(!e.isFlat)throw new _t.b("operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.",this);const t=e.start.parent;Ja(e.start),Ja(e.end);const n=t._removeChildren(e.start.index,e.end.index-e.start.index);return Ga(t,e.start.index),n}function Wa(e,t){if(!e.isFlat)throw new _t.b("operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.",this);const n=Va(e);return Ua(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),n)}function qa(e){const t=[];e instanceof Array||(e=[e]);for(let n=0;n<e.length;n++)if("string"==typeof e[n])t.push(new Ao(e[n]));else if(e[n]instanceof Io)t.push(new Ao(e[n].data,e[n].getAttributes()));else if(e[n]instanceof Ba||e[n]instanceof Ro)for(const r of e[n])t.push(r);else e[n]instanceof No&&t.push(e[n]);for(let e=1;e<t.length;e++){const n=t[e],r=t[e-1];n instanceof Ao&&r instanceof Ao&&Ka(n,r)&&(t.splice(e-1,2,new Ao(r.data+n.data,r.getAttributes())),e--)}return t}function Ga(e,t){const n=e.getChild(t-1),r=e.getChild(t);if(n&&r&&n.is("text")&&r.is("text")&&Ka(n,r)){const o=new Ao(n.data+r.data,n.getAttributes());e._removeChildren(t-1,2),e._insertChild(t-1,o)}}function Ja(e){const t=e.textNode,n=e.parent;if(t){const r=e.offset-t.startOffset,o=t.index;n._removeChildren(o,1);const a=new Ao(t.data.substr(0,r),t.getAttributes()),i=new Ao(t.data.substr(r),t.getAttributes());n._insertChild(o,[a,i])}}function Ka(e,t){const n=e.getAttributes(),r=t.getAttributes();for(const e of n){if(e[1]!==t.getAttribute(e[0]))return!1;r.next()}return r.next().done}var Qa=function(e,t){return qr(e,t)};class Xa extends za{constructor(e,t,n,r,o){super(o),this.range=e.clone(),this.key=t,this.oldValue=void 0===n?null:n,this.newValue=void 0===r?null:r}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}clone(){return new Xa(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Xa(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new _t.b("attribute-operation-range-not-flat: The range to change is not flat.",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!Qa(e.getAttribute(this.key),this.oldValue))throw new _t.b("attribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new _t.b("attribute-operation-attribute-exists: The attribute with given key already exists.",this,{node:e,key:this.key})}}_execute(){Qa(this.oldValue,this.newValue)||function(e,t,n){Ja(e.start),Ja(e.end);for(const r of e.getItems({shallow:!0})){const e=r.is("textProxy")?r.textNode:r;null!==n?e._setAttribute(t,n):e._removeAttribute(t),Ga(e.parent,e.index)}Ga(e.end.parent,e.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new Xa(zo.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class $a extends za{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new _t.b("detach-operation-on-document-node: Cannot detach document node.",this)}_execute(){Va(zo._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Za extends za{constructor(e,t,n,r){super(r),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new this.constructor(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,n=this.sourcePosition.offset,r=this.targetPosition.offset;if(n+this.howMany>e.maxOffset)throw new _t.b("move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.",this);if(e===t&&n<r&&r<n+this.howMany)throw new _t.b("move-operation-range-into-itself: Trying to move a range of nodes to the inside of that range.",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==Pt(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const e=this.sourcePosition.path.length-1;if(this.targetPosition.path[e]>=n&&this.targetPosition.path[e]<n+this.howMany)throw new _t.b("move-operation-node-into-itself: Trying to move a range of nodes into one of nodes from that range.",this)}}_execute(){Wa(zo._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,t){const n=Ho.fromJSON(e.sourcePosition,t),r=Ho.fromJSON(e.targetPosition,t);return new this(n,e.howMany,r,e.baseVersion)}}class ei extends za{constructor(e,t,n){super(n),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new Ro(qa(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}clone(){const e=new Ro([...this.nodes].map(e=>e._clone(!0))),t=new ei(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new Ho(e,[0]);return new Za(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new _t.b("insert-operation-position-invalid: Insertion position is invalid.",this)}_execute(){const e=this.nodes;this.nodes=new Ro([...e].map(e=>e._clone(!0))),Ua(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const n=[];for(const t of e.nodes)t.name?n.push(Yo.fromJSON(t)):n.push(Ao.fromJSON(t));const r=new ei(Ho.fromJSON(e.position,t),n,e.baseVersion);return r.shouldReceiveAttributes=e.shouldReceiveAttributes,r}}class ti extends za{constructor(e,t,n,r,o,a){super(a),this.name=e,this.oldRange=t?t.clone():null,this.newRange=n?n.clone():null,this.affectsData=o,this._markers=r}get type(){return"marker"}clone(){return new ti(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new ti(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const e=this.newRange?"_set":"_remove";this._markers[e](this.name,this.newRange,!0,this.affectsData)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new ti(e.name,e.oldRange?zo.fromJSON(e.oldRange,t):null,e.newRange?zo.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}class ni extends za{constructor(e,t,n,r){super(r),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=n}get type(){return"rename"}clone(){return new ni(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new ni(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Yo))throw new _t.b("rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.",this);if(e.name!==this.oldName)throw new _t.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 e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new ni(Ho.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class ri extends za{constructor(e,t,n,r,o){super(o),this.root=e,this.key=t,this.oldValue=n,this.newValue=r}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new ri(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new ri(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new _t.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 _t.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 _t.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 e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new _t.b("rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.",this,{rootName:e.root});return new ri(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class oi extends za{constructor(e,t,n,r,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=r.clone()}get type(){return"merge"}get deletionPosition(){return new Ho(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new zo(this.sourcePosition,e)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),n=new Ho(this.sourcePosition.root,t)._getTransformedByMergeOperation(this),r=new ai(e,this.howMany,this.graveyardPosition,this.baseVersion+1);return r.insertionPosition=n,r}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new _t.b("merge-operation-source-position-invalid: Merge source position is invalid.",this);if(!t.parent)throw new _t.b("merge-operation-target-position-invalid: Merge target position is invalid.",this);if(this.howMany!=e.maxOffset)throw new _t.b("merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.",this)}_execute(){const e=this.sourcePosition.parent;Wa(zo._createIn(e),this.targetPosition),Wa(zo._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const n=Ho.fromJSON(e.sourcePosition,t),r=Ho.fromJSON(e.targetPosition,t),o=Ho.fromJSON(e.graveyardPosition,t);return new this(n,e.howMany,r,o,e.baseVersion)}}class ai extends za{constructor(e,t,n,r){super(r),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=ai.getInsertionPosition(e),this.insertionPosition.stickiness="toNone",this.graveyardPosition=n?n.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Ho(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new zo(this.splitPosition,e)}clone(){const e=new this.constructor(this.splitPosition,this.howMany,this.graveyardPosition,this.baseVersion);return e.insertionPosition=this.insertionPosition,e}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new Ho(e,[0]);return new oi(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset<t)throw new _t.b("split-operation-position-invalid: Split position is invalid.",this);if(!e.parent)throw new _t.b("split-operation-split-in-root: Cannot split root element.",this);if(this.howMany!=e.maxOffset-this.splitPosition.offset)throw new _t.b("split-operation-how-many-invalid: Split operation specifies wrong number of nodes to move.",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new _t.b("split-operation-graveyard-position-invalid: Graveyard position invalid.",this)}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)Wa(zo._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const t=e._clone();Ua(this.insertionPosition,t)}Wa(new zo(Ho._createAt(e,this.splitPosition.offset),Ho._createAt(e,e.maxOffset)),this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const t=e.path.slice(0,-1);return t[t.length-1]++,new Ho(e.root,t)}static fromJSON(e,t){const n=Ho.fromJSON(e.splitPosition,t),r=Ho.fromJSON(e.insertionPosition,t),o=e.graveyardPosition?Ho.fromJSON(e.graveyardPosition,t):null,a=new this(n,e.howMany,o,e.baseVersion);return a.insertionPosition=r,a}}class ii extends Yo{constructor(e,t,n="main"){super(t),this._doc=e,this.rootName=n}get document(){return this._doc}is(e,t){const n=e.replace("model:","");return t?"rootElement"==n&&t==this.name||super.is(e,t):"rootElement"==n||super.is(e)}toJSON(){return this.rootName}}class si{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Ao(e,t)}createElement(e,t){return new Yo(e,t)}createDocumentFragment(){return new Ba}insert(e,t,n=0){if(this._assertWriterUsedCorrectly(),e instanceof Ao&&""==e.data)return;const r=Ho._createAt(t,n);if(e.parent){if(hi(e.root,r.root))return void this.move(zo._createOn(e),r);if(e.root.document)throw new _t.b("model-writer-insert-forbidden-move: Cannot move a node from a document to a different tree. It is forbidden to move a node that was already in a document outside of it.",this);this.remove(e)}const o=r.root.document?r.root.document.version:null,a=new ei(r,e,o);if(e instanceof Ao&&(a.shouldReceiveAttributes=!0),this.batch.addOperation(a),this.model.applyOperation(a),e instanceof Ba)for(const[t,n]of e.markers){const e=Ho._createAt(n.root,0),o={range:new zo(n.start._getCombined(e,r),n.end._getCombined(e,r)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,o):this.addMarker(t,o)}}insertText(e,t,n,r){t instanceof Ba||t instanceof Yo||t instanceof Ho?this.insert(this.createText(e),t,n):this.insert(this.createText(e,t),n,r)}insertElement(e,t,n,r){t instanceof Ba||t instanceof Yo||t instanceof Ho?this.insert(this.createElement(e),t,n):this.insert(this.createElement(e,t),n,r)}append(e,t){this.insert(e,t,"end")}appendText(e,t,n){t instanceof Ba||t instanceof Yo?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),n,"end")}appendElement(e,t,n){t instanceof Ba||t instanceof Yo?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),n,"end")}setAttribute(e,t,n){if(this._assertWriterUsedCorrectly(),n instanceof zo){const r=n.getMinimalFlatRanges();for(const n of r)li(this,e,t,n)}else ci(this,e,t,n)}setAttributes(e,t){for(const[n,r]of Oo(e))this.setAttribute(n,r,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof zo){const n=t.getMinimalFlatRanges();for(const t of n)li(this,e,null,t)}else ci(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof zo)for(const n of e.getItems())t(n);else t(e)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof zo))throw new _t.b("writer-move-invalid-range: Invalid range to move.",this);if(!e.isFlat)throw new _t.b("writer-move-range-not-flat: Range to move is not flat.",this);const r=Ho._createAt(t,n);if(r.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!hi(e.root,r.root))throw new _t.b("writer-move-different-document: Range is going to be moved between different documents.",this);const o=e.root.document?e.root.document.version:null,a=new Za(e.start,e.end.offset-e.start.offset,r,o);this.batch.addOperation(a),this.model.applyOperation(a)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof zo?e:zo._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),di(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,n=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Yo))throw new _t.b("writer-merge-no-element-before: Node before merge position must be an element.",this);if(!(n instanceof Yo))throw new _t.b("writer-merge-no-element-after: Node after merge position must be an element.",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,n){return this.model.createPositionFromPath(e,t,n)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(e,t,n){return this.model.createSelection(e,t,n)}_mergeDetached(e){const t=e.nodeBefore,n=e.nodeAfter;this.move(zo._createIn(n),Ho._createAt(t,"end")),this.remove(n)}_merge(e){const t=Ho._createAt(e.nodeBefore,"end"),n=Ho._createAt(e.nodeAfter,0),r=e.root.document.graveyard,o=new Ho(r,[0]),a=e.root.document.version,i=new oi(n,e.nodeAfter.maxOffset,t,o,a);this.batch.addOperation(i),this.model.applyOperation(i)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Yo))throw new _t.b("writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.",this);const n=e.root.document?e.root.document.version:null,r=new ni(Ho._createBefore(e),e.name,t,n);this.batch.addOperation(r),this.model.applyOperation(r)}split(e,t){this._assertWriterUsedCorrectly();let n,r,o=e.parent;if(!o.parent)throw new _t.b("writer-split-element-no-parent: Element with no parent can not be split.",this);if(t||(t=o.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new _t.b("writer-split-invalid-limit-element: Limit element is not a position ancestor.",this);do{const t=o.root.document?o.root.document.version:null,a=o.maxOffset-e.offset,i=new ai(e,a,null,t);this.batch.addOperation(i),this.model.applyOperation(i),n||r||(n=o,r=e.parent.nextSibling),o=(e=this.createPositionAfter(e.parent)).parent}while(o!==t);return{position:e,range:new zo(Ho._createAt(n,"end"),Ho._createAt(r,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new _t.b("writer-wrap-range-not-flat: Range to wrap is not flat.",this);const n=t instanceof Yo?t:new Yo(t);if(n.childCount>0)throw new _t.b("writer-wrap-element-not-empty: Element to wrap with is not empty.",this);if(null!==n.parent)throw new _t.b("writer-wrap-element-attached: Element to wrap with is already attached to tree model.",this);this.insert(n,e.start);const r=new zo(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(r,Ho._createAt(n,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new _t.b("writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.",this);this.move(zo._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new _t.b("writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.",this);const n=t.usingOperation,r=t.range,o=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new _t.b("writer-addMarker-marker-exists: Marker with provided name already exists.",this);if(!r)throw new _t.b("writer-addMarker-no-range: Range parameter is required when adding a new marker.",this);return n?(ui(this,e,null,r,o),this.model.markers.get(e)):this.model.markers._set(e,r,n,o)}updateMarker(e,t){this._assertWriterUsedCorrectly();const n="string"==typeof e?e:e.name,r=this.model.markers.get(n);if(!r)throw new _t.b("writer-updateMarker-marker-not-exists: Marker with provided name does not exists.",this);if(!t)return void this.model.markers._refresh(r);const o="boolean"==typeof t.usingOperation,a="boolean"==typeof t.affectsData,i=a?t.affectsData:r.affectsData;if(!o&&!t.range&&!a)throw new _t.b("writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.",this);const s=r.getRange(),l=t.range?t.range:s;o&&t.usingOperation!==r.managedUsingOperations?t.usingOperation?ui(this,n,null,l,i):(ui(this,n,s,null,i),this.model.markers._set(n,l,void 0,i)):r.managedUsingOperations?ui(this,n,s,l,i):this.model.markers._set(n,l,void 0,i)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new _t.b("writer-removeMarker-no-marker: Trying to remove marker which does not exist.",this);const n=this.model.markers.get(t);n.managedUsingOperations?ui(this,t,n.getRange(),null,n.affectsData):this.model.markers._remove(t)}setSelection(e,t,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(e,t,n)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,n]of Oo(e))this._setSelectionAttribute(t,n)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const r=Zo._getStoreAttributeKey(e);this.setAttribute(r,t,n.anchor.parent)}n._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const n=Zo._getStoreAttributeKey(e);this.removeAttribute(n,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new _t.b("writer-incorrect-use: Trying to use a writer outside the change() block.",this)}_addOperationForAffectedMarkers(e,t){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const r=n.getRange();let o=!1;if("move"==e)o=t.containsPosition(r.start)||t.start.isEqual(r.start)||t.containsPosition(r.end)||t.end.isEqual(r.end);else{const e=t.nodeBefore,n=t.nodeAfter,a=r.start.parent==e&&r.start.isAtEnd,i=r.end.parent==n&&0==r.end.offset,s=r.end.nodeAfter==n,l=r.start.nodeAfter==n;o=a||i||s||l}o&&this.updateMarker(n.name,{range:r})}}}function li(e,t,n,r){const o=e.model,a=o.document;let i,s,l,c=r.start;for(const e of r.getWalker({shallow:!0}))l=e.item.getAttribute(t),i&&s!=l&&(s!=n&&u(),c=i),i=e.nextPosition,s=l;function u(){const r=new zo(c,i),l=r.root.document?a.version:null,u=new Xa(r,t,s,n,l);e.batch.addOperation(u),o.applyOperation(u)}i instanceof Ho&&i!=c&&s!=n&&u()}function ci(e,t,n,r){const o=e.model,a=o.document,i=r.getAttribute(t);let s,l;if(i!=n){if(r.root===r){const e=r.document?a.version:null;l=new ri(r,t,i,n,e)}else{const o=(s=new zo(Ho._createBefore(r),e.createPositionAfter(r))).root.document?a.version:null;l=new Xa(s,t,i,n,o)}e.batch.addOperation(l),o.applyOperation(l)}}function ui(e,t,n,r,o){const a=e.model,i=a.document,s=new ti(t,n,r,a.markers,o,i.version);e.batch.addOperation(s),a.applyOperation(s)}function di(e,t,n,r){let o;if(e.root.document){const n=r.document,a=new Ho(n.graveyard,[0]);o=new Za(e,t,a,n.version)}else o=new $a(e,t);n.addOperation(o),r.applyOperation(o)}function hi(e,t){return e===t||e instanceof ii&&t instanceof ii}class pi{constructor(e){this._markerCollection=e,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(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize);const t=zo._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getRange();this.bufferMarkerChange(e.name,t,t,e.affectsData)}this._cachedChanges=null}bufferOperation(e){switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const t of e.range.getItems({shallow:!0}))this._isInInsertedElement(t.parent)||this._markAttribute(t);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;const t=this._isInInsertedElement(e.sourcePosition.parent),n=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),n||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const t=zo._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getRange();this.bufferMarkerChange(e.name,t,t,e.affectsData)}break}case"split":{const t=e.splitPosition.parent;this._isInInsertedElement(t)||this._markRemove(t,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{const t=e.sourcePosition.parent;this._isInInsertedElement(t.parent)||this._markRemove(t.parent,t.startOffset,1);const n=e.graveyardPosition.parent;this._markInsert(n,e.graveyardPosition.offset,1);const r=e.targetPosition.parent;this._isInInsertedElement(r)||this._markInsert(r,e.targetPosition.offset,t.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(e,t,n,r){const o=this._changedMarkers.get(e);o?(o.newRange=n,o.affectsData=r,null==o.oldRange&&null==o.newRange&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{oldRange:t,newRange:n,affectsData:r})}getMarkersToRemove(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.oldRange&&e.push({name:t,range:n.oldRange});return e}getMarkersToAdd(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.newRange&&e.push({name:t,range:n.newRange});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(e=>({name:e[0],data:{oldRange:e[1].oldRange,newRange:e[1].newRange}}))}hasDataChanges(){for(const[,e]of this._changedMarkers)if(e.affectsData)return!0;return this._changesInElement.size>0}getChanges(e={includeChangesInGraveyard:!1}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();const t=[];for(const e of this._changesInElement.keys()){const n=this._changesInElement.get(e).sort((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offset<t.offset?-1:1),r=this._elementSnapshots.get(e),o=fi(e.getChildren()),a=mi(r.length,n);let i=0,s=0;for(const n of a)if("i"===n)t.push(this._getInsertDiff(e,i,o[i].name)),i++;else if("r"===n)t.push(this._getRemoveDiff(e,i,r[s].name)),s++;else if("a"===n){const n=o[i].attributes,a=r[s].attributes;let l;if("$text"==o[i].name)l=new zo(Ho._createAt(e,i),Ho._createAt(e,i+1));else{const t=e.offsetToIndex(i);l=new zo(Ho._createAt(e,i),Ho._createAt(e.getChild(t),0))}t.push(...this._getAttributesDiff(l,a,n)),i++,s++}else i++,s++}t.sort((e,t)=>e.position.root!=t.position.root?e.position.root.rootName<t.position.root.rootName?-1:1:e.position.isEqual(t.position)?e.changeCount-t.changeCount:e.position.isBefore(t.position)?-1:1);for(let e=1;e<t.length;e++){const n=t[e-1],r=t[e],o="remove"==n.type&&"remove"==r.type&&"$text"==n.name&&"$text"==r.name&&n.position.isEqual(r.position),a="insert"==n.type&&"insert"==r.type&&"$text"==n.name&&"$text"==r.name&&n.position.parent==r.position.parent&&n.position.offset+n.length==r.position.offset,i="attribute"==n.type&&"attribute"==r.type&&n.position.parent==r.position.parent&&n.range.isFlat&&r.range.isFlat&&n.position.offset+n.length==r.position.offset&&n.attributeKey==r.attributeKey&&n.attributeOldValue==r.attributeOldValue&&n.attributeNewValue==r.attributeNewValue;(o||a||i)&&(t[e-1].length++,i&&(t[e-1].range.end=t[e-1].range.end.getShiftedBy(1)),t.splice(e,1),e--)}for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t.slice(),this._cachedChanges=t.slice().filter(gi),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard:this._cachedChanges}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._cachedChanges=null}_markInsert(e,t,n){const r={type:"insert",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,r)}_markRemove(e,t,n){const r={type:"remove",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,r),this._removeAllNestedChanges(e,t,n)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const n=this._getChangesForElement(e);this._handleChange(t,n),n.push(t);for(let e=0;e<n.length;e++)n[e].howMany<1&&(n.splice(e,1),e--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,fi(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const n of t){const r=e.offset+e.howMany,o=n.offset+n.howMany;if("insert"==e.type&&("insert"==n.type&&(e.offset<=n.offset?n.offset+=e.howMany:e.offset<o&&(n.howMany+=e.nodesToHandle,e.nodesToHandle=0)),"remove"==n.type&&e.offset<n.offset&&(n.offset+=e.howMany),"attribute"==n.type))if(e.offset<=n.offset)n.offset+=e.howMany;else if(e.offset<o){const o=n.howMany;n.howMany=e.offset-n.offset,t.unshift({type:"attribute",offset:r,howMany:o-n.howMany,count:this._changeCount++})}if("remove"==e.type){if("insert"==n.type)if(r<=n.offset)n.offset-=e.howMany;else if(r<=o)if(e.offset<n.offset){const t=r-n.offset;n.offset=e.offset,n.howMany-=t,e.nodesToHandle-=t}else n.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=n.offset)e.nodesToHandle-=n.howMany,n.howMany=0;else if(e.offset<o){const t=o-e.offset;n.howMany-=t,e.nodesToHandle-=t}if("remove"==n.type&&(r<=n.offset?n.offset-=e.howMany:e.offset<n.offset&&(e.nodesToHandle+=n.howMany,n.howMany=0)),"attribute"==n.type)if(r<=n.offset)n.offset-=e.howMany;else if(e.offset<n.offset){const t=r-n.offset;n.offset=e.offset,n.howMany-=t}else if(e.offset<o)if(r<=o){const r=n.howMany;n.howMany=e.offset-n.offset;const o=r-n.howMany-e.nodesToHandle;t.unshift({type:"attribute",offset:e.offset,howMany:o,count:this._changeCount++})}else n.howMany-=o-e.offset}if("attribute"==e.type){if("insert"==n.type)if(e.offset<n.offset&&r>n.offset){if(r>o){const e={type:"attribute",offset:o,howMany:r-o,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offset<o&&(r>o?(e.nodesToHandle=r-o,e.offset=o):e.nodesToHandle=0);if("remove"==n.type&&e.offset<n.offset&&r>n.offset){const o={type:"attribute",offset:n.offset,howMany:r-n.offset,count:this._changeCount++};this._handleChange(o,t),t.push(o),e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==n.type&&(e.offset>=n.offset&&r<=o?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&r>=o&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n){return{type:"insert",position:Ho._createAt(e,t),name:n,length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,n){return{type:"remove",position:Ho._createAt(e,t),name:n,length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,n){const r=[];n=new Map(n);for(const[o,a]of t){const t=n.has(o)?n.get(o):null;t!==a&&r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:o,attributeOldValue:a,attributeNewValue:t,changeCount:this._changeCount++}),n.delete(o)}for(const[t,o]of n)r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return r}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const n=this._changesInElement.get(t),r=e.startOffset;if(n)for(const e of n)if("insert"==e.type&&r>=e.offset&&r<e.offset+e.howMany)return!0;return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,n){const r=new zo(Ho._createAt(e,t),Ho._createAt(e,t+n));for(const e of r.getItems({shallow:!0}))e.is("element")&&(this._elementSnapshots.delete(e),this._changesInElement.delete(e),this._removeAllNestedChanges(e,0,e.maxOffset))}}function fi(e){const t=[];for(const n of e)if(n.is("text"))for(let e=0;e<n.data.length;e++)t.push({name:"$text",attributes:new Map(n.getAttributes())});else t.push({name:n.name,attributes:new Map(n.getAttributes())});return t}function mi(e,t){const n=[];let r=0,o=0;for(const e of t){if(e.offset>r){for(let t=0;t<e.offset-r;t++)n.push("e");o+=e.offset-r}if("insert"==e.type){for(let t=0;t<e.howMany;t++)n.push("i");r=e.offset+e.howMany}else if("remove"==e.type){for(let t=0;t<e.howMany;t++)n.push("r");r=e.offset,o+=e.howMany}else n.push(..."a".repeat(e.howMany).split("")),r=e.offset+e.howMany,o+=e.howMany}if(o<e)for(let t=0;t<e-o-r;t++)n.push("e");return n}function gi(e){const t=e.position&&"$graveyard"==e.position.root.rootName,n=e.range&&"$graveyard"==e.range.root.rootName;return!t&&!n}class _i{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set}addOperation(e){this._operations.includes(e)||this._operations.push(e)}getOperations(e=0,t=Number.POSITIVE_INFINITY){return e<0?[]:this._operations.slice(e,t)}getOperation(e){return this._operations[e]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}}function vi(e,t){return function(e){return!!e&&1==e.length&&/[\ud800-\udbff]/.test(e)}(e.charAt(t-1))&&function(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}(e.charAt(t))}function bi(e,t){return function(e){return!!e&&1==e.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e)}(e.charAt(t))}const yi="$graveyard";class wi{constructor(e){this.model=e,this.version=0,this.history=new _i(this),this.selection=new Zo(this),this.roots=new kn({idProperty:"rootName"}),this.differ=new pi(e.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",yi),this.listenTo(e,"applyOperation",(e,t)=>{const n=t[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new _t.b("model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.",this,{operation:n})},{priority:"highest"}),this.listenTo(e,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:"high"}),this.listenTo(e,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&(this.version++,this.history.addOperation(n))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(e,t,n,r)=>{this.differ.bufferMarkerChange(t.name,n,r,t.affectsData),null===n&&t.on("change",(e,n)=>{this.differ.bufferMarkerChange(t.name,n,t.getRange(),t.affectsData)})})}get graveyard(){return this.getRoot(yi)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new _t.b("model-document-createRoot-name-exists: Root with specified name already exists.",this,{name:t});const n=new ii(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,e=>e.rootName).filter(e=>e!=yi)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=Ot(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,n=t.schema,r=t.createPositionFromPath(e,[0]);return n.getNearestSelectionRange(r)||t.createRange(r)}_validateSelectionRange(e){return ki(e.start)&&ki(e.end)}_callPostFixers(e){let t=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),t=n(e))break}while(t)}}function ki(e){const t=e.textNode;if(t){const n=t.data,r=e.offset-t.startOffset;return!vi(n,r)&&!bi(n,r)}return!0}Ct(wi,xt);class xi{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}_set(e,t,n=!1,r=!1){const o=e instanceof Mi?e.name:e,a=this._markers.get(o);if(a){const e=a.getRange();let i=!1;return e.isEqual(t)||(a._attachLiveRange(Xo.fromRange(t)),i=!0),n!=a.managedUsingOperations&&(a._managedUsingOperations=n,i=!0),"boolean"==typeof r&&r!=a.affectsData&&(a._affectsData=r,i=!0),i&&this.fire("update:"+o,a,e,t),a}const i=Xo.fromRange(t),s=new Mi(o,i,n,r);return this._markers.set(o,s),this.fire("update:"+o,s,null,t),s}_remove(e){const t=e instanceof Mi?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire("update:"+t,n,n.getRange(),null),this._destroyMarker(n),!0)}_refresh(e){const t=e instanceof Mi?e.name:e,n=this._markers.get(t);if(!n)throw new _t.b("markercollection-refresh-marker-not-exists: Marker with provided name does not exists.",this);const r=n.getRange();this.fire("update:"+t,n,r,r,n.managedUsingOperations,n.affectsData)}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}Ct(xi,xt);class Mi{constructor(e,t,n,r){this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=n,this._affectsData=r}get managedUsingOperations(){if(!this._liveRange)throw new _t.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new _t.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._affectsData}getStart(){if(!this._liveRange)throw new _t.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new _t.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new _t.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.toRange()}is(e){return"marker"==e||"model:marker"==e}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Ct(Mi,xt);class Ei extends Ho{constructor(e,t,n="toNone"){if(super(e,t,n),!this.root.is("rootElement"))throw new _t.b("model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.",e);(function(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&function(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}.call(this,n)},{priority:"low"})}).call(this)}detach(){this.stopListening()}is(e){return"livePosition"==e||"model:livePosition"==e||super.is(e)}toPosition(){return new Ho(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}Ct(Ei,xt);class Ti{constructor(e,t,n){this.model=e,this.writer=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(e,t){e=Array.from(e);for(let n=0;n<e.length;n++){const r=e[n];this._handleNode(r,{isFirst:0===n&&t.isFirst,isLast:n===e.length-1&&t.isLast})}this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}getSelectionRange(){return this.nodeToSelect?zo._createOn(this.nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new zo(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e,t){this.schema.isObject(e)?this._handleObject(e,t):this._checkAndSplitToAllowedPosition(e,t)?(this._insert(e),this._mergeSiblingsOf(e,t)):this._handleDisallowedNode(e,t)}_handleObject(e,t){this._checkAndSplitToAllowedPosition(e)?this._insert(e):this._tryAutoparagraphing(e,t)}_handleDisallowedNode(e,t){e.is("element")?this.handleNodes(e.getChildren(),t):this._tryAutoparagraphing(e,t)}_insert(e){if(!this.schema.checkChild(this.position,e))throw new _t.b("insertcontent-wrong-position: Given node cannot be inserted on the given position.",this,{node:e,position:this.position});const t=Ei.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this.writer.insert(e,this.position),this.position=t.toPosition(),t.detach(),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this.nodeToSelect=e:this.nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Ei.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Ei.fromPosition(e,"toNext"))}_mergeSiblingsOf(e,t){if(!(e instanceof Yo))return;const n=this._canMergeLeft(e,t),r=this._canMergeRight(e,t),o=Ei._createBefore(e);o.stickiness="toNext";const a=Ei._createAfter(e);if(a.stickiness="toNext",n){const e=Ei.fromPosition(this.position);e.stickiness="toNext",this._affectedStart.isEqual(o)&&(this._affectedStart.detach(),this._affectedStart=Ei._createAt(o.nodeBefore,"end","toPrevious")),this.writer.merge(o),o.isEqual(this._affectedEnd)&&t.isLast&&(this._affectedEnd.detach(),this._affectedEnd=Ei._createAt(o.nodeBefore,"end","toNext")),this.position=e.toPosition(),e.detach()}if(r){if(!this.position.isEqual(a))throw new _t.b("insertcontent-invalid-insertion-position",this);this.position=Ho._createAt(a.nodeBefore,"end");const e=Ei.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(a)&&(this._affectedEnd.detach(),this._affectedEnd=Ei._createAt(a.nodeBefore,"end","toNext")),this.writer.merge(a),a.getShiftedBy(-1).isEqual(this._affectedStart)&&t.isFirst&&(this._affectedStart.detach(),this._affectedStart=Ei._createAt(a.nodeBefore,0,"toPrevious")),this.position=e.toPosition(),e.detach()}(n||r)&&this._filterAttributesOf.push(this.position.parent),o.detach(),a.detach()}_canMergeLeft(e,t){const n=e.previousSibling;return t.isFirst&&n instanceof Yo&&this.canMergeWith.has(n)&&this.model.schema.checkMerge(n,e)}_canMergeRight(e,t){const n=e.nextSibling;return t.isLast&&n instanceof Yo&&this.canMergeWith.has(n)&&this.model.schema.checkMerge(e,n)}_tryAutoparagraphing(e,t){const n=this.writer.createElement("paragraph");this._getAllowedIn(n,this.position.parent)&&this.schema.checkChild(n,e)&&(n._appendChild(e),this._handleNode(n,t))}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(e,this.position.parent);if(!t)return!1;for(;t!=this.position.parent;){if(this.schema.isLimit(this.position.parent))return!1;if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}}return!0}_getAllowedIn(e,t){return this.schema.checkChild(t,e)?t:t.parent?this._getAllowedIn(e,t.parent):null}}function Si(e,t,n){const r=e.createElement("paragraph");e.insert(r,t),Di(e,n,e.createPositionAt(r,0))}function Di(e,t,n){t instanceof Zo?e.setSelection(n):t.setTo(n)}const Li=' ,.?!:;"-()';function Ci(e,t){if("text"==t.type)return"word"===e.unit?function(e,t){let n=e.position.textNode;if(n){let r=e.position.offset-n.startOffset;for(;!Pi(n.data,r,t)&&!Oi(n,r,t);){e.next();const o=t?e.position.nodeAfter:e.position.nodeBefore;if(o&&o.is("text")){const r=o.data.charAt(t?0:o.data.length-1);Li.includes(r)||(e.next(),n=e.position.textNode)}r=e.position.offset-n.startOffset}}return e.position}(e.walker,e.isForward):function(e,t){const n=e.position.textNode;if(n){const r=n.data;let o=e.position.offset-n.startOffset;for(;vi(r,o)||"character"==t&&bi(r,o);)e.next(),o=e.position.offset-n.startOffset}return e.position}(e.walker,e.unit,e.isForward);if(t.type==(e.isForward?"elementStart":"elementEnd")){if(e.schema.isObject(t.item))return Ho._createAt(t.item,e.isForward?"after":"before");if(e.schema.checkChild(t.nextPosition,"$text"))return t.nextPosition}else{if(e.schema.isLimit(t.item))return void e.walker.skip(()=>!0);if(e.schema.checkChild(t.nextPosition,"$text"))return t.nextPosition}}function Pi(e,t,n){const r=t+(n?0:-1);return Li.includes(e.charAt(r))}function Oi(e,t,n){return t===(n?e.endOffset:0)}function Ni(e,t){const n=[];Array.from(e.getItems({direction:"backward"})).map(e=>t.createRangeOn(e)).filter(t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end))).forEach(e=>{n.push(e.start.parent),t.remove(e)}),n.forEach(e=>{let n=e;for(;n.parent&&n.isEmpty;){const e=t.createRangeOn(n);n=n.parent,t.remove(e)}})}function Ai(e,t){return e.isCollapsed?function(e,t){const n=e.start,r=t.getNearestSelectionRange(n);if(!r)return null;const o=r.start;return n.isEqual(o)?null:o.nodeAfter&&t.isLimit(o.nodeAfter)?new zo(o,Ho._createAfter(o.nodeAfter)):new zo(o)}(e,t):function(e,t){const n=e.start,r=e.end,o=t.checkChild(n,"$text"),a=t.checkChild(r,"$text"),i=t.getLimitElement(n),s=t.getLimitElement(r);if(i===s){if(o&&a)return null;if(function(e,t,n){const r=e.nodeAfter&&!n.isLimit(e.nodeAfter)||n.checkChild(e,"$text"),o=t.nodeBefore&&!n.isLimit(t.nodeBefore)||n.checkChild(t,"$text");return r||o}(n,r,t)){const e=n.nodeAfter&&t.isObject(n.nodeAfter)?null:t.getNearestSelectionRange(n,"forward"),o=r.nodeBefore&&t.isObject(r.nodeBefore)?null:t.getNearestSelectionRange(r,"backward"),a=e?e.start:n,i=o?o.start:r;return new zo(a,i)}}const l=i&&!i.is("rootElement"),c=s&&!s.is("rootElement");if(l||c){const e=n.nodeAfter&&r.nodeBefore&&n.nodeAfter.parent===r.nodeBefore.parent,o=l&&(!e||!Ri(n.nodeAfter,t)),a=c&&(!e||!Ri(r.nodeBefore,t));let u=n,d=r;return o&&(u=Ho._createBefore(Ii(i,t))),a&&(d=Ho._createAfter(Ii(s,t))),new zo(u,d)}return null}(e,t)}function Ii(e,t){let n=e,r=n;for(;t.isLimit(r)&&r.parent;)n=r,r=r.parent;return n}function Ri(e,t){return e&&t.isObject(e)}class Yi{constructor(){this.markers=new xi,this.document=new wi(this),this.schema=new xa,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(e=>this.decorate(e)),this.on("applyOperation",(e,t)=>{t[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((e,t)=>{if("$marker"===t.name)return!0}),function(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.selection,r=t.schema,o=[];let a=!1;for(const e of n.getRanges()){const t=Ai(e,r);t?(o.push(t),a=!0):o.push(e)}if(a){let t=o;if(o.length>1){const e=o[0].start,n=o[o.length-1].end;t=[new zo(e,n)]}e.setSelection(t,{backward:n.isBackward})}}(t,e))}(this)}change(e){return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Ha,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}enqueueChange(e,t){"string"==typeof e?e=new Ha(e):"function"==typeof e&&(t=e,e=new Ha),this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}applyOperation(e){e._execute()}insertContent(e,t,n){return function(e,t,n,r){return e.change(o=>{let a;const i=(a=n?n instanceof Go||n instanceof Zo?n:o.createSelection(n,r):e.document.selection).getFirstPosition();a.isCollapsed||e.deleteContent(a,{doNotAutoparagraph:!0});const s=new Ti(e,o,i);let l;l=t.is("documentFragment")?t.getChildren():[t],s.handleNodes(l,{isFirst:!0,isLast:!0});const c=s.getSelectionRange();c&&(a instanceof Zo?o.setSelection(c):a.setTo(c));const u=s.getAffectedRange()||e.createRange(i);return s.destroy(),u})}(this,e,t,n)}deleteContent(e,t){!function(e,t,n={}){if(t.isCollapsed)return;const r=t.getFirstRange();if("$graveyard"==r.root.rootName)return;const o=e.schema;e.change(e=>{if(!n.doNotResetEntireContent&&function(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const r=t.getFirstRange();return r.start.parent!=r.end.parent&&e.checkChild(n,"paragraph")}(o,t))return void function(e,t){const n=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(n)),Si(e,e.createPositionAt(n,0),t)}(e,t);const a=r.start,i=Ei.fromPosition(r.end,"toNext");if(r.start.isTouching(r.end)||e.remove(r),n.leaveUnmerged||(function e(t,n,r){const o=n.parent,a=r.parent;if(o!=a&&!t.model.schema.isLimit(o)&&!t.model.schema.isLimit(a)&&function(e,t,n){const r=new zo(e,t);for(const e of r.getWalker())if(n.isLimit(e.item))return!1;return!0}(n,r,t.model.schema)){for(n=t.createPositionAfter(o),(r=t.createPositionBefore(a)).isEqual(n)||t.insert(a,n),t.merge(n);r.parent.isEmpty;){const e=r.parent;r=t.createPositionBefore(e),t.remove(e)}e(t,n,r)}}(e,a,i),o.removeDisallowedAttributes(a.parent.getChildren(),e)),Di(e,t,a),function(e,t){const n=e.checkChild(t,"$text"),r=e.checkChild(t,"paragraph");return!n&&r}(o,a)){const r=o.getNearestSelectionRange(a);n.doNotAutoparagraph&&r?Di(e,t,r):Si(e,a,t)}i.detach()})}(this,e,t)}modifySelection(e,t){!function(e,t,n={}){const r=e.schema,o="backward"!=n.direction,a=n.unit?n.unit:"character",i=t.focus,s=new jo({boundaries:function(e,t){const n=e.root,r=Ho._createAt(n,t?"end":0);return t?new zo(e,r):new zo(r,e)}(i,o),singleCharacters:!0,direction:o?"forward":"backward"}),l={walker:s,schema:r,isForward:o,unit:a};let c;for(;c=s.next();){if(c.done)return;const n=Ci(l,c.value);if(n)return void(t instanceof Zo?e.change(e=>{e.setSelectionFocus(n)}):t.setFocus(n))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change(e=>{const n=e.createDocumentFragment(),r=t.getFirstRange();if(!r||r.isCollapsed)return n;const o=r.start.root,a=r.start.getCommonPath(r.end),i=o.getNodeByPath(a);let s;const l=(s=r.start.parent==r.end.parent?r:e.createRange(e.createPositionAt(i,r.start.path[a.length]),e.createPositionAt(i,r.end.path[a.length]+1))).end.offset-s.start.offset;for(const t of s.getItems({shallow:!0}))t.is("textProxy")?e.appendText(t.data,t.getAttributes(),n):e.append(t._clone(!0),n);if(s!=r){const t=r._getTransformedByMove(s.start,e.createPositionAt(n,0),l)[0],o=e.createRange(e.createPositionAt(n,0),t.start);Ni(e.createRange(t.end,e.createPositionAt(n,"end")),e),Ni(o,e)}return n})}(this,e)}hasContent(e,t){const n=e instanceof Yo?zo._createIn(e):e;if(n.isCollapsed)return!1;for(const e of this.markers.getMarkersIntersectingRange(n))if(e.affectsData)return!0;const{ignoreWhitespaces:r=!1}=t||{};for(const e of n.getItems())if(e.is("textProxy")){if(!r)return!0;if(-1!==e.data.search(/\S/))return!0}else if(this.schema.isObject(e))return!0;return!1}createPositionFromPath(e,t,n){return new Ho(e,t,n)}createPositionAt(e,t){return Ho._createAt(e,t)}createPositionAfter(e){return Ho._createAfter(e)}createPositionBefore(e){return Ho._createBefore(e)}createRange(e,t){return new zo(e,t)}createRangeIn(e){return zo._createIn(e)}createRangeOn(e){return zo._createOn(e)}createSelection(e,t,n){return new Go(e,t,n)}createBatch(e){return new Ha(e)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new si(this,t);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),e}}Ct(Yi,on);class ji{constructor(){this._listener=Object.create(Sr)}listenTo(e){this._listener.listenTo(e,"keydown",(e,t)=>{this._listener.fire("_keydown:"+jn(t),t)})}set(e,t,n={}){const r=Fn(e),o=n.priority;this._listener.listenTo(this._listener,"_keydown:"+r,(e,n)=>{t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0},{priority:o})}press(e){return!!this._listener.fire("_keydown:"+jn(e),e)}destroy(){this._listener.stopListening()}}class Fi extends ji{constructor(e){super(),this.editor=e}set(e,t,n={}){if("string"==typeof t){const e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}}class Hi{constructor(e){const t=this.constructor.builtinPlugins;this.config=new mt(e,this.constructor.defaultConfig),this.config.define("plugins",t),this.plugins=new ga(this,t),this.commands=new _a;const n=this.config.get("language")||{};this.locale=new ba({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 Yi,this.data=new Ra(this.model),this.editing=new ma(this.model),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Ya([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 Fi(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const e=this.config,t=e.get("plugins")||[],n=e.get("removePlugins")||[],r=e.get("extraPlugins")||[];return this.plugins.init(t.concat(r),n)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise(e=>this.once("ready",e))),e.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(...e){this.commands.execute(...e)}}Ct(Hi,on);var zi={setData(e){this.data.set(e)},getData(e){return this.data.get(e)}},Bi={updateSourceElement(){if(!this.sourceElement)throw new _t.b("editor-missing-sourceelement: Cannot update the source element of a detached editor.",this);!function(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}(this.sourceElement,this.data.get())}};class Ui{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Vi{constructor(){this._domParser=new DOMParser,this._domConverter=new xr({blockFiller:nr}),this._htmlWriter=new Ui}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,"text/html"),n=t.createDocumentFragment(),r=t.body.childNodes;for(;r.length>0;)n.appendChild(r[0]);return n}}class Wi{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){if(this.has(e))throw new _t.b("componentfactory-item-exists: The item already exists in the component factory.",this,{name:e});this._components.set(qi(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new _t.b("componentfactory-item-missing: The required component is not registered in the factory.",this,{name:e});return this._components.get(qi(e)).callback(this.editor.locale)}has(e){return this._components.has(qi(e))}}function qi(e){return String(e).toLowerCase()}class Gi{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new _t.b("focusTracker-add-element-already-exist",this);this.listenTo(e,"focus",()=>this._focus(e),{useCapture:!0}),this.listenTo(e,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}Ct(Gi,Sr),Ct(Gi,on);class Ji{constructor(e){this.editor=e,this.componentFactory=new Wi(e),this.focusTracker=new Gi,this._editableElementsMap=new Map,this.listenTo(e.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}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}}Ct(Ji,xt),n(14);const Ki=new WeakMap;function Qi(e){const{view:t,element:n,text:r,isDirectHost:o=!0}=e,a=t.document;Ki.has(a)||(Ki.set(a,new Map),a.registerPostFixer(e=>Xi(a,e))),Ki.get(a).set(n,{text:r,isDirectHost:o}),t.change(e=>Xi(a,e))}function Xi(e,t){const n=Ki.get(e);let r=!1;for(const[e,o]of n)$i(t,e,o)&&(r=!0);return r}function $i(e,t,n){const{text:r,isDirectHost:o}=n,a=o?t:function(e){if(1===e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement"))return t}return null}(t);let i=!1;return!!a&&(n.hostElement=a,a.getAttribute("data-placeholder")!==r&&(e.setAttribute("data-placeholder",r,a),i=!0),function(e){const t=e.document;if(!t)return!1;const n=!Array.from(e.getChildren()).some(e=>!e.is("uiElement"));if(!t.isFocused&&n)return!0;const r=t.selection.anchor;return!(!n||!r||r.parent===e)}(a)?function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,a)&&(i=!0):function(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}(e,a)&&(i=!0),i)}class Zi{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:t})=>{e.style.display="",t&&t.remove()}),this._replacedElements=[]}}class es extends Ji{constructor(e,t){super(e),this.view=t,this._toolbarConfig=function(e){return Array.isArray(e)?{items:e}:e?Object.assign({items:[]},e):{items:[]}}(e.config.get("toolbar")),this._elementReplacer=new Zi}get element(){return this.view.element}init(e){const t=this.editor,n=this.view,r=t.editing.view,o=n.editable,a=r.document.getRoot();o.name=a.rootName,n.render();const i=o.element;this.setEditableElement(o.name,i),this.focusTracker.add(i),n.editable.bind("isFocused").to(this.focusTracker),r.attachDomRoot(i),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initToolbar(){const e=this.editor,t=this.view,n=e.editing.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,this._toolbarConfig.viewportTopOffset&&(t.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset),t.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),function({origin:e,originKeystrokeHandler:t,originFocusTracker:n,toolbar:r,beforeFocus:o,afterBlur:a}){n.add(r.element),t.set("Alt+F10",(e,t)=>{n.isFocused&&!r.focusTracker.isFocused&&(o&&o(),r.focus(),t())}),r.keystrokes.set("Esc",(t,n)=>{r.focusTracker.isFocused&&(e.focus(),a&&a(),n())})}({origin:n,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:t.toolbar})}_initPlaceholder(){const e=this.editor,t=e.editing.view,n=t.document.getRoot(),r=e.sourceElement,o=e.config.get("placeholder")||r&&"textarea"===r.tagName.toLowerCase()&&r.getAttribute("placeholder");o&&Qi({view:t,element:n,text:o,isDirectHost:!1})}}class ts extends kn{constructor(e){super({idProperty:"viewUid"}),this.on("add",(e,t,n)=>{t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[n])}),this.on("remove",(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this.locale=e,this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e}delegate(...e){if(!e.length||!function(e){return e.every(e=>"string"==typeof e)}(e))throw new _t.b("ui-viewcollection-delegate-wrong-events: All event names must be strings.",this);return{to:t=>{for(const n of this)for(const r of e)n.delegate(r).to(t);this.on("add",(n,r)=>{for(const n of e)r.delegate(n).to(t)}),this.on("remove",(n,r)=>{for(const n of e)r.stopDelegating(n,t)})}}}}class ns{constructor(e){Object.assign(this,ds(us(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new _t.b("ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const n of t.children)gs(n)?yield n:_s(n)&&(yield*e(n))}(this)}static bind(e,t){return{to:(n,r)=>new os({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:r}),if:(n,r,o)=>new as({observable:e,emitter:t,attribute:n,valueIfTrue:r,callback:o})}}static extend(e,t){if(e._isRendered)throw new _t.b("template-extend-render: Attempting to extend a template which has already been rendered.",[this,e]);!function e(t,n){if(n.attributes&&(t.attributes||(t.attributes={}),fs(t.attributes,n.attributes)),n.eventListeners&&(t.eventListeners||(t.eventListeners={}),fs(t.eventListeners,n.eventListeners)),n.text&&t.text.push(...n.text),n.children&&n.children.length){if(t.children.length!=n.children.length)throw new _t.b("ui-template-extend-children-mismatch: The number of children in extended definition does not match.",t);let r=0;for(const o of n.children)e(t.children[r++],o)}}(e,ds(us(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text)throw new _t.b('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.',this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),is(this.text)?this._bindToObservable({schema:this.text,updater:function(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){let t,n,r,o;if(!this.attributes)return;const a=e.node,i=e.revertData;for(t in this.attributes)if(r=a.getAttribute(t),n=this.attributes[t],i&&(i.attributes[t]=r),o=T(n[0])&&n[0].ns?n[0].ns:null,is(n)){const s=o?n[0].value:n;i&&bs(t)&&s.unshift(r),this._bindToObservable({schema:s,updater:ls(a,t,o),data:e})}else"style"==t&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],e):(i&&r&&bs(t)&&n.unshift(r),ms(n=n.map(e=>e&&e.value||e).reduce((e,t)=>e.concat(t),[]).reduce(ps,""))||a.setAttributeNS(o,t,n))}_renderStyleAttribute(e,t){const n=t.node;for(const r in e){const o=e[r];is(o)?this._bindToObservable({schema:[o],updater:cs(n,r),data:t}):n.style[r]=o}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,r=e.isApplying;let o=0;for(const a of this.children)if(vs(a)){if(!r){a.setParent(t);for(const e of a)n.appendChild(e.element)}}else if(gs(a))r||(a.isRendered||a.render(),n.appendChild(a.element));else if(gr(a))n.appendChild(a);else if(r){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),a._renderNode({node:n.childNodes[o++],isApplying:!0,revertData:t})}else n.appendChild(a.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map(n=>{const[r,o]=t.split("@");return n.activateDomEventListener(r,o,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const r=n.revertData;ss(e,t,n);const o=e.filter(e=>!ms(e)).filter(e=>e.observable).map(r=>r.activateAttributeListener(e,t,n));r&&r.bindings.push(o)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)e.textContent=t.text;else{for(const n in t.attributes){const r=t.attributes[n];null===r?e.removeAttribute(n):e.setAttribute(n,r)}for(let n=0;n<t.children.length;++n)this._revertTemplateFromNode(e.childNodes[n],t.children[n])}}}Ct(ns,xt);class rs{constructor(e){Object.assign(this,e)}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,n){const r=()=>ss(e,t,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,r),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,r)}}}class os extends rs{activateDomEventListener(e,t,n){const r=(e,n)=>{t&&!n.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,r),()=>{this.emitter.stopListening(n.node,e,r)}}}class as extends rs{getValue(e){return!ms(super.getValue(e))&&(this.valueIfTrue||!0)}}function is(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(is):e instanceof rs)}function ss(e,t,{node:n}){let r=function(e,t){return e.map(e=>e instanceof rs?e.getValue(t):e)}(e,n);ms(r=1==e.length&&e[0]instanceof as?r[0]:r.reduce(ps,""))?t.remove():t.set(r)}function ls(e,t,n){return{set(r){e.setAttributeNS(n,t,r)},remove(){e.removeAttributeNS(n,t)}}}function cs(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function us(e){return pt(e,e=>{if(e&&(e instanceof rs||_s(e)||gs(e)||vs(e)))return e})}function ds(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){Array.isArray(e.text)||(e.text=[e.text])}(e),e.on&&(e.eventListeners=function(e){for(const t in e)hs(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),hs(e,t)}(e.attributes);const t=[];if(e.children)if(vs(e.children))t.push(e.children);else for(const n of e.children)_s(n)||gs(n)||gr(n)?t.push(n):t.push(new ns(n));e.children=t}return e}function hs(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function ps(e,t){return ms(t)?e:ms(e)?t:`${e} ${t}`}function fs(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function ms(e){return!e&&0!==e}function gs(e){return e instanceof ys}function _s(e){return e instanceof ns}function vs(e){return e instanceof ts}function bs(e){return"class"==e||"style"==e}n(16);class ys{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new kn,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,n)=>{n.locale=e}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=ns.bind(this,this)}createCollection(){const e=new ts;return this._viewCollections.add(e),e}registerChild(e){Yt(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){Yt(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new ns(e)}extendTemplate(e){ns.extend(this.template,e)}render(){if(this.isRendered)throw new _t.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(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}Ct(ys,Sr),Ct(ys,on),n(18);class ws extends ys{constructor(e){super(e),this.body=this.createCollection()}render(){super.render(),this._renderBodyCollection()}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const e=this.locale,t=this._bodyCollectionContainer=new ns({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:e.uiLanguageDirection},children:this.body}).render();document.body.appendChild(t)}}n(20);class ks extends ys{constructor(e){super(e),this.set("text"),this.set("for");const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],for:t.to("for")},children:[{text:t.to("text")}]})}}class xs extends ws{constructor(e){super(e);const t=bt();this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":"ck-editor__aria-label_"+t},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(e){const t=this.t,n=new ks;return n.text=t("bn"),n.extendTemplate({attributes:{id:"ck-editor__aria-label_"+e,class:"ck-voice-label"}}),n}}class Ms extends ys{constructor(e,t,n){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=t}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 e=this._editingView;function t(t){e.change(n=>{const r=e.document.getRoot(t.name);n.addClass(t.isFocused?"ck-focused":"ck-blurred",r),n.removeClass(t.isFocused?"ck-blurred":"ck-focused",r)})}e.isRenderingInProgress?function n(r){e.once("change:isRenderingInProgress",(e,o,a)=>{a?n(r):t(r)})}(this):t(this)}}class Es extends Ms{constructor(e,t,n){super(e,t,n),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView,t=this.t;e.change(n=>{const r=e.document.getRoot(this.name);n.setAttribute("aria-label",t("bm",[this.name]),r)})}}function Ts(e){return t=>t+e}n(22);const Ss=Ts("px");class Ds extends ys{constructor(e){super(e);const t=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 ns({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",e=>e?"block":"none"),height:t.to("isSticky",e=>e?Ss(this._panelRect.height):null)}}}).render(),this._contentPanel=new ns({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",e=>e?Ss(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_hasViewportTopOffset",e=>e?Ss(this.viewportTopOffset):null),bottom:t.to("_isStickyToTheLimiter",e=>e?Ss(this.limiterBottomOffset):null),marginLeft:t.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(yr.window,"scroll",()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,"change:isActive",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top<this.viewportTopOffset&&this._panelRect.height+this.limiterBottomOffset<t.height):this.isSticky=!1,this.isSticky?(this._isStickyToTheLimiter=t.bottom<e.height+this.limiterBottomOffset+this.viewportTopOffset,this._hasViewportTopOffset=!this._isStickyToTheLimiter&&!!this.viewportTopOffset,this._marginLeft=this._isStickyToTheLimiter?null:Ss(-yr.window.scrollX)):(this._isStickyToTheLimiter=!1,this._hasViewportTopOffset=!1,this._marginLeft=null)}}class Ls{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let n=e.actions[t];"string"==typeof n&&(n=[n]);for(const r of n)e.keystrokeHandler.set(r,(e,n)=>{this[t](),n()})}}get first(){return this.focusables.find(Cs)||null}get last(){return this.focusables.filter(Cs).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,n)=>{const r=t.element===this.focusTracker.focusedElement;return r&&(e=n),r}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,n=this.focusables.length;if(!n)return null;if(null===t)return this[1===e?"first":"last"];let r=(t+n+e)%n;do{const t=this.focusables.get(r);if(Cs(t))return t;r=(r+n+e)%n}while(r!==t);return null}}function Cs(e){return!(!e.focus||"none"==yr.window.getComputedStyle(e.element).display)}class Ps extends ys{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}n(24);class Os extends ys{constructor(e){super(e);const t=this.bindTemplate,n=this.t;this.set("ariaLabel",n("bl")),this.items=this.createCollection(),this.focusTracker=new Gi,this.keystrokes=new ji,this.set("isVertical",!1),this.set("class"),this._focusCycler=new Ls({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",t.if("isVertical","ck-toolbar_vertical"),t.to("class")],role:"toolbar","aria-label":t.to("ariaLabel")},children:this.items,on:{mousedown:function(e){return e.bindTemplate.to(t=>{t.target===e.element&&t.preventDefault()})}(this)}})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t){e.map(e=>{"|"==e?this.items.add(new Ps):t.has(e)?this.items.add(t.create(e)):console.warn(Object(_t.a)("toolbarview-item-unavailable: The requested toolbar item is unavailable."),{name:e})})}}n(26);class Ns extends xs{constructor(e,t){super(e),this.stickyPanel=new Ds(e),this.toolbar=new Os(e),this.editable=new Es(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class As extends Hi{constructor(e,t){super(t),ft(e)&&(this.sourceElement=e),this.data.processor=new Vi,this.model.document.createRoot(),this.ui=new es(this,new Ns(this.locale,this.editing.view)),function(e){if(!S(e.updateSourceElement))throw new _t.b("attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.",e);const t=e.sourceElement;if(t&&"textarea"===t.tagName.toLowerCase()&&t.form){let n;const r=t.form,o=()=>e.updateSourceElement();S(r.submit)&&(n=r.submit,r.submit=()=>{o(),n.apply(r)}),r.addEventListener("submit",o),e.on("destroy",()=>{r.removeEventListener("submit",o),n&&(r.submit=n)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise(n=>{const r=new this(e,t);n(r.initPlugins().then(()=>r.ui.init(ft(e)?e:null)).then(()=>{if(!ft(e)&&t.initialData)throw new _t.b("editor-create-initial-data: The config.initialData option cannot be used together with initial data passed in Editor.create().",null);const n=t.initialData||function(e){return ft(e)?function(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}(e):e}(e);return r.data.init(n)}).then(()=>r.fire("ready")).then(()=>r))})}}Ct(As,zi),Ct(As,Bi);class Is{constructor(e){this.editor=e}destroy(){this.stopListening()}}Ct(Is,on);class Rs{constructor(e){this.files=function(e){const t=e.files?Array.from(e.files):[],n=e.items?Array.from(e.items):[];return t.length?t:n.filter(e=>"file"===e.kind).map(e=>e.getAsFile())}(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}}class Ys extends Qr{constructor(e){super(e);const t=this.document;function n(e,n){n.preventDefault();const r=n.dropRange?[n.dropRange]:Array.from(t.selection.getRanges()),o=new vt(t,"clipboardInput");t.fire(o,{dataTransfer:n.dataTransfer,targetRanges:r}),o.stop.called&&n.stopPropagation()}this.domEventType=["paste","copy","cut","drop","dragover"],this.listenTo(t,"paste",n,{priority:"low"}),this.listenTo(t,"drop",n,{priority:"low"})}onDomEvent(e){const t={dataTransfer:new Rs(e.clipboardData?e.clipboardData:e.dataTransfer)};"drop"==e.type&&(t.dropRange=function(e,t){const n=t.target.ownerDocument,r=t.clientX,o=t.clientY;let a;return n.caretRangeFromPoint&&n.caretRangeFromPoint(r,o)?a=n.caretRangeFromPoint(r,o):t.rangeParent&&((a=n.createRange()).setStart(t.rangeParent,t.rangeOffset),a.collapse(!0)),a?e.domConverter.domRangeToView(a):e.document.selection.getFirstRange()}(this.view,e)),this.fire(e.type,e,t)}}const js=["figcaption","li"];class Fs extends Is{static get pluginName(){return"Clipboard"}init(){const e=this.editor,t=e.model.document,n=e.editing.view,r=n.document;function o(n,o){const a=o.dataTransfer;o.preventDefault();const i=e.data.toView(e.model.getSelectedContent(t.selection));r.fire("clipboardOutput",{dataTransfer:a,content:i,method:n.name})}this._htmlDataProcessor=new Vi,n.addObserver(Ys),this.listenTo(r,"clipboardInput",t=>{e.isReadOnly&&t.stop()},{priority:"highest"}),this.listenTo(r,"clipboardInput",(e,t)=>{const r=t.dataTransfer;let o="";r.getData("text/html")?o=function(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,t)=>1==t.length?" ":t)}(r.getData("text/html")):r.getData("text/plain")&&(o=function(e){return(e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"</p><p>").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;")).indexOf("</p><p>")>-1&&(e=`<p>${e}</p>`),e}(r.getData("text/plain"))),o=this._htmlDataProcessor.toView(o),this.fire("inputTransformation",{content:o,dataTransfer:r}),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(e,t)=>{if(!t.content.isEmpty){const e=this.editor.data,n=this.editor.model,r=e.toModel(t.content,"$clipboardHolder");if(0==r.childCount)return;n.insertContent(r)}},{priority:"low"}),this.listenTo(r,"copy",o,{priority:"low"}),this.listenTo(r,"cut",(t,n)=>{e.isReadOnly?n.preventDefault():o(t,n)},{priority:"low"}),this.listenTo(r,"clipboardOutput",(n,r)=>{r.content.isEmpty||(r.dataTransfer.setData("text/html",this._htmlDataProcessor.toData(r.content)),r.dataTransfer.setData("text/plain",function e(t){let n="";if(t.is("text")||t.is("textProxy"))n=t.data;else if(t.is("img")&&t.hasAttribute("alt"))n=t.getAttribute("alt");else{let r=null;for(const o of t.getChildren()){const t=e(o);r&&(r.is("containerElement")||o.is("containerElement"))&&(js.includes(r.name)||js.includes(o.name)?n+="\n":n+="\n\n"),n+=t,r=o}}return n}(r.content))),"cut"==r.method&&e.model.deleteContent(t.selection)},{priority:"low"})}}class Hs{constructor(e){this.editor=e,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",e=>{this.isEnabled||e.stop()},{priority:"high"}),this.listenTo(e,"change:isReadOnly",(e,t,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",zs,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",zs),this.refresh())}execute(){}destroy(){this.stopListening()}}function zs(e){e.return=!1,e.stop()}function*Bs(e,t){for(const n of t)n&&e.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}Ct(Hs,on);class Us extends Hs{execute(){const e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n,r){const o=n.isCollapsed,a=n.getFirstRange(),i=a.start.parent,s=a.end.parent;if(r.isLimit(i)||r.isLimit(s))o||i!=s||e.deleteContent(n);else if(o){const e=Bs(t.model.schema,n.getAttributes());Vs(t,a.start),t.setSelectionAttribute(e)}else{const r=!(a.start.isAtStart&&a.end.isAtEnd),o=i==s;e.deleteContent(n,{leaveUnmerged:r}),r&&(o?Vs(t,n.focus):t.setSelection(s,0))}}(this.editor.model,n,t.selection,e.schema),this.fire("afterExecute",{writer:n})})}}function Vs(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}class Ws extends Cr{constructor(e){super(e);const t=this.document;t.on("keydown",(e,n)=>{if(this.isEnabled&&n.keyCode==Yn.enter){let r;t.once("enter",e=>r=e,{priority:"highest"}),t.fire("enter",new Kr(t,n.domEvent,{isSoft:n.shiftKey})),r&&r.stop.called&&e.stop()}})}observe(){}}class qs extends Is{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(Ws),e.commands.add("enter",new Us(e)),this.listenTo(n,"enter",(n,r)=>{r.preventDefault(),r.isSoft||(e.execute("enter"),t.scrollToTheSelection())},{priority:"low"})}}class Gs extends Hs{execute(){const e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n){const r=n.isCollapsed,o=n.getFirstRange(),a=o.start.parent,i=o.end.parent,s=a==i;if(r){const r=Bs(e.schema,n.getAttributes());Js(t,o.end),t.removeSelectionAttribute(n.getAttributeKeys()),t.setSelectionAttribute(r)}else{const r=!(o.start.isAtStart&&o.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:r}),s?Js(t,n.focus):r&&t.setSelection(i,0)}}(e,n,t.selection),this.fire("afterExecute",{writer:n})})}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const n=t.anchor;if(!n||!e.checkChild(n,"softBreak"))return!1;const r=t.getFirstRange(),o=r.start.parent,a=r.end.parent;return!Ks(o,e)&&!Ks(a,e)||o===a}(e.schema,t.selection)}}function Js(e,t){const n=e.createElement("softBreak");e.insert(n,t),e.setSelection(n,"after")}function Ks(e,t){return!e.is("rootElement")&&(t.isLimit(e)||Ks(e.parent,t))}class Qs extends Is{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,n=e.conversion,r=e.editing.view,o=r.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(e,t)=>t.createEmptyElement("br")}),r.addObserver(Ws),e.commands.add("shiftEnter",new Gs(e)),this.listenTo(o,"enter",(t,n)=>{n.preventDefault(),n.isSoft&&(e.execute("shiftEnter"),r.scrollToTheSelection())},{priority:"low"})}}class Xs{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{"transparent"!=t.type&&t!==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(e){this.size+=e,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(e){this.isLocked&&!e||(this._batch=null,this.size=0)}}class $s extends Hs{constructor(e,t){super(e),this._buffer=new Xs(e.model,t),this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,r=e.text||"",o=r.length,a=e.range||n.selection.getFirstRange(),i=e.resultRange;t.enqueueChange(this._buffer.batch,e=>{const s=a.isCollapsed;this._buffer.lock(),t.deleteContent(t.createSelection(a)),r&&t.insertContent(e.createText(r,n.selection.getAttributes()),a.start),i?e.setSelection(i):s&&e.setSelection(a.start.getShiftedBy(o)),this._buffer.unlock(),this._buffer.input(o),this._batches.add(this._buffer.batch)})}}const Zs=[jn("arrowUp"),jn("arrowRight"),jn("arrowDown"),jn("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 e=112;e<=135;e++)Zs.push(e);function el(e){if(e.newChildren.length-e.oldChildren.length!=1)return;const t=function(e,t){const n=[];let r,o=0;return e.forEach(e=>{"equal"==e?(a(),o++):"insert"==e?(i("insert")?r.values.push(t[o]):(a(),r={type:"insert",index:o,values:[t[o]]}),o++):i("delete")?r.howMany++:(a(),r={type:"delete",index:o,howMany:1})}),a(),n;function a(){r&&(n.push(r),r=null)}function i(e){return r&&r.type==e}}(pr(e.oldChildren,e.newChildren,tl),e.newChildren);if(t.length>1)return;const n=t[0];return n.values[0]&&n.values[0].is("text")?n:void 0}function tl(e,t){return e&&e.is("text")&&t&&t.is("text")?e.data===t.data:e===t}class nl{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(function(e){if(0==e.length)return!1;for(const t of e)if("children"===t.type&&!el(t))return!0;return!1}(e))this._handleContainerChildrenMutations(e,t);else for(const n of e)this._handleTextMutation(n,t),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(e,t){const n=function(e){const t=e.map(e=>e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));if(t)return t.getAncestors({includeSelf:!0,parentFirst:!0}).find(e=>e.is("containerElement")||e.is("rootElement"))}(e);if(!n)return;const r=this.editor.editing.view.domConverter.mapViewToDom(n),o=new xr,a=this.editor.data.toModel(o.domToView(r)).getChild(0),i=this.editor.editing.mapper.toModelElement(n);if(!i)return;const s=Array.from(a.getChildren()),l=Array.from(i.getChildren()),c=s[s.length-1],u=l[l.length-1];c&&c.is("softBreak")&&u&&!u.is("softBreak")&&s.pop();const d=this.editor.model.schema;if(!rl(s,d)||!rl(l,d))return;const h=s.map(e=>e.is("text")?e.data:"@").join("").replace(/\u00A0/g," "),p=l.map(e=>e.is("text")?e.data:"@").join("").replace(/\u00A0/g," ");if(p===h)return;const f=pr(p,h),{firstChangeAt:m,insertions:g,deletions:_}=ol(f);let v=null;t&&(v=this.editing.mapper.toModelRange(t.getFirstRange()));const b=h.substr(m,g),y=this.editor.model.createRange(this.editor.model.createPositionAt(i,m),this.editor.model.createPositionAt(i,m+_));this.editor.execute("input",{text:b,range:y,resultRange:v})}_handleTextMutation(e,t){if("text"!=e.type)return;const n=e.newText.replace(/\u00A0/g," "),r=e.oldText.replace(/\u00A0/g," ");if(r===n)return;const o=pr(r,n),{firstChangeAt:a,insertions:i,deletions:s}=ol(o);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const c=this.editing.view.createPositionAt(e.node,a),u=this.editing.mapper.toModelPosition(c),d=this.editor.model.createRange(u,u.getShiftedBy(s)),h=n.substr(a,i);this.editor.execute("input",{text:h,range:d,resultRange:l})}_handleTextNodeInsertion(e){if("children"!=e.type)return;const t=el(e),n=this.editing.view.createPositionAt(e.node,t.index),r=this.editing.mapper.toModelPosition(n),o=t.values[0].data;this.editor.execute("input",{text:o.replace(/\u00A0/g," "),range:this.editor.model.createRange(r)})}}function rl(e,t){return e.every(e=>t.isInline(e))}function ol(e){let t=null,n=null;for(let r=0;r<e.length;r++)"equal"!=e[r]&&(t=null===t?r:t,n=r);let r=0,o=0;for(let a=t;a<=n;a++)"insert"!=e[a]&&r++,"delete"!=e[a]&&o++;return{insertions:o,deletions:r,firstChangeAt:t}}class al extends Is{static get pluginName(){return"Input"}init(){const e=this.editor,t=new $s(e,e.config.get("typing.undoStep")||20);e.commands.add("input",t),function(e){let t=null;const n=e.model,r=e.editing.view,o=e.commands.get("input");function a(e){const a=n.document,s=r.document.isComposing,l=t&&t.isEqual(a.selection);t=null,o.isEnabled&&(function(e){return!!e.ctrlKey||Zs.includes(e.keyCode)}(e)||a.selection.isCollapsed||s&&229===e.keyCode||!s&&229===e.keyCode&&l||i())}function i(){const e=o.buffer;e.lock(),n.enqueueChange(e.batch,()=>{n.deleteContent(n.document.selection)}),e.unlock()}An?r.document.on("beforeinput",(e,t)=>a(t),{priority:"lowest"}):r.document.on("keydown",(e,t)=>a(t),{priority:"lowest"}),r.document.on("compositionstart",(function(){const e=n.document,t=1!==e.selection.rangeCount||e.selection.getFirstRange().isFlat;e.selection.isCollapsed||t||i()}),{priority:"lowest"}),r.document.on("compositionend",()=>{t=n.createSelection(n.document.selection)},{priority:"lowest"})}(e),function(e){e.editing.view.document.on("mutations",(t,n,r)=>{new nl(e).handle(n,r)})}(e)}isInput(e){return this.editor.commands.get("input")._batches.has(e)}}class il extends Hs{constructor(e,t){super(e),this.direction=t,this._buffer=new Xs(e.model,e.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,r=>{this._buffer.lock();const o=r.createSelection(e.selection||n.selection),a=o.isCollapsed;if(o.isCollapsed&&t.modifySelection(o,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(e.sequence||1))return void this._replaceEntireContentWithParagraph(r);if(o.isCollapsed)return;let i=0;o.getFirstRange().getMinimalFlatRanges().forEach(e=>{i+=bn(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(o,{doNotResetEntireContent:a}),this._buffer.input(i),r.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,n=t.document.selection,r=t.schema.getLimitElement(n);if(!n.isCollapsed||!n.containsEntireContent(r))return!1;if(!t.schema.checkChild(r,"paragraph"))return!1;const o=r.getChild(0);return!o||"paragraph"!==o.name}_replaceEntireContentWithParagraph(e){const t=this.editor.model,n=t.document.selection,r=t.schema.getLimitElement(n),o=e.createElement("paragraph");e.remove(e.createRangeIn(r)),e.insert(o,r),e.setSelection(o,0)}}class sl extends Cr{constructor(e){super(e);const t=e.document;let n=0;function r(e,n,r){let o;t.once("delete",e=>o=e,{priority:Number.POSITIVE_INFINITY}),t.fire("delete",new Kr(t,n,r)),o&&o.stop.called&&e.stop()}t.on("keyup",(e,t)=>{t.keyCode!=Yn.delete&&t.keyCode!=Yn.backspace||(n=0)}),t.on("keydown",(e,t)=>{const o={};if(t.keyCode==Yn.delete)o.direction="forward",o.unit="character";else{if(t.keyCode!=Yn.backspace)return;o.direction="backward",o.unit="codePoint"}const a=Cn?t.altKey:t.ctrlKey;o.unit=a?"word":o.unit,o.sequence=++n,r(e,t.domEvent,o)}),An&&t.on("beforeinput",(t,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;const o={unit:"codepoint",direction:"backward",sequence:1},a=n.domTarget.ownerDocument.defaultView.getSelection();a.anchorNode==a.focusNode&&a.anchorOffset+1!=a.focusOffset&&(o.selectionToRemove=e.domConverter.domSelectionToView(a)),r(t,n.domEvent,o)})}observe(){}}class ll extends Is{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,n=t.document;if(t.addObserver(sl),e.commands.add("forwardDelete",new il(e,"forward")),e.commands.add("delete",new il(e,"backward")),this.listenTo(n,"delete",(n,r)=>{const o={unit:r.unit,sequence:r.sequence};if(r.selectionToRemove){const t=e.model.createSelection(),n=[];for(const t of r.selectionToRemove.getRanges())n.push(e.editing.mapper.toModelRange(t));t.setTo(n),o.selection=t}e.execute("forward"==r.direction?"forwardDelete":"delete",o),r.preventDefault(),t.scrollToTheSelection()}),An){let e=null;this.listenTo(n,"delete",(t,n)=>{const r=n.domTarget.ownerDocument.defaultView.getSelection();e={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}},{priority:"lowest"}),this.listenTo(n,"keyup",(t,n)=>{if(e){const t=n.domTarget.ownerDocument.defaultView.getSelection();t.collapse(e.anchorNode,e.anchorOffset),t.extend(e.focusNode,e.focusOffset),e=null}})}}}class cl extends Is{static get requires(){return[al,ll]}static get pluginName(){return"Typing"}}class ul extends za{get type(){return"noop"}clone(){return new ul(this.baseVersion)}getReversed(){return new ul(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const dl=new Map;function hl(e,t,n){let r=dl.get(e);r||(r=new Map,dl.set(e,r)),r.set(t,n)}function pl(e){return[e]}function fl(e,t,n={}){const r=function(e,t){const n=dl.get(e);return n&&n.has(t)?n.get(t):pl}(e.constructor,t.constructor);try{return r(e=e.clone(),t,n)}catch(e){throw e}}function ml(e,t,n){e=e.slice(),t=t.slice();const r=new gl(n.document,n.useRelations,n.forceWeakRemove);r.setOriginalOperations(e),r.setOriginalOperations(t);const o=r.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:o};const a=new WeakMap;for(const t of e)a.set(t,0);const i={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let s=0;for(;s<e.length;){const n=e[s],o=a.get(n);if(o==t.length){s++;continue}const i=t[o],l=fl(n,i,r.getContext(n,i,!0)),c=fl(i,n,r.getContext(i,n,!1));r.updateRelation(n,i),r.setOriginalOperations(l,n),r.setOriginalOperations(c,i);for(const e of l)a.set(e,o+c.length);e.splice(s,1,...l),t.splice(o,1,...c)}if(n.padWithNoOps){const n=e.length-i.originalOperationsACount,r=t.length-i.originalOperationsBCount;vl(e,r-n),vl(t,n-r)}return _l(e,i.nextBaseVersionB),_l(t,i.nextBaseVersionA),{operationsA:e,operationsB:t,originalOperations:o}}class gl{constructor(e,t,n=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!n,this._relations=new Map}setOriginalOperations(e,t=null){const n=t?this.originalOperations.get(t):null;for(const t of e)this.originalOperations.set(t,n||t)}updateRelation(e,t){switch(e.constructor){case Za:switch(t.constructor){case oi:e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter");break;case Za:e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter")}break;case ai:switch(t.constructor){case oi:e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");break;case Za:(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))&&this._setRelation(e,t,"splitBefore")}break;case oi:switch(t.constructor){case oi:e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement");break;case ai:e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource")}break;case ti:{const n=e.newRange;if(!n)return;switch(t.constructor){case Za:{const r=zo._createFromPositionAndShift(t.sourcePosition,t.howMany),o=r.containsPosition(n.start)||r.start.isEqual(n.start),a=r.containsPosition(n.end)||r.end.isEqual(n.end);!o&&!a||r.containsRange(n)||this._setRelation(e,t,{side:o?"left":"right",path:o?n.start.path.slice():n.end.path.slice()});break}case oi:{const r=n.start.isEqual(t.targetPosition),o=n.start.isEqual(t.deletionPosition),a=n.end.isEqual(t.deletionPosition),i=n.end.isEqual(t.sourcePosition);(r||o||a||i)&&this._setRelation(e,t,{wasInLeftElement:r,wasStartBeforeMergedElement:o,wasEndBeforeMergedElement:a,wasInRightElement:i});break}}break}}}getContext(e,t,n){return{aIsStrong:n,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const n=this.originalOperations.get(t),r=this._history.getUndoneOperation(n);if(!r)return null;const o=this.originalOperations.get(e),a=this._relations.get(o);return a&&a.get(r)||null}_setRelation(e,t,n){const r=this.originalOperations.get(e),o=this.originalOperations.get(t);let a=this._relations.get(r);a||(a=new Map,this._relations.set(r,a)),a.set(o,n)}}function _l(e,t){for(const n of e)n.baseVersion=t++}function vl(e,t){for(let n=0;n<t;n++)e.push(new ul(0))}function bl(e,t,n){const r=e.nodes.getNode(0).getAttribute(t);if(r==n)return null;const o=new zo(e.position,e.position.getShiftedBy(e.howMany));return new Xa(o,t,r,n,0)}function yl(e,t){return null===e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)}function wl(e,t){const n=[];for(let r=0;r<e.length;r++){const o=e[r],a=new Za(o.start,o.end.offset-o.start.offset,t,0);n.push(a);for(let t=r+1;t<e.length;t++)e[t]=e[t]._getTransformedByMove(a.sourcePosition,a.targetPosition,a.howMany)[0];t=t._getTransformedByMove(a.sourcePosition,a.targetPosition,a.howMany)}return n}hl(Xa,Xa,(e,t,n)=>{if(e.key===t.key){const r=e.range.getDifference(t.range).map(t=>new Xa(t,e.key,e.oldValue,e.newValue,0)),o=e.range.getIntersection(t.range);return o&&n.aIsStrong&&r.push(new Xa(o,t.key,t.newValue,e.newValue,0)),0==r.length?[new ul(0)]:r}return[e]}),hl(Xa,ei,(e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const n=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map(t=>new Xa(t,e.key,e.oldValue,e.newValue,e.baseVersion));if(t.shouldReceiveAttributes){const r=bl(t,e.key,e.oldValue);r&&n.unshift(r)}return n}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]}),hl(Xa,oi,(e,t)=>{const n=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&n.push(zo._createFromPositionAndShift(t.graveyardPosition,1));const r=e.range._getTransformedByMergeOperation(t);return r.isCollapsed||n.push(r),n.map(t=>new Xa(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),hl(Xa,Za,(e,t)=>function(e,t){const n=zo._createFromPositionAndShift(t.sourcePosition,t.howMany);let r=null,o=[];n.containsRange(e,!0)?r=e:e.start.hasSameParentAs(n.start)?(o=e.getDifference(n),r=e.getIntersection(n)):o=[e];const a=[];for(let e of o){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const n=t.getMovedRangeStart(),r=e.start.hasSameParentAs(n);e=e._getTransformedByInsertion(n,t.howMany,r),a.push(...e)}return r&&a.push(r._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]),a}(e.range,t).map(t=>new Xa(t,e.key,e.oldValue,e.newValue,e.baseVersion))),hl(Xa,ai,(e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const n=e.clone();return n.range=new zo(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,n]}return e.range=e.range._getTransformedBySplitOperation(t),[e]}),hl(ei,Xa,(e,t)=>{const n=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const r=bl(e,t.key,t.newValue);r&&n.push(r)}return n}),hl(ei,ei,(e,t,n)=>(e.position.isEqual(t.position)&&n.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e])),hl(ei,Za,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),hl(ei,ai,(e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e])),hl(ei,oi,(e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e])),hl(ti,ei,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e])),hl(ti,ti,(e,t,n)=>{if(e.name==t.name){if(!n.aIsStrong)return[new ul(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]}),hl(ti,oi,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e])),hl(ti,Za,(e,t,n)=>{if(e.oldRange&&(e.oldRange=zo._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(n.abRelation){const r=zo._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.start.path=n.abRelation.path,e.newRange.end=r.end,[e];if("right"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=r.start,e.newRange.end.path=n.abRelation.path,[e]}e.newRange=zo._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]}),hl(ti,ai,(e,t,n)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(n.abRelation){const r=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?e.newRange.start=Ho._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!n.abRelation.wasInLeftElement&&(e.newRange.start=Ho._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasInRightElement?e.newRange.end=Ho._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?e.newRange.end=Ho._createAt(t.insertionPosition):e.newRange.end=r.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]}),hl(oi,ei,(e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e])),hl(oi,oi,(e,t,n)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(n.bWasUndone){const n=t.graveyardPosition.path.slice();return n.push(0),e.sourcePosition=new Ho(t.graveyardPosition.root,n),e.howMany=0,[e]}return[new ul(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const r="$graveyard"==e.targetPosition.root.rootName,o="$graveyard"==t.targetPosition.root.rootName;if(o&&!r||(!r||o)&&n.aIsStrong){const n=t.targetPosition._getTransformedByMergeOperation(t),r=e.targetPosition._getTransformedByMergeOperation(t);return[new Za(n,e.howMany,r,0)]}return[new ul(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&n.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),hl(oi,Za,(e,t,n)=>{const r=zo._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!n.bWasUndone&&!n.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&r.containsPosition(e.sourcePosition)?[new ul(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])}),hl(oi,ai,(e,t,n)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const r=0!=t.howMany,o=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(r||o||"mergeTargetNotMoved"==n.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==n.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}),hl(Za,ei,(e,t)=>{const n=zo._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=n.start,e.howMany=n.end.offset-n.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]}),hl(Za,Za,(e,t,n)=>{const r=zo._createFromPositionAndShift(e.sourcePosition,e.howMany),o=zo._createFromPositionAndShift(t.sourcePosition,t.howMany);let a,i=n.aIsStrong,s=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?s=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(s=!1),a=e.targetPosition.isEqual(t.targetPosition)&&s?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),yl(e,t)&&yl(t,e))return[t.getReversed()];if(r.containsPosition(t.targetPosition)&&r.containsRange(o,!0))return r.start=r.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),r.end=r.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),wl([r],a);if(o.containsPosition(e.targetPosition)&&o.containsRange(r,!0))return r.start=r.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),r.end=r.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),wl([r],a);const l=Pt(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return r.start=r.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),r.end=r.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),wl([r],a);"remove"!=e.type||"remove"==t.type||n.aWasUndone||n.forceWeakRemove?"remove"==e.type||"remove"!=t.type||n.bWasUndone||n.forceWeakRemove||(i=!1):i=!0;const c=[],u=r.getDifference(o);for(const e of u){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const n="same"==Pt(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),r=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,n);c.push(...r)}const d=r.getIntersection(o);return null!==d&&i&&(d.start=d.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),d.end=d.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(d):1==c.length?o.start.isBefore(r.start)||o.start.isEqual(r.start)?c.unshift(d):c.push(d):c.splice(1,0,d)),0===c.length?[new ul(e.baseVersion)]:wl(c,a)}),hl(Za,ai,(e,t,n)=>{let r=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(r=e.targetPosition._getTransformedBySplitOperation(t));const o=zo._createFromPositionAndShift(e.sourcePosition,e.howMany);if(o.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=r,[e];if(o.start.hasSameParentAs(t.splitPosition)&&o.containsPosition(t.splitPosition)){let e=new zo(t.splitPosition,o.end);return e=e._getTransformedBySplitOperation(t),wl([new zo(o.start,t.splitPosition),e],r)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==n.abRelation&&(r=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==n.abRelation&&(r=e.targetPosition);const a=[o._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const r=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);e.howMany>1&&r&&!n.aWasUndone&&a.push(zo._createFromPositionAndShift(t.insertionPosition,1))}return wl(a,r)}),hl(Za,oi,(e,t,n)=>{const r=zo._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&r.containsPosition(t.sourcePosition))if("remove"!=e.type||n.forceWeakRemove){if(1==e.howMany)return n.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new ul(0)]}else if(!n.aWasUndone){const n=[];let r=t.graveyardPosition.clone(),o=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(n.push(new Za(e.sourcePosition,e.howMany-1,e.targetPosition,0)),r=r._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const a=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),i=new Za(r,1,a,0),s=i.getMovedRangeStart().path.slice();s.push(0);const l=new Ho(i.targetPosition.root,s);o=o._getTransformedByMove(r,a,1);const c=new Za(o,t.howMany,l,0);return n.push(i),n.push(c),n}const o=zo._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]}),hl(ni,ei,(e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e])),hl(ni,oi,(e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e])),hl(ni,Za,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),hl(ni,ni,(e,t,n)=>{if(e.position.isEqual(t.position)){if(!n.aIsStrong)return[new ul(0)];e.oldName=t.newName}return[e]}),hl(ni,ai,(e,t)=>"same"!=Pt(e.position.path,t.splitPosition.getParentPath())||t.graveyardPosition?(e.position=e.position._getTransformedBySplitOperation(t),[e]):[e,new ni(e.position.getShiftedBy(1),e.oldName,e.newName,0)]),hl(ri,ri,(e,t,n)=>{if(e.root===t.root&&e.key===t.key){if(!n.aIsStrong||e.newValue===t.newValue)return[new ul(0)];e.oldValue=t.newValue}return[e]}),hl(ai,ei,(e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset<t.position.offset&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByInsertOperation(t),e.insertionPosition=ai.getInsertionPosition(e.splitPosition),[e])),hl(ai,oi,(e,t,n)=>{if(!e.graveyardPosition&&!n.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const n=t.graveyardPosition.path.slice();n.push(0);const r=new Ho(t.graveyardPosition.root,n),o=ai.getInsertionPosition(new Ho(t.graveyardPosition.root,n)),a=new ai(r,0,null,0);return a.insertionPosition=o,e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=ai.getInsertionPosition(e.splitPosition),e.graveyardPosition=a.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[a,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=ai.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),hl(ai,Za,(e,t,n)=>{const r=zo._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const o=r.start.isEqual(e.graveyardPosition)||r.containsPosition(e.graveyardPosition);if(!n.bWasUndone&&o){const n=e.splitPosition._getTransformedByMoveOperation(t),r=e.graveyardPosition._getTransformedByMoveOperation(t),o=r.path.slice();o.push(0);const a=new Ho(r.root,o);return[new Za(n,e.howMany,a,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&r.containsPosition(e.splitPosition)){const n=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=n,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany),e.splitPosition=t.sourcePosition.clone(),e.insertionPosition=ai.getInsertionPosition(e.splitPosition),[e]}return!e.splitPosition.isEqual(t.targetPosition)||"insertAtSource"!=n.baRelation&&"splitBefore"!=n.abRelation?(t.sourcePosition.isEqual(t.targetPosition)||(e.splitPosition.hasSameParentAs(t.sourcePosition)&&e.splitPosition.offset<=t.sourcePosition.offset&&(e.howMany-=t.howMany),e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany)),e.splitPosition.stickiness="toNone",e.splitPosition=e.splitPosition._getTransformedByMoveOperation(t),e.splitPosition.stickiness="toNext",e.graveyardPosition?e.insertionPosition=e.insertionPosition._getTransformedByMoveOperation(t):e.insertionPosition=ai.getInsertionPosition(e.splitPosition),[e]):(e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=ai.getInsertionPosition(e.splitPosition),[e])}),hl(ai,ai,(e,t,n)=>{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new ul(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new ul(0)];if("splitBefore"==n.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const r="$graveyard"==e.splitPosition.root.rootName,o="$graveyard"==t.splitPosition.root.rootName;if(o&&!r||(!r||o)&&n.aIsStrong){const n=[];return t.howMany&&n.push(new Za(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&n.push(new Za(e.splitPosition,e.howMany,e.moveTargetPosition,0)),n}return[new ul(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.baRelation){const n=t.insertionPosition.path.slice();n.push(0);const r=new Ho(t.insertionPosition.root,n);return[e,new Za(e.insertionPosition,1,r,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset<t.splitPosition.offset&&(e.howMany-=t.howMany),e.splitPosition=e.splitPosition._getTransformedBySplitOperation(t),e.insertionPosition=ai.getInsertionPosition(e.splitPosition),[e]});class kl extends Hs{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh()}refresh(){this.isEnabled=this._stack.length>0}addBatch(e){const t=this.editor.model.document.selection,n={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,n){const r=this.editor.model,o=r.document,a=[];for(const t of e){const e=xl(t,n).find(e=>e.start.root!=o.graveyard);e&&a.push(e)}a.length&&r.change(e=>{e.setSelection(a,{backward:t})})}_undo(e,t){const n=this.editor.model,r=n.document;this._createdBatches.add(t);const o=e.operations.slice().filter(e=>e.isDocumentOperation);o.reverse();for(const e of o){const o=e.baseVersion+1,a=Array.from(r.history.getOperations(o)),i=ml([e.getReversed()],a,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const o of i)t.addOperation(o),n.applyOperation(o),r.history.setOperationAsUndone(e,o)}}}function xl(e,t){const n=e.getTransformedByOperations(t);n.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let e=1;e<n.length;e++){const t=n[e-1],r=n[e];t.end.isTouching(r.start)&&(t.end=r.end,n.splice(e,1),e--)}return n}class Ml extends kl{execute(e=null){const t=e?this._stack.findIndex(t=>t.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0],r=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(r,()=>{this._undo(n.batch,r);const e=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,e),this.fire("revert",n.batch,r)}),this.refresh()}}class El extends kl{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(t,()=>{const n=e.batch.operations[e.batch.operations.length-1].baseVersion+1,r=this.editor.model.document.history.getOperations(n);this._restoreSelection(e.selection.ranges,e.selection.isBackward,r),this._undo(e.batch,t)}),this.refresh()}}class Tl extends Is{constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new Ml(e),this._redoCommand=new El(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(e,t)=>{const n=t[0];if(!n.isDocumentOperation)return;const r=n.batch,o=this._redoCommand._createdBatches.has(r),a=this._undoCommand._createdBatches.has(r);this._batchRegistry.has(r)||"transparent"==r.type&&!o&&!a||(o?this._undoCommand.addBatch(r):a||(this._undoCommand.addBatch(r),this._redoCommand.clearStack()),this._batchRegistry.add(r))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(e,t,n)=>{this._redoCommand.addBatch(n)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}n(28);class Sl extends ys{constructor(){super();const e=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:e.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 e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");for(t&&(this.viewBox=t),this.element.innerHTML="";e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(e=>{e.style.fill=this.fillColor})}}n(30);class Dl extends ys{constructor(e){super(e),this.set("text",""),this.set("position","s");const t=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",t.to("position",e=>"ck-tooltip_"+e),t.if("text","ck-hidden",e=>!e.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:t.to("text")}]}]})}}n(32);class Ll extends ys{constructor(e){super(e);const t=this.bindTemplate,n=bt();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 Sl,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",t.to("class"),t.if("isEnabled","ck-disabled",e=>!e),t.if("isVisible","ck-hidden",e=>!e),t.to("isOn",e=>e?"ck-on":"ck-off"),t.if("withText","ck-button_with-text")],type:t.to("type",e=>e||"button"),tabindex:t.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_"+n,"aria-disabled":t.if("isEnabled",!0,e=>!e),"aria-pressed":t.to("isOn",e=>!!this.isToggleable&&String(e))},children:this.children,on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(e=>{this.isEnabled?this.fire("execute"):e.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 e=new Dl;return e.bind("text").to(this,"_tooltipString"),e.bind("position").to(this,"tooltipPosition"),e}_createLabelView(e){const t=new ys,n=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:"ck-editor__aria-label_"+e},children:[{text:this.bindTemplate.to("label")}]}),t}_getTooltipString(e,t,n){return e?"string"==typeof e?e:(n&&(n=function(e){return Cn?Hn(e).map(e=>Rn[e.toLowerCase()]||e).reduce((e,t)=>e.slice(-1)in In?e+t:e+"+"+t):e}(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:""}`):""}}var Cl='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.042 9.367l2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',Pl='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M14.958 9.367l-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';class Ol extends Is{init(){const e=this.editor,t=e.locale,n=e.t,r="ltr"==t.uiLanguageDirection?Cl:Pl,o="ltr"==t.uiLanguageDirection?Pl:Cl;this._addButton("undo",n("bj"),"CTRL+Z",r),this._addButton("redo",n("bk"),"CTRL+Y",o)}_addButton(e,t,n,r){const o=this.editor;o.ui.componentFactory.add(e,a=>{const i=o.commands.get(e),s=new Ll(a);return s.set({label:t,icon:r,keystroke:n,tooltip:!0}),s.bind("isEnabled").to(i,"isEnabled"),this.listenTo(s,"execute",()=>o.execute(e)),s})}}class Nl extends Is{static get requires(){return[Tl,Ol]}static get pluginName(){return"Undo"}}class Al extends Is{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new kn({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new _t.b("pendingactions-add-invalid-message: The message must be a string.",this);const t=Object.create(on);return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class Il{constructor(){const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise((n,r)=>{t.onload=()=>{const e=t.result;this._data=e,n(e)},t.onerror=()=>{r("error")},t.onabort=()=>{r("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}Ct(Il,on);class Rl extends Is{static get pluginName(){return"FileRepository"}static get requires(){return[Al]}init(){this.loaders=new kn,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",(e,t)=>t?e/t*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return console.warn(Object(_t.a)("filerepository-no-upload-adapter: Upload adapter is not defined.")),null;const t=new Yl(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then(e=>{this._loadersMap.set(e,t)}),t.file.catch(()=>{}),t.on("change:uploaded",()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on("change:uploadTotal",()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof Yl?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((e,n)=>{e===t&&this._loadersMap.delete(n)})}_updatePendingAction(){const e=this.editor.plugins.get(Al);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,n=e=>`${t("aw")} ${parseInt(e)}%.`;this._pendingAction=e.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else e.remove(this._pendingAction),this._pendingAction=null}}Ct(Rl,on);class Yl{constructor(e,t){this.id=bt(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new Il,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new _t.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(e=>this._reader.read(e)).then(e=>(this.status="idle",e)).catch(e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e})}upload(){if("idle"!=this.status)throw new _t.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(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e})}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&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(e){const t={};return t.promise=new Promise((n,r)=>{t.resolver=n,t.rejecter=r,t.isFulfilled=!1,e.then(e=>{t.isFulfilled=!0,n(e)}).catch(e=>{t.isFulfilled=!0,r(e)})}),t}}Ct(Yl,on);const jl="ckCsrfToken",Fl="abcdefghijklmnopqrstuvwxyz0123456789";class Hl extends Is{static get requires(){return[Rl]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const e=this.editor.config.get("ckfinder.uploadUrl");e&&(this.editor.plugins.get(Rl).createUploadAdapter=t=>new zl(t,e,this.editor.t))}}class zl{constructor(e,t,n){this.loader=e,this.url=t,this.t=n}upload(){return this.loader.file.then(e=>new Promise((t,n)=>{this._initRequest(),this._initListeners(t,n,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,n){const r=this.xhr,o=this.loader,a=(0,this.t)("a")+` ${n.name}.`;r.addEventListener("error",()=>t(a)),r.addEventListener("abort",()=>t()),r.addEventListener("load",()=>{const n=r.response;if(!n||!n.uploaded)return t(n&&n.error&&n.error.message?n.error.message:a);e({default:n.url})}),r.upload&&r.upload.addEventListener("progress",e=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)})}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",function(){let e=function(e){e=e.toLowerCase();const t=document.cookie.split(";");for(const n of t){const t=n.split("=");if(decodeURIComponent(t[0].trim().toLowerCase())===e)return decodeURIComponent(t[1])}return null}(jl);return e&&40==e.length||(e=function(e){let t="";const n=new Uint8Array(40);window.crypto.getRandomValues(n);for(let e=0;e<n.length;e++){const r=Fl.charAt(n[e]%Fl.length);t+=Math.random()>.5?r.toUpperCase():r}return t}(),function(e,t){document.cookie=encodeURIComponent("ckCsrfToken")+"="+encodeURIComponent(t)+";path=/"}(0,e)),e}()),this.xhr.send(t)}}class Bl{constructor(e,t,n){let r,o=null;"function"==typeof n?r=n:(o=e.commands.get(n),r=()=>{e.execute(n)}),e.model.document.on("change",(n,a)=>{if(o&&!o.isEnabled)return;if("transparent"==a.type)return;const i=Array.from(e.model.document.differ.getChanges()),s=i[0];if(1!=i.length||"insert"!==s.type||"$text"!=s.name||1!=s.length)return;const l=s.position.textNode||s.position.nodeAfter;if(!l.parent.is("paragraph"))return;const c=t.exec(l.data);c&&e.model.enqueueChange(e=>{const t=e.createPositionAt(l.parent,0),n=e.createPositionAt(l.parent,c[0].length),o=new Xo(t,n);!1!==r({match:c})&&e.remove(o),o.detach()})})}}class Ul{constructor(e,t,n){let r,o,a,i;t instanceof RegExp?r=t:a=t,"string"==typeof n?o=n:i=n,a=a||(e=>{let t;const n=[],o=[];for(;null!==(t=r.exec(e))&&!(t&&t.length<4);){let{index:e,1:r,2:a,3:i}=t;const s=r+a+i,l=[e+=t[0].length-s.length,e+r.length],c=[e+r.length+a.length,e+r.length+a.length+i.length];n.push(l),n.push(c),o.push([e+r.length,e+r.length+a.length])}return{remove:n,format:o}}),i=i||((t,n)=>{const r=e.model.schema.getValidRanges(n,o);for(const e of r)t.setAttribute(o,!0,e);t.removeSelectionAttribute(o)}),e.model.document.on("change",(t,n)=>{if("transparent"==n.type)return;const r=e.model.document.selection;if(!r.isCollapsed)return;const o=Array.from(e.model.document.differ.getChanges()),s=o[0];if(1!=o.length||"insert"!==s.type||"$text"!=s.name||1!=s.length)return;const l=r.focus.parent,c=function(e){return Array.from(e.getChildren()).reduce((e,t)=>e+t.data,"")}(l).slice(0,r.focus.offset),u=a(c),d=Vl(l,u.format,e.model),h=Vl(l,u.remove,e.model);d.length&&h.length&&e.model.enqueueChange(e=>{if(!1!==i(e,d))for(const t of h.reverse())e.remove(t)})})}}function Vl(e,t,n){return t.filter(e=>void 0!==e[0]&&void 0!==e[1]).map(t=>n.createRange(n.createPositionAt(e,t[0]),n.createPositionAt(e,t[1])))}function Wl(e,t){return(n,r)=>{if(!e.commands.get(t).isEnabled)return!1;const o=e.model.schema.getValidRanges(r,t);for(const e of o)n.setAttribute(t,!0,e);n.removeSelectionAttribute(t)}}class ql extends Hs{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document.selection,r=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(n.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const t of o)r?e.setAttribute(this.attributeKey,r,t):e.removeAttribute(this.attributeKey,t)}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const Gl="bold";class Jl extends Is{init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Gl}),e.model.schema.setAttributeProperties(Gl,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Gl,view:"strong",upcastAlso:["b",{styles:{"font-weight":"bold"}}]}),e.commands.add(Gl,new ql(e,Gl)),e.keystrokes.set("CTRL+B",Gl)}}const Kl="bold";class Ql extends Is{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Kl,n=>{const r=e.commands.get(Kl),o=new Ll(n);return o.set({label:t("d"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(o,"execute",()=>e.execute(Kl)),o})}}const Xl="italic";class $l extends Is{init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Xl}),e.model.schema.setAttributeProperties(Xl,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Xl,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(Xl,new ql(e,Xl)),e.keystrokes.set("CTRL+I",Xl)}}const Zl="italic";class ec extends Is{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Zl,n=>{const r=e.commands.get(Zl),o=new Ll(n);return o.set({label:t("e"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.586 14.633l.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(o,"execute",()=>e.execute(Zl)),o})}}function tc(e){const t=e.next();return t.done?null:t.value}class nc extends Hs{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.schema,r=t.document.selection,o=Array.from(r.getTopMostBlocks()),a=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(a){const t=o.filter(e=>rc(e)||ac(n,e));this._applyQuote(e,t)}else this._removeQuote(e,o.filter(rc))})}_getValue(){const e=tc(this.editor.model.document.selection.getTopMostBlocks());return!(!e||!rc(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=tc(e.getSelectedBlocks());return!!n&&ac(t,n)}_removeQuote(e,t){oc(e,t).reverse().forEach(t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=e.createPositionBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=e.createPositionAfter(t.end.parent);e.move(t,n)})}_applyQuote(e,t){const n=[];oc(e,t).reverse().forEach(t=>{let r=rc(t.start);r||(r=e.createElement("blockQuote"),e.wrap(t,r)),n.push(r)}),n.reverse().reduce((t,n)=>t.nextSibling==n?(e.merge(e.createPositionAfter(t)),t):n)}}function rc(e){return"blockQuote"==e.parent.name?e.parent:null}function oc(e,t){let n,r=0;const o=[];for(;r<t.length;){const a=t[r],i=t[r+1];n||(n=e.createPositionBefore(a)),i&&a.nextSibling==i||(o.push(e.createRange(n,e.createPositionAfter(a))),n=null),r++}return o}function ac(e,t){const n=e.checkChild(t.parent,"blockQuote"),r=e.checkChild(["$root","blockQuote"],t);return n&&r}class ic extends Is{init(){const e=this.editor,t=e.model.schema;e.commands.add("blockQuote",new nc(e)),t.register("blockQuote",{allowWhere:"$block",allowContentOf:"$root"}),t.addChildCheck((e,t)=>{if(e.endsWith("blockQuote")&&"blockQuote"==t.name)return!1}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer(n=>{const r=e.model.document.differ.getChanges();for(const e of r)if("insert"==e.type){const r=e.position.nodeAfter;if(!r)continue;if(r.is("blockQuote")&&r.isEmpty)return n.remove(r),!0;if(r.is("blockQuote")&&!t.checkChild(e.position,r))return n.unwrap(r),!0;if(r.is("element")){const e=n.createRangeIn(r);for(const r of e.getItems())if(r.is("blockQuote")&&!t.checkChild(n.createPositionBefore(r),r))return n.unwrap(r),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("blockQuote")&&t.isEmpty)return n.remove(t),!0}return!1})}afterInit(){const e=this.editor.commands.get("blockQuote");this.listenTo(this.editor.editing.view.document,"enter",(t,n)=>{const r=this.editor.model.document,o=r.selection.getLastPosition().parent;r.selection.isCollapsed&&o.isEmpty&&e.value&&(this.editor.execute("blockQuote"),this.editor.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())})}}n(34);class sc extends Is{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",n=>{const r=e.commands.get("blockQuote"),o=new Ll(n);return o.set({label:t("f"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(o,"execute",()=>e.execute("blockQuote")),o})}}class lc extends Is{static get pluginName(){return"CKFinderUI"}init(){const e=this.editor,t=e.ui.componentFactory,n=e.t;t.add("ckfinder",t=>{const r=e.commands.get("ckfinder"),o=new Ll(t);return o.set({label:n("g"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',tooltip:!0}),o.bind("isEnabled").to(r),o.on("execute",()=>{e.execute("ckfinder"),e.editing.view.focus()}),o})}}class cc extends Is{static get pluginName(){return"Notification"}init(){this.on("show:warning",(e,t)=>{window.alert(t.message)},{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t="show:"+e.type+(e.namespace?":"+e.namespace:"");this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class uc extends Hs{constructor(e){super(e),this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}refresh(){const e=this.editor.commands.get("imageUpload"),t=this.editor.commands.get("link");this.isEnabled=e&&t&&(e.isEnabled||t.isEnabled)}execute(){const e=this.editor,t=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=t&&"modal"!=t)throw new _t.b('ckfinder-unknown-openerMethod: The openerMethod config option must by "popup" or "modal".',e);const n=this.editor.config.get("ckfinder.options")||{};n.chooseFiles=!0;const r=n.onInit;n.language||(n.language=e.locale.uiLanguage),n.onInit=t=>{r&&r(t),t.on("files:choose",n=>{const r=n.data.files.toArray(),o=r.filter(e=>!e.isImage()),a=r.filter(e=>e.isImage());for(const t of o)e.execute("link",t.getUrl());const i=[];for(const e of a){const n=e.getUrl();i.push(n||t.request("file:getProxyUrl",{file:e}))}i.length&&dc(e,i)}),t.on("file:choose:resizedImage",t=>{const n=t.data.resizedUrl;if(n)dc(e,[n]);else{const t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("ar"),{title:n("as"),namespace:"ckfinder"})}})},window.CKFinder[t](n)}}function dc(e,t){if(e.commands.get("imageUpload").isEnabled)e.execute("imageInsert",{source:t});else{const t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("at"),{title:n("au"),namespace:"ckfinder"})}}class hc extends Is{static get pluginName(){return"CKFinderEditing"}static get requires(){return[cc]}init(){const e=this.editor;e.commands.add("ckfinder",new uc(e))}}const pc=/^data:(\S*?);base64,/;class fc{constructor(e,t,n){if(!e)throw new _t.b("fileuploader-missing-file: File must be provided as the first argument",null);if(!t)throw new _t.b("fileuploader-missing-token: Token must be provided as the second argument.",null);if(!n)throw new _t.b("fileuploader-missing-api-address: Api address must be provided as the third argument.",null);this.file=function(e){if("string"!=typeof e)return!1;const t=e.match(pc);return!(!t||!t.length)}(e)?function(e,t=512){try{const n=e.match(pc)[1],r=atob(e.replace(pc,"")),o=[];for(let e=0;e<r.length;e+=t){const n=r.slice(e,e+t),a=new Array(n.length);for(let e=0;e<n.length;e++)a[e]=n.charCodeAt(e);o.push(new Uint8Array(a))}return new Blob(o,{type:n})}catch(e){throw new _t.b("fileuploader-decoding-image-data-error: Problem with decoding Base64 image data.",null)}}(e):e,this._token=t,this._apiAddress=n}onProgress(e){return this.on("progress",(t,n)=>e(n)),this}onError(e){return this.once("error",(t,n)=>e(n)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open("POST",this._apiAddress),e.setRequestHeader("Authorization",this._token.value),e.responseType="json",this.xhr=e}_attachXHRListeners(){const e=this,t=this.xhr;function n(t){return()=>e.fire("error",t)}t.addEventListener("error",n("Network Error")),t.addEventListener("abort",n("Abort")),t.upload&&t.upload.addEventListener("progress",e=>{e.lengthComputable&&this.fire("progress",{total:e.total,uploaded:e.loaded})}),t.addEventListener("load",()=>{const e=t.status,n=t.response;if(e<200||e>299)return this.fire("error",n.message||n.error)})}_sendRequest(){const e=new FormData,t=this.xhr;return e.append("file",this.file),new Promise((n,r)=>{t.addEventListener("load",()=>{const e=t.status,o=t.response;return e<200||e>299?o.message?r(new _t.b("fileuploader-uploading-data-failed: Uploading file failed.",this,{message:o.message})):r(o.error):n(o)}),t.addEventListener("error",()=>r(new Error("Network Error"))),t.addEventListener("abort",()=>r(new Error("Abort"))),t.send(e)})}}Ct(fc,xt);const mc={refreshInterval:36e5,autoRefresh:!0};class gc{constructor(e,t=mc){if(!e)throw new _t.b("token-missing-token-url: A `tokenUrl` must be provided as the first constructor argument.",this);this.set("value",t.initValue),this._refresh="function"==typeof e?e:()=>function(e){return new Promise((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e),r.addEventListener("load",()=>{const e=r.status,o=r.response;return e<200||e>299?n(new _t.b("token-cannot-download-new-token: Cannot download new token from the provided url.",null)):t(o)}),r.addEventListener("error",()=>n(new Error("Network Error"))),r.addEventListener("abort",()=>n(new Error("Abort"))),r.send()})}(e),this._options=Object.assign({},mc,t)}init(){return new Promise((e,t)=>{this._options.autoRefresh&&this._startRefreshing(),this.value?e(this):this._refreshToken().then(e).catch(t)})}_refreshToken(){return this._refresh().then(e=>this.set("value",e)).then(()=>this)}destroy(){this._stopRefreshing()}_startRefreshing(){this._refreshInterval=setInterval(()=>this._refreshToken(),this._options.refreshInterval)}_stopRefreshing(){clearInterval(this._refreshInterval)}static create(e,t=mc){return new gc(e,t).init()}}Ct(gc,on);var _c=gc;class vc extends Is{static get pluginName(){return"CloudServices"}init(){const e=this.editor.config.get("cloudServices")||{};for(const t in e)this[t]=e[t];if(this.tokenUrl)return this.token=new vc.Token(this.tokenUrl),this.token.init();this.token=null}}vc.Token=_c;class bc extends Is{static get requires(){return[Rl,vc]}init(){const e=this.editor,t=e.plugins.get(vc),n=t.token,r=t.uploadUrl;n&&(this._uploadGateway=new bc._UploadGateway(n,r),e.plugins.get(Rl).createUploadAdapter=e=>new yc(this._uploadGateway,e))}}class yc{constructor(e,t){this.uploadGateway=e,this.loader=t}upload(){return this.loader.file.then(e=>(this.fileUploader=this.uploadGateway.upload(e),this.fileUploader.on("progress",(e,t)=>{this.loader.uploadTotal=t.total,this.loader.uploaded=t.uploaded}),this.fileUploader.send()))}abort(){this.fileUploader.abort()}}bc._UploadGateway=class{constructor(e,t){if(!e)throw new _t.b("uploadgateway-missing-token: Token must be provided.",null);if(!t)throw new _t.b("uploadgateway-missing-api-address: Api address must be provided.",null);this._token=e,this._apiAddress=t}upload(e){return new fc(e,this._token,this._apiAddress)}};class wc extends Cr{constructor(e){super(e),this._observedElements=new Set}observe(e,t){this.document.getRoot(t).on("change:children",(t,n)=>{this.view.once("render",()=>this._updateObservedElements(e,n))})}_updateObservedElements(e,t){if(!t.is("element")||t.is("attributeElement"))return;const n=this.view.domConverter.mapViewToDom(t);if(n){for(const e of n.querySelectorAll("img"))this._observedElements.has(e)||(this.listenTo(e,"load",(e,t)=>this._fireEvents(t)),this._observedElements.add(e));for(const t of this._observedElements)e.contains(t)||(this.stopListening(t),this._observedElements.delete(t))}}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}destroy(){this._observedElements.clear(),super.destroy()}}function kc(e){return n=>{n.on(`attribute:${e}:image`,t)};function t(e,t,n){if(!n.consumable.consume(t.item,e.name))return;const r=n.writer,o=n.mapper.toViewElement(t.item).getChild(0);null!==t.attributeNewValue?r.setAttribute(t.attributeKey,t.attributeNewValue,o):r.removeAttribute(t.attributeKey,o)}}class xc{constructor(){this._stack=[]}add(e,t){const n=this._stack,r=n[0];this._insertDescriptor(e);const o=n[0];r===o||Mc(r,o)||this.fire("change:top",{oldDescriptor:r,newDescriptor:o,writer:t})}remove(e,t){const n=this._stack,r=n[0];this._removeDescriptor(e);const o=n[0];r===o||Mc(r,o)||this.fire("change:top",{oldDescriptor:r,newDescriptor:o,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex(t=>t.id===e.id);if(Mc(e,t[n]))return;n>-1&&t.splice(n,1);let r=0;for(;t[r]&&Ec(t[r],e);)r++;t.splice(r,0,e)}_removeDescriptor(e){const t=this._stack,n=t.findIndex(t=>t.id===e);n>-1&&t.splice(n,1)}}function Mc(e,t){return e&&t&&e.priority==t.priority&&Tc(e.classes)==Tc(t.classes)}function Ec(e,t){return e.priority>t.priority||!(e.priority<t.priority)&&Tc(e.classes)>Tc(t.classes)}function Tc(e){return Array.isArray(e)?e.sort().join(","):e}Ct(xc,xt);const Sc="ck-widget_selected";function Dc(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function Lc(e,t,n={}){return Pn||t.setAttribute("contenteditable","false",e),t.addClass("ck-widget",e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=Nc,n.label&&function(e,t,n){n.setCustomProperty("widgetLabel",t,e)}(e,n.label,t),n.hasSelectionHandler&&function(e,t){const n=t.createUIElement("div",{class:"ck ck-widget__selection-handler"},(function(e){const t=this.toDomElement(e),n=new Sl;return n.set("content",'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>'),n.render(),t.appendChild(n.element),t}));t.insert(t.createPositionAt(e,0),n),t.addClass(["ck-widget_with-selection-handler"],e)}(e,t),function(e,t,n,r){const o=new xc;o.on("change:top",(t,o)=>{o.oldDescriptor&&r(e,o.oldDescriptor,o.writer),o.newDescriptor&&n(e,o.newDescriptor,o.writer)}),t.setCustomProperty("addHighlight",(e,t,n)=>o.add(t,n),e),t.setCustomProperty("removeHighlight",(e,t,n)=>o.remove(t,n),e)}(e,t,(e,t,n)=>n.addClass(r(t.classes),e),(e,t,n)=>n.removeClass(r(t.classes),e)),e;function r(e){return Array.isArray(e)?e:[e]}}function Cc(e){const t=e.getCustomProperty("widgetLabel");return t?"function"==typeof t?t():t:""}function Pc(e,t){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),Pn||(t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",(n,r,o)=>{t.setAttribute("contenteditable",o?"false":"true",e)})),e.on("change:isFocused",(n,r,o)=>{o?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)}),e}function Oc(e,t){const n=e.getSelectedElement();if(n&&t.schema.isBlock(n))return t.createPositionAfter(n);const r=e.getSelectedBlocks().next().value;if(r){if(r.isEmpty)return t.createPositionAt(r,0);const n=t.createPositionAfter(r);return e.focus.isTouching(n)?n:t.createPositionBefore(r)}return e.focus}function Nc(){return null}function Ac(e){const t=e.getSelectedElement();return t&&function(e){return!!e.getCustomProperty("image")&&Dc(e)}(t)?t:null}function Ic(e){return!!e&&e.is("image")}function Rc(e,t,n={}){const r=e.createElement("image",n),o=Oc(t.document.selection,t);t.insertContent(r,o),r.parent&&e.setSelection(r,"on")}function Yc(e){const t=e.schema,n=e.document.selection;return function(e,t,n){const r=function(e,t){const n=Oc(e,t).parent;return n.isEmpty&&!n.is("$root")?n.parent:n}(e,n);return t.checkChild(r,"image")}(n,t,e)&&!function(e,t){const n=e.getSelectedElement();return n&&t.isObject(n)}(n,t)&&function(e){return[...e.focus.getAncestors()].every(e=>!e.is("image"))}(n)}class jc extends Hs{refresh(){this.isEnabled=Yc(this.editor.model)}execute(e){const t=this.editor.model;t.change(n=>{const r=Array.isArray(e.source)?e.source:[e.source];for(const e of r)Rc(n,t,{src:e})})}}class Fc extends Is{init(){const e=this.editor,t=e.model.schema,n=e.t,r=e.conversion;e.editing.view.addObserver(wc),t.register("image",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["alt","src","srcset"]}),r.for("dataDowncast").elementToElement({model:"image",view:(e,t)=>Hc(t)}),r.for("editingDowncast").elementToElement({model:"image",view:(e,t)=>function(e,t,n){return t.setCustomProperty("image",!0,e),Lc(e,t,{label:function(){const t=e.getChild(0).getAttribute("alt");return t?`${t} ${n}`:n}})}(Hc(t),t,n("j"))}),r.for("downcast").add(kc("src")).add(kc("alt")).add(function(){return t=>{t.on("attribute:srcset:image",e)};function e(e,t,n){if(!n.consumable.consume(t.item,e.name))return;const r=n.writer,o=n.mapper.toViewElement(t.item).getChild(0);if(null===t.attributeNewValue){const e=t.attributeOldValue;e.data&&(r.removeAttribute("srcset",o),r.removeAttribute("sizes",o),e.width&&r.removeAttribute("width",o))}else{const e=t.attributeNewValue;e.data&&(r.setAttribute("srcset",e.data,o),r.setAttribute("sizes","100vw",o),e.width&&r.setAttribute("width",e.width,o))}}}()),r.for("upcast").elementToElement({view:{name:"img",attributes:{src:!0}},model:(e,t)=>t.createElement("image",{src:e.getAttribute("src")})}).attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}}).add(function(){return t=>{t.on("element:figure",e)};function e(e,t,n){if(!n.consumable.test(t.viewItem,{name:!0,classes:"image"}))return;const r=Array.from(t.viewItem.getChildren()).find(e=>e.is("img"));if(!r||!r.hasAttribute("src")||!n.consumable.test(r,{name:!0}))return;const o=n.convertItem(r,t.modelCursor),a=tc(o.modelRange.getItems());a&&(n.convertChildren(t.viewItem,n.writer.createPositionAt(a,0)),t.modelRange=o.modelRange,t.modelCursor=o.modelCursor)}}()),e.commands.add("imageInsert",new jc(e))}}function Hc(e){const t=e.createEmptyElement("img"),n=e.createContainerElement("figure",{class:"image"});return e.insert(e.createPositionAt(n,0),t),n}class zc extends Qr{constructor(e){super(e),this.domEventType="mousedown"}onDomEvent(e){this.fire(e.type,e)}}n(36);const Bc=Fn("Ctrl+A");class Uc extends Is{static get pluginName(){return"Widget"}init(){const e=this.editor.editing.view,t=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(e,t,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const r=n.writer,o=r.document.selection,a=o.getSelectedElement();let i=null;for(const e of o.getRanges())for(const t of e){const e=t.item;Dc(e)&&!Vc(e,i)&&(r.addClass(Sc,e),this._previouslySelected.add(e),i=e,e==a&&r.setSelection(o.getRanges(),{fake:!0,label:Cc(a)}))}},{priority:"low"}),e.addObserver(zc),this.listenTo(t,"mousedown",(...e)=>this._onMousedown(...e)),this.listenTo(t,"keydown",(...e)=>this._onKeydown(...e),{priority:"high"}),this.listenTo(t,"delete",(e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())},{priority:"high"})}_onMousedown(e,t){const n=this.editor,r=n.editing.view,o=r.document;let a=t.target;if(function(e){for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(Dc(e))return!1;e=e.parent}return!1}(a)){if(Nn&&t.domEvent.detail>=3){const e=n.editing.mapper.toModelElement(a);this.editor.model.change(n=>{t.preventDefault(),n.setSelection(e,"in")})}return}if(!Dc(a)&&!(a=a.findAncestor(Dc)))return;t.preventDefault(),o.isFocused||r.focus();const i=n.editing.mapper.toModelElement(a);this._setSelectionOverElement(i)}_onKeydown(e,t){const n=t.keyCode,r=n==Yn.arrowdown||n==Yn.arrowright;let o=!1;!function(e){return e==Yn.arrowright||e==Yn.arrowleft||e==Yn.arrowup||e==Yn.arrowdown}(n)?function(e){return jn(e)==Bc}(t)?o=this._selectAllNestedEditableContent()||this._selectAllContent():n===Yn.enter&&(o=this._handleEnterKey(t.shiftKey)):o=this._handleArrowKeys(r),o&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document.selection;if(!t.isCollapsed)return;const n=this._getObjectElementNextToSelection(e);return n?(this.editor.model.change(e=>{let r=t.anchor.parent;for(;r.isEmpty;){const t=r;r=t.parent,e.remove(t)}this._setSelectionOverElement(n)}),!0):void 0}_handleArrowKeys(e){const t=this.editor.model,n=t.schema,r=t.document.selection,o=r.getSelectedElement();if(o&&n.isObject(o)){const o=e?r.getLastPosition():r.getFirstPosition(),a=n.getNearestSelectionRange(o,e?"forward":"backward");return a&&t.change(e=>{e.setSelection(a)}),!0}if(!r.isCollapsed)return;const a=this._getObjectElementNextToSelection(e);return a&&n.isObject(a)?(this._setSelectionOverElement(a),!0):void 0}_handleEnterKey(e){const t=this.editor.model,n=t.document.selection.getSelectedElement();if(function(e,t){return e&&t.isObject(e)&&!t.isInline(e)}(n,t.schema))return t.change(r=>{let o=r.createPositionAt(n,e?"before":"after");const a=r.createElement("paragraph");if(t.schema.isBlock(n.parent)){const e=t.schema.findAllowedParent(o,a);o=r.split(o,e).position}r.insert(a,o),r.setSelection(a,"in")}),!0}_selectAllNestedEditableContent(){const e=this.editor.model,t=e.document.selection,n=e.schema.getLimitElement(t);return t.getFirstRange().root!=n&&(e.change(e=>{e.setSelection(e.createRangeIn(n))}),!0)}_selectAllContent(){const e=this.editor.model,t=this.editor.editing,n=t.view.document.selection.getSelectedElement();if(n&&Dc(n)){const r=t.mapper.toModelElement(n.parent);return e.change(e=>{e.setSelection(e.createRangeIn(r))}),!0}return!1}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,n=t.schema,r=t.document.selection,o=t.createSelection(r);t.modifySelection(o,{direction:e?"forward":"backward"});const a=e?o.focus.nodeBefore:o.focus.nodeAfter;return a&&n.isObject(a)?a:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(Sc,t);this._previouslySelected.clear()}}function Vc(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class Wc extends Hs{refresh(){const e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=Ic(e),Ic(e)&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor.model,n=t.document.selection.getSelectedElement();t.change(t=>{t.setAttribute("alt",e.newValue,n)})}}class qc extends Is{init(){this.editor.commands.add("imageTextAlternative",new Wc(this.editor))}}function Gc({emitter:e,activator:t,callback:n,contextElements:r}){e.listenTo(document,"mousedown",(e,{target:o})=>{if(t()){for(const e of r)if(e.contains(o))return;n()}})}n(38);class Jc extends ys{constructor(e,t){super(e);const n="ck-input-"+bt(),r="ck-status-"+bt();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(t,n,r),this.statusView=this._createStatusView(r),this.bind("_statusText").to(this,"errorText",this,"infoText",(e,t)=>e||t);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(e){const t=new ks(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createInputView(e,t,n){const r=new e(this.locale,n);return r.id=t,r.ariaDescribedById=n,r.bind("value").to(this),r.bind("isReadOnly").to(this),r.bind("hasError").to(this,"errorText",e=>!!e),r.on("input",()=>{this.errorText=null}),r}_createStatusView(e){const t=new ys(this.locale),n=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input__status",n.if("errorText","ck-labeled-input__status_error"),n.if("_statusText","ck-hidden",e=>!e)],id:e,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),t}select(){this.inputView.select()}focus(){this.inputView.focus()}}n(40);class Kc extends ys{constructor(e){super(e),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to("input")}})}render(){super.render();const e=e=>{this.element.value=e||0===e?e:""};e(this.value),this.on("change:value",(t,n,r)=>{e(r)})}select(){this.element.select()}focus(){this.element.focus()}}function Qc({view:e}){e.listenTo(e.element,"submit",(t,n)=>{n.preventDefault(),e.fire("submit")},{useCapture:!0})}var Xc='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',$c='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.591 10.177l4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>';n(42);class Zc extends ys{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new Gi,this.keystrokes=new ji,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("bd"),Xc,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("be"),$c,"ck-button-cancel","cancel"),this._focusables=new ts,this._focusCycler=new Ls({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),Qc({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)})}_createButton(e,t,n,r){const o=new Ll(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),r&&o.delegate("execute").to(this,r),o}_createLabeledInputView(){const e=this.locale.t,t=new Jc(this.locale,Kc);return t.label=e("ca"),t.inputView.placeholder=e("ca"),t}}function eu({element:e,target:t,positions:n,limiter:r,fitInViewport:o}){S(t)&&(t=t()),S(r)&&(r=r());const a=function(e){for(;e&&"html"!=e.tagName.toLowerCase();){if("static"!=yr.window.getComputedStyle(e).position)return e;e=e.parentElement}return null}(e.parentElement),i=new vo(e),s=new vo(t);let l,c;if(r||o){const e=r&&new vo(r).getVisible(),t=o&&new vo(yr.window);[c,l]=function(e,t,n,r,o){let a,i,s=0,l=0;const c=n.getArea();return e.some(e=>{const[u,d]=tu(e,t,n);let h,p;if(r)if(o){const e=r.getIntersection(o);h=e?e.getIntersectionArea(d):0}else h=r.getIntersectionArea(d);function f(){l=p,s=h,a=d,i=u}return o&&(p=o.getIntersectionArea(d)),o&&!r?p>l&&f():!o&&r?h>s&&f():(p>l&&h>=s||p>=l&&h>s)&&f(),h===c}),a?[i,a]:null}(n,s,i,e,t)||tu(n[0],s,i)}else[c,l]=tu(n[0],s,i);let{left:u,top:d}=nu(l);if(a){const e=nu(new vo(a)),t=go(a);u-=e.left,d-=e.top,u+=a.scrollLeft,d+=a.scrollTop,u-=t.left,d-=t.top}return{left:u,top:d,name:c}}function tu(e,t,n){const{left:r,top:o,name:a}=e(t,n);return[a,n.clone().moveTo(r,o)]}function nu({left:e,top:t}){const{scrollX:n,scrollY:r}=yr.window;return{left:e+n,top:t+r}}n(44);const ru=Ts("px"),ou=yr.document.body;class au extends ys{constructor(e){super(e);const t=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",t.to("position",e=>"ck-balloon-panel_"+e),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",ru),left:t.to("left",ru)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=au.defaultPositions,n=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthWest,t.northArrowSouthEast],limiter:ou,fitInViewport:!0},e),r=au._getOptimalPosition(n),o=parseInt(r.left),a=parseInt(r.top),i=r.name;Object.assign(this,{top:a,left:o,position:i})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),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(e){this.attachTo(e);const t=iu(e.target),n=e.limiter?iu(e.limiter):ou;this.listenTo(yr.document,"scroll",(r,o)=>{const a=o.target,i=t&&a.contains(t),s=n&&a.contains(n);!i&&!s&&t&&n||this.attachTo(e)},{useCapture:!0}),this.listenTo(yr.window,"resize",()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(yr.document,"scroll"),this.stopListening(yr.window,"resize")}}function iu(e){return ft(e)?e:mo(e)?e.commonAncestorContainer:"function"==typeof e?iu(e()):null}function su(e,t){return e.top-t.height-au.arrowVerticalOffset}function lu(e){return e.bottom+au.arrowVerticalOffset}au.arrowHorizontalOffset=25,au.arrowVerticalOffset=10,au._getOptimalPosition=eu,au.defaultPositions={northArrowSouth:(e,t)=>({top:su(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s"}),northArrowSouthEast:(e,t)=>({top:su(e,t),left:e.left+e.width/2-t.width+au.arrowHorizontalOffset,name:"arrow_se"}),northArrowSouthWest:(e,t)=>({top:su(e,t),left:e.left+e.width/2-au.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouth:(e,t)=>({top:su(e,t),left:e.left-t.width/2,name:"arrow_s"}),northWestArrowSouthWest:(e,t)=>({top:su(e,t),left:e.left-au.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouthEast:(e,t)=>({top:su(e,t),left:e.left-t.width+au.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouth:(e,t)=>({top:su(e,t),left:e.right-t.width/2,name:"arrow_s"}),northEastArrowSouthEast:(e,t)=>({top:su(e,t),left:e.right-t.width+au.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouthWest:(e,t)=>({top:su(e,t),left:e.right-au.arrowHorizontalOffset,name:"arrow_sw"}),southArrowNorth:(e,t)=>({top:lu(e),left:e.left+e.width/2-t.width/2,name:"arrow_n"}),southArrowNorthEast:(e,t)=>({top:lu(e),left:e.left+e.width/2-t.width+au.arrowHorizontalOffset,name:"arrow_ne"}),southArrowNorthWest:(e,t)=>({top:lu(e),left:e.left+e.width/2-au.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorth:(e,t)=>({top:lu(e),left:e.left-t.width/2,name:"arrow_n"}),southWestArrowNorthWest:(e,t)=>({top:lu(e),left:e.left-au.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorthEast:(e,t)=>({top:lu(e),left:e.left-t.width+au.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorth:(e,t)=>({top:lu(e),left:e.right-t.width/2,name:"arrow_n"}),southEastArrowNorthEast:(e,t)=>({top:lu(e),left:e.right-t.width+au.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorthWest:(e,t)=>({top:lu(e),left:e.right-au.arrowHorizontalOffset,name:"arrow_nw"})},n(46),n(48);const cu=Ts("px");class uu extends Is{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.view=new au(e.locale),e.ui.view.body.add(this.view),e.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(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this.hasView(e.view))throw new _t.b("contextualballoon-add-view-exist: Cannot add configuration of the same view twice.",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const n=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),n.set(e.view,e),this._viewToStack.set(e.view,n),n===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new _t.b("contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new _t.b("contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(t=>t[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new du(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(e,n)=>{if(n<2)return"";const r=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("bp",[r,n])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new hu(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>=2?Math.min(e-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:n=!0,singleViewMode:r=!1}){this.view.class=t,this.view.withArrow=n,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),r&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}}class du extends ys{constructor(e){super(e);const t=e.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Gi,this.buttonPrevView=this._createButtonView(t("bq"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z" /></svg>\n'),this.buttonNextView=this._createButtonView(t("br"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>\n'),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",e=>e?"":"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(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const n=new Ll(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n}}class hu extends ys{constructor(e,t){super(e);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=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",e=>e?"":"ck-hidden")],style:{top:n.to("top",cu),left:n.to("left",cu),width:n.to("width",cu),height:n.to("height",cu)}},children:this.content}),this.on("change:numberOfPanels",(e,t,n,r)=>{n>r?this._addPanels(n-r):this._removePanels(r-n),this.updatePosition()})}_addPanels(e){for(;e--;){const e=new ys;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:n,height:r}=new vo(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:n,height:r})}}}function pu(e){const t=e.editing.view,n=au.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}class fu extends Is{static get requires(){return[uu]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",n=>{const r=e.commands.get("imageTextAlternative"),o=new Ll(n);return o.set({label:t("bs"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22L2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21l-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',tooltip:!0}),o.bind("isEnabled").to(r,"isEnabled"),this.listenTo(o,"execute",()=>this._showForm()),o})}_createForm(){const e=this.editor,t=e.editing.view.document;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new Zc(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.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",(e,t)=>{this._hideForm(!0),t()}),this.listenTo(e.ui,"update",()=>{Ac(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(Ac(e.editing.view.document.selection)){const n=pu(e);t.updatePosition(n)}}(e):this._hideForm(!0)}),Gc({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const e=this.editor,t=e.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._isInBalloon||this._balloon.add({view:this._form,position:pu(e)}),n.value=n.inputView.element.value=t.value||"",this._form.labeledInput.select()}_hideForm(e){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class mu extends Is{static get requires(){return[qc,fu]}static get pluginName(){return"ImageTextAlternative"}}n(50);class gu extends Is{static get requires(){return[Fc,Uc,mu]}static get pluginName(){return"Image"}}class _u extends ys{constructor(e){super(e),this.buttonView=new Ll(e),this._fileInputView=new vu(e),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 vu extends ys{constructor(e){super(e),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}function bu(e){return/^image\/(jpeg|png|gif|bmp)$/.test(e.type)}function yu(e){return new Promise((t,n)=>{const r=e.getAttribute("src");fetch(r).then(e=>e.blob()).then(e=>{const o=function(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}(e,r),a=function(e,t,n){try{return new File([e],t,{type:n})}catch(e){return null}}(e,"image."+o.replace("image/",""),o);a?t(a):n()}).catch(n)})}class wu extends Is{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageUpload",n=>{const r=new _u(n),o=e.commands.get("imageUpload");return r.set({acceptedType:"image/*",allowMultipleFiles:!0}),r.buttonView.set({label:t("p"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.91 10.54c.26-.23.64-.21.88.03l3.36 3.14 2.23-2.06a.64.64 0 0 1 .87 0l2.52 2.97V4.5H3.2v10.12l3.71-4.08zm10.27-7.51c.6 0 1.09.47 1.09 1.05v11.84c0 .59-.49 1.06-1.09 1.06H2.79c-.6 0-1.09-.47-1.09-1.06V4.08c0-.58.49-1.05 1.1-1.05h14.38zm-5.22 5.56a1.96 1.96 0 1 1 3.4-1.96 1.96 1.96 0 0 1-3.4 1.96z"/></svg>',tooltip:!0}),r.buttonView.bind("isEnabled").to(o),r.on("done",(t,n)=>{const r=Array.from(n).filter(bu);r.length&&e.execute("imageUpload",{file:r})}),r})}}n(52),n(54),n(56);class ku extends Is{constructor(e){super(e),this.placeholder="data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 250"><rect rx="4"/></svg>')}init(){this.editor.editing.downcastDispatcher.on("attribute:uploadStatus:image",(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,n){const r=this.editor,o=t.item,a=o.getAttribute("uploadId");if(!n.consumable.consume(t.item,e.name))return;const i=r.plugins.get(Rl),s=a?t.attributeNewValue:null,l=this.placeholder,c=r.editing.mapper.toViewElement(o),u=n.writer;if("reading"==s)return xu(c,u),void Mu(l,c,u);if("uploading"==s){const e=i.loaders.get(a);return xu(c,u),void(e?(Eu(c,u),function(e,t,n,r){const o=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),o),n.on("change:uploadedPercent",(e,t,n)=>{r.change(e=>{e.setStyle("width",n+"%",o)})})}(c,u,e,r.editing.view),function(e,t,n){if(n.data){const r=e.getChild(0);t.setAttribute("src",n.data,r)}}(c,u,e)):Mu(l,c,u))}"complete"==s&&i.loaders.get(a)&&!Pn&&function(e,t,n){const r=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),r),setTimeout(()=>{n.change(e=>e.remove(e.createRangeOn(r)))},3e3)}(c,u,r.editing.view),function(e,t){Su(e,t,"progressBar")}(c,u),Eu(c,u),function(e,t){t.removeClass("ck-appear",e)}(c,u)}}function xu(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function Mu(e,t,n){t.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",t);const r=t.getChild(0);r.getAttribute("src")!==e&&n.setAttribute("src",e,r),Tu(t,"placeholder")||n.insert(n.createPositionAfter(r),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(n))}function Eu(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),Su(e,t,"placeholder")}function Tu(e,t){for(const n of e.getChildren())if(n.getCustomProperty(t))return n}function Su(e,t,n){const r=Tu(e,n);r&&t.remove(t.createRangeOn(r))}class Du{createDocumentFragment(e){return new Un(e)}createElement(e,t,n){return new Ht(e,t,n)}createText(e){return new At(e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,n){return n._insertChild(e,t)}removeChildren(e,t,n){return n._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const n=e.parent;if(n){const r=n.getChildIndex(e);return this.removeChildren(r,1,n),this.insertChild(r,t,n),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const n=t.getChildIndex(e);this.remove(e),this.insertChild(n,e.getChildren(),t)}}rename(e,t){const n=new Ht(e,t.getAttributes(),t.getChildren());return this.replace(t,n)?n:null}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){y(e)&&void 0===n&&(n=t),n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return gn._createAt(e,t)}createPositionAfter(e){return gn._createAfter(e)}createPositionBefore(e){return gn._createBefore(e)}createRange(e,t){return new _n(e,t)}createRangeOn(e){return _n._createOn(e)}createRangeIn(e){return _n._createIn(e)}createSelection(e,t,n){return new yn(e,t,n)}}class Lu extends Hs{refresh(){this.isEnabled=Yc(this.editor.model)}execute(e){const t=this.editor,n=t.model,r=t.plugins.get(Rl);n.change(t=>{const o=Array.isArray(e.file)?e.file:[e.file];for(const e of o)Cu(t,n,r,e)})}}function Cu(e,t,n,r){const o=n.createLoader(r);o&&Rc(e,t,{uploadId:o.id})}class Pu extends Is{static get requires(){return[Rl,cc]}init(){const e=this.editor,t=e.model.document,n=e.model.schema,r=e.conversion,o=e.plugins.get(Rl);n.extend("image",{allowAttributes:["uploadId","uploadStatus"]}),e.commands.add("imageUpload",new Lu(e)),r.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",(t,n)=>{if(function(e){return Array.from(e.types).includes("text/html")&&""!==e.getData("text/html")}(n.dataTransfer))return;const r=Array.from(n.dataTransfer.files).filter(e=>!!e&&bu(e)),o=n.targetRanges.map(t=>e.editing.mapper.toModelRange(t));e.model.change(n=>{n.setSelection(o),r.length&&(t.stop(),e.model.enqueueChange("default",()=>{e.execute("imageUpload",{file:r})}))})}),e.plugins.has("Clipboard")&&this.listenTo(e.plugins.get("Clipboard"),"inputTransformation",(t,n)=>{const r=Array.from(e.editing.view.createRangeIn(n.content)).filter(e=>function(e){return!(!e.is("element","img")||!e.getAttribute("src"))&&(e.getAttribute("src").match(/^data:image\/\w+;base64,/g)||e.getAttribute("src").match(/^blob:/g))}(e.item)&&!e.item.getAttribute("uploadProcessed")).map(e=>({promise:yu(e.item),imageElement:e.item}));if(!r.length)return;const a=new Du;for(const e of r){a.setAttribute("uploadProcessed",!0,e.imageElement);const t=o.createLoader(e.promise);t&&(a.setAttribute("src","",e.imageElement),a.setAttribute("uploadId",t.id,e.imageElement))}}),e.editing.view.document.on("dragover",(e,t)=>{t.preventDefault()}),t.on("change",()=>{const n=t.differ.getChanges({includeChangesInGraveyard:!0});for(const t of n)if("insert"==t.type&&"$text"!=t.name){const n=t.position.nodeAfter,r="$graveyard"==t.position.root.rootName;for(const t of Ou(e,n)){const e=t.getAttribute("uploadId");if(!e)continue;const n=o.loaders.get(e);n&&(r?n.abort():"idle"==n.status&&this._readAndUpload(n,t))}}})}_readAndUpload(e,t){const n=this.editor,r=n.model,o=n.locale.t,a=n.plugins.get(Rl),i=n.plugins.get(cc);return r.enqueueChange("transparent",e=>{e.setAttribute("uploadStatus","reading",t)}),e.read().then(()=>{const o=e.upload();if(Nn){const e=n.editing.mapper.toViewElement(t).getChild(0);n.editing.view.once("render",()=>{if(!e.parent)return;const t=n.editing.view.domConverter.mapViewToDom(e.parent);if(!t)return;const r=t.style.display;t.style.display="none",t._ckHack=t.offsetHeight,t.style.display=r})}return r.enqueueChange("transparent",e=>{e.setAttribute("uploadStatus","uploading",t)}),o}).then(e=>{r.enqueueChange("transparent",n=>{n.setAttributes({uploadStatus:"complete",src:e.default},t),this._parseAndSetSrcsetAttributeOnImage(e,t,n)}),s()}).catch(n=>{if("error"!==e.status&&"aborted"!==e.status)throw n;"error"==e.status&&n&&i.showWarning(n,{title:o("al"),namespace:"upload"}),s(),r.enqueueChange("transparent",e=>{e.remove(t)})});function s(){r.enqueueChange("transparent",e=>{e.removeAttribute("uploadId",t),e.removeAttribute("uploadStatus",t)}),a.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,n){let r=0;const o=Object.keys(e).filter(e=>{const t=parseInt(e,10);if(!isNaN(t))return r=Math.max(r,t),!0}).map(t=>`${e[t]} ${t}w`).join(", ");""!=o&&n.setAttribute("srcset",{data:o,width:r},t)}}function Ou(e,t){return Array.from(e.model.createRangeOn(t)).filter(e=>e.item.is("image")).map(e=>e.item)}class Nu extends Is{static get pluginName(){return"ImageUpload"}static get requires(){return[Pu,wu,ku]}}class Au extends Hs{refresh(){const e=this.editor.model,t=tc(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("paragraph"),this.isEnabled=!!t&&Iu(t,e.schema)}execute(e={}){const t=this.editor.model,n=t.document;t.change(r=>{const o=(e.selection||n.selection).getSelectedBlocks();for(const e of o)!e.is("paragraph")&&Iu(e,t.schema)&&r.rename(e,"paragraph")})}}function Iu(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class Ru extends Is{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model,n=e.data;e.commands.add("paragraph",new Au(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,t)=>Ru.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,converterPriority:"low"}),n.upcastDispatcher.on("element",(e,t,n)=>{n.consumable.test(t.viewItem,{name:t.viewItem.name})&&ju(t.viewItem,t.modelCursor,n.schema)&&Object.assign(t,Yu(t.viewItem,t.modelCursor,n))},{priority:"low"}),n.upcastDispatcher.on("text",(e,t,n)=>{t.modelRange||ju(t.viewItem,t.modelCursor,n.schema)&&Object.assign(t,Yu(t.viewItem,t.modelCursor,n))},{priority:"lowest"}),t.document.registerPostFixer(e=>this._autoparagraphEmptyRoots(e)),e.data.on("ready",()=>{t.enqueueChange("transparent",e=>this._autoparagraphEmptyRoots(e))},{priority:"lowest"})}_autoparagraphEmptyRoots(e){const t=this.editor.model;for(const n of t.document.getRootNames()){const r=t.document.getRoot(n);if(r.isEmpty&&"$graveyard"!=r.rootName&&t.schema.checkChild(r,"paragraph"))return e.insertElement("paragraph",r),!0}}}function Yu(e,t,n){const r=n.writer.createElement("paragraph");return n.writer.insert(r,t),n.convertItem(e,n.writer.createPositionAt(r,0))}function ju(e,t,n){const r=n.createContext(t);return!!n.checkChild(r,"paragraph")&&!!n.checkChild(r.push("paragraph"),e)}Ru.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td"]);class Fu extends Hs{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=tc(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>Hu(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,n=t.document,r=e.value;t.change(e=>{const o=Array.from(n.selection.getSelectedBlocks()).filter(e=>Hu(e,r,t.schema));for(const t of o)t.is(r)||e.rename(t,r)})}}function Hu(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}const zu="paragraph";class Bu extends Is{constructor(e){super(e),e.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[Ru]}init(){const e=this.editor,t=e.config.get("heading.options"),n=[];for(const r of t)r.model!==zu&&(e.model.schema.register(r.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(r),n.push(r.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new Fu(e,n))}afterInit(){const e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(t,r)=>{const o=e.model.document.selection.getFirstPosition().parent;n.some(e=>o.is(e.model))&&!o.is(zu)&&0===o.childCount&&r.writer.rename(o,zu)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:yt.get("low")+1})}}class Uu{constructor(e,t){t&&Zt(this,t),e&&this.set(e)}}Ct(Uu,on);class Vu extends ys{constructor(e){super(e);const t=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",t.to("position",e=>"ck-dropdown__panel_"+e),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to(e=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}n(58);class Wu extends ys{constructor(e,t,n){super(e);const r=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("panelPosition","auto"),this.focusTracker=new Gi,this.keystrokes=new ji,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",r.to("class"),r.if("isEnabled","ck-disabled",e=>!e)]},children:[t,n]}),t.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=Wu._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 e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set("arrowdown",(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set("arrowright",(e,t)=>{this.isOpen&&t()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:n,northWest:r}=Wu.defaultPanelPositions;return"ltr"===this.locale.uiLanguageDirection?[e,t,n,r]:[t,e,r,n]}}Wu.defaultPanelPositions={southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.bottom-t.height,left:e.left-t.width+e.width,name:"nw"})},Wu._getOptimalPosition=eu;class qu extends Ll{constructor(e){super(e),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 e=new Sl;return e.content='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>',e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}n(60);class Gu extends ys{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new Gi,this.keystrokes=new ji,this._focusCycler=new Ls({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 e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class Ju extends ys{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class Ku extends ys{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}n(62);class Qu extends Ll{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new ys;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function Xu(e,t=qu){const n=new t(e),r=new Vu(e),o=new Wu(e,n,r);return n.bind("isEnabled").to(o),n instanceof qu?n.bind("isOn").to(o,"isOpen"):n.arrowView.bind("isOn").to(o,"isOpen"),function(e){(function(e){e.on("render",()=>{Gc({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})})(e),function(e){e.on("execute",t=>{t.source instanceof Qu||(e.isOpen=!1)})}(e),function(e){e.keystrokes.set("arrowdown",(t,n)=>{e.isOpen&&(e.panelView.focus(),n())}),e.keystrokes.set("arrowup",(t,n)=>{e.isOpen&&(e.panelView.focusLast(),n())})}(e)}(o),o}function $u(e,t){const n=e.locale,r=e.listView=new Gu(n);r.items.bindTo(t).using(({type:e,model:t})=>{if("separator"===e)return new Ku(n);if("button"===e||"switchbutton"===e){const r=new Ju(n);let o;return(o="button"===e?new Ll(n):new Qu(n)).bind(...Object.keys(t)).to(t),o.delegate("execute").to(r),r.children.add(o),r}}),e.panelView.children.add(r),r.items.delegate("execute").to(e)}n(64),n(66),n(10);class Zu extends Is{init(){const e=this.editor,t=e.t,n=function(e){const t=e.t,n={Paragraph:t("bt"),"Heading 1":t("bu"),"Heading 2":t("bv"),"Heading 3":t("bw"),"Heading 4":t("bx"),"Heading 5":t("by"),"Heading 6":t("bz")};return e.config.get("heading.options").map(e=>{const t=n[e.title];return t&&t!=e.title&&(e.title=t),e})}(e),r=t("h"),o=t("i");e.ui.componentFactory.add("heading",t=>{const a={},i=new kn,s=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[s];for(const e of n){const t={type:"button",model:new Uu({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(l,"value"),t.model.set("commandName","paragraph"),c.push(l)):(t.model.bind("isOn").to(s,"value",t=>t===e.model),t.model.set({commandName:"heading",commandValue:e.model})),i.add(t),a[e.model]=e.title}const u=Xu(t);return $u(u,i),u.buttonView.set({isOn:!1,withText:!0,tooltip:o}),u.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),u.bind("isEnabled").toMany(c,"isEnabled",(...e)=>e.some(e=>e)),u.buttonView.bind("label").to(s,"value",l,"value",(e,t)=>{const n=e||t&&"paragraph";return a[n]?a[n]:r}),this.listenTo(u,"execute",t=>{e.execute(t.source.commandName,t.source.commandValue?{value:t.source.commandValue}:void 0),e.editing.view.focus()}),u})}}function ed(e){for(const t of e.getChildren())if(t&&t.is("caption"))return t;return null}function td(e){const t=e.parent;return"figcaption"==e.name&&t&&"figure"==t.name&&t.hasClass("image")?{name:!0}:null}class nd extends Is{init(){const e=this.editor,t=e.editing.view,n=e.model.schema,r=e.data,o=e.editing,a=e.t;n.register("caption",{allowIn:"image",allowContentOf:"$block",isLimit:!0}),e.model.document.registerPostFixer(e=>this._insertMissingModelCaptionElement(e)),e.conversion.for("upcast").elementToElement({view:td,model:"caption"}),r.downcastDispatcher.on("insert:caption",rd(e=>e.createContainerElement("figcaption"),!1));const i=function(e,t){return n=>{const r=n.createEditableElement("figcaption");return n.setCustomProperty("imageCaption",!0,r),Qi({view:e,element:r,text:t}),Pc(r,n)}}(t,a("ak"));o.downcastDispatcher.on("insert:caption",rd(i)),o.downcastDispatcher.on("insert",this._fixCaptionVisibility(e=>e.item),{priority:"high"}),o.downcastDispatcher.on("remove",this._fixCaptionVisibility(e=>e.position.parent),{priority:"high"}),t.document.registerPostFixer(e=>this._updateCaptionVisibility(e))}_updateCaptionVisibility(e){const t=this.editor.editing.mapper,n=this._lastSelectedCaption;let r;const o=this.editor.model.document.selection,a=o.getSelectedElement();if(a&&a.is("image")){const e=ed(a);r=t.toViewElement(e)}const i=od(o.getFirstPosition().parent);if(i&&(r=t.toViewElement(i)),r)return n?(n===r||(ad(n,e),this._lastSelectedCaption=r),id(r,e)):(this._lastSelectedCaption=r,id(r,e));if(n){const t=ad(n,e);return this._lastSelectedCaption=null,t}return!1}_fixCaptionVisibility(e){return(t,n,r)=>{const o=od(e(n)),a=this.editor.editing.mapper,i=r.writer;if(o){const e=a.toViewElement(o);e&&(o.childCount?i.removeClass("ck-hidden",e):i.addClass("ck-hidden",e))}}}_insertMissingModelCaptionElement(e){const t=this.editor.model,n=t.document.differ.getChanges(),r=[];for(const e of n)if("insert"==e.type&&"$text"!=e.name){const n=e.position.nodeAfter;if(n.is("image")&&!ed(n)&&r.push(n),!n.is("image")&&n.childCount)for(const e of t.createRangeIn(n).getItems())e.is("image")&&!ed(e)&&r.push(e)}for(const t of r)e.appendElement("caption",t);return!!r.length}}function rd(e,t=!0){return(n,r,o)=>{const a=r.item;if((a.childCount||t)&&Ic(a.parent)){if(!o.consumable.consume(r.item,"insert"))return;const t=o.mapper.toViewElement(r.range.start.parent),n=e(o.writer),i=o.writer;a.childCount||i.addClass("ck-hidden",n),function(e,t,n,r){const o=r.writer.createPositionAt(n,"end");r.writer.insert(o,e),r.mapper.bindElements(t,e)}(n,r.item,t,o)}}}function od(e){const t=e.getAncestors({includeSelf:!0}).find(e=>"caption"==e.name);return t&&t.parent&&"image"==t.parent.name?t:null}function ad(e,t){return!e.childCount&&!e.hasClass("ck-hidden")&&(t.addClass("ck-hidden",e),!0)}function id(e,t){return!!e.hasClass("ck-hidden")&&(t.removeClass("ck-hidden",e),!0)}n(69);class sd extends Hs{constructor(e,t){super(e),this.defaultStyle=!1,this.styles=t.reduce((e,t)=>(e[t.name]=t,t.isDefault&&(this.defaultStyle=t.name),e),{})}refresh(){const e=this.editor.model.document.selection.getSelectedElement();if(this.isEnabled=Ic(e),e)if(e.hasAttribute("imageStyle")){const t=e.getAttribute("imageStyle");this.value=!!this.styles[t]&&t}else this.value=this.defaultStyle;else this.value=!1}execute(e){const t=e.value,n=this.editor.model,r=n.document.selection.getSelectedElement();n.change(e=>{this.styles[t].isDefault?e.removeAttribute("imageStyle",r):e.setAttribute("imageStyle",t,r)})}}function ld(e,t){for(const n of t)if(n.name===e)return n}var cd='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5V3h16v1.5zm2.5 3V12h11V7.5h-11zM4.061 6H15.94c.586 0 1.061.407 1.061.91v5.68c0 .503-.475.91-1.061.91H4.06c-.585 0-1.06-.407-1.06-.91V6.91C3 6.406 3.475 6 4.061 6zM2 16.5V15h16v1.5z"/></svg>',ud='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M18 4.5V3H2v1.5h16zm0 3V6h-5.674v1.5H18zm0 3V9h-5.674v1.5H18zm0 3V12h-5.674v1.5H18zm-8.5-6V12h-6V7.5h6zm.818-1.5H2.682C2.305 6 2 6.407 2 6.91v5.68c0 .503.305.91.682.91h7.636c.377 0 .682-.407.682-.91V6.91c0-.503-.305-.91-.682-.91zM18 16.5V15H2v1.5h16z"/></svg>',dd='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5V3h16v1.5zm4.5 3V12h7V7.5h-7zM5.758 6h8.484c.419 0 .758.407.758.91v5.681c0 .502-.34.909-.758.909H5.758c-.419 0-.758-.407-.758-.91V6.91c0-.503.34-.91.758-.91zM2 16.5V15h16v1.5z"/></svg>',hd='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5V3h16v1.5zm0 3V6h5.674v1.5zm0 3V9h5.674v1.5zm0 3V12h5.674v1.5zm8.5-6V12h6V7.5h-6zM9.682 6h7.636c.377 0 .682.407.682.91v5.68c0 .503-.305.91-.682.91H9.682c-.377 0-.682-.407-.682-.91V6.91c0-.503.305-.91.682-.91zM2 16.5V15h16v1.5z"/></svg>';const pd={full:{name:"full",title:"Full size image",icon:cd,isDefault:!0},side:{name:"side",title:"Side image",icon:hd,className:"image-style-side"},alignLeft:{name:"alignLeft",title:"Left aligned image",icon:ud,className:"image-style-align-left"},alignCenter:{name:"alignCenter",title:"Centered image",icon:dd,className:"image-style-align-center"},alignRight:{name:"alignRight",title:"Right aligned image",icon:hd,className:"image-style-align-right"}},fd={full:cd,left:ud,right:hd,center:dd};function md(e=[]){return e.map(gd)}function gd(e){if("string"==typeof e){const t=e;pd[t]?e=Object.assign({},pd[t]):(console.warn(Object(_t.a)("image-style-not-found: There is no such image style of given name."),{name:t}),e={name:t})}else if(pd[e.name]){const t=pd[e.name],n=Object.assign({},e);for(const r in t)e.hasOwnProperty(r)||(n[r]=t[r]);e=n}return"string"==typeof e.icon&&fd[e.icon]&&(e.icon=fd[e.icon]),e}class _d extends Is{static get pluginName(){return"ImageStyleEditing"}init(){const e=this.editor,t=e.model.schema,n=e.data,r=e.editing;e.config.define("image.styles",["full","side"]);const o=md(e.config.get("image.styles"));t.extend("image",{allowAttributes:"imageStyle"});const a=function(e){return(t,n,r)=>{if(!r.consumable.consume(n.item,t.name))return;const o=ld(n.attributeNewValue,e),a=ld(n.attributeOldValue,e),i=r.mapper.toViewElement(n.item),s=r.writer;a&&s.removeClass(a.className,i),o&&s.addClass(o.className,i)}}(o);r.downcastDispatcher.on("attribute:imageStyle:image",a),n.downcastDispatcher.on("attribute:imageStyle:image",a),n.upcastDispatcher.on("element:figure",function(e){const t=e.filter(e=>!e.isDefault);return(e,n,r)=>{if(!n.modelRange)return;const o=n.viewItem,a=tc(n.modelRange.getItems());if(r.schema.checkAttribute(a,"imageStyle"))for(const e of t)r.consumable.consume(o,{classes:e.className})&&r.writer.setAttribute("imageStyle",e.name,a)}}(o),{priority:"low"}),e.commands.add("imageStyle",new sd(e,o))}}n(71);class vd extends Is{static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Full size image":e("k"),"Side image":e("l"),"Left aligned image":e("m"),"Centered image":e("n"),"Right aligned image":e("o")}}init(){const e=function(e,t){for(const n of e)t[n.title]&&(n.title=t[n.title]);return e}(md(this.editor.config.get("image.styles")),this.localizedDefaultStylesTitles);for(const t of e)this._createButton(t)}_createButton(e){const t=this.editor,n="imageStyle:"+e.name;t.ui.componentFactory.add(n,n=>{const r=t.commands.get("imageStyle"),o=new Ll(n);return o.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(r,"isEnabled"),o.bind("isOn").to(r,"value",t=>t===e.name),this.listenTo(o,"execute",()=>t.execute("imageStyle",{value:e.name})),o})}}class bd extends Is{static get requires(){return[uu]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",t=>{(function(e){const t=e.getSelectedElement();return!(!t||!Dc(t))})(e.editing.view.document.selection)&&t.stop()},{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:n,getRelatedElement:r,balloonClassName:o="ck-toolbar-container"}){const a=this.editor,i=a.t,s=new Os(a.locale);if(s.ariaLabel=t||i("av"),this._toolbarDefinitions.has(e))throw new _t.b("widget-toolbar-duplicated: Toolbar with the given id was already added.",this,{toolbarId:e});s.fillFromConfig(n,a.ui.componentFactory),this._toolbarDefinitions.set(e,{view:s,getRelatedElement:r,balloonClassName:o})}_updateToolbarsVisibility(){let e=0,t=null,n=null;for(const r of this._toolbarDefinitions.values()){const o=r.getRelatedElement(this.editor.editing.view.document.selection);if(this.editor.ui.focusTracker.isFocused)if(o){const a=o.getAncestors().length;a>e&&(e=a,t=o,n=r)}else this._isToolbarInBalloon(r)&&this._hideToolbar(r);else this._isToolbarVisible(r)&&this._hideToolbar(r)}n&&this._showToolbar(n,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?yd(this.editor,t):this._isToolbarInBalloon(e)||(this._balloon.add({view:e.view,position:wd(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);yd(this.editor,t)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function yd(e,t){const n=e.plugins.get("ContextualBalloon"),r=wd(e,t);n.updatePosition(r)}function wd(e,t){const n=e.editing.view,r=au.defaultPositions;return{target:n.domConverter.mapViewToDom(t),positions:[r.northArrowSouth,r.northArrowSouthWest,r.northArrowSouthEast,r.southArrowNorth,r.southArrowNorthWest,r.southArrowNorthEast]}}function kd(e,t,n){return n.createRange(xd(e,t,!0,n),xd(e,t,!1,n))}function xd(e,t,n,r){let o=e.textNode||(n?e.nodeBefore:e.nodeAfter),a=null;for(;o&&o.getAttribute("linkHref")==t;)a=o,o=n?o.previousSibling:o.nextSibling;return a?r.createPositionAt(a,n?"before":"after"):e}class Md extends Hs{constructor(e){super(e),this.manualDecorators=new kn}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute("linkHref");for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id);this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"linkHref")}execute(e,t={}){const n=this.editor.model,r=n.document.selection,o=[],a=[];for(const e in t)t[e]?o.push(e):a.push(e);n.change(t=>{if(r.isCollapsed){const i=r.getFirstPosition();if(r.hasAttribute("linkHref")){const s=kd(i,r.getAttribute("linkHref"),n);t.setAttribute("linkHref",e,s),o.forEach(e=>{t.setAttribute(e,!0,s)}),a.forEach(e=>{t.removeAttribute(e,s)}),t.setSelection(s)}else if(""!==e){const a=Oo(r.getAttributes());a.set("linkHref",e),o.forEach(e=>{a.set(e,!0)});const s=t.createText(e,a);n.insertContent(s,i),t.setSelection(t.createRangeOn(s))}}else{const i=n.schema.getValidRanges(r.getRanges(),"linkHref");for(const n of i)t.setAttribute("linkHref",e,n),o.forEach(e=>{t.setAttribute(e,!0,n)}),a.forEach(e=>{t.removeAttribute(e,n)})}})}_getDecoratorStateFromModel(e){return this.editor.model.document.selection.getAttribute(e)||!1}}class Ed extends Hs{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute("linkHref")}execute(){const e=this.editor,t=this.editor.model,n=t.document.selection,r=e.commands.get("link");t.change(e=>{const o=n.isCollapsed?[kd(n.getFirstPosition(),n.getAttribute("linkHref"),t)]:n.getRanges();for(const t of o)if(e.removeAttribute("linkHref",t),r)for(const n of r.manualDecorators)e.removeAttribute(n.id,t)})}}var Td=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}(e,t,n)},Sd=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Dd=function(e){return Sd.test(e)},Ld="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Cd="\\ud83c[\\udffb-\\udfff]",Pd="[^\\ud800-\\udfff]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Nd="[\\ud800-\\udbff][\\udc00-\\udfff]",Ad="(?:"+Ld+"|"+Cd+")?",Id="[\\ufe0e\\ufe0f]?"+Ad+"(?:\\u200d(?:"+[Pd,Od,Nd].join("|")+")[\\ufe0e\\ufe0f]?"+Ad+")*",Rd="(?:"+[Pd+Ld+"?",Ld,Od,Nd,"[\\ud800-\\udfff]"].join("|")+")",Yd=RegExp(Cd+"(?="+Cd+")|"+Rd+Id,"g"),jd=function(e){return Dd(e)?function(e){return e.match(Yd)||[]}(e):function(e){return e.split("")}(e)},Fd=o?o.prototype:void 0,Hd=Fd?Fd.toString:void 0,zd=function e(t){if("string"==typeof t)return t;if(se(t))return function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,e)+"";if(Zr(t))return Hd?Hd.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Bd=function(e){e=function(e){return null==e?"":zd(e)}(e);var t=Dd(e)?jd(e):void 0,n=t?t[0]:e.charAt(0),r=t?Td(t,1).join(""):e.slice(1);return n.toUpperCase()+r};const Ud=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Vd=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function Wd(e,t){const n=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,n),n}function qd(e){return function(e){return e.replace(Ud,"").match(Vd)}(e=String(e))?e:"#"}class Gd{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(e=>this._definitions.add(e)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(e,t,n)=>{if(!n.consumable.test(t.item,"attribute:linkHref"))return;const r=n.writer,o=r.document.selection;for(const e of this._definitions){const a=r.createAttributeElement("a",e.attributes,{priority:5});r.setCustomProperty("link",!0,a),e.callback(t.attributeNewValue)?t.item.is("selection")?r.wrap(o.getFirstRange(),a):r.wrap(n.mapper.toViewRange(t.range),a):r.unwrap(n.mapper.toViewRange(t.range),a)}},{priority:"high"})}}}class Jd{constructor({id:e,label:t,attributes:n}){this.id=e,this.set("value"),this.label=t,this.attributes=n}}Ct(Jd,on);class Kd{constructor(e,t,n){this.model=e,this.attribute=n,this._modelSelection=e.document.selection,this._overrideUid=null,this._isNextGravityRestorationSkipped=!1,t.listenTo(this._modelSelection,"change:range",(e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&Qd(this._modelSelection.getFirstPosition(),n)||this._restoreGravity())})}handleForwardMovement(e,t){const n=this.attribute;if(!(this._isGravityOverridden||e.isAtStart&&this._hasSelectionAttribute))return Zd(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._removeSelectionAttribute(),!0):Xd(e,n)||$d(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._overrideGravity(),!0):void 0}handleBackwardMovement(e,t){const n=this.attribute;return this._isGravityOverridden?Zd(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._restoreGravity(),this._removeSelectionAttribute(),!0):(this._preventCaretMovement(t),this._restoreGravity(),e.isAtStart&&this._removeSelectionAttribute(),!0):Zd(e,n)&&!this._hasSelectionAttribute?(this._preventCaretMovement(t),this._setSelectionAttributeFromTheNodeBefore(e),!0):e.isAtEnd&&$d(e,n)?this._hasSelectionAttribute?void(eh(e,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity())):(this._preventCaretMovement(t),this._setSelectionAttributeFromTheNodeBefore(e),!0):e.isAtStart?this._hasSelectionAttribute?(this._removeSelectionAttribute(),this._preventCaretMovement(t),!0):void 0:void(eh(e,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity()))}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}_preventCaretMovement(e){e.preventDefault()}_removeSelectionAttribute(){this.model.change(e=>{e.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(e){const t=this.attribute;this.model.change(n=>{n.setSelectionAttribute(this.attribute,e.nodeBefore.getAttribute(t))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=!0}}function Qd(e,t){return Xd(e,t)||$d(e,t)}function Xd(e,t){const{nodeBefore:n,nodeAfter:r}=e,o=!!n&&n.hasAttribute(t);return!!r&&r.hasAttribute(t)&&(!o||n.getAttribute(t)!==r.getAttribute(t))}function $d(e,t){const{nodeBefore:n,nodeAfter:r}=e,o=!!n&&n.hasAttribute(t),a=!!r&&r.hasAttribute(t);return o&&(!a||n.getAttribute(t)!==r.getAttribute(t))}function Zd(e,t){const{nodeBefore:n,nodeAfter:r}=e,o=!!n&&n.hasAttribute(t);if(r&&r.hasAttribute(t)&&o)return r.getAttribute(t)!==n.getAttribute(t)}function eh(e,t){return Qd(e.getShiftedBy(-1),t)}n(73);const th="ck-link_selected",nh="automatic",rh=/^(https?:)?\/\//;class oh extends Is{constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor,t=e.locale;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:Wd}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>Wd(qd(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new Md(e)),e.commands.add("unlink",new Ed(e));const n=function(e,t){const n={"Open in a new tab":e("ax"),Downloadable:e("ay")};return t.forEach(e=>(e.label&&n[e.label]&&(e.label=n[e.label]),e)),t}(e.t,function(e){const t=[];if(e)for(const[n,r]of Object.entries(e)){const e=Object.assign({},r,{id:"link"+Bd(n)});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(n.filter(e=>e.mode===nh)),this._enableManualDecorators(n.filter(e=>"manual"===e.mode)),function({view:e,model:t,emitter:n,attribute:r,locale:o}){const a=new Kd(t,n,r),i=t.document.selection;n.listenTo(e.document,"keydown",(e,t)=>{if(!i.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const n=t.keyCode==Yn.arrowright,r=t.keyCode==Yn.arrowleft;if(!n&&!r)return;const s=i.getFirstPosition(),l=o.contentLanguageDirection;let c;(c="ltr"===l&&n||"rtl"===l&&r?a.handleForwardMovement(s,t):a.handleBackwardMovement(s,t))&&e.stop()},{priority:yt.get("high")+1})}({view:e.editing.view,model:e.model,emitter:this,attribute:"linkHref",locale:t}),this._setupLinkHighlight()}_enableAutomaticDecorators(e){const t=this.editor,n=new Gd;t.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:nh,callback:e=>rh.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(e),n.length&&t.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,n=t.commands.get("link").manualDecorators;e.forEach(e=>{t.model.schema.extend("$text",{allowAttributes:e.id}),n.add(new Jd(e)),t.conversion.for("downcast").attributeToElement({model:e.id,view:(t,r)=>{if(t){const t=n.get(e.id).attributes,o=r.createAttributeElement("a",t,{priority:5});return r.setCustomProperty("link",!0,o),o}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:n.get(e.id).attributes},model:{key:e.id}})})}_setupLinkHighlight(){const e=this.editor,t=e.editing.view,n=new Set;t.document.registerPostFixer(t=>{const r=e.model.document.selection;let o=!1;if(r.hasAttribute("linkHref")){const a=kd(r.getFirstPosition(),r.getAttribute("linkHref"),e.model),i=e.editing.mapper.toViewRange(a);for(const e of i.getItems())e.is("a")&&!e.hasClass(th)&&(t.addClass(th,e),n.add(e),o=!0)}return o}),e.conversion.for("editingDowncast").add(e=>{function r(){t.change(e=>{for(const t of n.values())e.removeClass(th,t),n.delete(t)})}e.on("insert",r,{priority:"highest"}),e.on("remove",r,{priority:"highest"}),e.on("attribute",r,{priority:"highest"}),e.on("selection",r,{priority:"highest"})})}}class ah extends Qr{constructor(e){super(e),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}n(75);class ih extends ys{constructor(e,t=[]){super(e);const n=e.t;this.focusTracker=new Gi,this.keystrokes=new ji,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("bd"),Xc,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("be"),$c,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t),this._focusables=new ts,this._focusCycler=new Ls({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const r=["ck","ck-link-form"];t.length&&r.push("ck-link-form_layout-vertical"),this.setTemplate({tag:"form",attributes:{class:r,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((e,t)=>(e[t.name]=t.isOn,e),{})}render(){super.render(),Qc({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new Jc(this.locale,Kc);return t.label=e("bf"),t.inputView.placeholder="https://example.com",t}_createButton(e,t,n,r){const o=new Ll(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),r&&o.delegate("execute").to(this,r),o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const n of e){const e=new Qu(this.locale);e.set({name:n.id,label:n.label,withText:!0}),e.bind("isOn").to(n,"value"),e.on("execute",()=>{n.set("value",!e.isOn)}),t.add(e)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new ys;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}n(77);class sh extends ys{constructor(e){super(e);const t=e.t;this.focusTracker=new Gi,this.keystrokes=new ji,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("az"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.077 15l.991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562l-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(t("ba"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.3 17.37l-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506L13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5L9.375 17H19v1.5H8z"/></svg>',"edit"),this.set("href"),this._focusables=new ts,this._focusCycler=new Ls({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(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(e,t,n){const r=new Ll(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.delegate("execute").to(this,n),r}_createPreviewButton(){const e=new Ll(this.locale),t=this.bindTemplate,n=this.t;return e.set({withText:!0,tooltip:n("bb")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",e=>e&&qd(e)),target:"_blank"}}),e.bind("label").to(this,"href",e=>e||n("bc")),e.bind("isEnabled").to(this,"href",e=>!!e),e.template.tag="a",e.template.eventListeners={},e}}const lh="Ctrl+K";class ch extends Is{static get requires(){return[uu]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(ah),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(uu),this._createToolbarLinkButton(),this._enableUserBalloonInteractions()}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const e=this.editor,t=new sh(e.locale),n=e.commands.get("link"),r=e.commands.get("unlink");return t.bind("href").to(n,"value"),t.editButtonView.bind("isEnabled").to(n),t.unlinkButtonView.bind("isEnabled").to(r),this.listenTo(t,"edit",()=>{this._addFormView()}),this.listenTo(t,"unlink",()=>{e.execute("unlink"),this._hideUI()}),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(lh,(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),n=new ih(e.locale,t.manualDecorators);return n.urlInputView.bind("value").to(t,"value"),n.urlInputView.bind("isReadOnly").to(t,"isEnabled",e=>!e),n.saveButtonView.bind("isEnabled").to(t),this.listenTo(n,"submit",()=>{e.execute("link",n.urlInputView.inputView.element.value,n.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(n,"cancel",()=>{this._closeFormView()}),n.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),n}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),n=e.t;e.keystrokes.set(lh,(e,n)=>{n(),t.isEnabled&&this._showUI(!0)}),e.ui.componentFactory.add("link",e=>{const r=new Ll(e);return r.isEnabled=!0,r.label=n("aq"),r.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.077 15l.991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>',r.keystroke=lh,r.tooltip=!0,r.isToggleable=!0,r.bind("isEnabled").to(t,"isEnabled"),r.bind("isOn").to(t,"value",e=>!!e),this.listenTo(r,"execute",()=>this._showUI(!0)),r})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),Gc({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 e=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=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus())}_showUI(e=!1){this.editor.commands.get("link").isEnabled&&(this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI())}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView)}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let n=this._getSelectedLinkElement(),r=a();const o=()=>{const e=this._getSelectedLinkElement(),t=a();n&&!e||!n&&t!==r?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=e,r=t};function a(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.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 e=this.editor.editing.view,t=e.document,n=this._getSelectedLinkElement();return{target:n?e.domConverter.mapViewToDom(n):e.domConverter.viewRangeToDom(t.selection.getFirstRange())}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection;if(t.isCollapsed)return uh(t.getFirstPosition());{const n=t.getFirstRange().getTrimmed(),r=uh(n.start),o=uh(n.end);return r&&r==o&&e.createRangeIn(r).getTrimmed().isEqual(n)?r:null}}}function uh(e){return e.getAncestors().find(e=>function(e){return e.is("attributeElement")&&!!e.getCustomProperty("link")}(e))}class dh extends Hs{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document,n=Array.from(t.selection.getSelectedBlocks()).filter(t=>ph(t,e.schema)),r=!0===this.value;e.change(e=>{if(r){let t=n[n.length-1].nextSibling,r=Number.POSITIVE_INFINITY,o=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e<r&&(r=e);const n=e-r;o.push({element:t,listIndent:n}),t=t.nextSibling}o=o.reverse();for(const t of o)e.setAttribute("listIndent",t.listIndent,t.element)}if(!r){let e=Number.POSITIVE_INFINITY;for(const t of n)t.is("listItem")&&t.getAttribute("listIndent")<e&&(e=t.getAttribute("listIndent"));hh(n,!0,e=0===e?1:e),hh(n,!1,e)}for(const t of n.reverse())r&&"listItem"==t.name?e.rename(t,"paragraph"):r||"listItem"==t.name?r||"listItem"!=t.name||t.getAttribute("listType")==this.type||e.setAttribute("listType",this.type,t):(e.setAttributes({listType:this.type,listIndent:0},t),e.rename(t,"listItem"))})}_getValue(){const e=tc(this.editor.model.document.selection.getSelectedBlocks());return!!e&&e.is("listItem")&&e.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=tc(e.getSelectedBlocks());return!!n&&ph(n,t)}}function hh(e,t,n){const r=t?e[0]:e[e.length-1];if(r.is("listItem")){let o=r[t?"previousSibling":"nextSibling"],a=r.getAttribute("listIndent");for(;o&&o.is("listItem")&&o.getAttribute("listIndent")>=n;)a>o.getAttribute("listIndent")&&(a=o.getAttribute("listIndent")),o.getAttribute("listIndent")==a&&e[t?"unshift":"push"](o),o=o[t?"previousSibling":"nextSibling"]}}function ph(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class fh extends Hs{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let n=Array.from(t.selection.getSelectedBlocks());e.change(e=>{const t=n[n.length-1];let r=t.nextSibling;for(;r&&"listItem"==r.name&&r.getAttribute("listIndent")>t.getAttribute("listIndent");)n.push(r),r=r.nextSibling;this._indentBy<0&&(n=n.reverse());for(const t of n){const n=t.getAttribute("listIndent")+this._indentBy;n<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",n,t)}})}_checkEnabled(){const e=tc(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),n=e.getAttribute("listType");let r=e.previousSibling;for(;r&&r.is("listItem")&&r.getAttribute("listIndent")>=t;){if(r.getAttribute("listIndent")==t)return r.getAttribute("listType")==n;r=r.previousSibling}return!1}return!0}}function mh(e,t,n,r){const o=t.parent,a=n.mapper,i=n.writer;let s=a.toViewPosition(r.createPositionBefore(e));const l=vh(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=a.toViewElement(l);s=i.breakContainer(i.createPositionAfter(e))}else s=c&&"listItem"==c.name?a.toViewPosition(r.createPositionAt(c,"end")):a.toViewPosition(r.createPositionBefore(e));if(s=_h(s),i.insert(s,o),c&&"listItem"==c.name){const e=a.toViewElement(c),n=i.createRange(i.createPositionAt(e,0),s).getWalker({ignoreElementEnd:!0});for(const e of n)if(e.item.is("li")){const r=i.breakContainer(i.createPositionBefore(e.item)),o=e.item.parent,a=i.createPositionAt(t,"end");gh(i,a.nodeBefore,a.nodeAfter),i.move(i.createRangeOn(o),a),n.position=r}}else{const n=o.nextSibling;if(n&&(n.is("ul")||n.is("ol"))){let r=null;for(const t of n.getChildren()){const n=a.toModelElement(t);if(!(n&&n.getAttribute("listIndent")>e.getAttribute("listIndent")))break;r=t}r&&(i.breakContainer(i.createPositionAfter(r)),i.move(i.createRangeOn(r.parent),i.createPositionAt(t,"end")))}}gh(i,o,o.nextSibling),gh(i,o.previousSibling,o)}function gh(e,t,n){return!t||!n||"ul"!=t.name&&"ol"!=t.name||t.name!=n.name||t.getAttribute("class")!==n.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function _h(e){return e.getLastMatchingPosition(e=>e.item.is("uiElement"))}function vh(e,t){const n=!!t.sameIndent,r=!!t.smallerIndent,o=t.listIndent;let a=e;for(;a&&"listItem"==a.name;){const e=a.getAttribute("listIndent");if(n&&o==e||r&&o>e)return a;a=a.previousSibling}return null}function bh(e,t,n,r){e.ui.componentFactory.add(t,o=>{const a=e.commands.get(t),i=new Ll(o);return i.set({label:n,icon:r,tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(a,"value","isEnabled"),i.on("execute",()=>e.execute(t)),i})}function yh(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:Vt.call(this)}function wh(e){return(t,n,r)=>{const o=r.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 a=n.item;mh(a,function(e,t){const n=t.mapper,r=t.writer,o="numbered"==e.getAttribute("listType")?"ol":"ul",a=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=yh,t}(r),i=r.createContainerElement(o,null);return r.insert(r.createPositionAt(i,0),a),n.bindElements(e,a),a}(a,r),r,e)}}function kh(e,t,n){if(!n.consumable.consume(t.item,"attribute:listType"))return;const r=n.mapper.toViewElement(t.item),o=n.writer;o.breakContainer(o.createPositionBefore(r)),o.breakContainer(o.createPositionAfter(r));const a=r.parent,i="numbered"==t.attributeNewValue?"ol":"ul";o.rename(i,a)}function xh(e,t,n){const r=n.mapper.toViewElement(t.item).parent,o=n.writer;gh(o,r,r.nextSibling),gh(o,r.previousSibling,r);for(const e of t.item.getChildren())n.consumable.consume(e,"insert")}function Mh(e,t,n){if("listItem"!=t.item.name){let e=n.mapper.toViewPosition(t.range.start);const r=n.writer,o=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&"li"==(e=r.breakContainer(e)).parent.name;){const t=e,n=r.createPositionAt(e.parent,"end");if(!t.isEqual(n)){const e=r.remove(r.createRange(t,n));o.push(e)}e=r.createPositionAfter(e.parent)}if(o.length>0){for(let t=0;t<o.length;t++){const n=e.nodeBefore;if(e=r.insert(e,o[t]).end,t>0){const t=gh(r,n,n.nextSibling);t&&t.parent==n&&e.offset--}}gh(r,e.nodeBefore,e.nodeAfter)}}}function Eh(e,t,n){const r=n.mapper.toViewPosition(t.position),o=r.nodeBefore,a=r.nodeAfter;gh(n.writer,o,a)}function Th(e,t,n){if(n.consumable.consume(t.viewItem,{name:!0})){const e=n.writer,r=this.conversionApi.store,o=e.createElement("listItem");r.indent=r.indent||0,e.setAttribute("listIndent",r.indent,o);const a=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";e.setAttribute("listType",a,o),r.indent++;const i=n.splitToAllowedParent(o,t.modelCursor);if(!i)return;e.insert(o,i.position);const s=function(e,t,n){const{writer:r,schema:o}=n;let a=r.createPositionAfter(e);for(const i of t)if("ul"==i.name||"ol"==i.name)a=n.convertItem(i,a).modelCursor;else{const t=n.convertItem(i,r.createPositionAt(e,"end")),s=t.modelRange.start.nodeAfter;s&&s.is("element")&&!o.checkChild(e,s.name)&&(e=t.modelCursor.parent.is("listItem")?t.modelCursor.parent:Ph(t.modelCursor),a=r.createPositionAfter(e))}return a}(o,t.viewItem.getChildren(),n);r.indent--,t.modelRange=e.createRange(t.modelCursor,s),i.cursorParent?t.modelCursor=e.createPositionAt(i.cursorParent,0):t.modelCursor=t.modelRange.end}}function Sh(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e)t.is("li")||t._remove()}}function Dh(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let n=!1,r=!0;for(const t of e)!n||t.is("ul")||t.is("ol")||t._remove(),t.is("text")?(r&&(t._data=t.data.replace(/^\s+/,"")),(!t.nextSibling||t.nextSibling.is("ul")||t.nextSibling.is("ol"))&&(t._data=t.data.replace(/\s+$/,""))):(t.is("ul")||t.is("ol"))&&(n=!0),r=!1}}function Lh(e){return(t,n)=>{if(n.isPhantom)return;const r=n.modelPosition.nodeBefore;if(r&&r.is("listItem")){const t=n.mapper.toViewElement(r),o=t.getAncestors().find(e=>e.is("ul")||e.is("ol")),a=e.createPositionAt(t,0).getWalker();for(const e of a){if("elementStart"==e.type&&e.item.is("li")){n.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==o){n.viewPosition=e.nextPosition;break}}}}}function Ch(e,[t,n]){let r,o=t.is("documentFragment")?t.getChild(0):t;if(r=n?this.createSelection(n):this.document.selection,o&&o.is("listItem")){const e=r.getFirstPosition();let t=null;if(e.parent.is("listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;o&&o.is("listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+e),o=o.nextSibling}}}function Ph(e){const t=new jo({startPosition:e});let n;do{n=t.next()}while(!n.value.item.is("listItem"));return n.value.item}function Oh(e,t,n,r,o,a){const i=vh(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e,foo:"b"}),s=o.mapper,l=o.writer,c=i?i.getAttribute("listIndent"):null;let u;if(i)if(c==e){const e=s.toViewElement(i).parent;u=l.createPositionAfter(e)}else{const e=a.createPositionAt(i,"end");u=s.toViewPosition(e)}else u=n;u=_h(u);for(const e of[...r.getChildren()])(e.is("ul")||e.is("ol"))&&(u=l.move(l.createRangeOn(e),u).end,gh(l,e,e.nextSibling),gh(l,e.previousSibling,e))}class Nh extends Is{static get requires(){return[Ru]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,n=e.editing;e.model.document.registerPostFixer(t=>function(e,t){const n=e.document.differ.getChanges(),r=new Map;let o=!1;for(const e of n)if("insert"==e.type&&"listItem"==e.name)a(e.position);else if("insert"==e.type&&"listItem"!=e.name){if("$text"!=e.name){const n=e.position.nodeAfter;n.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",n),o=!0),n.hasAttribute("listType")&&(t.removeAttribute("listType",n),o=!0)}a(e.position.getShiftedBy(e.length))}else"remove"==e.type&&"listItem"==e.name?a(e.position):("attribute"==e.type&&"listIndent"==e.attributeKey||"attribute"==e.type&&"listType"==e.attributeKey)&&a(e.range.start);for(const e of r.values())i(e),s(e);return o;function a(e){const t=e.nodeBefore;if(t&&t.is("listItem")){let n=t;if(r.has(n))return;for(;n.previousSibling&&n.previousSibling.is("listItem");)if(n=n.previousSibling,r.has(n))return;r.set(e.nodeBefore,n)}else{const t=e.nodeAfter;t&&t.is("listItem")&&r.set(t,t)}}function i(e){let n=0,r=null;for(;e&&e.is("listItem");){const a=e.getAttribute("listIndent");if(a>n){let i;null===r?(r=a-n,i=n):(r>a&&(r=a),i=a-r),t.setAttribute("listIndent",i,e),o=!0}else r=null,n=e.getAttribute("listIndent")+1;e=e.nextSibling}}function s(e){let n=[],r=null;for(;e&&e.is("listItem");){const a=e.getAttribute("listIndent");if(r&&r.getAttribute("listIndent")>a&&(n=n.slice(0,a+1)),0!=a)if(n[a]){const r=n[a];e.getAttribute("listType")!=r&&(t.setAttribute("listType",r,e),o=!0)}else n[a]=e.getAttribute("listType");r=e,e=e.nextSibling}}}(e.model,t)),n.mapper.registerViewToModelLength("li",Ah),t.mapper.registerViewToModelLength("li",Ah),n.mapper.on("modelToViewPosition",Lh(n.view)),n.mapper.on("viewToModelPosition",function(e){return(t,n)=>{const r=n.viewPosition,o=r.parent,a=n.mapper;if("ul"==o.name||"ol"==o.name){if(r.isAtEnd){const t=a.toModelElement(r.nodeBefore),o=a.getModelLength(r.nodeBefore);n.modelPosition=e.createPositionBefore(t).getShiftedBy(o)}else{const t=a.toModelElement(r.nodeAfter);n.modelPosition=e.createPositionBefore(t)}t.stop()}else if("li"==o.name&&r.nodeBefore&&("ul"==r.nodeBefore.name||"ol"==r.nodeBefore.name)){const i=a.toModelElement(o);let s=1,l=r.nodeBefore;for(;l&&(l.is("ul")||l.is("ol"));)s+=a.getModelLength(l),l=l.previousSibling;n.modelPosition=e.createPositionBefore(i).getShiftedBy(s),t.stop()}}}(e.model)),t.mapper.on("modelToViewPosition",Lh(n.view)),n.downcastDispatcher.on("insert",Mh,{priority:"high"}),n.downcastDispatcher.on("insert:listItem",wh(e.model)),t.downcastDispatcher.on("insert",Mh,{priority:"high"}),t.downcastDispatcher.on("insert:listItem",wh(e.model)),n.downcastDispatcher.on("attribute:listType:listItem",kh,{priority:"high"}),n.downcastDispatcher.on("attribute:listType:listItem",xh,{priority:"low"}),n.downcastDispatcher.on("attribute:listIndent:listItem",function(e){return(t,n,r)=>{if(!r.consumable.consume(n.item,"attribute:listIndent"))return;const o=r.mapper.toViewElement(n.item),a=r.writer;a.breakContainer(a.createPositionBefore(o)),a.breakContainer(a.createPositionAfter(o));const i=o.parent,s=i.previousSibling,l=a.createRangeOn(i);a.remove(l),s&&s.nextSibling&&gh(a,s,s.nextSibling),Oh(n.attributeOldValue+1,n.range.start,l.start,o,r,e),mh(n.item,o,r,e);for(const e of n.item.getChildren())r.consumable.consume(e,"insert")}}(e.model)),n.downcastDispatcher.on("remove:listItem",function(e){return(t,n,r)=>{const o=r.mapper.toViewPosition(n.position).getLastMatchingPosition(e=>!e.item.is("li")).nodeAfter,a=r.writer;a.breakContainer(a.createPositionBefore(o)),a.breakContainer(a.createPositionAfter(o));const i=o.parent,s=i.previousSibling,l=a.createRangeOn(i),c=a.remove(l);s&&s.nextSibling&&gh(a,s,s.nextSibling),Oh(r.mapper.toModelElement(o).getAttribute("listIndent")+1,n.position,l.start,o,r,e);for(const e of a.createRangeIn(c).getItems())r.mapper.unbindViewElement(e);t.stop()}}(e.model)),n.downcastDispatcher.on("remove",Eh,{priority:"low"}),t.upcastDispatcher.on("element:ul",Sh,{priority:"high"}),t.upcastDispatcher.on("element:ol",Sh,{priority:"high"}),t.upcastDispatcher.on("element:li",Dh,{priority:"high"}),t.upcastDispatcher.on("element:li",Th),e.model.on("insertContent",Ch,{priority:"high"}),e.commands.add("numberedList",new dh(e,"numbered")),e.commands.add("bulletedList",new dh(e,"bulleted")),e.commands.add("indentList",new fh(e,"forward")),e.commands.add("outdentList",new fh(e,"backward"));const r=n.view.document;this.listenTo(r,"enter",(e,t)=>{const n=this.editor.model.document,r=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==r.name&&r.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),this.listenTo(r,"delete",(e,t)=>{if("backward"!==t.direction)return;const n=this.editor.model.document.selection;if(!n.isCollapsed)return;const r=n.getFirstPosition();if(!r.isAtStart)return;const o=r.parent;"listItem"===o.name&&(o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop()))},{priority:"high"});const o=e=>(t,n)=>{this.editor.commands.get(e).isEnabled&&(this.editor.execute(e),n())};e.keystrokes.set("Tab",o("indentList")),e.keystrokes.set("Shift+Tab",o("outdentList"))}afterInit(){const e=this.editor.commands,t=e.get("indent"),n=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),n&&n.registerChildCommand(e.get("outdentList"))}}function Ah(e){let t=1;for(const n of e.getChildren())if("ul"==n.name||"ol"==n.name)for(const e of n.getChildren())t+=Ah(e);return t}class Ih extends Is{init(){const e=this.editor.t;bh(this.editor,"numberedList",e("q"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>'),bh(this.editor,"bulletedList",e("r"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>')}}function Rh(e,t){return e=>{e.on("attribute:url:media",n)};function n(n,r,o){if(!o.consumable.consume(r.item,n.name))return;const a=r.attributeNewValue,i=o.writer,s=o.mapper.toViewElement(r.item);i.remove(i.createRangeIn(s));const l=e.getMediaViewElement(i,a,t);i.insert(i.createPositionAt(s,0),l)}}function Yh(e,t,n,r){const o=e.createContainerElement("figure",{class:"media"});return o.getFillerOffset=Hh,e.insert(e.createPositionAt(o,0),t.getMediaViewElement(e,n,r)),o}function jh(e){const t=e.getSelectedElement();return t&&t.is("media")?t:null}function Fh(e,t,n){e.change(r=>{const o=r.createElement("media",{url:t});e.insertContent(o,n),r.setSelection(o,"on")})}function Hh(){return null}class zh extends Hs{refresh(){const e=this.editor.model,t=e.document.selection,n=e.schema,r=t.getFirstPosition(),o=jh(t);let a=r.parent;a!=a.root&&(a=a.parent),this.value=o?o.getAttribute("url"):null,this.isEnabled=n.checkChild(a,"media")}execute(e){const t=this.editor.model,n=t.document.selection,r=jh(n);if(r)t.change(t=>{t.setAttribute("url",e,r)});else{const r=Oc(n,t);Fh(t,e,r)}}}class Bh{constructor(e,t){const n=t.providers,r=t.extraProviders||[],o=new Set(t.removeProviders),a=n.concat(r).filter(e=>{const t=e.name;return t?!o.has(t):(console.warn(Object(_t.a)("media-embed-no-provider-name: The configured media provider has no name and cannot be used."),{provider:e}),!1)});this.locale=e,this.providerDefinitions=a}hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,t,n){return this._getMedia(t).getViewElement(e,n)}_getMedia(e){if(!e)return new Uh(this.locale);e=e.trim();for(const t of this.providerDefinitions){const n=t.html;let r=t.url;Array.isArray(r)||(r=[r]);for(const t of r){const r=this._getUrlMatches(e,t);if(r)return new Uh(this.locale,e,r,n)}}return null}_getUrlMatches(e,t){let n=e.match(t);if(n)return n;let r=e.replace(/^https?:\/\//,"");return(n=r.match(t))?n:(n=(r=r.replace(/^www\./,"")).match(t))||null}}class Uh{constructor(e,t,n,r){this.url=this._getValidUrl(t),this._t=e.t,this._match=n,this._previewRenderer=r}getViewElement(e,t){const n={};if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),t.renderForEditingView&&(n.class="ck-media__wrapper");const r=this._getPreviewHtml(t);return e.createUIElement("div",n,(function(e){const t=this.toDomElement(e);return t.innerHTML=r,t}))}return this.url&&(n.url=this.url),e.createEmptyElement("oembed",n)}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const e=new Dl,t=new Sl;return e.text=this._t("Open media in new tab"),t.content='<svg viewBox="0 0 64 42" xmlns="http://www.w3.org/2000/svg"><path d="M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098-2.506.668-4.538-.083-4.538-1.678 0-1.594 2.032-3.43 4.538-4.098.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556A1.014 1.014 0 0 0 49 17h-1.574zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.994 1.994 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805V17zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17zm29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155h18.692zM20.6 21.375v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616V37.53H20.6zm24.233-16.155v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615V37.53h-1.615zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35v-9.956z"/></svg>',t.viewBox="0 0 64 42",new ns({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[t]},{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]},e]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}}n(79);class Vh extends Is{static get pluginName(){return"MediaEmbedEditing"}constructor(e){super(e),e.config.define("mediaEmbed",{providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; "><iframe src="https://www.dailymotion.com/embed/video/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" width="480" height="270" allowfullscreen allow="autoplay"></iframe></div>`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 126%;"><iframe src="https://open.spotify.com/embed/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe></div>`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,/^youtube\.com\/embed\/([\w-]+)/,/^youtu\.be\/([\w-]+)/],html:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://www.youtube.com/embed/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>`},{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:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://player.vimeo.com/video/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>`},{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 Bh(e.locale,e.config.get("mediaEmbed"))}init(){const e=this.editor,t=e.model.schema,n=e.t,r=e.conversion,o=e.config.get("mediaEmbed.previewsInData"),a=this.registry;e.commands.add("mediaEmbed",new zh(e)),t.register("media",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["url"]}),r.for("dataDowncast").elementToElement({model:"media",view:(e,t)=>{const n=e.getAttribute("url");return Yh(t,a,n,{renderMediaPreview:n&&o})}}),r.for("dataDowncast").add(Rh(a,{renderMediaPreview:o})),r.for("editingDowncast").elementToElement({model:"media",view:(e,t)=>{const r=e.getAttribute("url");return function(e,t,n){return t.setCustomProperty("media",!0,e),Lc(e,t,{label:n})}(Yh(t,a,r,{renderForEditingView:!0}),t,n("am"))}}),r.for("editingDowncast").add(Rh(a,{renderForEditingView:!0})),r.for("upcast").elementToElement({view:{name:"oembed",attributes:{url:!0}},model:(e,t)=>{const n=e.getAttribute("url");if(a.hasMedia(n))return t.createElement("media",{url:n})}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(e,t)=>{const n=e.getAttribute("data-oembed-url");if(a.hasMedia(n))return t.createElement("media",{url:n})}})}}const Wh=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/;class qh extends Is{static get requires(){return[Fs,Nl]}static get pluginName(){return"AutoMediaEmbed"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document;this.listenTo(e.plugins.get(Fs),"inputTransformation",()=>{const e=t.selection.getFirstRange(),n=Ei.fromPosition(e.start);n.stickiness="toPrevious";const r=Ei.fromPosition(e.end);r.stickiness="toNext",t.once("change:data",()=>{this._embedMediaBetweenPositions(n,r),n.detach(),r.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(yr.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(e,t){const n=this.editor,r=n.plugins.get(Vh).registry,o=new Xo(e,t),a=o.getWalker({ignoreElementEnd:!0});let i="";for(const e of a)e.item.is("textProxy")&&(i+=e.item.data);(i=i.trim()).match(Wh)&&r.hasMedia(i)&&n.commands.get("mediaEmbed").isEnabled&&(this._positionToInsert=Ei.fromPosition(e),this._timeoutId=yr.window.setTimeout(()=>{n.model.change(e=>{let t;this._timeoutId=null,e.remove(o),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert),Fh(n.model,i,t),this._positionToInsert.detach(),this._positionToInsert=null})},100))}}n(81);class Gh extends ys{constructor(e,t){super(t);const n=t.t;this.focusTracker=new Gi,this.keystrokes=new ji,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("bd"),Xc,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("be"),$c,"ck-button-cancel","cancel"),this._focusables=new ts,this._focusCycler=new Ls({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=e,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),Qc({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e),this.listenTo(this.urlInputView.element,"selectstart",(e,t)=>{t.stopPropagation()},{priority:"high"})}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.inputView.element.value.trim()}set url(e){this.urlInputView.inputView.element.value=e.trim()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const e=this.locale.t,t=new Jc(this.locale,Kc),n=t.inputView;return this._urlInputViewInfoDefault=e("bg"),this._urlInputViewInfoTip=e("bh"),t.label=e("bi"),t.infoText=this._urlInputViewInfoDefault,n.placeholder="https://example.com",n.on("input",()=>{t.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault}),t}_createButton(e,t,n,r){const o=new Ll(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),r&&o.delegate("execute").to(this,r),o}}class Jh extends Is{static get requires(){return[Vh]}static get pluginName(){return"MediaEmbedUI"}init(){const e=this.editor,t=e.commands.get("mediaEmbed"),n=e.plugins.get(Vh).registry;this.form=new Gh(function(e,t){return[t=>{if(!t.url.length)return e("ao")},n=>{if(!t.hasMedia(n.url))return e("ap")}]}(e.t,n),e.locale),e.ui.componentFactory.add("mediaEmbed",n=>{const r=Xu(n);return this._setUpDropdown(r,this.form,t,e),this._setUpForm(this.form,r,t),r})}_setUpDropdown(e,t,n){const r=this.editor,o=r.t,a=e.buttonView;function i(){r.editing.view.focus(),e.isOpen=!1}e.bind("isEnabled").to(n),e.panelView.children.add(t),a.set({label:o("an"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18.68 2.53c.6 0 .59-.03.59.55v12.84c0 .59.01.56-.59.56H1.29c-.6 0-.59.03-.59-.56V3.08c0-.58-.01-.55.6-.55h17.38zM15.77 14.5v-10H4.2v10h11.57zM2 4v1h1V4H2zm0 2v1h1V6H2zm0 2v1h1V8H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zM17 4v1h1V4h-1zm0 2v1h1V6h-1zm0 2v1h1V8h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zM7.5 6.677a.4.4 0 0 1 .593-.351l5.133 2.824a.4.4 0 0 1 0 .7l-5.133 2.824a.4.4 0 0 1-.593-.35V6.676z"/></svg>',tooltip:!0}),a.on("open",()=>{t.url=n.value||"",t.urlInputView.select(),t.focus()},{priority:"low"}),e.on("submit",()=>{t.isValid()&&(r.execute("mediaEmbed",t.url),i())}),e.on("change:isOpen",()=>t.resetFormStatus()),e.on("cancel",()=>i())}_setUpForm(e,t,n){e.delegate("submit","cancel").to(t),e.urlInputView.bind("value").to(n,"value"),e.urlInputView.bind("isReadOnly").to(n,"isEnabled",e=>!e),e.saveButtonView.bind("isEnabled").to(n)}}function Kh(e){const t={},n=e.getStyle("mso-list");return n&&(t.id=parseInt(n.match(/(^|\s+)l(\d+)/i)[2]),t.order=parseInt(n.match(/\s*lfo(\d+)/i)[1]),t.indent=parseInt(n.match(/\s*level(\d+)/i)[1])),t}function Qh(e){return e.is("ol")||e.is("ul")}n(83);const Xh=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class $h{isActive(e){return Xh.test(e)}execute(e){const t=new Du;!function(e,t){for(const n of e.getChildren())if(n.is("b")&&"normal"===n.getStyle("font-weight")){const r=e.getChildIndex(n);t.remove(n),t.insertChild(r,n.getChildren(),e)}}(e.content,t),function(e,t){for(const n of t.createRangeIn(e)){const e=n.item;if(e.is("li")){const n=e.nextSibling;n&&Qh(n)&&(t.remove(n),t.insertChild(e.childCount,n,e))}if(Qh(e)){let n=e.getChild(0);for(;Qh(n);)t.unwrapElement(n),n=e.getChild(0)}}}(e.content,t),function(e,t){for(const n of t.createRangeIn(e)){const e=n.item;if(e.is("li")){const n=e.getChild(0);n.is("p")&&t.unwrapElement(n)}}}(e.content,t)}}function Zh(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,t)=>1===t.length?" ":Array(t.length+1).join("  ").substr(0,t.length))}function ep(e){return btoa(e.match(/\w{2}/g).map(e=>String.fromCharCode(parseInt(e,16))).join(""))}const tp=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,np=/xmlns:o="urn:schemas-microsoft-com/i;class rp{isActive(e){return tp.test(e)||np.test(e)}execute(e){const{body:t,stylesString:n}=function(e){const t=new DOMParser,n=function(e){return Zh(Zh(e)).replace(/(<span style=['"]mso-spacerun:yes['"]>[\s]*?)[\r\n]+(\s*<\/span>)/g,"$1$2").replace(/<span style=['"]mso-spacerun:yes['"]><\/span>/g,"").replace(/ <\//g," </").replace(/ <o:p><\/o:p>/g," <o:p></o:p>").replace(/>(\s*[\r\n]\s*)</g,"><")}(function(e){const t=e.match(/<\/body>(.*?)(<\/html>|$)/);return t&&t[1]&&(e=e.slice(0,t.index)+e.slice(t.index).replace(t[1],"")),e}(e=e.replace(/<!--\[if gte vml 1]>/g,""))),r=t.parseFromString(n,"text/html");!function(e){e.querySelectorAll("span[style*=spacerun]").forEach(e=>{const t=e.childNodes[0].data.length;e.innerHTML=Array(t+1).join("  ").substr(0,t)})}(r);const o=r.body.innerHTML,a=function(e){const t=new xr({blockFiller:nr}),n=e.createDocumentFragment(),r=e.body.childNodes;for(;r.length>0;)n.appendChild(r[0]);return t.domToView(n)}(r),i=function(e){const t=[],n=[],r=Array.from(e.getElementsByTagName("style"));for(const e of r)e.sheet&&e.sheet.cssRules&&e.sheet.cssRules.length&&(t.push(e.sheet),n.push(e.innerHTML));return{styles:t,stylesString:n.join(" ")}}(r);return{body:a,bodyString:o,styles:i.styles,stylesString:i.stylesString}}(e.dataTransfer.getData("text/html"));(function(e,t){if(!e.childCount)return;const n=new Du,r=function(e,t){const n=t.createRangeIn(e),r=new jt({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),o=[];for(const e of n)if("elementStart"===e.type&&r.match(e.item)){const t=Kh(e.item);o.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return o}(e,n);if(!r.length)return;let o=null;r.forEach((e,a)=>{if(!o||function(e,t){if(e.id!==t.id)return!0;const n=t.element.previousSibling;return!n||!Qh(n)}(r[a-1],e)){const r=function(e,t){const n=/mso-level-number-format:([^;]*);/gi,r=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi").exec(t);let o="decimal";if(r&&r[1]){const e=n.exec(r[1]);e&&e[1]&&(o=e[1].trim())}return{type:"bullet"!==o&&"image"!==o?"ol":"ul",style:o}}(e,t);o=function(e,t,n){const r=new Ht(e.type),o=t.parent.getChildIndex(t);return n.insertChild(o,r,t.parent),r}(r,e.element,n)}const i=function(e,t){return function(e,t){const n=new jt({name:"span",styles:{"mso-list":"Ignore"}}),r=t.createRangeIn(e);for(const e of r)"elementStart"===e.type&&n.match(e.item)&&t.remove(e.item)}(e,t),t.rename("li",e)}(e.element,n);n.appendChild(i,o)})})(t,n),function(e,t){if(!e.childCount)return;const n=new Du;!function(e,t,n){const r=n.createRangeIn(t),o=new jt({name:"img"}),a=[];for(const t of r)if(o.match(t.item)){const n=t.item,r=n.getAttribute("v:shapes")?n.getAttribute("v:shapes").split(" "):[];r.length&&r.every(t=>e.indexOf(t)>-1)?a.push(n):n.getAttribute("src")||a.push(n)}for(const e of a)n.remove(e)}(function(e,t){const n=t.createRangeIn(e),r=new jt({name:/v:(.+)/}),o=[];for(const e of n){const t=e.item,n=t.previousSibling&&t.previousSibling.name||null;r.match(t)&&t.getAttribute("o:gfxdata")&&"v:shapetype"!==n&&o.push(e.item.getAttribute("id"))}return o}(e,n),e,n),function(e,t){const n=t.createRangeIn(e),r=new jt({name:/v:(.+)/}),o=[];for(const e of n)r.match(e.item)&&o.push(e.item);for(const e of o)t.remove(e)}(e,n);const r=function(e,t){const n=t.createRangeIn(e),r=new jt({name:"img"}),o=[];for(const e of n)r.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&o.push(e.item);return o}(e,n);r.length&&function(e,t,n){if(e.length===t.length)for(let r=0;r<e.length;r++){const o=`data:${t[r].type};base64,${ep(t[r].hex)}`;n.setAttribute("src",o,e[r])}}(r,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,n=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),r=e.match(n),o=[];if(r)for(const e of r){let n=!1;e.includes("\\pngblip")?n="image/png":e.includes("\\jpegblip")&&(n="image/jpeg"),n&&o.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:n})}return o}(t),n)}(t,e.dataTransfer.getData("text/rtf")),e.content=t}}function op(e,t){let n=t.parent;for(;n;){if(n.name===e)return n;n=n.parent}}function ap(e,t,n,r,o=1){t>o?r.setAttribute(e,t,n):r.removeAttribute(e,n)}function ip(e,t,n={}){const r=e.createElement("tableCell",n);e.insertElement("paragraph",r),e.insert(r,t)}function sp(e){return t=>{t.on("element:"+e,(e,t,n)=>{const r=t.viewItem;if(!n.consumable.test(r,{name:!0}))return;const o=n.writer.createElement("tableCell"),a=n.splitToAllowedParent(o,t.modelCursor);if(!a)return;n.writer.insert(o,a.position),n.consumable.consume(r,{name:!0});const i=n.writer.createPositionAt(o,0);n.convertChildren(r,i),o.childCount||n.writer.insertElement("paragraph",i),t.modelRange=n.writer.createRange(n.writer.createPositionBefore(o),n.writer.createPositionAfter(o)),t.modelCursor=t.modelRange.end})}}function lp(e){let t=0,n=0;const r=Array.from(e.getChildren()).filter(e=>"th"===e.name||"td"===e.name);for(;n<r.length&&"th"===r[n].name;){const e=r[n];t+=parseInt(e.getAttribute("colspan")||1),n++}return t}class cp{constructor(e,t={}){this.table=e,this.startRow=t.startRow||0,this.endRow="number"==typeof t.endRow?t.endRow:void 0,this.includeSpanned=!!t.includeSpanned,this.column="number"==typeof t.column?t.column:void 0,this._skipRows=new Set,this._row=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){const e=this.table.getChild(this._row);if(!e||this._isOverEndRow())return{done:!0};let t,n,r;if(this._isSpanned(this._row,this._column))t=this._getSpanned(this._row,this._column),n=!this.includeSpanned||this._shouldSkipRow()||this._shouldSkipColumn(),r=this._formatOutValue(t,this._column,!0);else{if(!(t=e.getChild(this._cellIndex)))return this._row++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next();const o=parseInt(t.getAttribute("colspan")||1),a=parseInt(t.getAttribute("rowspan")||1);(o>1||a>1)&&this._recordSpans(this._row,this._column,a,o,t),this._nextCellAtColumn=this._column+o,n=this._shouldSkipRow()||this._shouldSkipColumn(),r=this._formatOutValue(t,this._column,!1,a,o)}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,n?this.next():r}skipRow(e){this._skipRows.add(e)}_isOverEndRow(){return void 0!==this.endRow&&this._row>this.endRow}_formatOutValue(e,t,n,r=1,o=1){return{done:!1,value:{cell:e,row:this._row,column:t,isSpanned:n,rowspan:r,colspan:o,cellIndex:this._cellIndex}}}_shouldSkipRow(){const e=this._row<this.startRow,t=this._skipRows.has(this._row);return e||t}_shouldSkipColumn(){return void 0!==this.column&&this.column!=this._column}_isSpanned(e,t){return!!this._spannedCells.has(e)&&this._spannedCells.get(e).has(t)}_getSpanned(e,t){return this._spannedCells.get(e).get(t)}_recordSpans(e,t,n,r,o){for(let n=t+1;n<=t+r-1;n++)this._markSpannedCell(e,n,o);for(let a=e+1;a<e+n;a++)for(let e=t;e<=t+r-1;e++)this._markSpannedCell(a,e,o)}_markSpannedCell(e,t,n){this._spannedCells.has(e)||this._spannedCells.set(e,new Map),this._spannedCells.get(e).set(t,n)}}function up(e){return!!e.getCustomProperty("table")&&Dc(e)}function dp(e){const t=e.getSelectedElement();return t&&up(t)?t:null}function hp(e){const t=op("table",e.getFirstPosition());return t&&up(t.parent)?t.parent:null}function pp(e={}){return t=>t.on("insert:table",(t,n,r)=>{const o=n.item;if(!r.consumable.consume(o,"insert"))return;r.consumable.consume(o,"attribute:headingRows:table"),r.consumable.consume(o,"attribute:headingColumns:table");const a=e&&e.asWidget,i=r.writer.createContainerElement("figure",{class:"table"}),s=r.writer.createContainerElement("table");let l;r.writer.insert(r.writer.createPositionAt(i,0),s),a&&(l=function(e,t){return t.setCustomProperty("table",!0,e),Lc(e,t,{hasSelectionHandler:!0})}(i,r.writer));const c=new cp(o),u={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0},d=new Map;for(const t of c){const{row:n,cell:a}=t,i=Mp(xp(n,u),s,r),l=o.getChild(n),c=d.get(n)||wp(l,n,i,r);d.set(n,c),r.consumable.consume(a,"insert"),yp(t,u,r.writer.createPositionAt(c,"end"),r,e)}const h=r.mapper.toViewPosition(n.range.start);r.mapper.bindElements(o,a?l:i),r.writer.insert(h,a?l:i)})}function fp(e={}){return t=>t.on("insert:tableRow",(t,n,r)=>{const o=n.item;if(!r.consumable.consume(o,"insert"))return;const a=o.parent,i=Dp(r.mapper.toViewElement(a)),s=a.getChildIndex(o),l=new cp(a,{startRow:s,endRow:s}),c={headingRows:a.getAttribute("headingRows")||0,headingColumns:a.getAttribute("headingColumns")||0},u=new Map;for(const t of l){const n=Mp(xp(s,c),i,r),a=u.get(s)||wp(o,s,n,r);u.set(s,a),r.consumable.consume(t.cell,"insert"),yp(t,c,r.writer.createPositionAt(a,"end"),r,e)}})}function mp(e={}){return t=>t.on("insert:tableCell",(t,n,r)=>{const o=n.item;if(!r.consumable.consume(o,"insert"))return;const a=o.parent,i=a.parent,s=i.getChildIndex(a),l=new cp(i,{startRow:s,endRow:s}),c={headingRows:i.getAttribute("headingRows")||0,headingColumns:i.getAttribute("headingColumns")||0};for(const t of l)if(t.cell===o){const n=r.mapper.toViewElement(a);return void yp(t,c,r.writer.createPositionAt(n,a.getChildIndex(o)),r,e)}})}function gp(e={}){const t=!!e.asWidget;return e=>e.on("attribute:headingRows:table",(e,n,r)=>{const o=n.item;if(!r.consumable.consume(n.item,e.name))return;const a=Dp(r.mapper.toViewElement(o)),i=n.attributeOldValue,s=n.attributeNewValue;if(s>i){const e=Array.from(o.getChildren()).filter(({index:e})=>l(e,i-1,s));Sp(e,Mp("thead",a,r),r,"end");for(const n of e)for(const e of n.getChildren())vp(e,"th",r,t);Tp("tbody",a,r)}else{Sp(Array.from(o.getChildren()).filter(({index:e})=>l(e,s-1,i)).reverse(),Mp("tbody",a,r),r,0);const e=new cp(o,{startRow:s?s-1:s,endRow:i-1}),n={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0};for(const o of e)bp(o,n,r,t);Tp("thead",a,r)}function l(e,t,n){return e>t&&e<n}})}function _p(e={}){const t=!!e.asWidget;return e=>e.on("attribute:headingColumns:table",(e,n,r)=>{const o=n.item;if(!r.consumable.consume(n.item,e.name))return;const a={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0},i=n.attributeOldValue,s=n.attributeNewValue,l=(i>s?i:s)-1;for(const e of new cp(o))e.column>l||bp(e,a,r,t)})}function vp(e,t,n,r){const o=n.writer,a=n.mapper.toViewElement(e);if(!a)return;let i;r?(i=Pc(o.createEditableElement(t,a.getAttributes()),o),o.insert(o.createPositionAfter(a),i),o.move(o.createRangeIn(a),o.createPositionAt(i,0)),o.remove(o.createRangeOn(a))):i=o.rename(t,a),n.mapper.unbindViewElement(a),n.mapper.bindElements(e,i)}function bp(e,t,n,r){const{cell:o}=e,a=kp(e,t),i=n.mapper.toViewElement(o);i&&i.name!==a&&vp(o,a,n,r)}function yp(e,t,n,r,o){const a=o&&o.asWidget,i=kp(e,t),s=a?Pc(r.writer.createEditableElement(i),r.writer):r.writer.createContainerElement(i),l=e.cell,c=l.getChild(0),u=1===l.childCount&&"paragraph"===c.name;if(r.writer.insert(n,s),u&&!function(e){return!![...e.getAttributeKeys()].length}(c)){const e=l.getChild(0),t=r.writer.createPositionAt(s,"end");if(r.consumable.consume(e,"insert"),o.asWidget){const n=r.writer.createContainerElement("span");r.mapper.bindElements(e,n),r.writer.insert(t,n),r.mapper.bindElements(l,s)}else r.mapper.bindElements(l,s),r.mapper.bindElements(e,s)}else r.mapper.bindElements(l,s)}function wp(e,t,n,r){r.consumable.consume(e,"insert");const o=r.writer.createContainerElement("tr");r.mapper.bindElements(e,o);const a=e.parent.getAttribute("headingRows")||0,i=a>0&&t>=a?t-a:t,s=r.writer.createPositionAt(n,i);return r.writer.insert(s,o),o}function kp(e,t){const{row:n,column:r}=e,{headingColumns:o,headingRows:a}=t;return a&&a>n||o&&o>r?"th":"td"}function xp(e,t){return e<t.headingRows?"thead":"tbody"}function Mp(e,t,n){return Ep(e,t)||function(e,t,n){const r=n.writer.createContainerElement(e),o=n.writer.createPositionAt(t,"tbody"==e?"end":0);return n.writer.insert(o,r),r}(e,t,n)}function Ep(e,t){for(const n of t.getChildren())if(n.name==e)return n}function Tp(e,t,n){const r=Ep(e,t);r&&0===r.childCount&&n.writer.remove(n.writer.createRangeOn(r))}function Sp(e,t,n,r){for(const o of e){const e=n.mapper.toViewElement(o);e&&n.writer.move(n.writer.createRangeOn(e),n.writer.createPositionAt(t,r))}}function Dp(e){for(const t of e.getChildren())if("table"===t.name)return t}class Lp extends Hs{refresh(){const e=this.editor.model,t=e.document.selection,n=e.schema,r=function(e){const t=e.parent;return t===t.root?t:t.parent}(t.getFirstPosition());this.isEnabled=n.checkChild(r,"table")}execute(e={}){const t=this.editor.model,n=t.document.selection,r=this.editor.plugins.get("TableUtils"),o=parseInt(e.rows)||2,a=parseInt(e.columns)||2,i=Oc(n,t);t.change(e=>{const n=r.createTable(e,o,a);t.insertContent(n,i),e.setSelection(e.createPositionAt(n.getNodeByPath([0,0,0]),0))})}}class Cp extends Hs{constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=op("table",this.editor.model.document.selection.getFirstPosition());this.isEnabled=!!e}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),r=op("tableCell",t.getFirstPosition()).parent,o=r.parent,a=o.getChildIndex(r),i="below"===this.order?a+1:a;n.insertRows(o,{rows:1,at:i})}}class Pp extends Hs{constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=op("table",this.editor.model.document.selection.getFirstPosition());this.isEnabled=!!e}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),r=op("tableCell",t.getFirstPosition()),o=r.parent.parent,{column:a}=n.getCellLocation(r),i="right"===this.order?a+1:a;n.insertColumns(o,{columns:1,at:i})}}class Op extends Hs{constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=op("tableCell",this.editor.model.document.selection.getFirstPosition());this.isEnabled=!!e}execute(){const e=op("tableCell",this.editor.model.document.selection.getFirstPosition()),t="horizontally"===this.direction,n=this.editor.plugins.get("TableUtils");t?n.splitCellHorizontally(e,2):n.splitCellVertically(e,2)}}class Np extends Hs{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.isEnabled=!!e,this.value=e}execute(){const e=this.editor.model,t=op("tableCell",e.document.selection.getFirstPosition()),n=this.value,r=this.direction;e.change(e=>{const o="right"==r||"down"==r,a=o?t:n,i=o?n:t,s=i.parent;!function(e,t,n){Ap(e)||(Ap(t)&&n.remove(n.createRangeIn(t)),n.move(n.createRangeIn(e),n.createPositionAt(t,"end"))),n.remove(e)}(i,a,e);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(t.getAttribute(l)||1),u=parseInt(n.getAttribute(l)||1);e.setAttribute(l,c+u,a),e.setSelection(e.createRangeIn(a)),s.childCount||function(e,t){const n=e.parent,r=n.getChildIndex(e);for(const{cell:e,row:o,rowspan:a}of new cp(n,{endRow:r}))o+a-1>=r&&ap("rowspan",a-1,e,t);t.remove(e)}(s,e)})}_getMergeableCell(){const e=op("tableCell",this.editor.model.document.selection.getFirstPosition());if(!e)return;const t=this.editor.plugins.get("TableUtils"),n=this.isHorizontal?function(e,t,n){const r="right"==t?e.nextSibling:e.previousSibling;if(!r)return;const o="right"==t?e:r,a="right"==t?r:e,{column:i}=n.getCellLocation(o),{column:s}=n.getCellLocation(a);return i+parseInt(o.getAttribute("colspan")||1)===s?r:void 0}(e,this.direction,t):function(e,t){const n=e.parent,r=n.parent,o=r.getChildIndex(n);if("down"==t&&o===r.childCount-1||"up"==t&&0===o)return;const a=parseInt(e.getAttribute("rowspan")||1),i=r.getAttribute("headingRows")||0;if(i&&("down"==t&&o+a===i||"up"==t&&o===i))return;const s=parseInt(e.getAttribute("rowspan")||1),l="down"==t?o+s:o,c=[...new cp(r,{endRow:l})],u=c.find(t=>t.cell===e).column,d=c.find(({row:e,rowspan:n,column:r})=>r===u&&("down"==t?e===l:l===e+n));return d&&d.cell}(e,this.direction);if(!n)return;const r=this.isHorizontal?"rowspan":"colspan",o=parseInt(e.getAttribute(r)||1);return parseInt(n.getAttribute(r)||1)===o?n:void 0}}function Ap(e){return 1==e.childCount&&e.getChild(0).is("paragraph")&&e.getChild(0).isEmpty}class Ip extends Hs{refresh(){const e=op("tableCell",this.editor.model.document.selection.getFirstPosition());this.isEnabled=!!e&&e.parent.parent.childCount>1}execute(){const e=this.editor.model,t=op("tableCell",e.document.selection.getFirstPosition()).parent,n=t.parent,r=n.getChildIndex(t),o=n.getAttribute("headingRows")||0;e.change(e=>{o&&r<=o&&ap("headingRows",o-1,n,e,0);const a=[...new cp(n,{endRow:r})],i=new Map;a.filter(({row:e,rowspan:t})=>e===r&&t>1).forEach(({column:e,cell:t,rowspan:n})=>i.set(e,{cell:t,rowspanToSet:n-1})),a.filter(({row:e,rowspan:t})=>e<=r-1&&e+t>r).forEach(({cell:t,rowspan:n})=>ap("rowspan",n-1,t,e));const s=r+1,l=new cp(n,{includeSpanned:!0,startRow:s,endRow:s});let c;for(const{row:t,column:r,cell:o}of[...l])if(i.has(r)){const{cell:o,rowspanToSet:a}=i.get(r),s=c?e.createPositionAfter(c):e.createPositionAt(n.getChild(t),0);e.move(e.createRangeOn(o),s),ap("rowspan",a,o,e),c=o}else c=o;e.remove(t)})}}class Rp extends Hs{refresh(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),r=op("tableCell",t.getFirstPosition());this.isEnabled=!!r&&n.getColumns(r.parent.parent)>1}execute(){const e=this.editor.model,t=op("tableCell",e.document.selection.getFirstPosition()),n=t.parent,r=n.parent,o=r.getAttribute("headingColumns")||0,a=r.getChildIndex(n),i=[...new cp(r)],s=i.find(e=>e.cell===t).column;e.change(e=>{o&&a<=o&&e.setAttribute("headingColumns",o-1,r);for(const{cell:t,column:n,colspan:r}of i)n<=s&&r>1&&n+r>s?ap("colspan",r-1,t,e):n===s&&e.remove(t)})}}class Yp extends Hs{refresh(){const e=op("tableCell",this.editor.model.document.selection.getFirstPosition()),t=!!e;this.isEnabled=t,this.value=t&&this._isInHeading(e,e.parent.parent)}execute(e={}){const t=this.editor.model,n=op("tableCell",t.document.selection.getFirstPosition()).parent,r=n.parent,o=r.getAttribute("headingRows")||0,a=n.index;if(e.forceValue===this.value)return;const i=this.value?a:a+1;t.change(e=>{if(i){const t=function(e,t,n){const r=[],o=new cp(e,{startRow:t>n?n:0,endRow:t-1});for(const{row:e,rowspan:n,cell:a}of o)n>1&&e+n>t&&r.push(a);return r}(r,i,o);for(const n of t)jp(n,i,e)}ap("headingRows",i,r,e,0)})}_isInHeading(e,t){const n=parseInt(t.getAttribute("headingRows")||0);return!!n&&e.parent.index<n}}function jp(e,t,n){const r=e.parent,o=r.parent,a=t-r.index,i={},s=parseInt(e.getAttribute("rowspan"))-a;s>1&&(i.rowspan=s);const l=parseInt(e.getAttribute("colspan")||1);l>1&&(i.colspan=l);const c=o.getChildIndex(r),u=c+a,d=[...new cp(o,{startRow:c,endRow:u,includeSpanned:!0})];let h;for(const{row:t,column:r,cell:a,cellIndex:s}of d)if(a===e&&void 0===h&&(h=r),void 0!==h&&h===r&&t===u){const e=o.getChild(t);ip(n,n.createPositionAt(e,s),i)}ap("rowspan",a,e,n)}class Fp extends Hs{refresh(){const e=op("tableCell",this.editor.model.document.selection.getFirstPosition()),t=!!e;this.isEnabled=t,this.value=t&&this._isInHeading(e,e.parent.parent)}execute(e={}){const t=this.editor.model,n=t.document.selection,r=this.editor.plugins.get("TableUtils"),o=op("tableCell",n.getFirstPosition()),a=o.parent.parent,{column:i}=r.getCellLocation(o);if(e.forceValue===this.value)return;const s=this.value?i:i+1;t.change(e=>{ap("headingColumns",s,a,e,0)})}_isInHeading(e,t){const n=parseInt(t.getAttribute("headingColumns")||0),r=this.editor.plugins.get("TableUtils"),{column:o}=r.getCellLocation(e);return!!n&&o<n}}class Hp extends Is{static get pluginName(){return"TableUtils"}getCellLocation(e){const t=e.parent,n=t.parent,r=n.getChildIndex(t),o=new cp(n,{startRow:r,endRow:r});for(const{cell:t,row:n,column:r}of o)if(t===e)return{row:n,column:r}}createTable(e,t,n){const r=e.createElement("table");return zp(e,r,0,t,n),r}insertRows(e,t={}){const n=this.editor.model,r=t.at||0,o=t.rows||1;n.change(t=>{const n=e.getAttribute("headingRows")||0;if(n>r&&t.setAttribute("headingRows",n+o,e),0===r||r===e.childCount)return void zp(t,e,r,o,this.getColumns(e));const a=new cp(e,{endRow:r});let i=0;for(const{row:e,rowspan:n,colspan:s,cell:l}of a)e<r&&e+n>r&&t.setAttribute("rowspan",n+o,l),e===r&&(i+=s);zp(t,e,r,o,i)})}insertColumns(e,t={}){const n=this.editor.model,r=t.at||0,o=t.columns||1;n.change(t=>{const n=e.getAttribute("headingColumns");r<n&&t.setAttribute("headingColumns",n+o,e);const a=this.getColumns(e);if(0===r||a===r){for(const n of e.getChildren())Bp(o,t,t.createPositionAt(n,r?"end":0));return}const i=new cp(e,{column:r,includeSpanned:!0});for(const{row:n,cell:a,cellIndex:s}of i){const l=parseInt(a.getAttribute("rowspan")||1),c=parseInt(a.getAttribute("colspan")||1);if(a.index!==r&&c>1){if(t.setAttribute("colspan",c+o,a),i.skipRow(n),l>1)for(let e=n+1;e<n+l;e++)i.skipRow(e)}else{const r=t.createPositionAt(e.getChild(n),s);Bp(o,t,r)}}})}splitCellVertically(e,t=2){const n=this.editor.model,r=e.parent.parent,o=parseInt(e.getAttribute("rowspan")||1),a=parseInt(e.getAttribute("colspan")||1);n.change(n=>{if(a>1){const{newCellsSpan:r,updatedSpan:i}=Up(a,t);ap("colspan",i,e,n);const s={};r>1&&(s.colspan=r),o>1&&(s.rowspan=o),Bp(a>t?t-1:a-1,n,n.createPositionAfter(e),s)}if(a<t){const i=t-a,s=[...new cp(r)],{column:l}=s.find(({cell:t})=>t===e),c=s.filter(({cell:t,colspan:n,column:r})=>t!==e&&r===l||r<l&&r+n>l);for(const{cell:e,colspan:t}of c)n.setAttribute("colspan",t+i,e);const u={};o>1&&(u.rowspan=o),Bp(i,n,n.createPositionAfter(e),u);const d=r.getAttribute("headingColumns")||0;d>l&&ap("headingColumns",d+i,r,n)}})}splitCellHorizontally(e,t=2){const n=this.editor.model,r=e.parent,o=r.parent,a=o.getChildIndex(r),i=parseInt(e.getAttribute("rowspan")||1),s=parseInt(e.getAttribute("colspan")||1);n.change(n=>{if(i>1){const r=[...new cp(o,{startRow:a,endRow:a+i-1,includeSpanned:!0})],{newCellsSpan:l,updatedSpan:c}=Up(i,t);ap("rowspan",c,e,n);const{column:u}=r.find(({cell:t})=>t===e),d={};l>1&&(d.rowspan=l),s>1&&(d.colspan=s);for(const{column:e,row:t,cellIndex:i}of r)t>=a+c&&e===u&&(t+a+c)%l==0&&Bp(1,n,n.createPositionAt(o.getChild(t),i),d)}if(i<t){const r=t-i,l=[...new cp(o,{startRow:0,endRow:a})];for(const{cell:t,rowspan:o,row:i}of l)if(t!==e&&i+o>a){const e=o+r;n.setAttribute("rowspan",e,t)}const c={};s>1&&(c.colspan=s),zp(n,o,a+1,r,1,c);const u=o.getAttribute("headingRows")||0;u>a&&ap("headingRows",u+r,o,n)}})}getColumns(e){return[...e.getChild(0).getChildren()].reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||1),0)}}function zp(e,t,n,r,o,a={}){for(let i=0;i<r;i++){const r=e.createElement("tableRow");e.insert(r,t,n),Bp(o,e,e.createPositionAt(r,"end"),a)}}function Bp(e,t,n,r={}){for(let o=0;o<e;o++)ip(t,n,r)}function Up(e,t){if(e<t)return{newCellsSpan:1,updatedSpan:1};const n=Math.floor(e/t);return{newCellsSpan:n,updatedSpan:e-n*t+n}}function Vp(e,t){let n=!1;const r=function(e){const t=parseInt(e.getAttribute("headingRows")||0),n=e.childCount,r=[];for(const{row:o,rowspan:a,cell:i}of new cp(e)){if(a<2)continue;const e=o<t?t:n;if(o+a>e){const t=e-o;r.push({cell:i,rowspan:t})}}return r}(e);if(r.length){n=!0;for(const e of r)ap("rowspan",e.rowspan,e.cell,t,1)}return n}function Wp(e,t){let n=!1;const r=function(e){const t={};for(const{row:n}of new cp(e,{includeSpanned:!0}))t[n]||(t[n]=0),t[n]+=1;return t}(e),o=r[0];if(!Object.values(r).every(e=>e===o)){const o=Object.values(r).reduce((e,t)=>t>e?t:e,0);for(const[a,i]of Object.entries(r)){const r=o-i;if(r){for(let n=0;n<r;n++)ip(t,t.createPositionAt(e.getChild(a),"end"));n=!0}}}return n}function qp(e){const t="attribute"===e.type,n=e.attributeKey;return t&&("headingRows"===n||"colspan"===n||"rowspan"===n)}function Gp(e,t){let n=!1;for(const r of e.getChildren())n=Jp(r,t)||n;return n}function Jp(e,t){let n=!1;for(const r of e.getChildren())n=Kp(r,t)||n;return n}function Kp(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const n=Array.from(e.getChildren()).filter(e=>e.is("text"));for(const e of n)t.wrap(t.createRangeOn(e),"paragraph");return!!n.length}function Qp(e){return!(!e.position||!e.position.parent.is("tableCell"))&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function Xp(e,t){if(!Array.from(e.getChildren()).some(e=>e.is("paragraph")))return!1;if("attribute"==t){const t=Array.from(e.getChild(0).getAttributeKeys()).length;return 1===e.childCount&&t<2}return e.childCount<=("insert"==t?2:1)}n(85);class $p extends Is{init(){const e=this.editor,t=e.model,n=t.schema,r=e.conversion;n.register("table",{allowWhere:"$block",allowAttributes:["headingRows","headingColumns"],isLimit:!0,isObject:!0,isBlock:!0}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0}),n.extend("$block",{allowIn:"tableCell"}),n.addChildCheck((e,t)=>{if("table"==t.name&&Array.from(e.getNames()).includes("table"))return!1}),r.for("upcast").add(e=>{e.on("element:table",(e,t,n)=>{const r=t.viewItem;if(!n.consumable.test(r,{name:!0}))return;const{rows:o,headingRows:a,headingColumns:i}=function(e){const t={headingRows:0,headingColumns:0},n=[],r=[];let o;for(const a of Array.from(e.getChildren()))if("tbody"===a.name||"thead"===a.name||"tfoot"===a.name){"thead"!==a.name||o||(o=a);const e=Array.from(a.getChildren()).filter(e=>e.is("element","tr"));for(const a of e)if("thead"===a.parent.name&&a.parent===o)t.headingRows++,n.push(a);else{r.push(a);const e=lp(a);e>t.headingColumns&&(t.headingColumns=e)}}return t.rows=[...n,...r],t}(r),s={};i&&(s.headingColumns=i),a&&(s.headingRows=a);const l=n.writer.createElement("table",s),c=n.splitToAllowedParent(l,t.modelCursor);if(c){if(n.writer.insert(l,c.position),n.consumable.consume(r,{name:!0}),o.length)o.forEach(e=>n.convertItem(e,n.writer.createPositionAt(l,"end")));else{const e=n.writer.createElement("tableRow");n.writer.insert(e,n.writer.createPositionAt(l,"end")),ip(n.writer,n.writer.createPositionAt(e,"end"))}t.modelRange=n.writer.createRange(n.writer.createPositionBefore(l),n.writer.createPositionAfter(l)),c.cursorParent?t.modelCursor=n.writer.createPositionAt(c.cursorParent,0):t.modelCursor=t.modelRange.end}})}),r.for("editingDowncast").add(pp({asWidget:!0})),r.for("dataDowncast").add(pp()),r.for("upcast").elementToElement({model:"tableRow",view:"tr"}),r.for("editingDowncast").add(fp({asWidget:!0})),r.for("dataDowncast").add(fp()),r.for("downcast").add(e=>e.on("remove:tableRow",(e,t,n)=>{e.stop();const r=n.writer,o=n.mapper,a=o.toViewPosition(t.position).getLastMatchingPosition(e=>!e.item.is("tr")).nodeAfter,i=a.parent,s=r.createRangeOn(a),l=r.remove(s);for(const e of r.createRangeIn(l).getItems())o.unbindViewElement(e);i.childCount||r.remove(r.createRangeOn(i))},{priority:"higher"})),r.for("upcast").add(sp("td")),r.for("upcast").add(sp("th")),r.for("editingDowncast").add(mp({asWidget:!0})),r.for("dataDowncast").add(mp()),r.attributeToAttribute({model:"colspan",view:"colspan"}),r.attributeToAttribute({model:"rowspan",view:"rowspan"}),r.for("editingDowncast").add(_p({asWidget:!0})),r.for("dataDowncast").add(_p()),r.for("editingDowncast").add(gp({asWidget:!0})),r.for("dataDowncast").add(gp()),e.commands.add("insertTable",new Lp(e)),e.commands.add("insertTableRowAbove",new Cp(e,{order:"above"})),e.commands.add("insertTableRowBelow",new Cp(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new Pp(e,{order:"left"})),e.commands.add("insertTableColumnRight",new Pp(e,{order:"right"})),e.commands.add("removeTableRow",new Ip(e)),e.commands.add("removeTableColumn",new Rp(e)),e.commands.add("splitTableCellVertically",new Op(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new Op(e,{direction:"horizontally"})),e.commands.add("mergeTableCellRight",new Np(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new Np(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new Np(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new Np(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new Fp(e)),e.commands.add("setTableRowHeader",new Yp(e)),function(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.differ.getChanges();let r=!1;const o=new Set;for(const t of n){let n;"table"==t.name&&"insert"==t.type&&(n=t.position.nodeAfter),"tableRow"!=t.name&&"tableCell"!=t.name||(n=op("table",t.position)),qp(t)&&(n=op("table",t.range.start)),n&&!o.has(n)&&(r=Vp(n,e)||r,r=Wp(n,e)||r,o.add(n))}return r}(t,e))}(t),function(e){e.document.registerPostFixer(()=>function(e){const t=e.document.differ,n=new Set;for(const e of t.getChanges()){const t="insert"==e.type||"remove"==e.type?e.position.parent:e.range.start.parent;t.is("tableCell")&&Xp(t,e.type)&&n.add(t)}if(n.size){for(const e of n.values())t.refreshItem(e);return!0}return!1}(e))}(t),function(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.differ.getChanges();let r=!1;for(const t of n)"insert"==t.type&&"table"==t.name&&(r=Gp(t.position.nodeAfter,e)||r),"insert"==t.type&&"tableRow"==t.name&&(r=Jp(t.position.nodeAfter,e)||r),"insert"==t.type&&"tableCell"==t.name&&(r=Kp(t.position.nodeAfter,e)||r),Qp(t)&&(r=Kp(t.position.parent,e)||r);return r}(t,e))}(t),this.editor.keystrokes.set("Tab",(...e)=>this._handleTabOnSelectedTable(...e),{priority:"low"}),this.editor.keystrokes.set("Tab",this._getTabHandler(!0),{priority:"low"}),this.editor.keystrokes.set("Shift+Tab",this._getTabHandler(!1),{priority:"low"})}static get requires(){return[Hp]}_handleTabOnSelectedTable(e,t){const n=this.editor,r=n.model.document.selection;if(!r.isCollapsed&&1===r.rangeCount&&r.getFirstRange().isFlat){const e=r.getSelectedElement();if(!e||!e.is("table"))return;t(),n.model.change(t=>{t.setSelection(t.createRangeIn(e.getChild(0).getChild(0)))})}}_getTabHandler(e){const t=this.editor;return(n,r)=>{const o=op("tableCell",t.model.document.selection.getFirstPosition());if(!o)return;r();const a=o.parent,i=a.parent,s=i.getChildIndex(a),l=a.getChildIndex(o),c=0===l;if(!e&&c&&0===s)return;const u=l===a.childCount-1,d=s===i.childCount-1;if(e&&d&&u&&(t.execute("insertTableRowBelow"),s===i.childCount-1))return;let h;if(e&&u){const e=i.getChild(s+1);h=e.getChild(0)}else if(!e&&c){const e=i.getChild(s-1);h=e.getChild(e.childCount-1)}else h=a.getChild(l+(e?1:-1));t.model.change(e=>{e.setSelection(e.createRangeIn(h))})}}}n(87);class Zp extends ys{constructor(e){super(e);const t=this.bindTemplate;this.items=this.createCollection(),this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(e,t)=>`${t} × ${e}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},children:this.items},{tag:"div",attributes:{class:["ck-insert-table-dropdown__label"]},children:[{text:t.to("label")}]}],on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(()=>{this.fire("execute")})}});for(let e=0;e<100;e++){const t=new ef;t.on("over",()=>{const t=Math.floor(e/10),n=e%10;this.set("rows",t+1),this.set("columns",n+1)}),this.items.add(t)}this.on("change:columns",()=>{this._highlightGridBoxes()}),this.on("change:rows",()=>{this._highlightGridBoxes()})}focus(){}focusLast(){}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map((n,r)=>{const o=Math.floor(r/10)<e&&r%10<t;n.set("isOn",o)})}}class ef extends ys{constructor(e){super(e);const t=this.bindTemplate;this.set("isOn",!1),this.setTemplate({tag:"div",attributes:{class:["ck-insert-table-dropdown-grid-box",t.if("isOn","ck-on")]},on:{mouseover:t.to("over")}})}}class tf extends Is{init(){const e=this.editor,t=this.editor.t;e.ui.componentFactory.add("insertTable",n=>{const r=e.commands.get("insertTable"),o=Xu(n);o.bind("isEnabled").to(r),o.buttonView.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 6v3h4V6H3zm0 4v3h4v-3H3zm0 4v3h4v-3H3zm5 3h4v-3H8v3zm5 0h4v-3h-4v3zm4-4v-3h-4v3h4zm0-4V6h-4v3h4zm1.5 8a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 17V4c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13zM12 13v-3H8v3h4zm0-4V6H8v3h4z"/></svg>',label:t("s"),tooltip:!0});const a=new Zp(n);return o.panelView.children.add(a),a.delegate("execute").to(o),o.buttonView.on("open",()=>{a.rows=0,a.columns=0}),o.on("execute",()=>{e.execute("insertTable",{rows:a.rows,columns:a.columns}),e.editing.view.focus()}),o}),e.ui.componentFactory.add("tableColumn",e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("t"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableColumnLeft",label:t("u")}},{type:"button",model:{commandName:"insertTableColumnRight",label:t("v")}},{type:"button",model:{commandName:"removeTableColumn",label:t("w")}}];return this._prepareDropdown(t("x"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M18 7v1H2V7h16zm0 5v1H2v-1h16z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z"/></svg>',n,e)}),e.ui.componentFactory.add("tableRow",e=>{const n=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("y"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowBelow",label:t("z")}},{type:"button",model:{commandName:"insertTableRowAbove",label:t("aa")}},{type:"button",model:{commandName:"removeTableRow",label:t("ab")}}];return this._prepareDropdown(t("ac"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v16h-1V2z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z"/></svg>',n,e)}),e.ui.componentFactory.add("mergeTableCells",e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("ad")}},{type:"button",model:{commandName:"mergeTableCellRight",label:t("ae")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("af")}},{type:"button",model:{commandName:"mergeTableCellLeft",label:t("ag")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("ah")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("ai")}}];return this._prepareDropdown(t("aj"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z"/></svg>',n,e)})}_prepareDropdown(e,t,n,r){const o=this.editor,a=Xu(r),i=[],s=new kn;for(const e of n)nf(e,o,i,s);return $u(a,s),a.buttonView.set({label:e,icon:t,tooltip:!0}),a.bind("isEnabled").toMany(i,"isEnabled",(...e)=>e.some(e=>e)),this.listenTo(a,"execute",e=>{o.execute(e.source.commandName),o.editing.view.focus()}),a}}function nf(e,t,n,r){const o=e.model=new Uu(e.model),{commandName:a,bindIsOn:i}=e.model;if("separator"!==e.type){const e=t.commands.get(a);n.push(e),o.set({commandName:a}),o.bind("isEnabled").to(e),i&&o.bind("isOn").to(e,"value")}o.set({withText:!0}),r.add(e)}n(89),n.d(t,"default",(function(){return rf}));class rf extends As{}rf.builtinPlugins=[class extends Is{static get requires(){return[Fs,qs,Qs,cl,Nl]}static get pluginName(){return"Essentials"}},Hl,class extends Is{static get pluginName(){return"Autoformat"}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats()}_addListAutoformats(){const e=this.editor.commands;e.get("bulletedList")&&new Bl(this.editor,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&new Bl(this.editor,/^1[.|)]\s$/,"numberedList")}_addBasicStylesAutoformats(){const e=this.editor.commands;if(e.get("bold")){const e=Wl(this.editor,"bold");new Ul(this.editor,/(\*\*)([^*]+)(\*\*)$/g,e),new Ul(this.editor,/(__)([^_]+)(__)$/g,e)}if(e.get("italic")){const e=Wl(this.editor,"italic");new Ul(this.editor,/(?:^|[^*])(\*)([^*_]+)(\*)$/g,e),new Ul(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,e)}if(e.get("code")){const e=Wl(this.editor,"code");new Ul(this.editor,/(`)([^`]+)(`)$/g,e)}}_addHeadingAutoformats(){const e=this.editor.commands.get("heading");e&&e.modelElements.filter(e=>e.match(/^heading[1-6]$/)).forEach(t=>{const n=t[7],r=new RegExp(`^(#{${n}})\\s$`);new Bl(this.editor,r,()=>{if(!e.isEnabled)return!1;this.editor.execute("heading",{value:t})})})}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&new Bl(this.editor,/^>\s$/,"blockQuote")}},class extends Is{static get requires(){return[Jl,Ql]}static get pluginName(){return"Bold"}},class extends Is{static get requires(){return[$l,ec]}static get pluginName(){return"Italic"}},class extends Is{static get requires(){return[ic,sc]}static get pluginName(){return"BlockQuote"}},class extends Is{static get pluginName(){return"CKFinder"}static get requires(){return[hc,lc,Hl]}},class extends Is{static get requires(){return[bc,gu,Nu]}static get pluginName(){return"EasyImage"}},class extends Is{static get requires(){return[Bu,Zu]}static get pluginName(){return"Heading"}},gu,class extends Is{static get requires(){return[nd]}static get pluginName(){return"ImageCaption"}},class extends Is{static get requires(){return[_d,vd]}static get pluginName(){return"ImageStyle"}},class extends Is{static get requires(){return[bd]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t;e.plugins.get(bd).register("image",{ariaLabel:t("b"),items:e.config.get("image.toolbar")||[],getRelatedElement:Ac})}},Nu,class extends Is{static get requires(){return[oh,ch]}static get pluginName(){return"Link"}},class extends Is{static get requires(){return[Nh,Ih]}static get pluginName(){return"List"}},class extends Is{static get requires(){return[Vh,Jh,qh,Uc]}static get pluginName(){return"MediaEmbed"}},Ru,class extends Is{static get pluginName(){return"PasteFromOffice"}static get requires(){return[Fs]}init(){const e=this.editor,t=[];t.push(new rp),t.push(new $h),e.plugins.get("Clipboard").on("inputTransformation",(e,n)=>{if(n.isTransformedWithPasteFromOffice)return;const r=n.dataTransfer.getData("text/html"),o=t.find(e=>e.isActive(r));o&&(o.execute(n),n.isTransformedWithPasteFromOffice=!0)},{priority:"high"})}},class extends Is{static get requires(){return[$p,tf,Uc]}static get pluginName(){return"Table"}},class extends Is{static get requires(){return[bd]}static get pluginName(){return"TableToolbar"}afterInit(){const e=this.editor,t=e.t,n=e.plugins.get(bd),r=e.config.get("table.contentToolbar"),o=e.config.get("table.tableToolbar");r&&n.register("tableContent",{ariaLabel:t("c"),items:r,getRelatedElement:hp}),o&&n.register("table",{ariaLabel:t("c"),items:o,getRelatedElement:dp})}}],rf.defaultConfig={toolbar:{items:["heading","|","bold","italic","link","bulletedList","numberedList","imageUpload","blockQuote","insertTable","mediaEmbed","undo","redo"]},image:{toolbar:["imageStyle:full","imageStyle:side","|","imageTextAlternative"]},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells"]},language:"en"}}]).default},function(e,t,n){"use strict";var r={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"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},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 o(e){return function(t){var n=t||{},r=n.width?String(n.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var a={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({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:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(e){return function(t,n){var r,o=n||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,i=o.width?String(o.width):a;r=e.formattingValues[i]||e.formattingValues[a]}else{var s=e.defaultWidth,l=o.width?String(o.width):e.defaultWidth;r=e.values[l]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function l(e){return function(t,n){var r=String(t),o=n||{},a=o.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=r.match(i);if(!s)return null;var l,c=s[0],u=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(u)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(u,(function(e){return e.test(c)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(u,(function(e){return e.test(c)})),l=e.valueCallback?e.valueCallback(l):l,{value:l=o.valueCallback?o.valueCallback(l):l,rest:r.slice(c.length)}}}var c,u={code:"en-US",formatDistance:function(e,t,n){var o;return n=n||{},o="string"==typeof r[e]?r[e]:1===t?r[e].one:r[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+o:o+" ago":o},formatLong:a,formatRelative:function(e,t,n,r){return i[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:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({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:s({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:s({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:s({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"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(c={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||{},o=n.match(c.matchPattern);if(!o)return null;var a=o[0],i=n.match(c.parsePattern);if(!i)return null;var s=c.valueCallback?c.valueCallback(i[0]):i[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:l({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:l({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:l({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:l({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:l({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}};t.a=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),o=n(18),a=n(7),i=n(31),s=n(2);function l(e,t){Object(s.a)(1,arguments);var n=t||{},r=n.locale,l=r&&r.options&&r.options.firstWeekContainsDate,c=null==l?1:Object(a.a)(l),u=null==n.firstWeekContainsDate?c:Object(a.a)(n.firstWeekContainsDate),d=Object(i.a)(e,t),h=new Date(0);h.setUTCFullYear(d,0,u),h.setUTCHours(0,0,0,0);var p=Object(o.a)(h,t);return p}function c(e,t){Object(s.a)(1,arguments);var n=Object(r.default)(e),a=Object(o.a)(n,t).getTime()-l(n,t).getTime();return Math.round(a/6048e5)+1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),o=n(21),a=n(53),i=n(2);function s(e){Object(i.a)(1,arguments);var t=Object(a.a)(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Object(o.a)(n);return r}function l(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=Object(o.a)(t).getTime()-s(t).getTime();return Math.round(n/6048e5)+1}},function(e,t,n){var r=n(450),o=n(451),a=n(452),i=n(454);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()}},function(e,t,n){"use strict";
24
- /*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !(function (e) {
2
+ var t = {};
3
+ function n(r) {
4
+ if (t[r]) return t[r].exports;
5
+ var o = (t[r] = { i: r, l: !1, exports: {} });
6
+ return e[r].call(o.exports, o, o.exports, n), (o.l = !0), o.exports;
7
+ }
8
+ (n.m = e),
9
+ (n.c = t),
10
+ (n.d = function (e, t, r) {
11
+ n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: r });
12
+ }),
13
+ (n.r = function (e) {
14
+ "undefined" != typeof Symbol &&
15
+ Symbol.toStringTag &&
16
+ Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
17
+ Object.defineProperty(e, "__esModule", { value: !0 });
18
+ }),
19
+ (n.t = function (e, t) {
20
+ if ((1 & t && (e = n(e)), 8 & t)) return e;
21
+ if (4 & t && "object" == typeof e && e && e.__esModule) return e;
22
+ var r = Object.create(null);
23
+ if (
24
+ (n.r(r),
25
+ Object.defineProperty(r, "default", { enumerable: !0, value: e }),
26
+ 2 & t && "string" != typeof e)
27
+ )
28
+ for (var o in e)
29
+ n.d(
30
+ r,
31
+ o,
32
+ function (t) {
33
+ return e[t];
34
+ }.bind(null, o)
35
+ );
36
+ return r;
37
+ }),
38
+ (n.n = function (e) {
39
+ var t =
40
+ e && e.__esModule
41
+ ? function () {
42
+ return e.default;
43
+ }
44
+ : function () {
45
+ return e;
46
+ };
47
+ return n.d(t, "a", t), t;
48
+ }),
49
+ (n.o = function (e, t) {
50
+ return Object.prototype.hasOwnProperty.call(e, t);
51
+ }),
52
+ (n.p = ""),
53
+ n((n.s = 455));
54
+ })([
55
+ function (e, t, n) {
56
+ "use strict";
57
+ e.exports = n(255);
58
+ },
59
+ function (e, t) {
60
+ e.exports = function (e, t, n) {
61
+ return (
62
+ t in e
63
+ ? Object.defineProperty(e, t, {
64
+ value: n,
65
+ enumerable: !0,
66
+ configurable: !0,
67
+ writable: !0,
68
+ })
69
+ : (e[t] = n),
70
+ e
71
+ );
72
+ };
73
+ },
74
+ function (e, t, n) {
75
+ "use strict";
76
+ function r(e, t) {
77
+ if (t.length < e)
78
+ throw new TypeError(
79
+ e +
80
+ " argument" +
81
+ (e > 1 ? "s" : "") +
82
+ " required, but only " +
83
+ t.length +
84
+ " present"
85
+ );
86
+ }
87
+ n.d(t, "a", function () {
88
+ return r;
89
+ });
90
+ },
91
+ function (e, t, n) {
92
+ (function (e) {
93
+ e.exports = (function () {
94
+ "use strict";
95
+ var t, r;
96
+ function o() {
97
+ return t.apply(null, arguments);
98
+ }
99
+ function a(e) {
100
+ return (
101
+ e instanceof Array ||
102
+ "[object Array]" === Object.prototype.toString.call(e)
103
+ );
104
+ }
105
+ function i(e) {
106
+ return (
107
+ null != e && "[object Object]" === Object.prototype.toString.call(e)
108
+ );
109
+ }
110
+ function s(e, t) {
111
+ return Object.prototype.hasOwnProperty.call(e, t);
112
+ }
113
+ function l(e) {
114
+ if (Object.getOwnPropertyNames)
115
+ return 0 === Object.getOwnPropertyNames(e).length;
116
+ var t;
117
+ for (t in e) if (s(e, t)) return !1;
118
+ return !0;
119
+ }
120
+ function c(e) {
121
+ return void 0 === e;
122
+ }
123
+ function u(e) {
124
+ return (
125
+ "number" == typeof e ||
126
+ "[object Number]" === Object.prototype.toString.call(e)
127
+ );
128
+ }
129
+ function d(e) {
130
+ return (
131
+ e instanceof Date ||
132
+ "[object Date]" === Object.prototype.toString.call(e)
133
+ );
134
+ }
135
+ function h(e, t) {
136
+ var n,
137
+ r = [];
138
+ for (n = 0; n < e.length; ++n) r.push(t(e[n], n));
139
+ return r;
140
+ }
141
+ function p(e, t) {
142
+ for (var n in t) s(t, n) && (e[n] = t[n]);
143
+ return (
144
+ s(t, "toString") && (e.toString = t.toString),
145
+ s(t, "valueOf") && (e.valueOf = t.valueOf),
146
+ e
147
+ );
148
+ }
149
+ function f(e, t, n, r) {
150
+ return Et(e, t, n, r, !0).utc();
151
+ }
152
+ function m(e) {
153
+ return (
154
+ null == e._pf &&
155
+ (e._pf = {
156
+ empty: !1,
157
+ unusedTokens: [],
158
+ unusedInput: [],
159
+ overflow: -2,
160
+ charsLeftOver: 0,
161
+ nullInput: !1,
162
+ invalidEra: null,
163
+ invalidMonth: null,
164
+ invalidFormat: !1,
165
+ userInvalidated: !1,
166
+ iso: !1,
167
+ parsedDateParts: [],
168
+ era: null,
169
+ meridiem: null,
170
+ rfc2822: !1,
171
+ weekdayMismatch: !1,
172
+ }),
173
+ e._pf
174
+ );
175
+ }
176
+ function g(e) {
177
+ if (null == e._isValid) {
178
+ var t = m(e),
179
+ n = r.call(t.parsedDateParts, function (e) {
180
+ return null != e;
181
+ }),
182
+ o =
183
+ !isNaN(e._d.getTime()) &&
184
+ t.overflow < 0 &&
185
+ !t.empty &&
186
+ !t.invalidEra &&
187
+ !t.invalidMonth &&
188
+ !t.invalidWeekday &&
189
+ !t.weekdayMismatch &&
190
+ !t.nullInput &&
191
+ !t.invalidFormat &&
192
+ !t.userInvalidated &&
193
+ (!t.meridiem || (t.meridiem && n));
194
+ if (
195
+ (e._strict &&
196
+ (o =
197
+ o &&
198
+ 0 === t.charsLeftOver &&
199
+ 0 === t.unusedTokens.length &&
200
+ void 0 === t.bigHour),
201
+ null != Object.isFrozen && Object.isFrozen(e))
202
+ )
203
+ return o;
204
+ e._isValid = o;
205
+ }
206
+ return e._isValid;
207
+ }
208
+ function _(e) {
209
+ var t = f(NaN);
210
+ return null != e ? p(m(t), e) : (m(t).userInvalidated = !0), t;
211
+ }
212
+ r = Array.prototype.some
213
+ ? Array.prototype.some
214
+ : function (e) {
215
+ var t,
216
+ n = Object(this),
217
+ r = n.length >>> 0;
218
+ for (t = 0; t < r; t++)
219
+ if (t in n && e.call(this, n[t], t, n)) return !0;
220
+ return !1;
221
+ };
222
+ var v = (o.momentProperties = []),
223
+ b = !1;
224
+ function y(e, t) {
225
+ var n, r, o;
226
+ if (
227
+ (c(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject),
228
+ c(t._i) || (e._i = t._i),
229
+ c(t._f) || (e._f = t._f),
230
+ c(t._l) || (e._l = t._l),
231
+ c(t._strict) || (e._strict = t._strict),
232
+ c(t._tzm) || (e._tzm = t._tzm),
233
+ c(t._isUTC) || (e._isUTC = t._isUTC),
234
+ c(t._offset) || (e._offset = t._offset),
235
+ c(t._pf) || (e._pf = m(t)),
236
+ c(t._locale) || (e._locale = t._locale),
237
+ v.length > 0)
238
+ )
239
+ for (n = 0; n < v.length; n++) c((o = t[(r = v[n])])) || (e[r] = o);
240
+ return e;
241
+ }
242
+ function w(e) {
243
+ y(this, e),
244
+ (this._d = new Date(null != e._d ? e._d.getTime() : NaN)),
245
+ this.isValid() || (this._d = new Date(NaN)),
246
+ !1 === b && ((b = !0), o.updateOffset(this), (b = !1));
247
+ }
248
+ function k(e) {
249
+ return e instanceof w || (null != e && null != e._isAMomentObject);
250
+ }
251
+ function x(e) {
252
+ !1 === o.suppressDeprecationWarnings &&
253
+ "undefined" != typeof console &&
254
+ console.warn &&
255
+ console.warn("Deprecation warning: " + e);
256
+ }
257
+ function M(e, t) {
258
+ var n = !0;
259
+ return p(function () {
260
+ if (
261
+ (null != o.deprecationHandler && o.deprecationHandler(null, e), n)
262
+ ) {
263
+ var r,
264
+ a,
265
+ i,
266
+ l = [];
267
+ for (a = 0; a < arguments.length; a++) {
268
+ if (((r = ""), "object" == typeof arguments[a])) {
269
+ for (i in ((r += "\n[" + a + "] "), arguments[0]))
270
+ s(arguments[0], i) &&
271
+ (r += i + ": " + arguments[0][i] + ", ");
272
+ r = r.slice(0, -2);
273
+ } else r = arguments[a];
274
+ l.push(r);
275
+ }
276
+ x(
277
+ e +
278
+ "\nArguments: " +
279
+ Array.prototype.slice.call(l).join("") +
280
+ "\n" +
281
+ new Error().stack
282
+ ),
283
+ (n = !1);
284
+ }
285
+ return t.apply(this, arguments);
286
+ }, t);
287
+ }
288
+ var E,
289
+ T = {};
290
+ function S(e, t) {
291
+ null != o.deprecationHandler && o.deprecationHandler(e, t),
292
+ T[e] || (x(t), (T[e] = !0));
293
+ }
294
+ function D(e) {
295
+ return (
296
+ ("undefined" != typeof Function && e instanceof Function) ||
297
+ "[object Function]" === Object.prototype.toString.call(e)
298
+ );
299
+ }
300
+ function L(e, t) {
301
+ var n,
302
+ r = p({}, e);
303
+ for (n in t)
304
+ s(t, n) &&
305
+ (i(e[n]) && i(t[n])
306
+ ? ((r[n] = {}), p(r[n], e[n]), p(r[n], t[n]))
307
+ : null != t[n]
308
+ ? (r[n] = t[n])
309
+ : delete r[n]);
310
+ for (n in e) s(e, n) && !s(t, n) && i(e[n]) && (r[n] = p({}, r[n]));
311
+ return r;
312
+ }
313
+ function C(e) {
314
+ null != e && this.set(e);
315
+ }
316
+ function P(e, t, n) {
317
+ var r = "" + Math.abs(e),
318
+ o = t - r.length;
319
+ return (
320
+ (e >= 0 ? (n ? "+" : "") : "-") +
321
+ Math.pow(10, Math.max(0, o)).toString().substr(1) +
322
+ r
323
+ );
324
+ }
325
+ (o.suppressDeprecationWarnings = !1),
326
+ (o.deprecationHandler = null),
327
+ (E = Object.keys
328
+ ? Object.keys
329
+ : function (e) {
330
+ var t,
331
+ n = [];
332
+ for (t in e) s(e, t) && n.push(t);
333
+ return n;
334
+ });
335
+ var O = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
336
+ N = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
337
+ A = {},
338
+ I = {};
339
+ function R(e, t, n, r) {
340
+ var o = r;
341
+ "string" == typeof r &&
342
+ (o = function () {
343
+ return this[r]();
344
+ }),
345
+ e && (I[e] = o),
346
+ t &&
347
+ (I[t[0]] = function () {
348
+ return P(o.apply(this, arguments), t[1], t[2]);
349
+ }),
350
+ n &&
351
+ (I[n] = function () {
352
+ return this.localeData().ordinal(o.apply(this, arguments), e);
353
+ });
354
+ }
355
+ function Y(e, t) {
356
+ return e.isValid()
357
+ ? ((t = j(t, e.localeData())),
358
+ (A[t] =
359
+ A[t] ||
360
+ (function (e) {
361
+ var t,
362
+ n,
363
+ r,
364
+ o = e.match(O);
365
+ for (t = 0, n = o.length; t < n; t++)
366
+ I[o[t]]
367
+ ? (o[t] = I[o[t]])
368
+ : (o[t] = (r = o[t]).match(/\[[\s\S]/)
369
+ ? r.replace(/^\[|\]$/g, "")
370
+ : r.replace(/\\/g, ""));
371
+ return function (t) {
372
+ var r,
373
+ a = "";
374
+ for (r = 0; r < n; r++)
375
+ a += D(o[r]) ? o[r].call(t, e) : o[r];
376
+ return a;
377
+ };
378
+ })(t)),
379
+ A[t](e))
380
+ : e.localeData().invalidDate();
381
+ }
382
+ function j(e, t) {
383
+ var n = 5;
384
+ function r(e) {
385
+ return t.longDateFormat(e) || e;
386
+ }
387
+ for (N.lastIndex = 0; n >= 0 && N.test(e); )
388
+ (e = e.replace(N, r)), (N.lastIndex = 0), (n -= 1);
389
+ return e;
390
+ }
391
+ var F = {};
392
+ function H(e, t) {
393
+ var n = e.toLowerCase();
394
+ F[n] = F[n + "s"] = F[t] = e;
395
+ }
396
+ function z(e) {
397
+ return "string" == typeof e ? F[e] || F[e.toLowerCase()] : void 0;
398
+ }
399
+ function B(e) {
400
+ var t,
401
+ n,
402
+ r = {};
403
+ for (n in e) s(e, n) && (t = z(n)) && (r[t] = e[n]);
404
+ return r;
405
+ }
406
+ var U = {};
407
+ function V(e, t) {
408
+ U[e] = t;
409
+ }
410
+ function W(e) {
411
+ return (e % 4 == 0 && e % 100 != 0) || e % 400 == 0;
412
+ }
413
+ function q(e) {
414
+ return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
415
+ }
416
+ function G(e) {
417
+ var t = +e,
418
+ n = 0;
419
+ return 0 !== t && isFinite(t) && (n = q(t)), n;
420
+ }
421
+ function J(e, t) {
422
+ return function (n) {
423
+ return null != n
424
+ ? (Q(this, e, n), o.updateOffset(this, t), this)
425
+ : K(this, e);
426
+ };
427
+ }
428
+ function K(e, t) {
429
+ return e.isValid()
430
+ ? e._d["get" + (e._isUTC ? "UTC" : "") + t]()
431
+ : NaN;
432
+ }
433
+ function Q(e, t, n) {
434
+ e.isValid() &&
435
+ !isNaN(n) &&
436
+ ("FullYear" === t &&
437
+ W(e.year()) &&
438
+ 1 === e.month() &&
439
+ 29 === e.date()
440
+ ? ((n = G(n)),
441
+ e._d["set" + (e._isUTC ? "UTC" : "") + t](
442
+ n,
443
+ e.month(),
444
+ ke(n, e.month())
445
+ ))
446
+ : e._d["set" + (e._isUTC ? "UTC" : "") + t](n));
447
+ }
448
+ var X,
449
+ $ = /\d/,
450
+ Z = /\d\d/,
451
+ ee = /\d{3}/,
452
+ te = /\d{4}/,
453
+ ne = /[+-]?\d{6}/,
454
+ re = /\d\d?/,
455
+ oe = /\d\d\d\d?/,
456
+ ae = /\d\d\d\d\d\d?/,
457
+ ie = /\d{1,3}/,
458
+ se = /\d{1,4}/,
459
+ le = /[+-]?\d{1,6}/,
460
+ ce = /\d+/,
461
+ ue = /[+-]?\d+/,
462
+ de = /Z|[+-]\d\d:?\d\d/gi,
463
+ he = /Z|[+-]\d\d(?::?\d\d)?/gi,
464
+ pe = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
465
+ function fe(e, t, n) {
466
+ X[e] = D(t)
467
+ ? t
468
+ : function (e, r) {
469
+ return e && n ? n : t;
470
+ };
471
+ }
472
+ function me(e, t) {
473
+ return s(X, e)
474
+ ? X[e](t._strict, t._locale)
475
+ : new RegExp(
476
+ ge(
477
+ e
478
+ .replace("\\", "")
479
+ .replace(
480
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
481
+ function (e, t, n, r, o) {
482
+ return t || n || r || o;
483
+ }
484
+ )
485
+ )
486
+ );
487
+ }
488
+ function ge(e) {
489
+ return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
490
+ }
491
+ X = {};
492
+ var _e,
493
+ ve = {};
494
+ function be(e, t) {
495
+ var n,
496
+ r = t;
497
+ for (
498
+ "string" == typeof e && (e = [e]),
499
+ u(t) &&
500
+ (r = function (e, n) {
501
+ n[t] = G(e);
502
+ }),
503
+ n = 0;
504
+ n < e.length;
505
+ n++
506
+ )
507
+ ve[e[n]] = r;
508
+ }
509
+ function ye(e, t) {
510
+ be(e, function (e, n, r, o) {
511
+ (r._w = r._w || {}), t(e, r._w, r, o);
512
+ });
513
+ }
514
+ function we(e, t, n) {
515
+ null != t && s(ve, e) && ve[e](t, n._a, n, e);
516
+ }
517
+ function ke(e, t) {
518
+ if (isNaN(e) || isNaN(t)) return NaN;
519
+ var n,
520
+ r = ((t % (n = 12)) + n) % n;
521
+ return (
522
+ (e += (t - r) / 12), 1 === r ? (W(e) ? 29 : 28) : 31 - ((r % 7) % 2)
523
+ );
524
+ }
525
+ (_e = Array.prototype.indexOf
526
+ ? Array.prototype.indexOf
527
+ : function (e) {
528
+ var t;
529
+ for (t = 0; t < this.length; ++t) if (this[t] === e) return t;
530
+ return -1;
531
+ }),
532
+ R("M", ["MM", 2], "Mo", function () {
533
+ return this.month() + 1;
534
+ }),
535
+ R("MMM", 0, 0, function (e) {
536
+ return this.localeData().monthsShort(this, e);
537
+ }),
538
+ R("MMMM", 0, 0, function (e) {
539
+ return this.localeData().months(this, e);
540
+ }),
541
+ H("month", "M"),
542
+ V("month", 8),
543
+ fe("M", re),
544
+ fe("MM", re, Z),
545
+ fe("MMM", function (e, t) {
546
+ return t.monthsShortRegex(e);
547
+ }),
548
+ fe("MMMM", function (e, t) {
549
+ return t.monthsRegex(e);
550
+ }),
551
+ be(["M", "MM"], function (e, t) {
552
+ t[1] = G(e) - 1;
553
+ }),
554
+ be(["MMM", "MMMM"], function (e, t, n, r) {
555
+ var o = n._locale.monthsParse(e, r, n._strict);
556
+ null != o ? (t[1] = o) : (m(n).invalidMonth = e);
557
+ });
558
+ var xe = "January_February_March_April_May_June_July_August_September_October_November_December".split(
559
+ "_"
560
+ ),
561
+ Me = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
562
+ Ee = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
563
+ Te = pe,
564
+ Se = pe;
565
+ function De(e, t, n) {
566
+ var r,
567
+ o,
568
+ a,
569
+ i = e.toLocaleLowerCase();
570
+ if (!this._monthsParse)
571
+ for (
572
+ this._monthsParse = [],
573
+ this._longMonthsParse = [],
574
+ this._shortMonthsParse = [],
575
+ r = 0;
576
+ r < 12;
577
+ ++r
578
+ )
579
+ (a = f([2e3, r])),
580
+ (this._shortMonthsParse[r] = this.monthsShort(
581
+ a,
582
+ ""
583
+ ).toLocaleLowerCase()),
584
+ (this._longMonthsParse[r] = this.months(
585
+ a,
586
+ ""
587
+ ).toLocaleLowerCase());
588
+ return n
589
+ ? "MMM" === t
590
+ ? -1 !== (o = _e.call(this._shortMonthsParse, i))
591
+ ? o
592
+ : null
593
+ : -1 !== (o = _e.call(this._longMonthsParse, i))
594
+ ? o
595
+ : null
596
+ : "MMM" === t
597
+ ? -1 !== (o = _e.call(this._shortMonthsParse, i)) ||
598
+ -1 !== (o = _e.call(this._longMonthsParse, i))
599
+ ? o
600
+ : null
601
+ : -1 !== (o = _e.call(this._longMonthsParse, i)) ||
602
+ -1 !== (o = _e.call(this._shortMonthsParse, i))
603
+ ? o
604
+ : null;
605
+ }
606
+ function Le(e, t) {
607
+ var n;
608
+ if (!e.isValid()) return e;
609
+ if ("string" == typeof t)
610
+ if (/^\d+$/.test(t)) t = G(t);
611
+ else if (!u((t = e.localeData().monthsParse(t)))) return e;
612
+ return (
613
+ (n = Math.min(e.date(), ke(e.year(), t))),
614
+ e._d["set" + (e._isUTC ? "UTC" : "") + "Month"](t, n),
615
+ e
616
+ );
617
+ }
618
+ function Ce(e) {
619
+ return null != e
620
+ ? (Le(this, e), o.updateOffset(this, !0), this)
621
+ : K(this, "Month");
622
+ }
623
+ function Pe() {
624
+ function e(e, t) {
625
+ return t.length - e.length;
626
+ }
627
+ var t,
628
+ n,
629
+ r = [],
630
+ o = [],
631
+ a = [];
632
+ for (t = 0; t < 12; t++)
633
+ (n = f([2e3, t])),
634
+ r.push(this.monthsShort(n, "")),
635
+ o.push(this.months(n, "")),
636
+ a.push(this.months(n, "")),
637
+ a.push(this.monthsShort(n, ""));
638
+ for (r.sort(e), o.sort(e), a.sort(e), t = 0; t < 12; t++)
639
+ (r[t] = ge(r[t])), (o[t] = ge(o[t]));
640
+ for (t = 0; t < 24; t++) a[t] = ge(a[t]);
641
+ (this._monthsRegex = new RegExp("^(" + a.join("|") + ")", "i")),
642
+ (this._monthsShortRegex = this._monthsRegex),
643
+ (this._monthsStrictRegex = new RegExp(
644
+ "^(" + o.join("|") + ")",
645
+ "i"
646
+ )),
647
+ (this._monthsShortStrictRegex = new RegExp(
648
+ "^(" + r.join("|") + ")",
649
+ "i"
650
+ ));
651
+ }
652
+ function Oe(e) {
653
+ return W(e) ? 366 : 365;
654
+ }
655
+ R("Y", 0, 0, function () {
656
+ var e = this.year();
657
+ return e <= 9999 ? P(e, 4) : "+" + e;
658
+ }),
659
+ R(0, ["YY", 2], 0, function () {
660
+ return this.year() % 100;
661
+ }),
662
+ R(0, ["YYYY", 4], 0, "year"),
663
+ R(0, ["YYYYY", 5], 0, "year"),
664
+ R(0, ["YYYYYY", 6, !0], 0, "year"),
665
+ H("year", "y"),
666
+ V("year", 1),
667
+ fe("Y", ue),
668
+ fe("YY", re, Z),
669
+ fe("YYYY", se, te),
670
+ fe("YYYYY", le, ne),
671
+ fe("YYYYYY", le, ne),
672
+ be(["YYYYY", "YYYYYY"], 0),
673
+ be("YYYY", function (e, t) {
674
+ t[0] = 2 === e.length ? o.parseTwoDigitYear(e) : G(e);
675
+ }),
676
+ be("YY", function (e, t) {
677
+ t[0] = o.parseTwoDigitYear(e);
678
+ }),
679
+ be("Y", function (e, t) {
680
+ t[0] = parseInt(e, 10);
681
+ }),
682
+ (o.parseTwoDigitYear = function (e) {
683
+ return G(e) + (G(e) > 68 ? 1900 : 2e3);
684
+ });
685
+ var Ne = J("FullYear", !0);
686
+ function Ae(e, t, n, r, o, a, i) {
687
+ var s;
688
+ return (
689
+ e < 100 && e >= 0
690
+ ? ((s = new Date(e + 400, t, n, r, o, a, i)),
691
+ isFinite(s.getFullYear()) && s.setFullYear(e))
692
+ : (s = new Date(e, t, n, r, o, a, i)),
693
+ s
694
+ );
695
+ }
696
+ function Ie(e) {
697
+ var t, n;
698
+ return (
699
+ e < 100 && e >= 0
700
+ ? (((n = Array.prototype.slice.call(arguments))[0] = e + 400),
701
+ (t = new Date(Date.UTC.apply(null, n))),
702
+ isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e))
703
+ : (t = new Date(Date.UTC.apply(null, arguments))),
704
+ t
705
+ );
706
+ }
707
+ function Re(e, t, n) {
708
+ var r = 7 + t - n;
709
+ return (-(7 + Ie(e, 0, r).getUTCDay() - t) % 7) + r - 1;
710
+ }
711
+ function Ye(e, t, n, r, o) {
712
+ var a,
713
+ i,
714
+ s = 1 + 7 * (t - 1) + ((7 + n - r) % 7) + Re(e, r, o);
715
+ return (
716
+ s <= 0
717
+ ? (i = Oe((a = e - 1)) + s)
718
+ : s > Oe(e)
719
+ ? ((a = e + 1), (i = s - Oe(e)))
720
+ : ((a = e), (i = s)),
721
+ { year: a, dayOfYear: i }
722
+ );
723
+ }
724
+ function je(e, t, n) {
725
+ var r,
726
+ o,
727
+ a = Re(e.year(), t, n),
728
+ i = Math.floor((e.dayOfYear() - a - 1) / 7) + 1;
729
+ return (
730
+ i < 1
731
+ ? (r = i + Fe((o = e.year() - 1), t, n))
732
+ : i > Fe(e.year(), t, n)
733
+ ? ((r = i - Fe(e.year(), t, n)), (o = e.year() + 1))
734
+ : ((o = e.year()), (r = i)),
735
+ { week: r, year: o }
736
+ );
737
+ }
738
+ function Fe(e, t, n) {
739
+ var r = Re(e, t, n),
740
+ o = Re(e + 1, t, n);
741
+ return (Oe(e) - r + o) / 7;
742
+ }
743
+ function He(e, t) {
744
+ return e.slice(t, 7).concat(e.slice(0, t));
745
+ }
746
+ R("w", ["ww", 2], "wo", "week"),
747
+ R("W", ["WW", 2], "Wo", "isoWeek"),
748
+ H("week", "w"),
749
+ H("isoWeek", "W"),
750
+ V("week", 5),
751
+ V("isoWeek", 5),
752
+ fe("w", re),
753
+ fe("ww", re, Z),
754
+ fe("W", re),
755
+ fe("WW", re, Z),
756
+ ye(["w", "ww", "W", "WW"], function (e, t, n, r) {
757
+ t[r.substr(0, 1)] = G(e);
758
+ }),
759
+ R("d", 0, "do", "day"),
760
+ R("dd", 0, 0, function (e) {
761
+ return this.localeData().weekdaysMin(this, e);
762
+ }),
763
+ R("ddd", 0, 0, function (e) {
764
+ return this.localeData().weekdaysShort(this, e);
765
+ }),
766
+ R("dddd", 0, 0, function (e) {
767
+ return this.localeData().weekdays(this, e);
768
+ }),
769
+ R("e", 0, 0, "weekday"),
770
+ R("E", 0, 0, "isoWeekday"),
771
+ H("day", "d"),
772
+ H("weekday", "e"),
773
+ H("isoWeekday", "E"),
774
+ V("day", 11),
775
+ V("weekday", 11),
776
+ V("isoWeekday", 11),
777
+ fe("d", re),
778
+ fe("e", re),
779
+ fe("E", re),
780
+ fe("dd", function (e, t) {
781
+ return t.weekdaysMinRegex(e);
782
+ }),
783
+ fe("ddd", function (e, t) {
784
+ return t.weekdaysShortRegex(e);
785
+ }),
786
+ fe("dddd", function (e, t) {
787
+ return t.weekdaysRegex(e);
788
+ }),
789
+ ye(["dd", "ddd", "dddd"], function (e, t, n, r) {
790
+ var o = n._locale.weekdaysParse(e, r, n._strict);
791
+ null != o ? (t.d = o) : (m(n).invalidWeekday = e);
792
+ }),
793
+ ye(["d", "e", "E"], function (e, t, n, r) {
794
+ t[r] = G(e);
795
+ });
796
+ var ze = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split(
797
+ "_"
798
+ ),
799
+ Be = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
800
+ Ue = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
801
+ Ve = pe,
802
+ We = pe,
803
+ qe = pe;
804
+ function Ge(e, t, n) {
805
+ var r,
806
+ o,
807
+ a,
808
+ i = e.toLocaleLowerCase();
809
+ if (!this._weekdaysParse)
810
+ for (
811
+ this._weekdaysParse = [],
812
+ this._shortWeekdaysParse = [],
813
+ this._minWeekdaysParse = [],
814
+ r = 0;
815
+ r < 7;
816
+ ++r
817
+ )
818
+ (a = f([2e3, 1]).day(r)),
819
+ (this._minWeekdaysParse[r] = this.weekdaysMin(
820
+ a,
821
+ ""
822
+ ).toLocaleLowerCase()),
823
+ (this._shortWeekdaysParse[r] = this.weekdaysShort(
824
+ a,
825
+ ""
826
+ ).toLocaleLowerCase()),
827
+ (this._weekdaysParse[r] = this.weekdays(
828
+ a,
829
+ ""
830
+ ).toLocaleLowerCase());
831
+ return n
832
+ ? "dddd" === t
833
+ ? -1 !== (o = _e.call(this._weekdaysParse, i))
834
+ ? o
835
+ : null
836
+ : "ddd" === t
837
+ ? -1 !== (o = _e.call(this._shortWeekdaysParse, i))
838
+ ? o
839
+ : null
840
+ : -1 !== (o = _e.call(this._minWeekdaysParse, i))
841
+ ? o
842
+ : null
843
+ : "dddd" === t
844
+ ? -1 !== (o = _e.call(this._weekdaysParse, i)) ||
845
+ -1 !== (o = _e.call(this._shortWeekdaysParse, i)) ||
846
+ -1 !== (o = _e.call(this._minWeekdaysParse, i))
847
+ ? o
848
+ : null
849
+ : "ddd" === t
850
+ ? -1 !== (o = _e.call(this._shortWeekdaysParse, i)) ||
851
+ -1 !== (o = _e.call(this._weekdaysParse, i)) ||
852
+ -1 !== (o = _e.call(this._minWeekdaysParse, i))
853
+ ? o
854
+ : null
855
+ : -1 !== (o = _e.call(this._minWeekdaysParse, i)) ||
856
+ -1 !== (o = _e.call(this._weekdaysParse, i)) ||
857
+ -1 !== (o = _e.call(this._shortWeekdaysParse, i))
858
+ ? o
859
+ : null;
860
+ }
861
+ function Je() {
862
+ function e(e, t) {
863
+ return t.length - e.length;
864
+ }
865
+ var t,
866
+ n,
867
+ r,
868
+ o,
869
+ a,
870
+ i = [],
871
+ s = [],
872
+ l = [],
873
+ c = [];
874
+ for (t = 0; t < 7; t++)
875
+ (n = f([2e3, 1]).day(t)),
876
+ (r = ge(this.weekdaysMin(n, ""))),
877
+ (o = ge(this.weekdaysShort(n, ""))),
878
+ (a = ge(this.weekdays(n, ""))),
879
+ i.push(r),
880
+ s.push(o),
881
+ l.push(a),
882
+ c.push(r),
883
+ c.push(o),
884
+ c.push(a);
885
+ i.sort(e),
886
+ s.sort(e),
887
+ l.sort(e),
888
+ c.sort(e),
889
+ (this._weekdaysRegex = new RegExp("^(" + c.join("|") + ")", "i")),
890
+ (this._weekdaysShortRegex = this._weekdaysRegex),
891
+ (this._weekdaysMinRegex = this._weekdaysRegex),
892
+ (this._weekdaysStrictRegex = new RegExp(
893
+ "^(" + l.join("|") + ")",
894
+ "i"
895
+ )),
896
+ (this._weekdaysShortStrictRegex = new RegExp(
897
+ "^(" + s.join("|") + ")",
898
+ "i"
899
+ )),
900
+ (this._weekdaysMinStrictRegex = new RegExp(
901
+ "^(" + i.join("|") + ")",
902
+ "i"
903
+ ));
904
+ }
905
+ function Ke() {
906
+ return this.hours() % 12 || 12;
907
+ }
908
+ function Qe(e, t) {
909
+ R(e, 0, 0, function () {
910
+ return this.localeData().meridiem(this.hours(), this.minutes(), t);
911
+ });
912
+ }
913
+ function Xe(e, t) {
914
+ return t._meridiemParse;
915
+ }
916
+ R("H", ["HH", 2], 0, "hour"),
917
+ R("h", ["hh", 2], 0, Ke),
918
+ R("k", ["kk", 2], 0, function () {
919
+ return this.hours() || 24;
920
+ }),
921
+ R("hmm", 0, 0, function () {
922
+ return "" + Ke.apply(this) + P(this.minutes(), 2);
923
+ }),
924
+ R("hmmss", 0, 0, function () {
925
+ return (
926
+ "" + Ke.apply(this) + P(this.minutes(), 2) + P(this.seconds(), 2)
927
+ );
928
+ }),
929
+ R("Hmm", 0, 0, function () {
930
+ return "" + this.hours() + P(this.minutes(), 2);
931
+ }),
932
+ R("Hmmss", 0, 0, function () {
933
+ return (
934
+ "" + this.hours() + P(this.minutes(), 2) + P(this.seconds(), 2)
935
+ );
936
+ }),
937
+ Qe("a", !0),
938
+ Qe("A", !1),
939
+ H("hour", "h"),
940
+ V("hour", 13),
941
+ fe("a", Xe),
942
+ fe("A", Xe),
943
+ fe("H", re),
944
+ fe("h", re),
945
+ fe("k", re),
946
+ fe("HH", re, Z),
947
+ fe("hh", re, Z),
948
+ fe("kk", re, Z),
949
+ fe("hmm", oe),
950
+ fe("hmmss", ae),
951
+ fe("Hmm", oe),
952
+ fe("Hmmss", ae),
953
+ be(["H", "HH"], 3),
954
+ be(["k", "kk"], function (e, t, n) {
955
+ var r = G(e);
956
+ t[3] = 24 === r ? 0 : r;
957
+ }),
958
+ be(["a", "A"], function (e, t, n) {
959
+ (n._isPm = n._locale.isPM(e)), (n._meridiem = e);
960
+ }),
961
+ be(["h", "hh"], function (e, t, n) {
962
+ (t[3] = G(e)), (m(n).bigHour = !0);
963
+ }),
964
+ be("hmm", function (e, t, n) {
965
+ var r = e.length - 2;
966
+ (t[3] = G(e.substr(0, r))),
967
+ (t[4] = G(e.substr(r))),
968
+ (m(n).bigHour = !0);
969
+ }),
970
+ be("hmmss", function (e, t, n) {
971
+ var r = e.length - 4,
972
+ o = e.length - 2;
973
+ (t[3] = G(e.substr(0, r))),
974
+ (t[4] = G(e.substr(r, 2))),
975
+ (t[5] = G(e.substr(o))),
976
+ (m(n).bigHour = !0);
977
+ }),
978
+ be("Hmm", function (e, t, n) {
979
+ var r = e.length - 2;
980
+ (t[3] = G(e.substr(0, r))), (t[4] = G(e.substr(r)));
981
+ }),
982
+ be("Hmmss", function (e, t, n) {
983
+ var r = e.length - 4,
984
+ o = e.length - 2;
985
+ (t[3] = G(e.substr(0, r))),
986
+ (t[4] = G(e.substr(r, 2))),
987
+ (t[5] = G(e.substr(o)));
988
+ });
989
+ var $e,
990
+ Ze = J("Hours", !0),
991
+ et = {
992
+ calendar: {
993
+ sameDay: "[Today at] LT",
994
+ nextDay: "[Tomorrow at] LT",
995
+ nextWeek: "dddd [at] LT",
996
+ lastDay: "[Yesterday at] LT",
997
+ lastWeek: "[Last] dddd [at] LT",
998
+ sameElse: "L",
999
+ },
1000
+ longDateFormat: {
1001
+ LTS: "h:mm:ss A",
1002
+ LT: "h:mm A",
1003
+ L: "MM/DD/YYYY",
1004
+ LL: "MMMM D, YYYY",
1005
+ LLL: "MMMM D, YYYY h:mm A",
1006
+ LLLL: "dddd, MMMM D, YYYY h:mm A",
1007
+ },
1008
+ invalidDate: "Invalid date",
1009
+ ordinal: "%d",
1010
+ dayOfMonthOrdinalParse: /\d{1,2}/,
1011
+ relativeTime: {
1012
+ future: "in %s",
1013
+ past: "%s ago",
1014
+ s: "a few seconds",
1015
+ ss: "%d seconds",
1016
+ m: "a minute",
1017
+ mm: "%d minutes",
1018
+ h: "an hour",
1019
+ hh: "%d hours",
1020
+ d: "a day",
1021
+ dd: "%d days",
1022
+ w: "a week",
1023
+ ww: "%d weeks",
1024
+ M: "a month",
1025
+ MM: "%d months",
1026
+ y: "a year",
1027
+ yy: "%d years",
1028
+ },
1029
+ months: xe,
1030
+ monthsShort: Me,
1031
+ week: { dow: 0, doy: 6 },
1032
+ weekdays: ze,
1033
+ weekdaysMin: Ue,
1034
+ weekdaysShort: Be,
1035
+ meridiemParse: /[ap]\.?m?\.?/i,
1036
+ },
1037
+ tt = {},
1038
+ nt = {};
1039
+ function rt(e, t) {
1040
+ var n,
1041
+ r = Math.min(e.length, t.length);
1042
+ for (n = 0; n < r; n += 1) if (e[n] !== t[n]) return n;
1043
+ return r;
1044
+ }
1045
+ function ot(e) {
1046
+ return e ? e.toLowerCase().replace("_", "-") : e;
1047
+ }
1048
+ function at(t) {
1049
+ var r = null;
1050
+ if (void 0 === tt[t] && void 0 !== e && e && e.exports)
1051
+ try {
1052
+ (r = $e._abbr), n(290)("./" + t), it(r);
1053
+ } catch (e) {
1054
+ tt[t] = null;
1055
+ }
1056
+ return tt[t];
1057
+ }
1058
+ function it(e, t) {
1059
+ var n;
1060
+ return (
1061
+ e &&
1062
+ ((n = c(t) ? lt(e) : st(e, t))
1063
+ ? ($e = n)
1064
+ : "undefined" != typeof console &&
1065
+ console.warn &&
1066
+ console.warn(
1067
+ "Locale " + e + " not found. Did you forget to load it?"
1068
+ )),
1069
+ $e._abbr
1070
+ );
1071
+ }
1072
+ function st(e, t) {
1073
+ if (null !== t) {
1074
+ var n,
1075
+ r = et;
1076
+ if (((t.abbr = e), null != tt[e]))
1077
+ S(
1078
+ "defineLocaleOverride",
1079
+ "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
1080
+ ),
1081
+ (r = tt[e]._config);
1082
+ else if (null != t.parentLocale)
1083
+ if (null != tt[t.parentLocale]) r = tt[t.parentLocale]._config;
1084
+ else {
1085
+ if (null == (n = at(t.parentLocale)))
1086
+ return (
1087
+ nt[t.parentLocale] || (nt[t.parentLocale] = []),
1088
+ nt[t.parentLocale].push({ name: e, config: t }),
1089
+ null
1090
+ );
1091
+ r = n._config;
1092
+ }
1093
+ return (
1094
+ (tt[e] = new C(L(r, t))),
1095
+ nt[e] &&
1096
+ nt[e].forEach(function (e) {
1097
+ st(e.name, e.config);
1098
+ }),
1099
+ it(e),
1100
+ tt[e]
1101
+ );
1102
+ }
1103
+ return delete tt[e], null;
1104
+ }
1105
+ function lt(e) {
1106
+ var t;
1107
+ if ((e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e))
1108
+ return $e;
1109
+ if (!a(e)) {
1110
+ if ((t = at(e))) return t;
1111
+ e = [e];
1112
+ }
1113
+ return (function (e) {
1114
+ for (var t, n, r, o, a = 0; a < e.length; ) {
1115
+ for (
1116
+ t = (o = ot(e[a]).split("-")).length,
1117
+ n = (n = ot(e[a + 1])) ? n.split("-") : null;
1118
+ t > 0;
1119
+
1120
+ ) {
1121
+ if ((r = at(o.slice(0, t).join("-")))) return r;
1122
+ if (n && n.length >= t && rt(o, n) >= t - 1) break;
1123
+ t--;
1124
+ }
1125
+ a++;
1126
+ }
1127
+ return $e;
1128
+ })(e);
1129
+ }
1130
+ function ct(e) {
1131
+ var t,
1132
+ n = e._a;
1133
+ return (
1134
+ n &&
1135
+ -2 === m(e).overflow &&
1136
+ ((t =
1137
+ n[1] < 0 || n[1] > 11
1138
+ ? 1
1139
+ : n[2] < 1 || n[2] > ke(n[0], n[1])
1140
+ ? 2
1141
+ : n[3] < 0 ||
1142
+ n[3] > 24 ||
1143
+ (24 === n[3] && (0 !== n[4] || 0 !== n[5] || 0 !== n[6]))
1144
+ ? 3
1145
+ : n[4] < 0 || n[4] > 59
1146
+ ? 4
1147
+ : n[5] < 0 || n[5] > 59
1148
+ ? 5
1149
+ : n[6] < 0 || n[6] > 999
1150
+ ? 6
1151
+ : -1),
1152
+ m(e)._overflowDayOfYear && (t < 0 || t > 2) && (t = 2),
1153
+ m(e)._overflowWeeks && -1 === t && (t = 7),
1154
+ m(e)._overflowWeekday && -1 === t && (t = 8),
1155
+ (m(e).overflow = t)),
1156
+ e
1157
+ );
1158
+ }
1159
+ var ut = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
1160
+ dt = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
1161
+ ht = /Z|[+-]\d\d(?::?\d\d)?/,
1162
+ pt = [
1163
+ ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
1164
+ ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
1165
+ ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
1166
+ ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
1167
+ ["YYYY-DDD", /\d{4}-\d{3}/],
1168
+ ["YYYY-MM", /\d{4}-\d\d/, !1],
1169
+ ["YYYYYYMMDD", /[+-]\d{10}/],
1170
+ ["YYYYMMDD", /\d{8}/],
1171
+ ["GGGG[W]WWE", /\d{4}W\d{3}/],
1172
+ ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
1173
+ ["YYYYDDD", /\d{7}/],
1174
+ ["YYYYMM", /\d{6}/, !1],
1175
+ ["YYYY", /\d{4}/, !1],
1176
+ ],
1177
+ ft = [
1178
+ ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
1179
+ ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
1180
+ ["HH:mm:ss", /\d\d:\d\d:\d\d/],
1181
+ ["HH:mm", /\d\d:\d\d/],
1182
+ ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
1183
+ ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
1184
+ ["HHmmss", /\d\d\d\d\d\d/],
1185
+ ["HHmm", /\d\d\d\d/],
1186
+ ["HH", /\d\d/],
1187
+ ],
1188
+ mt = /^\/?Date\((-?\d+)/i,
1189
+ gt = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
1190
+ _t = {
1191
+ UT: 0,
1192
+ GMT: 0,
1193
+ EDT: -240,
1194
+ EST: -300,
1195
+ CDT: -300,
1196
+ CST: -360,
1197
+ MDT: -360,
1198
+ MST: -420,
1199
+ PDT: -420,
1200
+ PST: -480,
1201
+ };
1202
+ function vt(e) {
1203
+ var t,
1204
+ n,
1205
+ r,
1206
+ o,
1207
+ a,
1208
+ i,
1209
+ s = e._i,
1210
+ l = ut.exec(s) || dt.exec(s);
1211
+ if (l) {
1212
+ for (m(e).iso = !0, t = 0, n = pt.length; t < n; t++)
1213
+ if (pt[t][1].exec(l[1])) {
1214
+ (o = pt[t][0]), (r = !1 !== pt[t][2]);
1215
+ break;
1216
+ }
1217
+ if (null == o) return void (e._isValid = !1);
1218
+ if (l[3]) {
1219
+ for (t = 0, n = ft.length; t < n; t++)
1220
+ if (ft[t][1].exec(l[3])) {
1221
+ a = (l[2] || " ") + ft[t][0];
1222
+ break;
1223
+ }
1224
+ if (null == a) return void (e._isValid = !1);
1225
+ }
1226
+ if (!r && null != a) return void (e._isValid = !1);
1227
+ if (l[4]) {
1228
+ if (!ht.exec(l[4])) return void (e._isValid = !1);
1229
+ i = "Z";
1230
+ }
1231
+ (e._f = o + (a || "") + (i || "")), xt(e);
1232
+ } else e._isValid = !1;
1233
+ }
1234
+ function bt(e) {
1235
+ var t = parseInt(e, 10);
1236
+ return t <= 49 ? 2e3 + t : t <= 999 ? 1900 + t : t;
1237
+ }
1238
+ function yt(e) {
1239
+ var t,
1240
+ n,
1241
+ r,
1242
+ o,
1243
+ a,
1244
+ i,
1245
+ s,
1246
+ l,
1247
+ c = gt.exec(
1248
+ e._i
1249
+ .replace(/\([^)]*\)|[\n\t]/g, " ")
1250
+ .replace(/(\s\s+)/g, " ")
1251
+ .replace(/^\s\s*/, "")
1252
+ .replace(/\s\s*$/, "")
1253
+ );
1254
+ if (c) {
1255
+ if (
1256
+ ((n = c[4]),
1257
+ (r = c[3]),
1258
+ (o = c[2]),
1259
+ (a = c[5]),
1260
+ (i = c[6]),
1261
+ (s = c[7]),
1262
+ (l = [
1263
+ bt(n),
1264
+ Me.indexOf(r),
1265
+ parseInt(o, 10),
1266
+ parseInt(a, 10),
1267
+ parseInt(i, 10),
1268
+ ]),
1269
+ s && l.push(parseInt(s, 10)),
1270
+ (t = l),
1271
+ !(function (e, t, n) {
1272
+ return (
1273
+ !e ||
1274
+ Be.indexOf(e) === new Date(t[0], t[1], t[2]).getDay() ||
1275
+ ((m(n).weekdayMismatch = !0), (n._isValid = !1), !1)
1276
+ );
1277
+ })(c[1], t, e))
1278
+ )
1279
+ return;
1280
+ (e._a = t),
1281
+ (e._tzm = (function (e, t, n) {
1282
+ if (e) return _t[e];
1283
+ if (t) return 0;
1284
+ var r = parseInt(n, 10),
1285
+ o = r % 100;
1286
+ return ((r - o) / 100) * 60 + o;
1287
+ })(c[8], c[9], c[10])),
1288
+ (e._d = Ie.apply(null, e._a)),
1289
+ e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm),
1290
+ (m(e).rfc2822 = !0);
1291
+ } else e._isValid = !1;
1292
+ }
1293
+ function wt(e, t, n) {
1294
+ return null != e ? e : null != t ? t : n;
1295
+ }
1296
+ function kt(e) {
1297
+ var t,
1298
+ n,
1299
+ r,
1300
+ a,
1301
+ i,
1302
+ s = [];
1303
+ if (!e._d) {
1304
+ for (
1305
+ r = (function (e) {
1306
+ var t = new Date(o.now());
1307
+ return e._useUTC
1308
+ ? [t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()]
1309
+ : [t.getFullYear(), t.getMonth(), t.getDate()];
1310
+ })(e),
1311
+ e._w &&
1312
+ null == e._a[2] &&
1313
+ null == e._a[1] &&
1314
+ (function (e) {
1315
+ var t, n, r, o, a, i, s, l, c;
1316
+ null != (t = e._w).GG || null != t.W || null != t.E
1317
+ ? ((a = 1),
1318
+ (i = 4),
1319
+ (n = wt(t.GG, e._a[0], je(Tt(), 1, 4).year)),
1320
+ (r = wt(t.W, 1)),
1321
+ ((o = wt(t.E, 1)) < 1 || o > 7) && (l = !0))
1322
+ : ((a = e._locale._week.dow),
1323
+ (i = e._locale._week.doy),
1324
+ (c = je(Tt(), a, i)),
1325
+ (n = wt(t.gg, e._a[0], c.year)),
1326
+ (r = wt(t.w, c.week)),
1327
+ null != t.d
1328
+ ? ((o = t.d) < 0 || o > 6) && (l = !0)
1329
+ : null != t.e
1330
+ ? ((o = t.e + a), (t.e < 0 || t.e > 6) && (l = !0))
1331
+ : (o = a)),
1332
+ r < 1 || r > Fe(n, a, i)
1333
+ ? (m(e)._overflowWeeks = !0)
1334
+ : null != l
1335
+ ? (m(e)._overflowWeekday = !0)
1336
+ : ((s = Ye(n, r, o, a, i)),
1337
+ (e._a[0] = s.year),
1338
+ (e._dayOfYear = s.dayOfYear));
1339
+ })(e),
1340
+ null != e._dayOfYear &&
1341
+ ((i = wt(e._a[0], r[0])),
1342
+ (e._dayOfYear > Oe(i) || 0 === e._dayOfYear) &&
1343
+ (m(e)._overflowDayOfYear = !0),
1344
+ (n = Ie(i, 0, e._dayOfYear)),
1345
+ (e._a[1] = n.getUTCMonth()),
1346
+ (e._a[2] = n.getUTCDate())),
1347
+ t = 0;
1348
+ t < 3 && null == e._a[t];
1349
+ ++t
1350
+ )
1351
+ e._a[t] = s[t] = r[t];
1352
+ for (; t < 7; t++)
1353
+ e._a[t] = s[t] = null == e._a[t] ? (2 === t ? 1 : 0) : e._a[t];
1354
+ 24 === e._a[3] &&
1355
+ 0 === e._a[4] &&
1356
+ 0 === e._a[5] &&
1357
+ 0 === e._a[6] &&
1358
+ ((e._nextDay = !0), (e._a[3] = 0)),
1359
+ (e._d = (e._useUTC ? Ie : Ae).apply(null, s)),
1360
+ (a = e._useUTC ? e._d.getUTCDay() : e._d.getDay()),
1361
+ null != e._tzm &&
1362
+ e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm),
1363
+ e._nextDay && (e._a[3] = 24),
1364
+ e._w &&
1365
+ void 0 !== e._w.d &&
1366
+ e._w.d !== a &&
1367
+ (m(e).weekdayMismatch = !0);
1368
+ }
1369
+ }
1370
+ function xt(e) {
1371
+ if (e._f !== o.ISO_8601)
1372
+ if (e._f !== o.RFC_2822) {
1373
+ (e._a = []), (m(e).empty = !0);
1374
+ var t,
1375
+ n,
1376
+ r,
1377
+ a,
1378
+ i,
1379
+ s,
1380
+ l = "" + e._i,
1381
+ c = l.length,
1382
+ u = 0;
1383
+ for (
1384
+ r = j(e._f, e._locale).match(O) || [], t = 0;
1385
+ t < r.length;
1386
+ t++
1387
+ )
1388
+ (a = r[t]),
1389
+ (n = (l.match(me(a, e)) || [])[0]) &&
1390
+ ((i = l.substr(0, l.indexOf(n))).length > 0 &&
1391
+ m(e).unusedInput.push(i),
1392
+ (l = l.slice(l.indexOf(n) + n.length)),
1393
+ (u += n.length)),
1394
+ I[a]
1395
+ ? (n ? (m(e).empty = !1) : m(e).unusedTokens.push(a),
1396
+ we(a, n, e))
1397
+ : e._strict && !n && m(e).unusedTokens.push(a);
1398
+ (m(e).charsLeftOver = c - u),
1399
+ l.length > 0 && m(e).unusedInput.push(l),
1400
+ e._a[3] <= 12 &&
1401
+ !0 === m(e).bigHour &&
1402
+ e._a[3] > 0 &&
1403
+ (m(e).bigHour = void 0),
1404
+ (m(e).parsedDateParts = e._a.slice(0)),
1405
+ (m(e).meridiem = e._meridiem),
1406
+ (e._a[3] = (function (e, t, n) {
1407
+ var r;
1408
+ return null == n
1409
+ ? t
1410
+ : null != e.meridiemHour
1411
+ ? e.meridiemHour(t, n)
1412
+ : null != e.isPM
1413
+ ? ((r = e.isPM(n)) && t < 12 && (t += 12),
1414
+ r || 12 !== t || (t = 0),
1415
+ t)
1416
+ : t;
1417
+ })(e._locale, e._a[3], e._meridiem)),
1418
+ null !== (s = m(e).era) &&
1419
+ (e._a[0] = e._locale.erasConvertYear(s, e._a[0])),
1420
+ kt(e),
1421
+ ct(e);
1422
+ } else yt(e);
1423
+ else vt(e);
1424
+ }
1425
+ function Mt(e) {
1426
+ var t = e._i,
1427
+ n = e._f;
1428
+ return (
1429
+ (e._locale = e._locale || lt(e._l)),
1430
+ null === t || (void 0 === n && "" === t)
1431
+ ? _({ nullInput: !0 })
1432
+ : ("string" == typeof t && (e._i = t = e._locale.preparse(t)),
1433
+ k(t)
1434
+ ? new w(ct(t))
1435
+ : (d(t)
1436
+ ? (e._d = t)
1437
+ : a(n)
1438
+ ? (function (e) {
1439
+ var t,
1440
+ n,
1441
+ r,
1442
+ o,
1443
+ a,
1444
+ i,
1445
+ s = !1;
1446
+ if (0 === e._f.length)
1447
+ return (
1448
+ (m(e).invalidFormat = !0),
1449
+ void (e._d = new Date(NaN))
1450
+ );
1451
+ for (o = 0; o < e._f.length; o++)
1452
+ (a = 0),
1453
+ (i = !1),
1454
+ (t = y({}, e)),
1455
+ null != e._useUTC && (t._useUTC = e._useUTC),
1456
+ (t._f = e._f[o]),
1457
+ xt(t),
1458
+ g(t) && (i = !0),
1459
+ (a += m(t).charsLeftOver),
1460
+ (a += 10 * m(t).unusedTokens.length),
1461
+ (m(t).score = a),
1462
+ s
1463
+ ? a < r && ((r = a), (n = t))
1464
+ : (null == r || a < r || i) &&
1465
+ ((r = a), (n = t), i && (s = !0));
1466
+ p(e, n || t);
1467
+ })(e)
1468
+ : n
1469
+ ? xt(e)
1470
+ : (function (e) {
1471
+ var t = e._i;
1472
+ c(t)
1473
+ ? (e._d = new Date(o.now()))
1474
+ : d(t)
1475
+ ? (e._d = new Date(t.valueOf()))
1476
+ : "string" == typeof t
1477
+ ? (function (e) {
1478
+ var t = mt.exec(e._i);
1479
+ null === t
1480
+ ? (vt(e),
1481
+ !1 === e._isValid &&
1482
+ (delete e._isValid,
1483
+ yt(e),
1484
+ !1 === e._isValid &&
1485
+ (delete e._isValid,
1486
+ e._strict
1487
+ ? (e._isValid = !1)
1488
+ : o.createFromInputFallback(e))))
1489
+ : (e._d = new Date(+t[1]));
1490
+ })(e)
1491
+ : a(t)
1492
+ ? ((e._a = h(t.slice(0), function (e) {
1493
+ return parseInt(e, 10);
1494
+ })),
1495
+ kt(e))
1496
+ : i(t)
1497
+ ? (function (e) {
1498
+ if (!e._d) {
1499
+ var t = B(e._i),
1500
+ n = void 0 === t.day ? t.date : t.day;
1501
+ (e._a = h(
1502
+ [
1503
+ t.year,
1504
+ t.month,
1505
+ n,
1506
+ t.hour,
1507
+ t.minute,
1508
+ t.second,
1509
+ t.millisecond,
1510
+ ],
1511
+ function (e) {
1512
+ return e && parseInt(e, 10);
1513
+ }
1514
+ )),
1515
+ kt(e);
1516
+ }
1517
+ })(e)
1518
+ : u(t)
1519
+ ? (e._d = new Date(t))
1520
+ : o.createFromInputFallback(e);
1521
+ })(e),
1522
+ g(e) || (e._d = null),
1523
+ e))
1524
+ );
1525
+ }
1526
+ function Et(e, t, n, r, o) {
1527
+ var s,
1528
+ c = {};
1529
+ return (
1530
+ (!0 !== t && !1 !== t) || ((r = t), (t = void 0)),
1531
+ (!0 !== n && !1 !== n) || ((r = n), (n = void 0)),
1532
+ ((i(e) && l(e)) || (a(e) && 0 === e.length)) && (e = void 0),
1533
+ (c._isAMomentObject = !0),
1534
+ (c._useUTC = c._isUTC = o),
1535
+ (c._l = n),
1536
+ (c._i = e),
1537
+ (c._f = t),
1538
+ (c._strict = r),
1539
+ (s = new w(ct(Mt(c))))._nextDay &&
1540
+ (s.add(1, "d"), (s._nextDay = void 0)),
1541
+ s
1542
+ );
1543
+ }
1544
+ function Tt(e, t, n, r) {
1545
+ return Et(e, t, n, r, !1);
1546
+ }
1547
+ (o.createFromInputFallback = M(
1548
+ "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
1549
+ function (e) {
1550
+ e._d = new Date(e._i + (e._useUTC ? " UTC" : ""));
1551
+ }
1552
+ )),
1553
+ (o.ISO_8601 = function () {}),
1554
+ (o.RFC_2822 = function () {});
1555
+ var St = M(
1556
+ "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
1557
+ function () {
1558
+ var e = Tt.apply(null, arguments);
1559
+ return this.isValid() && e.isValid()
1560
+ ? e < this
1561
+ ? this
1562
+ : e
1563
+ : _();
1564
+ }
1565
+ ),
1566
+ Dt = M(
1567
+ "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
1568
+ function () {
1569
+ var e = Tt.apply(null, arguments);
1570
+ return this.isValid() && e.isValid()
1571
+ ? e > this
1572
+ ? this
1573
+ : e
1574
+ : _();
1575
+ }
1576
+ );
1577
+ function Lt(e, t) {
1578
+ var n, r;
1579
+ if ((1 === t.length && a(t[0]) && (t = t[0]), !t.length)) return Tt();
1580
+ for (n = t[0], r = 1; r < t.length; ++r)
1581
+ (t[r].isValid() && !t[r][e](n)) || (n = t[r]);
1582
+ return n;
1583
+ }
1584
+ var Ct = [
1585
+ "year",
1586
+ "quarter",
1587
+ "month",
1588
+ "week",
1589
+ "day",
1590
+ "hour",
1591
+ "minute",
1592
+ "second",
1593
+ "millisecond",
1594
+ ];
1595
+ function Pt(e) {
1596
+ var t = B(e),
1597
+ n = t.year || 0,
1598
+ r = t.quarter || 0,
1599
+ o = t.month || 0,
1600
+ a = t.week || t.isoWeek || 0,
1601
+ i = t.day || 0,
1602
+ l = t.hour || 0,
1603
+ c = t.minute || 0,
1604
+ u = t.second || 0,
1605
+ d = t.millisecond || 0;
1606
+ (this._isValid = (function (e) {
1607
+ var t,
1608
+ n,
1609
+ r = !1;
1610
+ for (t in e)
1611
+ if (
1612
+ s(e, t) &&
1613
+ (-1 === _e.call(Ct, t) || (null != e[t] && isNaN(e[t])))
1614
+ )
1615
+ return !1;
1616
+ for (n = 0; n < Ct.length; ++n)
1617
+ if (e[Ct[n]]) {
1618
+ if (r) return !1;
1619
+ parseFloat(e[Ct[n]]) !== G(e[Ct[n]]) && (r = !0);
1620
+ }
1621
+ return !0;
1622
+ })(t)),
1623
+ (this._milliseconds = +d + 1e3 * u + 6e4 * c + 1e3 * l * 60 * 60),
1624
+ (this._days = +i + 7 * a),
1625
+ (this._months = +o + 3 * r + 12 * n),
1626
+ (this._data = {}),
1627
+ (this._locale = lt()),
1628
+ this._bubble();
1629
+ }
1630
+ function Ot(e) {
1631
+ return e instanceof Pt;
1632
+ }
1633
+ function Nt(e) {
1634
+ return e < 0 ? -1 * Math.round(-1 * e) : Math.round(e);
1635
+ }
1636
+ function At(e, t) {
1637
+ R(e, 0, 0, function () {
1638
+ var e = this.utcOffset(),
1639
+ n = "+";
1640
+ return (
1641
+ e < 0 && ((e = -e), (n = "-")),
1642
+ n + P(~~(e / 60), 2) + t + P(~~e % 60, 2)
1643
+ );
1644
+ });
1645
+ }
1646
+ At("Z", ":"),
1647
+ At("ZZ", ""),
1648
+ fe("Z", he),
1649
+ fe("ZZ", he),
1650
+ be(["Z", "ZZ"], function (e, t, n) {
1651
+ (n._useUTC = !0), (n._tzm = Rt(he, e));
1652
+ });
1653
+ var It = /([\+\-]|\d\d)/gi;
1654
+ function Rt(e, t) {
1655
+ var n,
1656
+ r,
1657
+ o = (t || "").match(e);
1658
+ return null === o
1659
+ ? null
1660
+ : 0 ===
1661
+ (r =
1662
+ 60 *
1663
+ (n = ((o[o.length - 1] || []) + "").match(It) || [
1664
+ "-",
1665
+ 0,
1666
+ 0,
1667
+ ])[1] +
1668
+ G(n[2]))
1669
+ ? 0
1670
+ : "+" === n[0]
1671
+ ? r
1672
+ : -r;
1673
+ }
1674
+ function Yt(e, t) {
1675
+ var n, r;
1676
+ return t._isUTC
1677
+ ? ((n = t.clone()),
1678
+ (r =
1679
+ (k(e) || d(e) ? e.valueOf() : Tt(e).valueOf()) - n.valueOf()),
1680
+ n._d.setTime(n._d.valueOf() + r),
1681
+ o.updateOffset(n, !1),
1682
+ n)
1683
+ : Tt(e).local();
1684
+ }
1685
+ function jt(e) {
1686
+ return -Math.round(e._d.getTimezoneOffset());
1687
+ }
1688
+ function Ft() {
1689
+ return !!this.isValid() && this._isUTC && 0 === this._offset;
1690
+ }
1691
+ o.updateOffset = function () {};
1692
+ var Ht = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
1693
+ zt = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
1694
+ function Bt(e, t) {
1695
+ var n,
1696
+ r,
1697
+ o,
1698
+ a,
1699
+ i,
1700
+ l,
1701
+ c = e,
1702
+ d = null;
1703
+ return (
1704
+ Ot(e)
1705
+ ? (c = { ms: e._milliseconds, d: e._days, M: e._months })
1706
+ : u(e) || !isNaN(+e)
1707
+ ? ((c = {}), t ? (c[t] = +e) : (c.milliseconds = +e))
1708
+ : (d = Ht.exec(e))
1709
+ ? ((n = "-" === d[1] ? -1 : 1),
1710
+ (c = {
1711
+ y: 0,
1712
+ d: G(d[2]) * n,
1713
+ h: G(d[3]) * n,
1714
+ m: G(d[4]) * n,
1715
+ s: G(d[5]) * n,
1716
+ ms: G(Nt(1e3 * d[6])) * n,
1717
+ }))
1718
+ : (d = zt.exec(e))
1719
+ ? ((n = "-" === d[1] ? -1 : 1),
1720
+ (c = {
1721
+ y: Ut(d[2], n),
1722
+ M: Ut(d[3], n),
1723
+ w: Ut(d[4], n),
1724
+ d: Ut(d[5], n),
1725
+ h: Ut(d[6], n),
1726
+ m: Ut(d[7], n),
1727
+ s: Ut(d[8], n),
1728
+ }))
1729
+ : null == c
1730
+ ? (c = {})
1731
+ : "object" == typeof c &&
1732
+ ("from" in c || "to" in c) &&
1733
+ ((a = Tt(c.from)),
1734
+ (i = Tt(c.to)),
1735
+ (o =
1736
+ a.isValid() && i.isValid()
1737
+ ? ((i = Yt(i, a)),
1738
+ a.isBefore(i)
1739
+ ? (l = Vt(a, i))
1740
+ : (((l = Vt(i, a)).milliseconds = -l.milliseconds),
1741
+ (l.months = -l.months)),
1742
+ l)
1743
+ : { milliseconds: 0, months: 0 }),
1744
+ ((c = {}).ms = o.milliseconds),
1745
+ (c.M = o.months)),
1746
+ (r = new Pt(c)),
1747
+ Ot(e) && s(e, "_locale") && (r._locale = e._locale),
1748
+ Ot(e) && s(e, "_isValid") && (r._isValid = e._isValid),
1749
+ r
1750
+ );
1751
+ }
1752
+ function Ut(e, t) {
1753
+ var n = e && parseFloat(e.replace(",", "."));
1754
+ return (isNaN(n) ? 0 : n) * t;
1755
+ }
1756
+ function Vt(e, t) {
1757
+ var n = {};
1758
+ return (
1759
+ (n.months = t.month() - e.month() + 12 * (t.year() - e.year())),
1760
+ e.clone().add(n.months, "M").isAfter(t) && --n.months,
1761
+ (n.milliseconds = +t - +e.clone().add(n.months, "M")),
1762
+ n
1763
+ );
1764
+ }
1765
+ function Wt(e, t) {
1766
+ return function (n, r) {
1767
+ var o;
1768
+ return (
1769
+ null === r ||
1770
+ isNaN(+r) ||
1771
+ (S(
1772
+ t,
1773
+ "moment()." +
1774
+ t +
1775
+ "(period, number) is deprecated. Please use moment()." +
1776
+ t +
1777
+ "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
1778
+ ),
1779
+ (o = n),
1780
+ (n = r),
1781
+ (r = o)),
1782
+ qt(this, Bt(n, r), e),
1783
+ this
1784
+ );
1785
+ };
1786
+ }
1787
+ function qt(e, t, n, r) {
1788
+ var a = t._milliseconds,
1789
+ i = Nt(t._days),
1790
+ s = Nt(t._months);
1791
+ e.isValid() &&
1792
+ ((r = null == r || r),
1793
+ s && Le(e, K(e, "Month") + s * n),
1794
+ i && Q(e, "Date", K(e, "Date") + i * n),
1795
+ a && e._d.setTime(e._d.valueOf() + a * n),
1796
+ r && o.updateOffset(e, i || s));
1797
+ }
1798
+ (Bt.fn = Pt.prototype),
1799
+ (Bt.invalid = function () {
1800
+ return Bt(NaN);
1801
+ });
1802
+ var Gt = Wt(1, "add"),
1803
+ Jt = Wt(-1, "subtract");
1804
+ function Kt(e) {
1805
+ return "string" == typeof e || e instanceof String;
1806
+ }
1807
+ function Qt(e) {
1808
+ return (
1809
+ k(e) ||
1810
+ d(e) ||
1811
+ Kt(e) ||
1812
+ u(e) ||
1813
+ (function (e) {
1814
+ var t = a(e),
1815
+ n = !1;
1816
+ return (
1817
+ t &&
1818
+ (n =
1819
+ 0 ===
1820
+ e.filter(function (t) {
1821
+ return !u(t) && Kt(e);
1822
+ }).length),
1823
+ t && n
1824
+ );
1825
+ })(e) ||
1826
+ (function (e) {
1827
+ var t,
1828
+ n,
1829
+ r = i(e) && !l(e),
1830
+ o = !1,
1831
+ a = [
1832
+ "years",
1833
+ "year",
1834
+ "y",
1835
+ "months",
1836
+ "month",
1837
+ "M",
1838
+ "days",
1839
+ "day",
1840
+ "d",
1841
+ "dates",
1842
+ "date",
1843
+ "D",
1844
+ "hours",
1845
+ "hour",
1846
+ "h",
1847
+ "minutes",
1848
+ "minute",
1849
+ "m",
1850
+ "seconds",
1851
+ "second",
1852
+ "s",
1853
+ "milliseconds",
1854
+ "millisecond",
1855
+ "ms",
1856
+ ];
1857
+ for (t = 0; t < a.length; t += 1) (n = a[t]), (o = o || s(e, n));
1858
+ return r && o;
1859
+ })(e) ||
1860
+ null == e
1861
+ );
1862
+ }
1863
+ function Xt(e) {
1864
+ var t,
1865
+ n = i(e) && !l(e),
1866
+ r = !1,
1867
+ o = [
1868
+ "sameDay",
1869
+ "nextDay",
1870
+ "lastDay",
1871
+ "nextWeek",
1872
+ "lastWeek",
1873
+ "sameElse",
1874
+ ];
1875
+ for (t = 0; t < o.length; t += 1) r = r || s(e, o[t]);
1876
+ return n && r;
1877
+ }
1878
+ function $t(e, t) {
1879
+ if (e.date() < t.date()) return -$t(t, e);
1880
+ var n = 12 * (t.year() - e.year()) + (t.month() - e.month()),
1881
+ r = e.clone().add(n, "months");
1882
+ return (
1883
+ -(
1884
+ n +
1885
+ (t - r < 0
1886
+ ? (t - r) / (r - e.clone().add(n - 1, "months"))
1887
+ : (t - r) / (e.clone().add(n + 1, "months") - r))
1888
+ ) || 0
1889
+ );
1890
+ }
1891
+ function Zt(e) {
1892
+ var t;
1893
+ return void 0 === e
1894
+ ? this._locale._abbr
1895
+ : (null != (t = lt(e)) && (this._locale = t), this);
1896
+ }
1897
+ (o.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ"),
1898
+ (o.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]");
1899
+ var en = M(
1900
+ "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
1901
+ function (e) {
1902
+ return void 0 === e ? this.localeData() : this.locale(e);
1903
+ }
1904
+ );
1905
+ function tn() {
1906
+ return this._locale;
1907
+ }
1908
+ function nn(e, t) {
1909
+ return ((e % t) + t) % t;
1910
+ }
1911
+ function rn(e, t, n) {
1912
+ return e < 100 && e >= 0
1913
+ ? new Date(e + 400, t, n) - 126227808e5
1914
+ : new Date(e, t, n).valueOf();
1915
+ }
1916
+ function on(e, t, n) {
1917
+ return e < 100 && e >= 0
1918
+ ? Date.UTC(e + 400, t, n) - 126227808e5
1919
+ : Date.UTC(e, t, n);
1920
+ }
1921
+ function an(e, t) {
1922
+ return t.erasAbbrRegex(e);
1923
+ }
1924
+ function sn() {
1925
+ var e,
1926
+ t,
1927
+ n = [],
1928
+ r = [],
1929
+ o = [],
1930
+ a = [],
1931
+ i = this.eras();
1932
+ for (e = 0, t = i.length; e < t; ++e)
1933
+ r.push(ge(i[e].name)),
1934
+ n.push(ge(i[e].abbr)),
1935
+ o.push(ge(i[e].narrow)),
1936
+ a.push(ge(i[e].name)),
1937
+ a.push(ge(i[e].abbr)),
1938
+ a.push(ge(i[e].narrow));
1939
+ (this._erasRegex = new RegExp("^(" + a.join("|") + ")", "i")),
1940
+ (this._erasNameRegex = new RegExp("^(" + r.join("|") + ")", "i")),
1941
+ (this._erasAbbrRegex = new RegExp("^(" + n.join("|") + ")", "i")),
1942
+ (this._erasNarrowRegex = new RegExp("^(" + o.join("|") + ")", "i"));
1943
+ }
1944
+ function ln(e, t) {
1945
+ R(0, [e, e.length], 0, t);
1946
+ }
1947
+ function cn(e, t, n, r, o) {
1948
+ var a;
1949
+ return null == e
1950
+ ? je(this, r, o).year
1951
+ : (t > (a = Fe(e, r, o)) && (t = a), un.call(this, e, t, n, r, o));
1952
+ }
1953
+ function un(e, t, n, r, o) {
1954
+ var a = Ye(e, t, n, r, o),
1955
+ i = Ie(a.year, 0, a.dayOfYear);
1956
+ return (
1957
+ this.year(i.getUTCFullYear()),
1958
+ this.month(i.getUTCMonth()),
1959
+ this.date(i.getUTCDate()),
1960
+ this
1961
+ );
1962
+ }
1963
+ R("N", 0, 0, "eraAbbr"),
1964
+ R("NN", 0, 0, "eraAbbr"),
1965
+ R("NNN", 0, 0, "eraAbbr"),
1966
+ R("NNNN", 0, 0, "eraName"),
1967
+ R("NNNNN", 0, 0, "eraNarrow"),
1968
+ R("y", ["y", 1], "yo", "eraYear"),
1969
+ R("y", ["yy", 2], 0, "eraYear"),
1970
+ R("y", ["yyy", 3], 0, "eraYear"),
1971
+ R("y", ["yyyy", 4], 0, "eraYear"),
1972
+ fe("N", an),
1973
+ fe("NN", an),
1974
+ fe("NNN", an),
1975
+ fe("NNNN", function (e, t) {
1976
+ return t.erasNameRegex(e);
1977
+ }),
1978
+ fe("NNNNN", function (e, t) {
1979
+ return t.erasNarrowRegex(e);
1980
+ }),
1981
+ be(["N", "NN", "NNN", "NNNN", "NNNNN"], function (e, t, n, r) {
1982
+ var o = n._locale.erasParse(e, r, n._strict);
1983
+ o ? (m(n).era = o) : (m(n).invalidEra = e);
1984
+ }),
1985
+ fe("y", ce),
1986
+ fe("yy", ce),
1987
+ fe("yyy", ce),
1988
+ fe("yyyy", ce),
1989
+ fe("yo", function (e, t) {
1990
+ return t._eraYearOrdinalRegex || ce;
1991
+ }),
1992
+ be(["y", "yy", "yyy", "yyyy"], 0),
1993
+ be(["yo"], function (e, t, n, r) {
1994
+ var o;
1995
+ n._locale._eraYearOrdinalRegex &&
1996
+ (o = e.match(n._locale._eraYearOrdinalRegex)),
1997
+ n._locale.eraYearOrdinalParse
1998
+ ? (t[0] = n._locale.eraYearOrdinalParse(e, o))
1999
+ : (t[0] = parseInt(e, 10));
2000
+ }),
2001
+ R(0, ["gg", 2], 0, function () {
2002
+ return this.weekYear() % 100;
2003
+ }),
2004
+ R(0, ["GG", 2], 0, function () {
2005
+ return this.isoWeekYear() % 100;
2006
+ }),
2007
+ ln("gggg", "weekYear"),
2008
+ ln("ggggg", "weekYear"),
2009
+ ln("GGGG", "isoWeekYear"),
2010
+ ln("GGGGG", "isoWeekYear"),
2011
+ H("weekYear", "gg"),
2012
+ H("isoWeekYear", "GG"),
2013
+ V("weekYear", 1),
2014
+ V("isoWeekYear", 1),
2015
+ fe("G", ue),
2016
+ fe("g", ue),
2017
+ fe("GG", re, Z),
2018
+ fe("gg", re, Z),
2019
+ fe("GGGG", se, te),
2020
+ fe("gggg", se, te),
2021
+ fe("GGGGG", le, ne),
2022
+ fe("ggggg", le, ne),
2023
+ ye(["gggg", "ggggg", "GGGG", "GGGGG"], function (e, t, n, r) {
2024
+ t[r.substr(0, 2)] = G(e);
2025
+ }),
2026
+ ye(["gg", "GG"], function (e, t, n, r) {
2027
+ t[r] = o.parseTwoDigitYear(e);
2028
+ }),
2029
+ R("Q", 0, "Qo", "quarter"),
2030
+ H("quarter", "Q"),
2031
+ V("quarter", 7),
2032
+ fe("Q", $),
2033
+ be("Q", function (e, t) {
2034
+ t[1] = 3 * (G(e) - 1);
2035
+ }),
2036
+ R("D", ["DD", 2], "Do", "date"),
2037
+ H("date", "D"),
2038
+ V("date", 9),
2039
+ fe("D", re),
2040
+ fe("DD", re, Z),
2041
+ fe("Do", function (e, t) {
2042
+ return e
2043
+ ? t._dayOfMonthOrdinalParse || t._ordinalParse
2044
+ : t._dayOfMonthOrdinalParseLenient;
2045
+ }),
2046
+ be(["D", "DD"], 2),
2047
+ be("Do", function (e, t) {
2048
+ t[2] = G(e.match(re)[0]);
2049
+ });
2050
+ var dn = J("Date", !0);
2051
+ R("DDD", ["DDDD", 3], "DDDo", "dayOfYear"),
2052
+ H("dayOfYear", "DDD"),
2053
+ V("dayOfYear", 4),
2054
+ fe("DDD", ie),
2055
+ fe("DDDD", ee),
2056
+ be(["DDD", "DDDD"], function (e, t, n) {
2057
+ n._dayOfYear = G(e);
2058
+ }),
2059
+ R("m", ["mm", 2], 0, "minute"),
2060
+ H("minute", "m"),
2061
+ V("minute", 14),
2062
+ fe("m", re),
2063
+ fe("mm", re, Z),
2064
+ be(["m", "mm"], 4);
2065
+ var hn = J("Minutes", !1);
2066
+ R("s", ["ss", 2], 0, "second"),
2067
+ H("second", "s"),
2068
+ V("second", 15),
2069
+ fe("s", re),
2070
+ fe("ss", re, Z),
2071
+ be(["s", "ss"], 5);
2072
+ var pn,
2073
+ fn,
2074
+ mn = J("Seconds", !1);
2075
+ for (
2076
+ R("S", 0, 0, function () {
2077
+ return ~~(this.millisecond() / 100);
2078
+ }),
2079
+ R(0, ["SS", 2], 0, function () {
2080
+ return ~~(this.millisecond() / 10);
2081
+ }),
2082
+ R(0, ["SSS", 3], 0, "millisecond"),
2083
+ R(0, ["SSSS", 4], 0, function () {
2084
+ return 10 * this.millisecond();
2085
+ }),
2086
+ R(0, ["SSSSS", 5], 0, function () {
2087
+ return 100 * this.millisecond();
2088
+ }),
2089
+ R(0, ["SSSSSS", 6], 0, function () {
2090
+ return 1e3 * this.millisecond();
2091
+ }),
2092
+ R(0, ["SSSSSSS", 7], 0, function () {
2093
+ return 1e4 * this.millisecond();
2094
+ }),
2095
+ R(0, ["SSSSSSSS", 8], 0, function () {
2096
+ return 1e5 * this.millisecond();
2097
+ }),
2098
+ R(0, ["SSSSSSSSS", 9], 0, function () {
2099
+ return 1e6 * this.millisecond();
2100
+ }),
2101
+ H("millisecond", "ms"),
2102
+ V("millisecond", 16),
2103
+ fe("S", ie, $),
2104
+ fe("SS", ie, Z),
2105
+ fe("SSS", ie, ee),
2106
+ pn = "SSSS";
2107
+ pn.length <= 9;
2108
+ pn += "S"
2109
+ )
2110
+ fe(pn, ce);
2111
+ function gn(e, t) {
2112
+ t[6] = G(1e3 * ("0." + e));
2113
+ }
2114
+ for (pn = "S"; pn.length <= 9; pn += "S") be(pn, gn);
2115
+ (fn = J("Milliseconds", !1)),
2116
+ R("z", 0, 0, "zoneAbbr"),
2117
+ R("zz", 0, 0, "zoneName");
2118
+ var _n = w.prototype;
2119
+ function vn(e) {
2120
+ return e;
2121
+ }
2122
+ (_n.add = Gt),
2123
+ (_n.calendar = function (e, t) {
2124
+ 1 === arguments.length &&
2125
+ (arguments[0]
2126
+ ? Qt(arguments[0])
2127
+ ? ((e = arguments[0]), (t = void 0))
2128
+ : Xt(arguments[0]) && ((t = arguments[0]), (e = void 0))
2129
+ : ((e = void 0), (t = void 0)));
2130
+ var n = e || Tt(),
2131
+ r = Yt(n, this).startOf("day"),
2132
+ a = o.calendarFormat(this, r) || "sameElse",
2133
+ i = t && (D(t[a]) ? t[a].call(this, n) : t[a]);
2134
+ return this.format(i || this.localeData().calendar(a, this, Tt(n)));
2135
+ }),
2136
+ (_n.clone = function () {
2137
+ return new w(this);
2138
+ }),
2139
+ (_n.diff = function (e, t, n) {
2140
+ var r, o, a;
2141
+ if (!this.isValid()) return NaN;
2142
+ if (!(r = Yt(e, this)).isValid()) return NaN;
2143
+ switch (
2144
+ ((o = 6e4 * (r.utcOffset() - this.utcOffset())), (t = z(t)))
2145
+ ) {
2146
+ case "year":
2147
+ a = $t(this, r) / 12;
2148
+ break;
2149
+ case "month":
2150
+ a = $t(this, r);
2151
+ break;
2152
+ case "quarter":
2153
+ a = $t(this, r) / 3;
2154
+ break;
2155
+ case "second":
2156
+ a = (this - r) / 1e3;
2157
+ break;
2158
+ case "minute":
2159
+ a = (this - r) / 6e4;
2160
+ break;
2161
+ case "hour":
2162
+ a = (this - r) / 36e5;
2163
+ break;
2164
+ case "day":
2165
+ a = (this - r - o) / 864e5;
2166
+ break;
2167
+ case "week":
2168
+ a = (this - r - o) / 6048e5;
2169
+ break;
2170
+ default:
2171
+ a = this - r;
2172
+ }
2173
+ return n ? a : q(a);
2174
+ }),
2175
+ (_n.endOf = function (e) {
2176
+ var t, n;
2177
+ if (void 0 === (e = z(e)) || "millisecond" === e || !this.isValid())
2178
+ return this;
2179
+ switch (((n = this._isUTC ? on : rn), e)) {
2180
+ case "year":
2181
+ t = n(this.year() + 1, 0, 1) - 1;
2182
+ break;
2183
+ case "quarter":
2184
+ t =
2185
+ n(this.year(), this.month() - (this.month() % 3) + 3, 1) - 1;
2186
+ break;
2187
+ case "month":
2188
+ t = n(this.year(), this.month() + 1, 1) - 1;
2189
+ break;
2190
+ case "week":
2191
+ t =
2192
+ n(
2193
+ this.year(),
2194
+ this.month(),
2195
+ this.date() - this.weekday() + 7
2196
+ ) - 1;
2197
+ break;
2198
+ case "isoWeek":
2199
+ t =
2200
+ n(
2201
+ this.year(),
2202
+ this.month(),
2203
+ this.date() - (this.isoWeekday() - 1) + 7
2204
+ ) - 1;
2205
+ break;
2206
+ case "day":
2207
+ case "date":
2208
+ t = n(this.year(), this.month(), this.date() + 1) - 1;
2209
+ break;
2210
+ case "hour":
2211
+ (t = this._d.valueOf()),
2212
+ (t +=
2213
+ 36e5 -
2214
+ nn(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5) -
2215
+ 1);
2216
+ break;
2217
+ case "minute":
2218
+ (t = this._d.valueOf()), (t += 6e4 - nn(t, 6e4) - 1);
2219
+ break;
2220
+ case "second":
2221
+ (t = this._d.valueOf()), (t += 1e3 - nn(t, 1e3) - 1);
2222
+ }
2223
+ return this._d.setTime(t), o.updateOffset(this, !0), this;
2224
+ }),
2225
+ (_n.format = function (e) {
2226
+ e || (e = this.isUtc() ? o.defaultFormatUtc : o.defaultFormat);
2227
+ var t = Y(this, e);
2228
+ return this.localeData().postformat(t);
2229
+ }),
2230
+ (_n.from = function (e, t) {
2231
+ return this.isValid() && ((k(e) && e.isValid()) || Tt(e).isValid())
2232
+ ? Bt({ to: this, from: e }).locale(this.locale()).humanize(!t)
2233
+ : this.localeData().invalidDate();
2234
+ }),
2235
+ (_n.fromNow = function (e) {
2236
+ return this.from(Tt(), e);
2237
+ }),
2238
+ (_n.to = function (e, t) {
2239
+ return this.isValid() && ((k(e) && e.isValid()) || Tt(e).isValid())
2240
+ ? Bt({ from: this, to: e }).locale(this.locale()).humanize(!t)
2241
+ : this.localeData().invalidDate();
2242
+ }),
2243
+ (_n.toNow = function (e) {
2244
+ return this.to(Tt(), e);
2245
+ }),
2246
+ (_n.get = function (e) {
2247
+ return D(this[(e = z(e))]) ? this[e]() : this;
2248
+ }),
2249
+ (_n.invalidAt = function () {
2250
+ return m(this).overflow;
2251
+ }),
2252
+ (_n.isAfter = function (e, t) {
2253
+ var n = k(e) ? e : Tt(e);
2254
+ return (
2255
+ !(!this.isValid() || !n.isValid()) &&
2256
+ ("millisecond" === (t = z(t) || "millisecond")
2257
+ ? this.valueOf() > n.valueOf()
2258
+ : n.valueOf() < this.clone().startOf(t).valueOf())
2259
+ );
2260
+ }),
2261
+ (_n.isBefore = function (e, t) {
2262
+ var n = k(e) ? e : Tt(e);
2263
+ return (
2264
+ !(!this.isValid() || !n.isValid()) &&
2265
+ ("millisecond" === (t = z(t) || "millisecond")
2266
+ ? this.valueOf() < n.valueOf()
2267
+ : this.clone().endOf(t).valueOf() < n.valueOf())
2268
+ );
2269
+ }),
2270
+ (_n.isBetween = function (e, t, n, r) {
2271
+ var o = k(e) ? e : Tt(e),
2272
+ a = k(t) ? t : Tt(t);
2273
+ return (
2274
+ !!(this.isValid() && o.isValid() && a.isValid()) &&
2275
+ ("(" === (r = r || "()")[0]
2276
+ ? this.isAfter(o, n)
2277
+ : !this.isBefore(o, n)) &&
2278
+ (")" === r[1] ? this.isBefore(a, n) : !this.isAfter(a, n))
2279
+ );
2280
+ }),
2281
+ (_n.isSame = function (e, t) {
2282
+ var n,
2283
+ r = k(e) ? e : Tt(e);
2284
+ return (
2285
+ !(!this.isValid() || !r.isValid()) &&
2286
+ ("millisecond" === (t = z(t) || "millisecond")
2287
+ ? this.valueOf() === r.valueOf()
2288
+ : ((n = r.valueOf()),
2289
+ this.clone().startOf(t).valueOf() <= n &&
2290
+ n <= this.clone().endOf(t).valueOf()))
2291
+ );
2292
+ }),
2293
+ (_n.isSameOrAfter = function (e, t) {
2294
+ return this.isSame(e, t) || this.isAfter(e, t);
2295
+ }),
2296
+ (_n.isSameOrBefore = function (e, t) {
2297
+ return this.isSame(e, t) || this.isBefore(e, t);
2298
+ }),
2299
+ (_n.isValid = function () {
2300
+ return g(this);
2301
+ }),
2302
+ (_n.lang = en),
2303
+ (_n.locale = Zt),
2304
+ (_n.localeData = tn),
2305
+ (_n.max = Dt),
2306
+ (_n.min = St),
2307
+ (_n.parsingFlags = function () {
2308
+ return p({}, m(this));
2309
+ }),
2310
+ (_n.set = function (e, t) {
2311
+ if ("object" == typeof e) {
2312
+ var n,
2313
+ r = (function (e) {
2314
+ var t,
2315
+ n = [];
2316
+ for (t in e) s(e, t) && n.push({ unit: t, priority: U[t] });
2317
+ return (
2318
+ n.sort(function (e, t) {
2319
+ return e.priority - t.priority;
2320
+ }),
2321
+ n
2322
+ );
2323
+ })((e = B(e)));
2324
+ for (n = 0; n < r.length; n++) this[r[n].unit](e[r[n].unit]);
2325
+ } else if (D(this[(e = z(e))])) return this[e](t);
2326
+ return this;
2327
+ }),
2328
+ (_n.startOf = function (e) {
2329
+ var t, n;
2330
+ if (void 0 === (e = z(e)) || "millisecond" === e || !this.isValid())
2331
+ return this;
2332
+ switch (((n = this._isUTC ? on : rn), e)) {
2333
+ case "year":
2334
+ t = n(this.year(), 0, 1);
2335
+ break;
2336
+ case "quarter":
2337
+ t = n(this.year(), this.month() - (this.month() % 3), 1);
2338
+ break;
2339
+ case "month":
2340
+ t = n(this.year(), this.month(), 1);
2341
+ break;
2342
+ case "week":
2343
+ t = n(this.year(), this.month(), this.date() - this.weekday());
2344
+ break;
2345
+ case "isoWeek":
2346
+ t = n(
2347
+ this.year(),
2348
+ this.month(),
2349
+ this.date() - (this.isoWeekday() - 1)
2350
+ );
2351
+ break;
2352
+ case "day":
2353
+ case "date":
2354
+ t = n(this.year(), this.month(), this.date());
2355
+ break;
2356
+ case "hour":
2357
+ (t = this._d.valueOf()),
2358
+ (t -= nn(
2359
+ t + (this._isUTC ? 0 : 6e4 * this.utcOffset()),
2360
+ 36e5
2361
+ ));
2362
+ break;
2363
+ case "minute":
2364
+ (t = this._d.valueOf()), (t -= nn(t, 6e4));
2365
+ break;
2366
+ case "second":
2367
+ (t = this._d.valueOf()), (t -= nn(t, 1e3));
2368
+ }
2369
+ return this._d.setTime(t), o.updateOffset(this, !0), this;
2370
+ }),
2371
+ (_n.subtract = Jt),
2372
+ (_n.toArray = function () {
2373
+ var e = this;
2374
+ return [
2375
+ e.year(),
2376
+ e.month(),
2377
+ e.date(),
2378
+ e.hour(),
2379
+ e.minute(),
2380
+ e.second(),
2381
+ e.millisecond(),
2382
+ ];
2383
+ }),
2384
+ (_n.toObject = function () {
2385
+ var e = this;
2386
+ return {
2387
+ years: e.year(),
2388
+ months: e.month(),
2389
+ date: e.date(),
2390
+ hours: e.hours(),
2391
+ minutes: e.minutes(),
2392
+ seconds: e.seconds(),
2393
+ milliseconds: e.milliseconds(),
2394
+ };
2395
+ }),
2396
+ (_n.toDate = function () {
2397
+ return new Date(this.valueOf());
2398
+ }),
2399
+ (_n.toISOString = function (e) {
2400
+ if (!this.isValid()) return null;
2401
+ var t = !0 !== e,
2402
+ n = t ? this.clone().utc() : this;
2403
+ return n.year() < 0 || n.year() > 9999
2404
+ ? Y(
2405
+ n,
2406
+ t
2407
+ ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"
2408
+ : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
2409
+ )
2410
+ : D(Date.prototype.toISOString)
2411
+ ? t
2412
+ ? this.toDate().toISOString()
2413
+ : new Date(this.valueOf() + 60 * this.utcOffset() * 1e3)
2414
+ .toISOString()
2415
+ .replace("Z", Y(n, "Z"))
2416
+ : Y(
2417
+ n,
2418
+ t
2419
+ ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"
2420
+ : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
2421
+ );
2422
+ }),
2423
+ (_n.inspect = function () {
2424
+ if (!this.isValid()) return "moment.invalid(/* " + this._i + " */)";
2425
+ var e,
2426
+ t,
2427
+ n,
2428
+ r = "moment",
2429
+ o = "";
2430
+ return (
2431
+ this.isLocal() ||
2432
+ ((r =
2433
+ 0 === this.utcOffset() ? "moment.utc" : "moment.parseZone"),
2434
+ (o = "Z")),
2435
+ (e = "[" + r + '("]'),
2436
+ (t = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY"),
2437
+ (n = o + '[")]'),
2438
+ this.format(e + t + "-MM-DD[T]HH:mm:ss.SSS" + n)
2439
+ );
2440
+ }),
2441
+ "undefined" != typeof Symbol &&
2442
+ null != Symbol.for &&
2443
+ (_n[Symbol.for("nodejs.util.inspect.custom")] = function () {
2444
+ return "Moment<" + this.format() + ">";
2445
+ }),
2446
+ (_n.toJSON = function () {
2447
+ return this.isValid() ? this.toISOString() : null;
2448
+ }),
2449
+ (_n.toString = function () {
2450
+ return this.clone()
2451
+ .locale("en")
2452
+ .format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
2453
+ }),
2454
+ (_n.unix = function () {
2455
+ return Math.floor(this.valueOf() / 1e3);
2456
+ }),
2457
+ (_n.valueOf = function () {
2458
+ return this._d.valueOf() - 6e4 * (this._offset || 0);
2459
+ }),
2460
+ (_n.creationData = function () {
2461
+ return {
2462
+ input: this._i,
2463
+ format: this._f,
2464
+ locale: this._locale,
2465
+ isUTC: this._isUTC,
2466
+ strict: this._strict,
2467
+ };
2468
+ }),
2469
+ (_n.eraName = function () {
2470
+ var e,
2471
+ t,
2472
+ n,
2473
+ r = this.localeData().eras();
2474
+ for (e = 0, t = r.length; e < t; ++e) {
2475
+ if (
2476
+ ((n = this.clone().startOf("day").valueOf()),
2477
+ r[e].since <= n && n <= r[e].until)
2478
+ )
2479
+ return r[e].name;
2480
+ if (r[e].until <= n && n <= r[e].since) return r[e].name;
2481
+ }
2482
+ return "";
2483
+ }),
2484
+ (_n.eraNarrow = function () {
2485
+ var e,
2486
+ t,
2487
+ n,
2488
+ r = this.localeData().eras();
2489
+ for (e = 0, t = r.length; e < t; ++e) {
2490
+ if (
2491
+ ((n = this.clone().startOf("day").valueOf()),
2492
+ r[e].since <= n && n <= r[e].until)
2493
+ )
2494
+ return r[e].narrow;
2495
+ if (r[e].until <= n && n <= r[e].since) return r[e].narrow;
2496
+ }
2497
+ return "";
2498
+ }),
2499
+ (_n.eraAbbr = function () {
2500
+ var e,
2501
+ t,
2502
+ n,
2503
+ r = this.localeData().eras();
2504
+ for (e = 0, t = r.length; e < t; ++e) {
2505
+ if (
2506
+ ((n = this.clone().startOf("day").valueOf()),
2507
+ r[e].since <= n && n <= r[e].until)
2508
+ )
2509
+ return r[e].abbr;
2510
+ if (r[e].until <= n && n <= r[e].since) return r[e].abbr;
2511
+ }
2512
+ return "";
2513
+ }),
2514
+ (_n.eraYear = function () {
2515
+ var e,
2516
+ t,
2517
+ n,
2518
+ r,
2519
+ a = this.localeData().eras();
2520
+ for (e = 0, t = a.length; e < t; ++e)
2521
+ if (
2522
+ ((n = a[e].since <= a[e].until ? 1 : -1),
2523
+ (r = this.clone().startOf("day").valueOf()),
2524
+ (a[e].since <= r && r <= a[e].until) ||
2525
+ (a[e].until <= r && r <= a[e].since))
2526
+ )
2527
+ return (this.year() - o(a[e].since).year()) * n + a[e].offset;
2528
+ return this.year();
2529
+ }),
2530
+ (_n.year = Ne),
2531
+ (_n.isLeapYear = function () {
2532
+ return W(this.year());
2533
+ }),
2534
+ (_n.weekYear = function (e) {
2535
+ return cn.call(
2536
+ this,
2537
+ e,
2538
+ this.week(),
2539
+ this.weekday(),
2540
+ this.localeData()._week.dow,
2541
+ this.localeData()._week.doy
2542
+ );
2543
+ }),
2544
+ (_n.isoWeekYear = function (e) {
2545
+ return cn.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4);
2546
+ }),
2547
+ (_n.quarter = _n.quarters = function (e) {
2548
+ return null == e
2549
+ ? Math.ceil((this.month() + 1) / 3)
2550
+ : this.month(3 * (e - 1) + (this.month() % 3));
2551
+ }),
2552
+ (_n.month = Ce),
2553
+ (_n.daysInMonth = function () {
2554
+ return ke(this.year(), this.month());
2555
+ }),
2556
+ (_n.week = _n.weeks = function (e) {
2557
+ var t = this.localeData().week(this);
2558
+ return null == e ? t : this.add(7 * (e - t), "d");
2559
+ }),
2560
+ (_n.isoWeek = _n.isoWeeks = function (e) {
2561
+ var t = je(this, 1, 4).week;
2562
+ return null == e ? t : this.add(7 * (e - t), "d");
2563
+ }),
2564
+ (_n.weeksInYear = function () {
2565
+ var e = this.localeData()._week;
2566
+ return Fe(this.year(), e.dow, e.doy);
2567
+ }),
2568
+ (_n.weeksInWeekYear = function () {
2569
+ var e = this.localeData()._week;
2570
+ return Fe(this.weekYear(), e.dow, e.doy);
2571
+ }),
2572
+ (_n.isoWeeksInYear = function () {
2573
+ return Fe(this.year(), 1, 4);
2574
+ }),
2575
+ (_n.isoWeeksInISOWeekYear = function () {
2576
+ return Fe(this.isoWeekYear(), 1, 4);
2577
+ }),
2578
+ (_n.date = dn),
2579
+ (_n.day = _n.days = function (e) {
2580
+ if (!this.isValid()) return null != e ? this : NaN;
2581
+ var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
2582
+ return null != e
2583
+ ? ((e = (function (e, t) {
2584
+ return "string" != typeof e
2585
+ ? e
2586
+ : isNaN(e)
2587
+ ? "number" == typeof (e = t.weekdaysParse(e))
2588
+ ? e
2589
+ : null
2590
+ : parseInt(e, 10);
2591
+ })(e, this.localeData())),
2592
+ this.add(e - t, "d"))
2593
+ : t;
2594
+ }),
2595
+ (_n.weekday = function (e) {
2596
+ if (!this.isValid()) return null != e ? this : NaN;
2597
+ var t = (this.day() + 7 - this.localeData()._week.dow) % 7;
2598
+ return null == e ? t : this.add(e - t, "d");
2599
+ }),
2600
+ (_n.isoWeekday = function (e) {
2601
+ if (!this.isValid()) return null != e ? this : NaN;
2602
+ if (null != e) {
2603
+ var t = (function (e, t) {
2604
+ return "string" == typeof e
2605
+ ? t.weekdaysParse(e) % 7 || 7
2606
+ : isNaN(e)
2607
+ ? null
2608
+ : e;
2609
+ })(e, this.localeData());
2610
+ return this.day(this.day() % 7 ? t : t - 7);
2611
+ }
2612
+ return this.day() || 7;
2613
+ }),
2614
+ (_n.dayOfYear = function (e) {
2615
+ var t =
2616
+ Math.round(
2617
+ (this.clone().startOf("day") - this.clone().startOf("year")) /
2618
+ 864e5
2619
+ ) + 1;
2620
+ return null == e ? t : this.add(e - t, "d");
2621
+ }),
2622
+ (_n.hour = _n.hours = Ze),
2623
+ (_n.minute = _n.minutes = hn),
2624
+ (_n.second = _n.seconds = mn),
2625
+ (_n.millisecond = _n.milliseconds = fn),
2626
+ (_n.utcOffset = function (e, t, n) {
2627
+ var r,
2628
+ a = this._offset || 0;
2629
+ if (!this.isValid()) return null != e ? this : NaN;
2630
+ if (null != e) {
2631
+ if ("string" == typeof e) {
2632
+ if (null === (e = Rt(he, e))) return this;
2633
+ } else Math.abs(e) < 16 && !n && (e *= 60);
2634
+ return (
2635
+ !this._isUTC && t && (r = jt(this)),
2636
+ (this._offset = e),
2637
+ (this._isUTC = !0),
2638
+ null != r && this.add(r, "m"),
2639
+ a !== e &&
2640
+ (!t || this._changeInProgress
2641
+ ? qt(this, Bt(e - a, "m"), 1, !1)
2642
+ : this._changeInProgress ||
2643
+ ((this._changeInProgress = !0),
2644
+ o.updateOffset(this, !0),
2645
+ (this._changeInProgress = null))),
2646
+ this
2647
+ );
2648
+ }
2649
+ return this._isUTC ? a : jt(this);
2650
+ }),
2651
+ (_n.utc = function (e) {
2652
+ return this.utcOffset(0, e);
2653
+ }),
2654
+ (_n.local = function (e) {
2655
+ return (
2656
+ this._isUTC &&
2657
+ (this.utcOffset(0, e),
2658
+ (this._isUTC = !1),
2659
+ e && this.subtract(jt(this), "m")),
2660
+ this
2661
+ );
2662
+ }),
2663
+ (_n.parseZone = function () {
2664
+ if (null != this._tzm) this.utcOffset(this._tzm, !1, !0);
2665
+ else if ("string" == typeof this._i) {
2666
+ var e = Rt(de, this._i);
2667
+ null != e ? this.utcOffset(e) : this.utcOffset(0, !0);
2668
+ }
2669
+ return this;
2670
+ }),
2671
+ (_n.hasAlignedHourOffset = function (e) {
2672
+ return (
2673
+ !!this.isValid() &&
2674
+ ((e = e ? Tt(e).utcOffset() : 0),
2675
+ (this.utcOffset() - e) % 60 == 0)
2676
+ );
2677
+ }),
2678
+ (_n.isDST = function () {
2679
+ return (
2680
+ this.utcOffset() > this.clone().month(0).utcOffset() ||
2681
+ this.utcOffset() > this.clone().month(5).utcOffset()
2682
+ );
2683
+ }),
2684
+ (_n.isLocal = function () {
2685
+ return !!this.isValid() && !this._isUTC;
2686
+ }),
2687
+ (_n.isUtcOffset = function () {
2688
+ return !!this.isValid() && this._isUTC;
2689
+ }),
2690
+ (_n.isUtc = Ft),
2691
+ (_n.isUTC = Ft),
2692
+ (_n.zoneAbbr = function () {
2693
+ return this._isUTC ? "UTC" : "";
2694
+ }),
2695
+ (_n.zoneName = function () {
2696
+ return this._isUTC ? "Coordinated Universal Time" : "";
2697
+ }),
2698
+ (_n.dates = M("dates accessor is deprecated. Use date instead.", dn)),
2699
+ (_n.months = M(
2700
+ "months accessor is deprecated. Use month instead",
2701
+ Ce
2702
+ )),
2703
+ (_n.years = M("years accessor is deprecated. Use year instead", Ne)),
2704
+ (_n.zone = M(
2705
+ "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
2706
+ function (e, t) {
2707
+ return null != e
2708
+ ? ("string" != typeof e && (e = -e), this.utcOffset(e, t), this)
2709
+ : -this.utcOffset();
2710
+ }
2711
+ )),
2712
+ (_n.isDSTShifted = M(
2713
+ "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
2714
+ function () {
2715
+ if (!c(this._isDSTShifted)) return this._isDSTShifted;
2716
+ var e,
2717
+ t = {};
2718
+ return (
2719
+ y(t, this),
2720
+ (t = Mt(t))._a
2721
+ ? ((e = t._isUTC ? f(t._a) : Tt(t._a)),
2722
+ (this._isDSTShifted =
2723
+ this.isValid() &&
2724
+ (function (e, t, n) {
2725
+ var r,
2726
+ o = Math.min(e.length, t.length),
2727
+ a = Math.abs(e.length - t.length),
2728
+ i = 0;
2729
+ for (r = 0; r < o; r++)
2730
+ ((n && e[r] !== t[r]) ||
2731
+ (!n && G(e[r]) !== G(t[r]))) &&
2732
+ i++;
2733
+ return i + a;
2734
+ })(t._a, e.toArray()) > 0))
2735
+ : (this._isDSTShifted = !1),
2736
+ this._isDSTShifted
2737
+ );
2738
+ }
2739
+ ));
2740
+ var bn = C.prototype;
2741
+ function yn(e, t, n, r) {
2742
+ var o = lt(),
2743
+ a = f().set(r, t);
2744
+ return o[n](a, e);
2745
+ }
2746
+ function wn(e, t, n) {
2747
+ if ((u(e) && ((t = e), (e = void 0)), (e = e || ""), null != t))
2748
+ return yn(e, t, n, "month");
2749
+ var r,
2750
+ o = [];
2751
+ for (r = 0; r < 12; r++) o[r] = yn(e, r, n, "month");
2752
+ return o;
2753
+ }
2754
+ function kn(e, t, n, r) {
2755
+ "boolean" == typeof e
2756
+ ? (u(t) && ((n = t), (t = void 0)), (t = t || ""))
2757
+ : ((n = t = e),
2758
+ (e = !1),
2759
+ u(t) && ((n = t), (t = void 0)),
2760
+ (t = t || ""));
2761
+ var o,
2762
+ a = lt(),
2763
+ i = e ? a._week.dow : 0,
2764
+ s = [];
2765
+ if (null != n) return yn(t, (n + i) % 7, r, "day");
2766
+ for (o = 0; o < 7; o++) s[o] = yn(t, (o + i) % 7, r, "day");
2767
+ return s;
2768
+ }
2769
+ (bn.calendar = function (e, t, n) {
2770
+ var r = this._calendar[e] || this._calendar.sameElse;
2771
+ return D(r) ? r.call(t, n) : r;
2772
+ }),
2773
+ (bn.longDateFormat = function (e) {
2774
+ var t = this._longDateFormat[e],
2775
+ n = this._longDateFormat[e.toUpperCase()];
2776
+ return t || !n
2777
+ ? t
2778
+ : ((this._longDateFormat[e] = n
2779
+ .match(O)
2780
+ .map(function (e) {
2781
+ return "MMMM" === e ||
2782
+ "MM" === e ||
2783
+ "DD" === e ||
2784
+ "dddd" === e
2785
+ ? e.slice(1)
2786
+ : e;
2787
+ })
2788
+ .join("")),
2789
+ this._longDateFormat[e]);
2790
+ }),
2791
+ (bn.invalidDate = function () {
2792
+ return this._invalidDate;
2793
+ }),
2794
+ (bn.ordinal = function (e) {
2795
+ return this._ordinal.replace("%d", e);
2796
+ }),
2797
+ (bn.preparse = vn),
2798
+ (bn.postformat = vn),
2799
+ (bn.relativeTime = function (e, t, n, r) {
2800
+ var o = this._relativeTime[n];
2801
+ return D(o) ? o(e, t, n, r) : o.replace(/%d/i, e);
2802
+ }),
2803
+ (bn.pastFuture = function (e, t) {
2804
+ var n = this._relativeTime[e > 0 ? "future" : "past"];
2805
+ return D(n) ? n(t) : n.replace(/%s/i, t);
2806
+ }),
2807
+ (bn.set = function (e) {
2808
+ var t, n;
2809
+ for (n in e)
2810
+ s(e, n) && (D((t = e[n])) ? (this[n] = t) : (this["_" + n] = t));
2811
+ (this._config = e),
2812
+ (this._dayOfMonthOrdinalParseLenient = new RegExp(
2813
+ (this._dayOfMonthOrdinalParse.source ||
2814
+ this._ordinalParse.source) +
2815
+ "|" +
2816
+ /\d{1,2}/.source
2817
+ ));
2818
+ }),
2819
+ (bn.eras = function (e, t) {
2820
+ var n,
2821
+ r,
2822
+ a,
2823
+ i = this._eras || lt("en")._eras;
2824
+ for (n = 0, r = i.length; n < r; ++n) {
2825
+ switch (typeof i[n].since) {
2826
+ case "string":
2827
+ (a = o(i[n].since).startOf("day")),
2828
+ (i[n].since = a.valueOf());
2829
+ }
2830
+ switch (typeof i[n].until) {
2831
+ case "undefined":
2832
+ i[n].until = 1 / 0;
2833
+ break;
2834
+ case "string":
2835
+ (a = o(i[n].until).startOf("day").valueOf()),
2836
+ (i[n].until = a.valueOf());
2837
+ }
2838
+ }
2839
+ return i;
2840
+ }),
2841
+ (bn.erasParse = function (e, t, n) {
2842
+ var r,
2843
+ o,
2844
+ a,
2845
+ i,
2846
+ s,
2847
+ l = this.eras();
2848
+ for (e = e.toUpperCase(), r = 0, o = l.length; r < o; ++r)
2849
+ if (
2850
+ ((a = l[r].name.toUpperCase()),
2851
+ (i = l[r].abbr.toUpperCase()),
2852
+ (s = l[r].narrow.toUpperCase()),
2853
+ n)
2854
+ )
2855
+ switch (t) {
2856
+ case "N":
2857
+ case "NN":
2858
+ case "NNN":
2859
+ if (i === e) return l[r];
2860
+ break;
2861
+ case "NNNN":
2862
+ if (a === e) return l[r];
2863
+ break;
2864
+ case "NNNNN":
2865
+ if (s === e) return l[r];
2866
+ }
2867
+ else if ([a, i, s].indexOf(e) >= 0) return l[r];
2868
+ }),
2869
+ (bn.erasConvertYear = function (e, t) {
2870
+ var n = e.since <= e.until ? 1 : -1;
2871
+ return void 0 === t
2872
+ ? o(e.since).year()
2873
+ : o(e.since).year() + (t - e.offset) * n;
2874
+ }),
2875
+ (bn.erasAbbrRegex = function (e) {
2876
+ return (
2877
+ s(this, "_erasAbbrRegex") || sn.call(this),
2878
+ e ? this._erasAbbrRegex : this._erasRegex
2879
+ );
2880
+ }),
2881
+ (bn.erasNameRegex = function (e) {
2882
+ return (
2883
+ s(this, "_erasNameRegex") || sn.call(this),
2884
+ e ? this._erasNameRegex : this._erasRegex
2885
+ );
2886
+ }),
2887
+ (bn.erasNarrowRegex = function (e) {
2888
+ return (
2889
+ s(this, "_erasNarrowRegex") || sn.call(this),
2890
+ e ? this._erasNarrowRegex : this._erasRegex
2891
+ );
2892
+ }),
2893
+ (bn.months = function (e, t) {
2894
+ return e
2895
+ ? a(this._months)
2896
+ ? this._months[e.month()]
2897
+ : this._months[
2898
+ (this._months.isFormat || Ee).test(t)
2899
+ ? "format"
2900
+ : "standalone"
2901
+ ][e.month()]
2902
+ : a(this._months)
2903
+ ? this._months
2904
+ : this._months.standalone;
2905
+ }),
2906
+ (bn.monthsShort = function (e, t) {
2907
+ return e
2908
+ ? a(this._monthsShort)
2909
+ ? this._monthsShort[e.month()]
2910
+ : this._monthsShort[Ee.test(t) ? "format" : "standalone"][
2911
+ e.month()
2912
+ ]
2913
+ : a(this._monthsShort)
2914
+ ? this._monthsShort
2915
+ : this._monthsShort.standalone;
2916
+ }),
2917
+ (bn.monthsParse = function (e, t, n) {
2918
+ var r, o, a;
2919
+ if (this._monthsParseExact) return De.call(this, e, t, n);
2920
+ for (
2921
+ this._monthsParse ||
2922
+ ((this._monthsParse = []),
2923
+ (this._longMonthsParse = []),
2924
+ (this._shortMonthsParse = [])),
2925
+ r = 0;
2926
+ r < 12;
2927
+ r++
2928
+ ) {
2929
+ if (
2930
+ ((o = f([2e3, r])),
2931
+ n &&
2932
+ !this._longMonthsParse[r] &&
2933
+ ((this._longMonthsParse[r] = new RegExp(
2934
+ "^" + this.months(o, "").replace(".", "") + "$",
2935
+ "i"
2936
+ )),
2937
+ (this._shortMonthsParse[r] = new RegExp(
2938
+ "^" + this.monthsShort(o, "").replace(".", "") + "$",
2939
+ "i"
2940
+ ))),
2941
+ n ||
2942
+ this._monthsParse[r] ||
2943
+ ((a =
2944
+ "^" + this.months(o, "") + "|^" + this.monthsShort(o, "")),
2945
+ (this._monthsParse[r] = new RegExp(a.replace(".", ""), "i"))),
2946
+ n && "MMMM" === t && this._longMonthsParse[r].test(e))
2947
+ )
2948
+ return r;
2949
+ if (n && "MMM" === t && this._shortMonthsParse[r].test(e))
2950
+ return r;
2951
+ if (!n && this._monthsParse[r].test(e)) return r;
2952
+ }
2953
+ }),
2954
+ (bn.monthsRegex = function (e) {
2955
+ return this._monthsParseExact
2956
+ ? (s(this, "_monthsRegex") || Pe.call(this),
2957
+ e ? this._monthsStrictRegex : this._monthsRegex)
2958
+ : (s(this, "_monthsRegex") || (this._monthsRegex = Se),
2959
+ this._monthsStrictRegex && e
2960
+ ? this._monthsStrictRegex
2961
+ : this._monthsRegex);
2962
+ }),
2963
+ (bn.monthsShortRegex = function (e) {
2964
+ return this._monthsParseExact
2965
+ ? (s(this, "_monthsRegex") || Pe.call(this),
2966
+ e ? this._monthsShortStrictRegex : this._monthsShortRegex)
2967
+ : (s(this, "_monthsShortRegex") || (this._monthsShortRegex = Te),
2968
+ this._monthsShortStrictRegex && e
2969
+ ? this._monthsShortStrictRegex
2970
+ : this._monthsShortRegex);
2971
+ }),
2972
+ (bn.week = function (e) {
2973
+ return je(e, this._week.dow, this._week.doy).week;
2974
+ }),
2975
+ (bn.firstDayOfYear = function () {
2976
+ return this._week.doy;
2977
+ }),
2978
+ (bn.firstDayOfWeek = function () {
2979
+ return this._week.dow;
2980
+ }),
2981
+ (bn.weekdays = function (e, t) {
2982
+ var n = a(this._weekdays)
2983
+ ? this._weekdays
2984
+ : this._weekdays[
2985
+ e && !0 !== e && this._weekdays.isFormat.test(t)
2986
+ ? "format"
2987
+ : "standalone"
2988
+ ];
2989
+ return !0 === e ? He(n, this._week.dow) : e ? n[e.day()] : n;
2990
+ }),
2991
+ (bn.weekdaysMin = function (e) {
2992
+ return !0 === e
2993
+ ? He(this._weekdaysMin, this._week.dow)
2994
+ : e
2995
+ ? this._weekdaysMin[e.day()]
2996
+ : this._weekdaysMin;
2997
+ }),
2998
+ (bn.weekdaysShort = function (e) {
2999
+ return !0 === e
3000
+ ? He(this._weekdaysShort, this._week.dow)
3001
+ : e
3002
+ ? this._weekdaysShort[e.day()]
3003
+ : this._weekdaysShort;
3004
+ }),
3005
+ (bn.weekdaysParse = function (e, t, n) {
3006
+ var r, o, a;
3007
+ if (this._weekdaysParseExact) return Ge.call(this, e, t, n);
3008
+ for (
3009
+ this._weekdaysParse ||
3010
+ ((this._weekdaysParse = []),
3011
+ (this._minWeekdaysParse = []),
3012
+ (this._shortWeekdaysParse = []),
3013
+ (this._fullWeekdaysParse = [])),
3014
+ r = 0;
3015
+ r < 7;
3016
+ r++
3017
+ ) {
3018
+ if (
3019
+ ((o = f([2e3, 1]).day(r)),
3020
+ n &&
3021
+ !this._fullWeekdaysParse[r] &&
3022
+ ((this._fullWeekdaysParse[r] = new RegExp(
3023
+ "^" + this.weekdays(o, "").replace(".", "\\.?") + "$",
3024
+ "i"
3025
+ )),
3026
+ (this._shortWeekdaysParse[r] = new RegExp(
3027
+ "^" + this.weekdaysShort(o, "").replace(".", "\\.?") + "$",
3028
+ "i"
3029
+ )),
3030
+ (this._minWeekdaysParse[r] = new RegExp(
3031
+ "^" + this.weekdaysMin(o, "").replace(".", "\\.?") + "$",
3032
+ "i"
3033
+ ))),
3034
+ this._weekdaysParse[r] ||
3035
+ ((a =
3036
+ "^" +
3037
+ this.weekdays(o, "") +
3038
+ "|^" +
3039
+ this.weekdaysShort(o, "") +
3040
+ "|^" +
3041
+ this.weekdaysMin(o, "")),
3042
+ (this._weekdaysParse[r] = new RegExp(
3043
+ a.replace(".", ""),
3044
+ "i"
3045
+ ))),
3046
+ n && "dddd" === t && this._fullWeekdaysParse[r].test(e))
3047
+ )
3048
+ return r;
3049
+ if (n && "ddd" === t && this._shortWeekdaysParse[r].test(e))
3050
+ return r;
3051
+ if (n && "dd" === t && this._minWeekdaysParse[r].test(e))
3052
+ return r;
3053
+ if (!n && this._weekdaysParse[r].test(e)) return r;
3054
+ }
3055
+ }),
3056
+ (bn.weekdaysRegex = function (e) {
3057
+ return this._weekdaysParseExact
3058
+ ? (s(this, "_weekdaysRegex") || Je.call(this),
3059
+ e ? this._weekdaysStrictRegex : this._weekdaysRegex)
3060
+ : (s(this, "_weekdaysRegex") || (this._weekdaysRegex = Ve),
3061
+ this._weekdaysStrictRegex && e
3062
+ ? this._weekdaysStrictRegex
3063
+ : this._weekdaysRegex);
3064
+ }),
3065
+ (bn.weekdaysShortRegex = function (e) {
3066
+ return this._weekdaysParseExact
3067
+ ? (s(this, "_weekdaysRegex") || Je.call(this),
3068
+ e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex)
3069
+ : (s(this, "_weekdaysShortRegex") ||
3070
+ (this._weekdaysShortRegex = We),
3071
+ this._weekdaysShortStrictRegex && e
3072
+ ? this._weekdaysShortStrictRegex
3073
+ : this._weekdaysShortRegex);
3074
+ }),
3075
+ (bn.weekdaysMinRegex = function (e) {
3076
+ return this._weekdaysParseExact
3077
+ ? (s(this, "_weekdaysRegex") || Je.call(this),
3078
+ e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex)
3079
+ : (s(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = qe),
3080
+ this._weekdaysMinStrictRegex && e
3081
+ ? this._weekdaysMinStrictRegex
3082
+ : this._weekdaysMinRegex);
3083
+ }),
3084
+ (bn.isPM = function (e) {
3085
+ return "p" === (e + "").toLowerCase().charAt(0);
3086
+ }),
3087
+ (bn.meridiem = function (e, t, n) {
3088
+ return e > 11 ? (n ? "pm" : "PM") : n ? "am" : "AM";
3089
+ }),
3090
+ it("en", {
3091
+ eras: [
3092
+ {
3093
+ since: "0001-01-01",
3094
+ until: 1 / 0,
3095
+ offset: 1,
3096
+ name: "Anno Domini",
3097
+ narrow: "AD",
3098
+ abbr: "AD",
3099
+ },
3100
+ {
3101
+ since: "0000-12-31",
3102
+ until: -1 / 0,
3103
+ offset: 1,
3104
+ name: "Before Christ",
3105
+ narrow: "BC",
3106
+ abbr: "BC",
3107
+ },
3108
+ ],
3109
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
3110
+ ordinal: function (e) {
3111
+ var t = e % 10;
3112
+ return (
3113
+ e +
3114
+ (1 === G((e % 100) / 10)
3115
+ ? "th"
3116
+ : 1 === t
3117
+ ? "st"
3118
+ : 2 === t
3119
+ ? "nd"
3120
+ : 3 === t
3121
+ ? "rd"
3122
+ : "th")
3123
+ );
3124
+ },
3125
+ }),
3126
+ (o.lang = M(
3127
+ "moment.lang is deprecated. Use moment.locale instead.",
3128
+ it
3129
+ )),
3130
+ (o.langData = M(
3131
+ "moment.langData is deprecated. Use moment.localeData instead.",
3132
+ lt
3133
+ ));
3134
+ var xn = Math.abs;
3135
+ function Mn(e, t, n, r) {
3136
+ var o = Bt(t, n);
3137
+ return (
3138
+ (e._milliseconds += r * o._milliseconds),
3139
+ (e._days += r * o._days),
3140
+ (e._months += r * o._months),
3141
+ e._bubble()
3142
+ );
3143
+ }
3144
+ function En(e) {
3145
+ return e < 0 ? Math.floor(e) : Math.ceil(e);
3146
+ }
3147
+ function Tn(e) {
3148
+ return (4800 * e) / 146097;
3149
+ }
3150
+ function Sn(e) {
3151
+ return (146097 * e) / 4800;
3152
+ }
3153
+ function Dn(e) {
3154
+ return function () {
3155
+ return this.as(e);
3156
+ };
3157
+ }
3158
+ var Ln = Dn("ms"),
3159
+ Cn = Dn("s"),
3160
+ Pn = Dn("m"),
3161
+ On = Dn("h"),
3162
+ Nn = Dn("d"),
3163
+ An = Dn("w"),
3164
+ In = Dn("M"),
3165
+ Rn = Dn("Q"),
3166
+ Yn = Dn("y");
3167
+ function jn(e) {
3168
+ return function () {
3169
+ return this.isValid() ? this._data[e] : NaN;
3170
+ };
3171
+ }
3172
+ var Fn = jn("milliseconds"),
3173
+ Hn = jn("seconds"),
3174
+ zn = jn("minutes"),
3175
+ Bn = jn("hours"),
3176
+ Un = jn("days"),
3177
+ Vn = jn("months"),
3178
+ Wn = jn("years"),
3179
+ qn = Math.round,
3180
+ Gn = { ss: 44, s: 45, m: 45, h: 22, d: 26, w: null, M: 11 };
3181
+ function Jn(e, t, n, r, o) {
3182
+ return o.relativeTime(t || 1, !!n, e, r);
3183
+ }
3184
+ var Kn = Math.abs;
3185
+ function Qn(e) {
3186
+ return (e > 0) - (e < 0) || +e;
3187
+ }
3188
+ function Xn() {
3189
+ if (!this.isValid()) return this.localeData().invalidDate();
3190
+ var e,
3191
+ t,
3192
+ n,
3193
+ r,
3194
+ o,
3195
+ a,
3196
+ i,
3197
+ s,
3198
+ l = Kn(this._milliseconds) / 1e3,
3199
+ c = Kn(this._days),
3200
+ u = Kn(this._months),
3201
+ d = this.asSeconds();
3202
+ return d
3203
+ ? ((e = q(l / 60)),
3204
+ (t = q(e / 60)),
3205
+ (l %= 60),
3206
+ (e %= 60),
3207
+ (n = q(u / 12)),
3208
+ (u %= 12),
3209
+ (r = l ? l.toFixed(3).replace(/\.?0+$/, "") : ""),
3210
+ (o = d < 0 ? "-" : ""),
3211
+ (a = Qn(this._months) !== Qn(d) ? "-" : ""),
3212
+ (i = Qn(this._days) !== Qn(d) ? "-" : ""),
3213
+ (s = Qn(this._milliseconds) !== Qn(d) ? "-" : ""),
3214
+ o +
3215
+ "P" +
3216
+ (n ? a + n + "Y" : "") +
3217
+ (u ? a + u + "M" : "") +
3218
+ (c ? i + c + "D" : "") +
3219
+ (t || e || l ? "T" : "") +
3220
+ (t ? s + t + "H" : "") +
3221
+ (e ? s + e + "M" : "") +
3222
+ (l ? s + r + "S" : ""))
3223
+ : "P0D";
3224
+ }
3225
+ var $n = Pt.prototype;
3226
+ return (
3227
+ ($n.isValid = function () {
3228
+ return this._isValid;
3229
+ }),
3230
+ ($n.abs = function () {
3231
+ var e = this._data;
3232
+ return (
3233
+ (this._milliseconds = xn(this._milliseconds)),
3234
+ (this._days = xn(this._days)),
3235
+ (this._months = xn(this._months)),
3236
+ (e.milliseconds = xn(e.milliseconds)),
3237
+ (e.seconds = xn(e.seconds)),
3238
+ (e.minutes = xn(e.minutes)),
3239
+ (e.hours = xn(e.hours)),
3240
+ (e.months = xn(e.months)),
3241
+ (e.years = xn(e.years)),
3242
+ this
3243
+ );
3244
+ }),
3245
+ ($n.add = function (e, t) {
3246
+ return Mn(this, e, t, 1);
3247
+ }),
3248
+ ($n.subtract = function (e, t) {
3249
+ return Mn(this, e, t, -1);
3250
+ }),
3251
+ ($n.as = function (e) {
3252
+ if (!this.isValid()) return NaN;
3253
+ var t,
3254
+ n,
3255
+ r = this._milliseconds;
3256
+ if ("month" === (e = z(e)) || "quarter" === e || "year" === e)
3257
+ switch (
3258
+ ((t = this._days + r / 864e5), (n = this._months + Tn(t)), e)
3259
+ ) {
3260
+ case "month":
3261
+ return n;
3262
+ case "quarter":
3263
+ return n / 3;
3264
+ case "year":
3265
+ return n / 12;
3266
+ }
3267
+ else
3268
+ switch (((t = this._days + Math.round(Sn(this._months))), e)) {
3269
+ case "week":
3270
+ return t / 7 + r / 6048e5;
3271
+ case "day":
3272
+ return t + r / 864e5;
3273
+ case "hour":
3274
+ return 24 * t + r / 36e5;
3275
+ case "minute":
3276
+ return 1440 * t + r / 6e4;
3277
+ case "second":
3278
+ return 86400 * t + r / 1e3;
3279
+ case "millisecond":
3280
+ return Math.floor(864e5 * t) + r;
3281
+ default:
3282
+ throw new Error("Unknown unit " + e);
3283
+ }
3284
+ }),
3285
+ ($n.asMilliseconds = Ln),
3286
+ ($n.asSeconds = Cn),
3287
+ ($n.asMinutes = Pn),
3288
+ ($n.asHours = On),
3289
+ ($n.asDays = Nn),
3290
+ ($n.asWeeks = An),
3291
+ ($n.asMonths = In),
3292
+ ($n.asQuarters = Rn),
3293
+ ($n.asYears = Yn),
3294
+ ($n.valueOf = function () {
3295
+ return this.isValid()
3296
+ ? this._milliseconds +
3297
+ 864e5 * this._days +
3298
+ (this._months % 12) * 2592e6 +
3299
+ 31536e6 * G(this._months / 12)
3300
+ : NaN;
3301
+ }),
3302
+ ($n._bubble = function () {
3303
+ var e,
3304
+ t,
3305
+ n,
3306
+ r,
3307
+ o,
3308
+ a = this._milliseconds,
3309
+ i = this._days,
3310
+ s = this._months,
3311
+ l = this._data;
3312
+ return (
3313
+ (a >= 0 && i >= 0 && s >= 0) ||
3314
+ (a <= 0 && i <= 0 && s <= 0) ||
3315
+ ((a += 864e5 * En(Sn(s) + i)), (i = 0), (s = 0)),
3316
+ (l.milliseconds = a % 1e3),
3317
+ (e = q(a / 1e3)),
3318
+ (l.seconds = e % 60),
3319
+ (t = q(e / 60)),
3320
+ (l.minutes = t % 60),
3321
+ (n = q(t / 60)),
3322
+ (l.hours = n % 24),
3323
+ (i += q(n / 24)),
3324
+ (o = q(Tn(i))),
3325
+ (s += o),
3326
+ (i -= En(Sn(o))),
3327
+ (r = q(s / 12)),
3328
+ (s %= 12),
3329
+ (l.days = i),
3330
+ (l.months = s),
3331
+ (l.years = r),
3332
+ this
3333
+ );
3334
+ }),
3335
+ ($n.clone = function () {
3336
+ return Bt(this);
3337
+ }),
3338
+ ($n.get = function (e) {
3339
+ return (e = z(e)), this.isValid() ? this[e + "s"]() : NaN;
3340
+ }),
3341
+ ($n.milliseconds = Fn),
3342
+ ($n.seconds = Hn),
3343
+ ($n.minutes = zn),
3344
+ ($n.hours = Bn),
3345
+ ($n.days = Un),
3346
+ ($n.weeks = function () {
3347
+ return q(this.days() / 7);
3348
+ }),
3349
+ ($n.months = Vn),
3350
+ ($n.years = Wn),
3351
+ ($n.humanize = function (e, t) {
3352
+ if (!this.isValid()) return this.localeData().invalidDate();
3353
+ var n,
3354
+ r,
3355
+ o = !1,
3356
+ a = Gn;
3357
+ return (
3358
+ "object" == typeof e && ((t = e), (e = !1)),
3359
+ "boolean" == typeof e && (o = e),
3360
+ "object" == typeof t &&
3361
+ ((a = Object.assign({}, Gn, t)),
3362
+ null != t.s && null == t.ss && (a.ss = t.s - 1)),
3363
+ (n = this.localeData()),
3364
+ (r = (function (e, t, n, r) {
3365
+ var o = Bt(e).abs(),
3366
+ a = qn(o.as("s")),
3367
+ i = qn(o.as("m")),
3368
+ s = qn(o.as("h")),
3369
+ l = qn(o.as("d")),
3370
+ c = qn(o.as("M")),
3371
+ u = qn(o.as("w")),
3372
+ d = qn(o.as("y")),
3373
+ h =
3374
+ (a <= n.ss && ["s", a]) ||
3375
+ (a < n.s && ["ss", a]) ||
3376
+ (i <= 1 && ["m"]) ||
3377
+ (i < n.m && ["mm", i]) ||
3378
+ (s <= 1 && ["h"]) ||
3379
+ (s < n.h && ["hh", s]) ||
3380
+ (l <= 1 && ["d"]) ||
3381
+ (l < n.d && ["dd", l]);
3382
+ return (
3383
+ null != n.w &&
3384
+ (h = h || (u <= 1 && ["w"]) || (u < n.w && ["ww", u])),
3385
+ ((h = h ||
3386
+ (c <= 1 && ["M"]) ||
3387
+ (c < n.M && ["MM", c]) ||
3388
+ (d <= 1 && ["y"]) || ["yy", d])[2] = t),
3389
+ (h[3] = +e > 0),
3390
+ (h[4] = r),
3391
+ Jn.apply(null, h)
3392
+ );
3393
+ })(this, !o, a, n)),
3394
+ o && (r = n.pastFuture(+this, r)),
3395
+ n.postformat(r)
3396
+ );
3397
+ }),
3398
+ ($n.toISOString = Xn),
3399
+ ($n.toString = Xn),
3400
+ ($n.toJSON = Xn),
3401
+ ($n.locale = Zt),
3402
+ ($n.localeData = tn),
3403
+ ($n.toIsoString = M(
3404
+ "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
3405
+ Xn
3406
+ )),
3407
+ ($n.lang = en),
3408
+ R("X", 0, 0, "unix"),
3409
+ R("x", 0, 0, "valueOf"),
3410
+ fe("x", ue),
3411
+ fe("X", /[+-]?\d+(\.\d{1,3})?/),
3412
+ be("X", function (e, t, n) {
3413
+ n._d = new Date(1e3 * parseFloat(e));
3414
+ }),
3415
+ be("x", function (e, t, n) {
3416
+ n._d = new Date(G(e));
3417
+ }),
3418
+ //! moment.js
3419
+ (o.version = "2.29.1"),
3420
+ (t = Tt),
3421
+ (o.fn = _n),
3422
+ (o.min = function () {
3423
+ var e = [].slice.call(arguments, 0);
3424
+ return Lt("isBefore", e);
3425
+ }),
3426
+ (o.max = function () {
3427
+ var e = [].slice.call(arguments, 0);
3428
+ return Lt("isAfter", e);
3429
+ }),
3430
+ (o.now = function () {
3431
+ return Date.now ? Date.now() : +new Date();
3432
+ }),
3433
+ (o.utc = f),
3434
+ (o.unix = function (e) {
3435
+ return Tt(1e3 * e);
3436
+ }),
3437
+ (o.months = function (e, t) {
3438
+ return wn(e, t, "months");
3439
+ }),
3440
+ (o.isDate = d),
3441
+ (o.locale = it),
3442
+ (o.invalid = _),
3443
+ (o.duration = Bt),
3444
+ (o.isMoment = k),
3445
+ (o.weekdays = function (e, t, n) {
3446
+ return kn(e, t, n, "weekdays");
3447
+ }),
3448
+ (o.parseZone = function () {
3449
+ return Tt.apply(null, arguments).parseZone();
3450
+ }),
3451
+ (o.localeData = lt),
3452
+ (o.isDuration = Ot),
3453
+ (o.monthsShort = function (e, t) {
3454
+ return wn(e, t, "monthsShort");
3455
+ }),
3456
+ (o.weekdaysMin = function (e, t, n) {
3457
+ return kn(e, t, n, "weekdaysMin");
3458
+ }),
3459
+ (o.defineLocale = st),
3460
+ (o.updateLocale = function (e, t) {
3461
+ if (null != t) {
3462
+ var n,
3463
+ r,
3464
+ o = et;
3465
+ null != tt[e] && null != tt[e].parentLocale
3466
+ ? tt[e].set(L(tt[e]._config, t))
3467
+ : (null != (r = at(e)) && (o = r._config),
3468
+ (t = L(o, t)),
3469
+ null == r && (t.abbr = e),
3470
+ ((n = new C(t)).parentLocale = tt[e]),
3471
+ (tt[e] = n)),
3472
+ it(e);
3473
+ } else
3474
+ null != tt[e] &&
3475
+ (null != tt[e].parentLocale
3476
+ ? ((tt[e] = tt[e].parentLocale), e === it() && it(e))
3477
+ : null != tt[e] && delete tt[e]);
3478
+ return tt[e];
3479
+ }),
3480
+ (o.locales = function () {
3481
+ return E(tt);
3482
+ }),
3483
+ (o.weekdaysShort = function (e, t, n) {
3484
+ return kn(e, t, n, "weekdaysShort");
3485
+ }),
3486
+ (o.normalizeUnits = z),
3487
+ (o.relativeTimeRounding = function (e) {
3488
+ return void 0 === e ? qn : "function" == typeof e && ((qn = e), !0);
3489
+ }),
3490
+ (o.relativeTimeThreshold = function (e, t) {
3491
+ return (
3492
+ void 0 !== Gn[e] &&
3493
+ (void 0 === t
3494
+ ? Gn[e]
3495
+ : ((Gn[e] = t), "s" === e && (Gn.ss = t - 1), !0))
3496
+ );
3497
+ }),
3498
+ (o.calendarFormat = function (e, t) {
3499
+ var n = e.diff(t, "days", !0);
3500
+ return n < -6
3501
+ ? "sameElse"
3502
+ : n < -1
3503
+ ? "lastWeek"
3504
+ : n < 0
3505
+ ? "lastDay"
3506
+ : n < 1
3507
+ ? "sameDay"
3508
+ : n < 2
3509
+ ? "nextDay"
3510
+ : n < 7
3511
+ ? "nextWeek"
3512
+ : "sameElse";
3513
+ }),
3514
+ (o.prototype = _n),
3515
+ (o.HTML5_FMT = {
3516
+ DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
3517
+ DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
3518
+ DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
3519
+ DATE: "YYYY-MM-DD",
3520
+ TIME: "HH:mm",
3521
+ TIME_SECONDS: "HH:mm:ss",
3522
+ TIME_MS: "HH:mm:ss.SSS",
3523
+ WEEK: "GGGG-[W]WW",
3524
+ MONTH: "YYYY-MM",
3525
+ }),
3526
+ o
3527
+ );
3528
+ })();
3529
+ }.call(this, n(64)(e)));
3530
+ },
3531
+ function (e, t, n) {
3532
+ e.exports = n(261);
3533
+ },
3534
+ function (e, t, n) {
3535
+ "use strict";
3536
+ n.r(t),
3537
+ n.d(t, "default", function () {
3538
+ return o;
3539
+ });
3540
+ var r = n(2);
3541
+ function o(e) {
3542
+ Object(r.a)(1, arguments);
3543
+ var t = Object.prototype.toString.call(e);
3544
+ return e instanceof Date ||
3545
+ ("object" == typeof e && "[object Date]" === t)
3546
+ ? new Date(e.getTime())
3547
+ : "number" == typeof e || "[object Number]" === t
3548
+ ? new Date(e)
3549
+ : (("string" != typeof e && "[object String]" !== t) ||
3550
+ "undefined" == typeof console ||
3551
+ (console.warn(
3552
+ "Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"
3553
+ ),
3554
+ console.warn(new Error().stack)),
3555
+ new Date(NaN));
3556
+ }
3557
+ },
3558
+ function (e, t) {
3559
+ function n(t) {
3560
+ return (
3561
+ (e.exports = n = Object.setPrototypeOf
3562
+ ? Object.getPrototypeOf
3563
+ : function (e) {
3564
+ return e.__proto__ || Object.getPrototypeOf(e);
3565
+ }),
3566
+ n(t)
3567
+ );
3568
+ }
3569
+ e.exports = n;
3570
+ },
3571
+ function (e, t, n) {
3572
+ "use strict";
3573
+ function r(e) {
3574
+ if (null === e || !0 === e || !1 === e) return NaN;
3575
+ var t = Number(e);
3576
+ return isNaN(t) ? t : t < 0 ? Math.ceil(t) : Math.floor(t);
3577
+ }
3578
+ n.d(t, "a", function () {
3579
+ return r;
3580
+ });
3581
+ },
3582
+ function (e, t) {
3583
+ function n(e, t, n, r, o, a, i) {
3584
+ try {
3585
+ var s = e[a](i),
3586
+ l = s.value;
3587
+ } catch (e) {
3588
+ return void n(e);
3589
+ }
3590
+ s.done ? t(l) : Promise.resolve(l).then(r, o);
3591
+ }
3592
+ e.exports = function (e) {
3593
+ return function () {
3594
+ var t = this,
3595
+ r = arguments;
3596
+ return new Promise(function (o, a) {
3597
+ var i = e.apply(t, r);
3598
+ function s(e) {
3599
+ n(i, o, a, s, l, "next", e);
3600
+ }
3601
+ function l(e) {
3602
+ n(i, o, a, s, l, "throw", e);
3603
+ }
3604
+ s(void 0);
3605
+ });
3606
+ };
3607
+ };
3608
+ },
3609
+ function (e, t, n) {
3610
+ e.exports = n(262);
3611
+ },
3612
+ function (e, t) {
3613
+ e.exports = function (e) {
3614
+ if (void 0 === e)
3615
+ throw new ReferenceError(
3616
+ "this hasn't been initialised - super() hasn't been called"
3617
+ );
3618
+ return e;
3619
+ };
3620
+ },
3621
+ function (e, t, n) {
3622
+ "use strict";
3623
+ t.__esModule = !0;
3624
+ var r = l(n(279));
3625
+ t.ToastContainer = r.default;
3626
+ var o = n(91);
3627
+ (t.Bounce = o.Bounce),
3628
+ (t.Slide = o.Slide),
3629
+ (t.Zoom = o.Zoom),
3630
+ (t.Flip = o.Flip);
3631
+ var a = n(34);
3632
+ (t.ToastPosition = a.POSITION), (t.ToastType = a.TYPE);
3633
+ var i = l(n(289));
3634
+ t.toast = i.default;
3635
+ var s = l(n(92));
3636
+ function l(e) {
3637
+ return e && e.__esModule ? e : { default: e };
3638
+ }
3639
+ t.cssTransition = s.default;
3640
+ },
3641
+ function (e, t) {
3642
+ e.exports = function (e, t) {
3643
+ if (!(e instanceof t))
3644
+ throw new TypeError("Cannot call a class as a function");
3645
+ };
3646
+ },
3647
+ function (e, t) {
3648
+ function n(e, t) {
3649
+ for (var n = 0; n < t.length; n++) {
3650
+ var r = t[n];
3651
+ (r.enumerable = r.enumerable || !1),
3652
+ (r.configurable = !0),
3653
+ "value" in r && (r.writable = !0),
3654
+ Object.defineProperty(e, r.key, r);
3655
+ }
3656
+ }
3657
+ e.exports = function (e, t, r) {
3658
+ return t && n(e.prototype, t), r && n(e, r), e;
3659
+ };
3660
+ },
3661
+ function (e, t, n) {
3662
+ var r = n(259);
3663
+ e.exports = function (e, t) {
3664
+ if ("function" != typeof t && null !== t)
3665
+ throw new TypeError(
3666
+ "Super expression must either be null or a function"
3667
+ );
3668
+ (e.prototype = Object.create(t && t.prototype, {
3669
+ constructor: { value: e, writable: !0, configurable: !0 },
3670
+ })),
3671
+ t && r(e, t);
3672
+ };
3673
+ },
3674
+ function (e, t, n) {
3675
+ var r = n(260),
3676
+ o = n(10);
3677
+ e.exports = function (e, t) {
3678
+ return !t || ("object" !== r(t) && "function" != typeof t) ? o(e) : t;
3679
+ };
3680
+ },
3681
+ function (e, t, n) {
3682
+ "use strict";
3683
+ var r = n(84),
3684
+ o = n(263),
3685
+ a = Object.prototype.toString;
3686
+ function i(e) {
3687
+ return "[object Array]" === a.call(e);
3688
+ }
3689
+ function s(e) {
3690
+ return null !== e && "object" == typeof e;
3691
+ }
3692
+ function l(e) {
3693
+ return "[object Function]" === a.call(e);
3694
+ }
3695
+ function c(e, t) {
3696
+ if (null != e)
3697
+ if (("object" != typeof e && (e = [e]), i(e)))
3698
+ for (var n = 0, r = e.length; n < r; n++) t.call(null, e[n], n, e);
3699
+ else
3700
+ for (var o in e)
3701
+ Object.prototype.hasOwnProperty.call(e, o) &&
3702
+ t.call(null, e[o], o, e);
3703
+ }
3704
+ e.exports = {
3705
+ isArray: i,
3706
+ isArrayBuffer: function (e) {
3707
+ return "[object ArrayBuffer]" === a.call(e);
3708
+ },
3709
+ isBuffer: o,
3710
+ isFormData: function (e) {
3711
+ return "undefined" != typeof FormData && e instanceof FormData;
3712
+ },
3713
+ isArrayBufferView: function (e) {
3714
+ return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView
3715
+ ? ArrayBuffer.isView(e)
3716
+ : e && e.buffer && e.buffer instanceof ArrayBuffer;
3717
+ },
3718
+ isString: function (e) {
3719
+ return "string" == typeof e;
3720
+ },
3721
+ isNumber: function (e) {
3722
+ return "number" == typeof e;
3723
+ },
3724
+ isObject: s,
3725
+ isUndefined: function (e) {
3726
+ return void 0 === e;
3727
+ },
3728
+ isDate: function (e) {
3729
+ return "[object Date]" === a.call(e);
3730
+ },
3731
+ isFile: function (e) {
3732
+ return "[object File]" === a.call(e);
3733
+ },
3734
+ isBlob: function (e) {
3735
+ return "[object Blob]" === a.call(e);
3736
+ },
3737
+ isFunction: l,
3738
+ isStream: function (e) {
3739
+ return s(e) && l(e.pipe);
3740
+ },
3741
+ isURLSearchParams: function (e) {
3742
+ return (
3743
+ "undefined" != typeof URLSearchParams && e instanceof URLSearchParams
3744
+ );
3745
+ },
3746
+ isStandardBrowserEnv: function () {
3747
+ return (
3748
+ ("undefined" == typeof navigator ||
3749
+ "ReactNative" !== navigator.product) &&
3750
+ "undefined" != typeof window &&
3751
+ "undefined" != typeof document
3752
+ );
3753
+ },
3754
+ forEach: c,
3755
+ merge: function e() {
3756
+ var t = {};
3757
+ function n(n, r) {
3758
+ "object" == typeof t[r] && "object" == typeof n
3759
+ ? (t[r] = e(t[r], n))
3760
+ : (t[r] = n);
3761
+ }
3762
+ for (var r = 0, o = arguments.length; r < o; r++) c(arguments[r], n);
3763
+ return t;
3764
+ },
3765
+ extend: function (e, t, n) {
3766
+ return (
3767
+ c(t, function (t, o) {
3768
+ e[o] = n && "function" == typeof t ? r(t, n) : t;
3769
+ }),
3770
+ e
3771
+ );
3772
+ },
3773
+ trim: function (e) {
3774
+ return e.replace(/^\s*/, "").replace(/\s*$/, "");
3775
+ },
3776
+ };
3777
+ },
3778
+ function (e, t, n) {
3779
+ "use strict";
3780
+ n.r(t),
3781
+ n.d(t, "default", function () {
3782
+ return i;
3783
+ });
3784
+ var r = n(5),
3785
+ o = n(7),
3786
+ a = n(2);
3787
+ function i(e, t) {
3788
+ Object(a.a)(1, arguments);
3789
+ var n = t || {},
3790
+ i = n.locale,
3791
+ s = i && i.options && i.options.weekStartsOn,
3792
+ l = null == s ? 0 : Object(o.a)(s),
3793
+ c = null == n.weekStartsOn ? l : Object(o.a)(n.weekStartsOn);
3794
+ if (!(c >= 0 && c <= 6))
3795
+ throw new RangeError(
3796
+ "weekStartsOn must be between 0 and 6 inclusively"
3797
+ );
3798
+ var u = Object(r.default)(e),
3799
+ d = u.getDay(),
3800
+ h = (d < c ? 7 : 0) + d - c;
3801
+ return u.setDate(u.getDate() - h), u.setHours(0, 0, 0, 0), u;
3802
+ }
3803
+ },
3804
+ function (e, t, n) {
3805
+ "use strict";
3806
+ n.d(t, "a", function () {
3807
+ return i;
3808
+ });
3809
+ var r = n(7),
3810
+ o = n(5),
3811
+ a = n(2);
3812
+ function i(e, t) {
3813
+ Object(a.a)(1, arguments);
3814
+ var n = t || {},
3815
+ i = n.locale,
3816
+ s = i && i.options && i.options.weekStartsOn,
3817
+ l = null == s ? 0 : Object(r.a)(s),
3818
+ c = null == n.weekStartsOn ? l : Object(r.a)(n.weekStartsOn);
3819
+ if (!(c >= 0 && c <= 6))
3820
+ throw new RangeError(
3821
+ "weekStartsOn must be between 0 and 6 inclusively"
3822
+ );
3823
+ var u = Object(o.default)(e),
3824
+ d = u.getUTCDay(),
3825
+ h = (d < c ? 7 : 0) + d - c;
3826
+ return u.setUTCDate(u.getUTCDate() - h), u.setUTCHours(0, 0, 0, 0), u;
3827
+ }
3828
+ },
3829
+ function (e, t, n) {
3830
+ e.exports = n(280)();
3831
+ },
3832
+ function (e, t, n) {
3833
+ "use strict";
3834
+ n.d(t, "a", function () {
3835
+ return o;
3836
+ });
3837
+ function r(e) {
3838
+ return e.getTime() % 6e4;
3839
+ }
3840
+ function o(e) {
3841
+ var t = new Date(e.getTime()),
3842
+ n = Math.ceil(t.getTimezoneOffset());
3843
+ return t.setSeconds(0, 0), 6e4 * n + (n > 0 ? (6e4 + r(t)) % 6e4 : r(t));
3844
+ }
3845
+ },
3846
+ function (e, t, n) {
3847
+ "use strict";
3848
+ n.d(t, "a", function () {
3849
+ return a;
3850
+ });
3851
+ var r = n(5),
3852
+ o = n(2);
3853
+ function a(e) {
3854
+ Object(o.a)(1, arguments);
3855
+ var t = 1,
3856
+ n = Object(r.default)(e),
3857
+ a = n.getUTCDay(),
3858
+ i = (a < t ? 7 : 0) + a - t;
3859
+ return n.setUTCDate(n.getUTCDate() - i), n.setUTCHours(0, 0, 0, 0), n;
3860
+ }
3861
+ },
3862
+ function (e, t, n) {
3863
+ "use strict";
3864
+ n.d(t, "a", function () {
3865
+ return a;
3866
+ }),
3867
+ n.d(t, "b", function () {
3868
+ return i;
3869
+ }),
3870
+ n.d(t, "c", function () {
3871
+ return s;
3872
+ });
3873
+ var r = ["D", "DD"],
3874
+ o = ["YY", "YYYY"];
3875
+ function a(e) {
3876
+ return -1 !== r.indexOf(e);
3877
+ }
3878
+ function i(e) {
3879
+ return -1 !== o.indexOf(e);
3880
+ }
3881
+ function s(e, t, n) {
3882
+ if ("YYYY" === e)
3883
+ throw new RangeError(
3884
+ "Use `yyyy` instead of `YYYY` (in `"
3885
+ .concat(t, "`) for formatting years to the input `")
3886
+ .concat(n, "`; see: https://git.io/fxCyr")
3887
+ );
3888
+ if ("YY" === e)
3889
+ throw new RangeError(
3890
+ "Use `yy` instead of `YY` (in `"
3891
+ .concat(t, "`) for formatting years to the input `")
3892
+ .concat(n, "`; see: https://git.io/fxCyr")
3893
+ );
3894
+ if ("D" === e)
3895
+ throw new RangeError(
3896
+ "Use `d` instead of `D` (in `"
3897
+ .concat(t, "`) for formatting days of the month to the input `")
3898
+ .concat(n, "`; see: https://git.io/fxCyr")
3899
+ );
3900
+ if ("DD" === e)
3901
+ throw new RangeError(
3902
+ "Use `dd` instead of `DD` (in `"
3903
+ .concat(t, "`) for formatting days of the month to the input `")
3904
+ .concat(n, "`; see: https://git.io/fxCyr")
3905
+ );
3906
+ }
3907
+ },
3908
+ function (e, t, n) {
3909
+ "use strict";
3910
+ Object.defineProperty(t, "__esModule", { value: !0 }),
3911
+ Object.defineProperty(t, "Draggable", {
3912
+ enumerable: !0,
3913
+ get: function () {
3914
+ return r.default;
3915
+ },
3916
+ }),
3917
+ Object.defineProperty(t, "Droppable", {
3918
+ enumerable: !0,
3919
+ get: function () {
3920
+ return o.default;
3921
+ },
3922
+ });
3923
+ var r = a(n(447)),
3924
+ o = a(n(448));
3925
+ function a(e) {
3926
+ return e && e.__esModule ? e : { default: e };
3927
+ }
3928
+ },
3929
+ function (e, t, n) {
3930
+ var r = n(241),
3931
+ o = "object" == typeof self && self && self.Object === Object && self,
3932
+ a = r || o || Function("return this")();
3933
+ e.exports = a;
3934
+ },
3935
+ function (e, t) {
3936
+ var n = Array.isArray;
3937
+ e.exports = n;
3938
+ },
3939
+ function (e, t, n) {
3940
+ "use strict";
3941
+ /*!
3942
+ * react-filepond v5.0.0
3943
+ * A handy FilePond adapter component for React
3944
+ *
3945
+ * Copyright (c) 2018 PQINA
3946
+ * https://pqina.nl/filepond
3947
+ *
3948
+ * Licensed under the MIT license.
3949
+ */ Object.defineProperty(t, "__esModule", { value: !0 }),
3950
+ (t.File = t.FilePond = t.registerPlugin = void 0);
3951
+ var r,
3952
+ o = (function () {
3953
+ function e(e, t) {
3954
+ for (var n = 0; n < t.length; n++) {
3955
+ var r = t[n];
3956
+ (r.enumerable = r.enumerable || !1),
3957
+ (r.configurable = !0),
3958
+ "value" in r && (r.writable = !0),
3959
+ Object.defineProperty(e, r.key, r);
3960
+ }
3961
+ }
3962
+ return function (t, n, r) {
3963
+ return n && e(t.prototype, n), r && e(t, r), t;
3964
+ };
3965
+ })(),
3966
+ a = n(0),
3967
+ i = (r = a) && r.__esModule ? r : { default: r },
3968
+ s = n(446);
3969
+ function l(e, t) {
3970
+ if (!(e instanceof t))
3971
+ throw new TypeError("Cannot call a class as a function");
3972
+ }
3973
+ function c(e, t) {
3974
+ if (!e)
3975
+ throw new ReferenceError(
3976
+ "this hasn't been initialised - super() hasn't been called"
3977
+ );
3978
+ return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
3979
+ }
3980
+ function u(e, t) {
3981
+ if ("function" != typeof t && null !== t)
3982
+ throw new TypeError(
3983
+ "Super expression must either be null or a function, not " + typeof t
3984
+ );
3985
+ (e.prototype = Object.create(t && t.prototype, {
3986
+ constructor: {
3987
+ value: e,
3988
+ enumerable: !1,
3989
+ writable: !0,
3990
+ configurable: !0,
3991
+ },
3992
+ })),
3993
+ t &&
3994
+ (Object.setPrototypeOf
3995
+ ? Object.setPrototypeOf(e, t)
3996
+ : (e.__proto__ = t));
3997
+ }
3998
+ t.registerPlugin = s.registerPlugin;
3999
+ var d = (0, s.supported)(),
4000
+ h = function (e) {
4001
+ return e
4002
+ ? i.default.Children.map(e, function (e) {
4003
+ var t = e.props;
4004
+ if (t.src) {
4005
+ var n = {};
4006
+ return (
4007
+ t.origin && (n.type = t.origin),
4008
+ t.name &&
4009
+ (n.file = { name: t.name, size: t.size, type: t.type }),
4010
+ t.metadata && (n.metadata = t.metadata),
4011
+ { source: t.src, options: n }
4012
+ );
4013
+ }
4014
+ return t.source && t.type
4015
+ ? { source: t.source, options: { type: t.type } }
4016
+ : t.source;
4017
+ })
4018
+ : [];
4019
+ },
4020
+ p = [
4021
+ "setOptions",
4022
+ "on",
4023
+ "off",
4024
+ "onOnce",
4025
+ "appendTo",
4026
+ "insertAfter",
4027
+ "insertBefore",
4028
+ "isAttachedTo",
4029
+ "replaceElement",
4030
+ "restoreElement",
4031
+ "destroy",
4032
+ ];
4033
+ (t.FilePond = (function (e) {
4034
+ function t() {
4035
+ return (
4036
+ l(this, t),
4037
+ c(
4038
+ this,
4039
+ (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)
4040
+ )
4041
+ );
4042
+ }
4043
+ return (
4044
+ u(t, e),
4045
+ o(t, [
4046
+ {
4047
+ key: "componentDidMount",
4048
+ value: function () {
4049
+ var e = this;
4050
+ d &&
4051
+ ((this._pond = (0, s.create)(
4052
+ this._element,
4053
+ Object.assign({}, this.props, {
4054
+ files: h(this.props.children),
4055
+ })
4056
+ )),
4057
+ Object.keys(this._pond)
4058
+ .filter(function (e) {
4059
+ return !p.includes(e);
4060
+ })
4061
+ .forEach(function (t) {
4062
+ e[t] = e._pond[t];
4063
+ }));
4064
+ },
4065
+ },
4066
+ {
4067
+ key: "componentWillUnmount",
4068
+ value: function () {
4069
+ this._pond && this._pond.destroy();
4070
+ },
4071
+ },
4072
+ {
4073
+ key: "componentDidUpdate",
4074
+ value: function (e) {
4075
+ if (this._pond) {
4076
+ var t = Object.assign({}, this.props),
4077
+ n = h(e.children),
4078
+ r = h(this.props.children);
4079
+ JSON.stringify(n) !== JSON.stringify(r) && (t.files = r),
4080
+ this._pond.setOptions(t);
4081
+ }
4082
+ },
4083
+ },
4084
+ {
4085
+ key: "render",
4086
+ value: function () {
4087
+ var e = this,
4088
+ t = this.props,
4089
+ n = t.id,
4090
+ r = t.name,
4091
+ o = t.className,
4092
+ i = t.allowMultiple,
4093
+ s = t.required,
4094
+ l = t.captureMethod,
4095
+ c = t.acceptedFileTypes;
4096
+ return (0, a.createElement)(
4097
+ "div",
4098
+ { className: "filepond--wrapper" },
4099
+ (0, a.createElement)("input", {
4100
+ type: "file",
4101
+ name: r,
4102
+ id: n,
4103
+ accept: c,
4104
+ multiple: i,
4105
+ required: s,
4106
+ className: o,
4107
+ capture: l,
4108
+ ref: function (t) {
4109
+ return (e._element = t);
4110
+ },
4111
+ })
4112
+ );
4113
+ },
4114
+ },
4115
+ ]),
4116
+ t
4117
+ );
4118
+ })(i.default.Component)),
4119
+ (t.File = (function (e) {
4120
+ function t() {
4121
+ return (
4122
+ l(this, t),
4123
+ c(
4124
+ this,
4125
+ (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)
4126
+ )
4127
+ );
4128
+ }
4129
+ return u(t, e), t;
4130
+ })(i.default.Component));
4131
+ },
4132
+ function (e, t, n) {
4133
+ var r = n(366),
4134
+ o = n(371);
4135
+ e.exports = function (e, t) {
4136
+ var n = o(e, t);
4137
+ return r(n) ? n : void 0;
4138
+ };
4139
+ },
4140
+ function (e, t, n) {
4141
+ "use strict";
4142
+ n.r(t),
4143
+ n.d(t, "default", function () {
4144
+ return a;
4145
+ });
4146
+ var r = n(5),
4147
+ o = n(2);
4148
+ function a(e) {
4149
+ Object(o.a)(1, arguments);
4150
+ var t = Object(r.default)(e);
4151
+ return t.setHours(0, 0, 0, 0), t;
4152
+ }
4153
+ },
4154
+ function (e, t) {
4155
+ function n() {
4156
+ return (
4157
+ (e.exports = n =
4158
+ Object.assign ||
4159
+ function (e) {
4160
+ for (var t = 1; t < arguments.length; t++) {
4161
+ var n = arguments[t];
4162
+ for (var r in n)
4163
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
4164
+ }
4165
+ return e;
4166
+ }),
4167
+ n.apply(this, arguments)
4168
+ );
4169
+ }
4170
+ e.exports = n;
4171
+ },
4172
+ function (e, t, n) {
4173
+ "use strict";
4174
+ n.d(t, "a", function () {
4175
+ return i;
4176
+ });
4177
+ var r = n(7),
4178
+ o = n(5),
4179
+ a = n(2);
4180
+ function i(e, t) {
4181
+ Object(a.a)(2, arguments);
4182
+ var n = Object(o.default)(e).getTime(),
4183
+ i = Object(r.a)(t);
4184
+ return new Date(n + i);
4185
+ }
4186
+ },
4187
+ function (e, t, n) {
4188
+ "use strict";
4189
+ n.d(t, "a", function () {
4190
+ return s;
4191
+ });
4192
+ var r = n(7),
4193
+ o = n(5),
4194
+ a = n(18),
4195
+ i = n(2);
4196
+ function s(e, t) {
4197
+ Object(i.a)(1, arguments);
4198
+ var n = Object(o.default)(e, t),
4199
+ s = n.getUTCFullYear(),
4200
+ l = t || {},
4201
+ c = l.locale,
4202
+ u = c && c.options && c.options.firstWeekContainsDate,
4203
+ d = null == u ? 1 : Object(r.a)(u),
4204
+ h =
4205
+ null == l.firstWeekContainsDate
4206
+ ? d
4207
+ : Object(r.a)(l.firstWeekContainsDate);
4208
+ if (!(h >= 1 && h <= 7))
4209
+ throw new RangeError(
4210
+ "firstWeekContainsDate must be between 1 and 7 inclusively"
4211
+ );
4212
+ var p = new Date(0);
4213
+ p.setUTCFullYear(s + 1, 0, h), p.setUTCHours(0, 0, 0, 0);
4214
+ var f = Object(a.a)(p, t),
4215
+ m = new Date(0);
4216
+ m.setUTCFullYear(s, 0, h), m.setUTCHours(0, 0, 0, 0);
4217
+ var g = Object(a.a)(m, t);
4218
+ return n.getTime() >= f.getTime()
4219
+ ? s + 1
4220
+ : n.getTime() >= g.getTime()
4221
+ ? s
4222
+ : s - 1;
4223
+ }
4224
+ },
4225
+ function (e, t) {
4226
+ e.exports = function (e, t) {
4227
+ (e.prototype = Object.create(t.prototype)),
4228
+ (e.prototype.constructor = e),
4229
+ (e.__proto__ = t);
4230
+ };
4231
+ },
4232
+ function (e, t, n) {
4233
+ "use strict";
4234
+ /*!
4235
+ * cookie
4236
+ * Copyright(c) 2012-2014 Roman Shtylman
4237
+ * Copyright(c) 2015 Douglas Christopher Wilson
4238
+ * MIT Licensed
4239
+ */ (t.parse = function (e, t) {
4240
+ if ("string" != typeof e)
4241
+ throw new TypeError("argument str must be a string");
4242
+ for (
4243
+ var n = {}, o = t || {}, i = e.split(a), l = o.decode || r, c = 0;
4244
+ c < i.length;
4245
+ c++
4246
+ ) {
4247
+ var u = i[c],
4248
+ d = u.indexOf("=");
4249
+ if (!(d < 0)) {
4250
+ var h = u.substr(0, d).trim(),
4251
+ p = u.substr(++d, u.length).trim();
4252
+ '"' == p[0] && (p = p.slice(1, -1)), null == n[h] && (n[h] = s(p, l));
4253
+ }
4254
+ }
4255
+ return n;
4256
+ }),
4257
+ (t.serialize = function (e, t, n) {
4258
+ var r = n || {},
4259
+ a = r.encode || o;
4260
+ if ("function" != typeof a)
4261
+ throw new TypeError("option encode is invalid");
4262
+ if (!i.test(e)) throw new TypeError("argument name is invalid");
4263
+ var s = a(t);
4264
+ if (s && !i.test(s)) throw new TypeError("argument val is invalid");
4265
+ var l = e + "=" + s;
4266
+ if (null != r.maxAge) {
4267
+ var c = r.maxAge - 0;
4268
+ if (isNaN(c)) throw new Error("maxAge should be a Number");
4269
+ l += "; Max-Age=" + Math.floor(c);
4270
+ }
4271
+ if (r.domain) {
4272
+ if (!i.test(r.domain))
4273
+ throw new TypeError("option domain is invalid");
4274
+ l += "; Domain=" + r.domain;
4275
+ }
4276
+ if (r.path) {
4277
+ if (!i.test(r.path)) throw new TypeError("option path is invalid");
4278
+ l += "; Path=" + r.path;
4279
+ }
4280
+ if (r.expires) {
4281
+ if ("function" != typeof r.expires.toUTCString)
4282
+ throw new TypeError("option expires is invalid");
4283
+ l += "; Expires=" + r.expires.toUTCString();
4284
+ }
4285
+ r.httpOnly && (l += "; HttpOnly");
4286
+ r.secure && (l += "; Secure");
4287
+ if (r.sameSite) {
4288
+ switch (
4289
+ "string" == typeof r.sameSite
4290
+ ? r.sameSite.toLowerCase()
4291
+ : r.sameSite
4292
+ ) {
4293
+ case !0:
4294
+ l += "; SameSite=Strict";
4295
+ break;
4296
+ case "lax":
4297
+ l += "; SameSite=Lax";
4298
+ break;
4299
+ case "strict":
4300
+ l += "; SameSite=Strict";
4301
+ break;
4302
+ default:
4303
+ throw new TypeError("option sameSite is invalid");
4304
+ }
4305
+ }
4306
+ return l;
4307
+ });
4308
+ var r = decodeURIComponent,
4309
+ o = encodeURIComponent,
4310
+ a = /; */,
4311
+ i = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
4312
+ function s(e, t) {
4313
+ try {
4314
+ return t(e);
4315
+ } catch (t) {
4316
+ return e;
4317
+ }
4318
+ }
4319
+ },
4320
+ function (e, t, n) {
4321
+ "use strict";
4322
+ (t.__esModule = !0), (t.ACTION = t.TYPE = t.POSITION = void 0);
4323
+ t.POSITION = {
4324
+ TOP_LEFT: "top-left",
4325
+ TOP_RIGHT: "top-right",
4326
+ TOP_CENTER: "top-center",
4327
+ BOTTOM_LEFT: "bottom-left",
4328
+ BOTTOM_RIGHT: "bottom-right",
4329
+ BOTTOM_CENTER: "bottom-center",
4330
+ };
4331
+ t.TYPE = {
4332
+ INFO: "info",
4333
+ SUCCESS: "success",
4334
+ WARNING: "warning",
4335
+ ERROR: "error",
4336
+ DEFAULT: "default",
4337
+ };
4338
+ t.ACTION = {
4339
+ SHOW: 0,
4340
+ CLEAR: 1,
4341
+ DID_MOUNT: 2,
4342
+ WILL_UNMOUNT: 3,
4343
+ ON_CHANGE: 4,
4344
+ };
4345
+ },
4346
+ function (e, t) {
4347
+ var n;
4348
+ n = (function () {
4349
+ return this;
4350
+ })();
4351
+ try {
4352
+ n = n || new Function("return this")();
4353
+ } catch (e) {
4354
+ "object" == typeof window && (n = window);
4355
+ }
4356
+ e.exports = n;
4357
+ },
4358
+ function (e, t, n) {
4359
+ "use strict";
4360
+ var r = n(341);
4361
+ e.exports = Function.prototype.bind || r;
4362
+ },
4363
+ function (e, t, n) {
4364
+ "use strict";
4365
+ var r = n(230),
4366
+ o = "function" == typeof Symbol && "symbol" == typeof Symbol("foo"),
4367
+ a = Object.prototype.toString,
4368
+ i = Array.prototype.concat,
4369
+ s = Object.defineProperty,
4370
+ l =
4371
+ s &&
4372
+ (function () {
4373
+ var e = {};
4374
+ try {
4375
+ for (var t in (s(e, "x", { enumerable: !1, value: e }), e))
4376
+ return !1;
4377
+ return e.x === e;
4378
+ } catch (e) {
4379
+ return !1;
4380
+ }
4381
+ })(),
4382
+ c = function (e, t, n, r) {
4383
+ var o;
4384
+ (!(t in e) ||
4385
+ ("function" == typeof (o = r) &&
4386
+ "[object Function]" === a.call(o) &&
4387
+ r())) &&
4388
+ (l
4389
+ ? s(e, t, {
4390
+ configurable: !0,
4391
+ enumerable: !1,
4392
+ value: n,
4393
+ writable: !0,
4394
+ })
4395
+ : (e[t] = n));
4396
+ },
4397
+ u = function (e, t) {
4398
+ var n = arguments.length > 2 ? arguments[2] : {},
4399
+ a = r(t);
4400
+ o && (a = i.call(a, Object.getOwnPropertySymbols(t)));
4401
+ for (var s = 0; s < a.length; s += 1) c(e, a[s], t[a[s]], n[a[s]]);
4402
+ };
4403
+ (u.supportsDescriptors = !!l), (e.exports = u);
4404
+ },
4405
+ function (e, t, n) {
4406
+ var r = n(47),
4407
+ o = n(367),
4408
+ a = n(368),
4409
+ i = r ? r.toStringTag : void 0;
4410
+ e.exports = function (e) {
4411
+ return null == e
4412
+ ? void 0 === e
4413
+ ? "[object Undefined]"
4414
+ : "[object Null]"
4415
+ : i && i in Object(e)
4416
+ ? o(e)
4417
+ : a(e);
4418
+ };
4419
+ },
4420
+ function (e, t) {
4421
+ e.exports = function (e) {
4422
+ return null != e && "object" == typeof e;
4423
+ };
4424
+ },
4425
+ function (e, t, n) {
4426
+ "use strict";
4427
+ !(function e() {
4428
+ if (
4429
+ "undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
4430
+ "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE
4431
+ ) {
4432
+ 0;
4433
+ try {
4434
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);
4435
+ } catch (e) {
4436
+ console.error(e);
4437
+ }
4438
+ }
4439
+ })(),
4440
+ (e.exports = n(256));
4441
+ },
4442
+ function (e, t, n) {
4443
+ (function (e) {
4444
+ !(function (
4445
+ t,
4446
+ n,
4447
+ r,
4448
+ o,
4449
+ a,
4450
+ i,
4451
+ s,
4452
+ l,
4453
+ c,
4454
+ u,
4455
+ d,
4456
+ h,
4457
+ p,
4458
+ f,
4459
+ m,
4460
+ g,
4461
+ _,
4462
+ v,
4463
+ b,
4464
+ y,
4465
+ w,
4466
+ k,
4467
+ x,
4468
+ M,
4469
+ E,
4470
+ T,
4471
+ S,
4472
+ D,
4473
+ L,
4474
+ C,
4475
+ P,
4476
+ O,
4477
+ N,
4478
+ A,
4479
+ I,
4480
+ R,
4481
+ Y,
4482
+ j,
4483
+ F,
4484
+ H,
4485
+ z,
4486
+ B,
4487
+ U,
4488
+ V,
4489
+ W,
4490
+ q,
4491
+ G,
4492
+ J,
4493
+ K,
4494
+ Q,
4495
+ X,
4496
+ $,
4497
+ Z,
4498
+ ee,
4499
+ te,
4500
+ ne,
4501
+ re,
4502
+ oe,
4503
+ ae,
4504
+ ie,
4505
+ se,
4506
+ le
4507
+ ) {
4508
+ "use strict";
4509
+ function ce(e) {
4510
+ return (ce =
4511
+ "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
4512
+ ? function (e) {
4513
+ return typeof e;
4514
+ }
4515
+ : function (e) {
4516
+ return e &&
4517
+ "function" == typeof Symbol &&
4518
+ e.constructor === Symbol &&
4519
+ e !== Symbol.prototype
4520
+ ? "symbol"
4521
+ : typeof e;
4522
+ })(e);
4523
+ }
4524
+ function ue(e, t) {
4525
+ if (!(e instanceof t))
4526
+ throw new TypeError("Cannot call a class as a function");
4527
+ }
4528
+ function de(e, t) {
4529
+ for (var n = 0; n < t.length; n++) {
4530
+ var r = t[n];
4531
+ (r.enumerable = r.enumerable || !1),
4532
+ (r.configurable = !0),
4533
+ "value" in r && (r.writable = !0),
4534
+ Object.defineProperty(e, r.key, r);
4535
+ }
4536
+ }
4537
+ function he(e, t, n) {
4538
+ return t && de(e.prototype, t), n && de(e, n), e;
4539
+ }
4540
+ function pe(e, t, n) {
4541
+ return (
4542
+ t in e
4543
+ ? Object.defineProperty(e, t, {
4544
+ value: n,
4545
+ enumerable: !0,
4546
+ configurable: !0,
4547
+ writable: !0,
4548
+ })
4549
+ : (e[t] = n),
4550
+ e
4551
+ );
4552
+ }
4553
+ function fe() {
4554
+ return (fe =
4555
+ Object.assign ||
4556
+ function (e) {
4557
+ for (var t = 1; t < arguments.length; t++) {
4558
+ var n = arguments[t];
4559
+ for (var r in n)
4560
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
4561
+ }
4562
+ return e;
4563
+ }).apply(this, arguments);
4564
+ }
4565
+ function me(e, t) {
4566
+ var n = Object.keys(e);
4567
+ if (Object.getOwnPropertySymbols) {
4568
+ var r = Object.getOwnPropertySymbols(e);
4569
+ t &&
4570
+ (r = r.filter(function (t) {
4571
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
4572
+ })),
4573
+ n.push.apply(n, r);
4574
+ }
4575
+ return n;
4576
+ }
4577
+ function ge(e) {
4578
+ for (var t = 1; t < arguments.length; t++) {
4579
+ var n = null != arguments[t] ? arguments[t] : {};
4580
+ t % 2
4581
+ ? me(Object(n), !0).forEach(function (t) {
4582
+ pe(e, t, n[t]);
4583
+ })
4584
+ : Object.getOwnPropertyDescriptors
4585
+ ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
4586
+ : me(Object(n)).forEach(function (t) {
4587
+ Object.defineProperty(
4588
+ e,
4589
+ t,
4590
+ Object.getOwnPropertyDescriptor(n, t)
4591
+ );
4592
+ });
4593
+ }
4594
+ return e;
4595
+ }
4596
+ function _e(e, t) {
4597
+ if ("function" != typeof t && null !== t)
4598
+ throw new TypeError(
4599
+ "Super expression must either be null or a function"
4600
+ );
4601
+ (e.prototype = Object.create(t && t.prototype, {
4602
+ constructor: { value: e, writable: !0, configurable: !0 },
4603
+ })),
4604
+ t &&
4605
+ (function (e, t) {
4606
+ (
4607
+ Object.setPrototypeOf ||
4608
+ function (e, t) {
4609
+ return (e.__proto__ = t), e;
4610
+ }
4611
+ )(e, t);
4612
+ })(e, t);
4613
+ }
4614
+ function ve(e) {
4615
+ return (ve = Object.setPrototypeOf
4616
+ ? Object.getPrototypeOf
4617
+ : function (e) {
4618
+ return e.__proto__ || Object.getPrototypeOf(e);
4619
+ })(e);
4620
+ }
4621
+ function be(e) {
4622
+ if (void 0 === e)
4623
+ throw new ReferenceError(
4624
+ "this hasn't been initialised - super() hasn't been called"
4625
+ );
4626
+ return e;
4627
+ }
4628
+ function ye(e, t) {
4629
+ return !t || ("object" != typeof t && "function" != typeof t)
4630
+ ? be(e)
4631
+ : t;
4632
+ }
4633
+ function we(e) {
4634
+ var t = (function () {
4635
+ if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
4636
+ if (Reflect.construct.sham) return !1;
4637
+ if ("function" == typeof Proxy) return !0;
4638
+ try {
4639
+ return (
4640
+ Date.prototype.toString.call(
4641
+ Reflect.construct(Date, [], function () {})
4642
+ ),
4643
+ !0
4644
+ );
4645
+ } catch (e) {
4646
+ return !1;
4647
+ }
4648
+ })();
4649
+ return function () {
4650
+ var n,
4651
+ r = ve(e);
4652
+ if (t) {
4653
+ var o = ve(this).constructor;
4654
+ n = Reflect.construct(r, arguments, o);
4655
+ } else n = r.apply(this, arguments);
4656
+ return ye(this, n);
4657
+ };
4658
+ }
4659
+ function ke(e, t) {
4660
+ switch (e) {
4661
+ case "P":
4662
+ return t.date({ width: "short" });
4663
+ case "PP":
4664
+ return t.date({ width: "medium" });
4665
+ case "PPP":
4666
+ return t.date({ width: "long" });
4667
+ case "PPPP":
4668
+ default:
4669
+ return t.date({ width: "full" });
4670
+ }
4671
+ }
4672
+ function xe(e, t) {
4673
+ switch (e) {
4674
+ case "p":
4675
+ return t.time({ width: "short" });
4676
+ case "pp":
4677
+ return t.time({ width: "medium" });
4678
+ case "ppp":
4679
+ return t.time({ width: "long" });
4680
+ case "pppp":
4681
+ default:
4682
+ return t.time({ width: "full" });
4683
+ }
4684
+ }
4685
+ (n =
4686
+ n && Object.prototype.hasOwnProperty.call(n, "default")
4687
+ ? n.default
4688
+ : n),
4689
+ (r =
4690
+ r && Object.prototype.hasOwnProperty.call(r, "default")
4691
+ ? r.default
4692
+ : r),
4693
+ (o =
4694
+ o && Object.prototype.hasOwnProperty.call(o, "default")
4695
+ ? o.default
4696
+ : o),
4697
+ (a =
4698
+ a && Object.prototype.hasOwnProperty.call(a, "default")
4699
+ ? a.default
4700
+ : a),
4701
+ (i =
4702
+ i && Object.prototype.hasOwnProperty.call(i, "default")
4703
+ ? i.default
4704
+ : i),
4705
+ (s =
4706
+ s && Object.prototype.hasOwnProperty.call(s, "default")
4707
+ ? s.default
4708
+ : s),
4709
+ (l =
4710
+ l && Object.prototype.hasOwnProperty.call(l, "default")
4711
+ ? l.default
4712
+ : l),
4713
+ (c =
4714
+ c && Object.prototype.hasOwnProperty.call(c, "default")
4715
+ ? c.default
4716
+ : c),
4717
+ (u =
4718
+ u && Object.prototype.hasOwnProperty.call(u, "default")
4719
+ ? u.default
4720
+ : u),
4721
+ (d =
4722
+ d && Object.prototype.hasOwnProperty.call(d, "default")
4723
+ ? d.default
4724
+ : d),
4725
+ (h =
4726
+ h && Object.prototype.hasOwnProperty.call(h, "default")
4727
+ ? h.default
4728
+ : h),
4729
+ (p =
4730
+ p && Object.prototype.hasOwnProperty.call(p, "default")
4731
+ ? p.default
4732
+ : p),
4733
+ (f =
4734
+ f && Object.prototype.hasOwnProperty.call(f, "default")
4735
+ ? f.default
4736
+ : f),
4737
+ (m =
4738
+ m && Object.prototype.hasOwnProperty.call(m, "default")
4739
+ ? m.default
4740
+ : m),
4741
+ (g =
4742
+ g && Object.prototype.hasOwnProperty.call(g, "default")
4743
+ ? g.default
4744
+ : g),
4745
+ (_ =
4746
+ _ && Object.prototype.hasOwnProperty.call(_, "default")
4747
+ ? _.default
4748
+ : _),
4749
+ (v =
4750
+ v && Object.prototype.hasOwnProperty.call(v, "default")
4751
+ ? v.default
4752
+ : v),
4753
+ (b =
4754
+ b && Object.prototype.hasOwnProperty.call(b, "default")
4755
+ ? b.default
4756
+ : b),
4757
+ (y =
4758
+ y && Object.prototype.hasOwnProperty.call(y, "default")
4759
+ ? y.default
4760
+ : y),
4761
+ (w =
4762
+ w && Object.prototype.hasOwnProperty.call(w, "default")
4763
+ ? w.default
4764
+ : w),
4765
+ (k =
4766
+ k && Object.prototype.hasOwnProperty.call(k, "default")
4767
+ ? k.default
4768
+ : k),
4769
+ (x =
4770
+ x && Object.prototype.hasOwnProperty.call(x, "default")
4771
+ ? x.default
4772
+ : x),
4773
+ (M =
4774
+ M && Object.prototype.hasOwnProperty.call(M, "default")
4775
+ ? M.default
4776
+ : M),
4777
+ (E =
4778
+ E && Object.prototype.hasOwnProperty.call(E, "default")
4779
+ ? E.default
4780
+ : E),
4781
+ (T =
4782
+ T && Object.prototype.hasOwnProperty.call(T, "default")
4783
+ ? T.default
4784
+ : T),
4785
+ (S =
4786
+ S && Object.prototype.hasOwnProperty.call(S, "default")
4787
+ ? S.default
4788
+ : S),
4789
+ (D =
4790
+ D && Object.prototype.hasOwnProperty.call(D, "default")
4791
+ ? D.default
4792
+ : D),
4793
+ (L =
4794
+ L && Object.prototype.hasOwnProperty.call(L, "default")
4795
+ ? L.default
4796
+ : L),
4797
+ (C =
4798
+ C && Object.prototype.hasOwnProperty.call(C, "default")
4799
+ ? C.default
4800
+ : C),
4801
+ (P =
4802
+ P && Object.prototype.hasOwnProperty.call(P, "default")
4803
+ ? P.default
4804
+ : P),
4805
+ (O =
4806
+ O && Object.prototype.hasOwnProperty.call(O, "default")
4807
+ ? O.default
4808
+ : O),
4809
+ (N =
4810
+ N && Object.prototype.hasOwnProperty.call(N, "default")
4811
+ ? N.default
4812
+ : N),
4813
+ (A =
4814
+ A && Object.prototype.hasOwnProperty.call(A, "default")
4815
+ ? A.default
4816
+ : A),
4817
+ (I =
4818
+ I && Object.prototype.hasOwnProperty.call(I, "default")
4819
+ ? I.default
4820
+ : I),
4821
+ (R =
4822
+ R && Object.prototype.hasOwnProperty.call(R, "default")
4823
+ ? R.default
4824
+ : R),
4825
+ (Y =
4826
+ Y && Object.prototype.hasOwnProperty.call(Y, "default")
4827
+ ? Y.default
4828
+ : Y),
4829
+ (j =
4830
+ j && Object.prototype.hasOwnProperty.call(j, "default")
4831
+ ? j.default
4832
+ : j),
4833
+ (F =
4834
+ F && Object.prototype.hasOwnProperty.call(F, "default")
4835
+ ? F.default
4836
+ : F),
4837
+ (H =
4838
+ H && Object.prototype.hasOwnProperty.call(H, "default")
4839
+ ? H.default
4840
+ : H),
4841
+ (z =
4842
+ z && Object.prototype.hasOwnProperty.call(z, "default")
4843
+ ? z.default
4844
+ : z),
4845
+ (B =
4846
+ B && Object.prototype.hasOwnProperty.call(B, "default")
4847
+ ? B.default
4848
+ : B),
4849
+ (U =
4850
+ U && Object.prototype.hasOwnProperty.call(U, "default")
4851
+ ? U.default
4852
+ : U),
4853
+ (V =
4854
+ V && Object.prototype.hasOwnProperty.call(V, "default")
4855
+ ? V.default
4856
+ : V),
4857
+ (W =
4858
+ W && Object.prototype.hasOwnProperty.call(W, "default")
4859
+ ? W.default
4860
+ : W),
4861
+ (q =
4862
+ q && Object.prototype.hasOwnProperty.call(q, "default")
4863
+ ? q.default
4864
+ : q),
4865
+ (G =
4866
+ G && Object.prototype.hasOwnProperty.call(G, "default")
4867
+ ? G.default
4868
+ : G),
4869
+ (J =
4870
+ J && Object.prototype.hasOwnProperty.call(J, "default")
4871
+ ? J.default
4872
+ : J),
4873
+ (K =
4874
+ K && Object.prototype.hasOwnProperty.call(K, "default")
4875
+ ? K.default
4876
+ : K),
4877
+ (Q =
4878
+ Q && Object.prototype.hasOwnProperty.call(Q, "default")
4879
+ ? Q.default
4880
+ : Q),
4881
+ (X =
4882
+ X && Object.prototype.hasOwnProperty.call(X, "default")
4883
+ ? X.default
4884
+ : X),
4885
+ ($ =
4886
+ $ && Object.prototype.hasOwnProperty.call($, "default")
4887
+ ? $.default
4888
+ : $),
4889
+ (Z =
4890
+ Z && Object.prototype.hasOwnProperty.call(Z, "default")
4891
+ ? Z.default
4892
+ : Z),
4893
+ (ee =
4894
+ ee && Object.prototype.hasOwnProperty.call(ee, "default")
4895
+ ? ee.default
4896
+ : ee),
4897
+ (te =
4898
+ te && Object.prototype.hasOwnProperty.call(te, "default")
4899
+ ? te.default
4900
+ : te),
4901
+ (ne =
4902
+ ne && Object.prototype.hasOwnProperty.call(ne, "default")
4903
+ ? ne.default
4904
+ : ne),
4905
+ (re =
4906
+ re && Object.prototype.hasOwnProperty.call(re, "default")
4907
+ ? re.default
4908
+ : re),
4909
+ (oe =
4910
+ oe && Object.prototype.hasOwnProperty.call(oe, "default")
4911
+ ? oe.default
4912
+ : oe),
4913
+ (ae =
4914
+ ae && Object.prototype.hasOwnProperty.call(ae, "default")
4915
+ ? ae.default
4916
+ : ae),
4917
+ (ie =
4918
+ ie && Object.prototype.hasOwnProperty.call(ie, "default")
4919
+ ? ie.default
4920
+ : ie),
4921
+ (se =
4922
+ se && Object.prototype.hasOwnProperty.call(se, "default")
4923
+ ? se.default
4924
+ : se);
4925
+ var Me = {
4926
+ p: xe,
4927
+ P: function (e, t) {
4928
+ var n,
4929
+ r = e.match(/(P+)(p+)?/),
4930
+ o = r[1],
4931
+ a = r[2];
4932
+ if (!a) return ke(e, t);
4933
+ switch (o) {
4934
+ case "P":
4935
+ n = t.dateTime({ width: "short" });
4936
+ break;
4937
+ case "PP":
4938
+ n = t.dateTime({ width: "medium" });
4939
+ break;
4940
+ case "PPP":
4941
+ n = t.dateTime({ width: "long" });
4942
+ break;
4943
+ case "PPPP":
4944
+ default:
4945
+ n = t.dateTime({ width: "full" });
4946
+ }
4947
+ return n
4948
+ .replace("{{date}}", ke(o, t))
4949
+ .replace("{{time}}", xe(a, t));
4950
+ },
4951
+ },
4952
+ Ee = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
4953
+ function Te(e) {
4954
+ var t = e
4955
+ ? "string" == typeof e || e instanceof String
4956
+ ? ie(e)
4957
+ : oe(e)
4958
+ : new Date();
4959
+ return De(t) ? t : null;
4960
+ }
4961
+ function Se(e, t, n, r) {
4962
+ var o = null,
4963
+ a = Ve(n) || Ue(),
4964
+ i = !0;
4965
+ return Array.isArray(t)
4966
+ ? (t.forEach(function (t) {
4967
+ var n = ae(e, t, new Date(), { locale: a });
4968
+ r && (i = De(n) && e === s(n, t, { awareOfUnicodeTokens: !0 })),
4969
+ De(n) && i && (o = n);
4970
+ }),
4971
+ o)
4972
+ : ((o = ae(e, t, new Date(), { locale: a })),
4973
+ r
4974
+ ? (i = De(o) && e === s(o, t, { awareOfUnicodeTokens: !0 }))
4975
+ : De(o) ||
4976
+ ((t = t
4977
+ .match(Ee)
4978
+ .map(function (e) {
4979
+ var t = e[0];
4980
+ return "p" === t || "P" === t
4981
+ ? a
4982
+ ? (0, Me[t])(e, a.formatLong)
4983
+ : t
4984
+ : e;
4985
+ })
4986
+ .join("")),
4987
+ e.length > 0 && (o = ae(e, t.slice(0, e.length), new Date())),
4988
+ De(o) || (o = new Date(e))),
4989
+ De(o) && i ? o : null);
4990
+ }
4991
+ function De(e) {
4992
+ return i(e) && te(e, new Date("1/1/1000"));
4993
+ }
4994
+ function Le(e, t, n) {
4995
+ if ("en" === n) return s(e, t, { awareOfUnicodeTokens: !0 });
4996
+ var r = Ve(n);
4997
+ return (
4998
+ n &&
4999
+ !r &&
5000
+ console.warn(
5001
+ 'A locale object was not found for the provided string ["'.concat(
5002
+ n,
5003
+ '"].'
5004
+ )
5005
+ ),
5006
+ !r && Ue() && Ve(Ue()) && (r = Ve(Ue())),
5007
+ s(e, t, { locale: r || null, awareOfUnicodeTokens: !0 })
5008
+ );
5009
+ }
5010
+ function Ce(e, t) {
5011
+ var n = t.hour,
5012
+ r = void 0 === n ? 0 : n,
5013
+ o = t.minute,
5014
+ a = void 0 === o ? 0 : o,
5015
+ i = t.second;
5016
+ return O(P(C(e, void 0 === i ? 0 : i), a), r);
5017
+ }
5018
+ function Pe(e, t) {
5019
+ var n = (t && Ve(t)) || (Ue() && Ve(Ue()));
5020
+ return E(e, n ? { locale: n } : null);
5021
+ }
5022
+ function Oe(e, t) {
5023
+ return Le(e, "ddd", t);
5024
+ }
5025
+ function Ne(e) {
5026
+ return B(e);
5027
+ }
5028
+ function Ae(e, t) {
5029
+ var n = Ve(t || Ue());
5030
+ return U(e, { locale: n });
5031
+ }
5032
+ function Ie(e) {
5033
+ return V(e);
5034
+ }
5035
+ function Re(e) {
5036
+ return W(e);
5037
+ }
5038
+ function Ye(e, t) {
5039
+ return e && t ? Z(e, t) : !e && !t;
5040
+ }
5041
+ function je(e, t) {
5042
+ return e && t ? $(e, t) : !e && !t;
5043
+ }
5044
+ function Fe(e, t) {
5045
+ return e && t ? ee(e, t) : !e && !t;
5046
+ }
5047
+ function He(e, t) {
5048
+ return e && t ? X(e, t) : !e && !t;
5049
+ }
5050
+ function ze(e, t) {
5051
+ return e && t ? Q(e, t) : !e && !t;
5052
+ }
5053
+ function Be(e, t, n) {
5054
+ var r,
5055
+ o = B(t),
5056
+ a = G(n);
5057
+ try {
5058
+ r = re(e, { start: o, end: a });
5059
+ } catch (e) {
5060
+ r = !1;
5061
+ }
5062
+ return r;
5063
+ }
5064
+ function Ue() {
5065
+ return ("undefined" != typeof window ? window : e).__localeId__;
5066
+ }
5067
+ function Ve(t) {
5068
+ if ("string" == typeof t) {
5069
+ var n = "undefined" != typeof window ? window : e;
5070
+ return n.__localeData__ ? n.__localeData__[t] : null;
5071
+ }
5072
+ return t;
5073
+ }
5074
+ function We(e, t) {
5075
+ return Le(N(Te(), e), "LLLL", t);
5076
+ }
5077
+ function qe(e, t) {
5078
+ return Le(N(Te(), e), "LLL", t);
5079
+ }
5080
+ function Ge(e, t) {
5081
+ return Le(A(Te(), e), "QQQ", t);
5082
+ }
5083
+ function Je(e) {
5084
+ var t =
5085
+ arguments.length > 1 && void 0 !== arguments[1]
5086
+ ? arguments[1]
5087
+ : {},
5088
+ n = t.minDate,
5089
+ r = t.maxDate,
5090
+ o = t.excludeDates,
5091
+ a = t.includeDates,
5092
+ i = t.filterDate;
5093
+ return (
5094
+ et(e, { minDate: n, maxDate: r }) ||
5095
+ (o &&
5096
+ o.some(function (t) {
5097
+ return He(e, t);
5098
+ })) ||
5099
+ (a &&
5100
+ !a.some(function (t) {
5101
+ return He(e, t);
5102
+ })) ||
5103
+ (i && !i(Te(e))) ||
5104
+ !1
5105
+ );
5106
+ }
5107
+ function Ke(e) {
5108
+ var t =
5109
+ arguments.length > 1 && void 0 !== arguments[1]
5110
+ ? arguments[1]
5111
+ : {},
5112
+ n = t.excludeDates;
5113
+ return (
5114
+ (n &&
5115
+ n.some(function (t) {
5116
+ return He(e, t);
5117
+ })) ||
5118
+ !1
5119
+ );
5120
+ }
5121
+ function Qe(e) {
5122
+ var t =
5123
+ arguments.length > 1 && void 0 !== arguments[1]
5124
+ ? arguments[1]
5125
+ : {},
5126
+ n = t.minDate,
5127
+ r = t.maxDate,
5128
+ o = t.excludeDates,
5129
+ a = t.includeDates,
5130
+ i = t.filterDate;
5131
+ return (
5132
+ et(e, { minDate: n, maxDate: r }) ||
5133
+ (o &&
5134
+ o.some(function (t) {
5135
+ return je(e, t);
5136
+ })) ||
5137
+ (a &&
5138
+ !a.some(function (t) {
5139
+ return je(e, t);
5140
+ })) ||
5141
+ (i && !i(Te(e))) ||
5142
+ !1
5143
+ );
5144
+ }
5145
+ function Xe(e, t, n, r) {
5146
+ var o = D(e),
5147
+ a = T(e),
5148
+ i = D(t),
5149
+ s = T(t),
5150
+ l = D(r);
5151
+ return o === i && o === l
5152
+ ? a <= n && n <= s
5153
+ : o < i
5154
+ ? (l === o && a <= n) || (l === i && s >= n) || (l < i && l > o)
5155
+ : void 0;
5156
+ }
5157
+ function $e(e) {
5158
+ var t =
5159
+ arguments.length > 1 && void 0 !== arguments[1]
5160
+ ? arguments[1]
5161
+ : {},
5162
+ n = t.minDate,
5163
+ r = t.maxDate,
5164
+ o = t.excludeDates,
5165
+ a = t.includeDates,
5166
+ i = t.filterDate;
5167
+ return (
5168
+ et(e, { minDate: n, maxDate: r }) ||
5169
+ (o &&
5170
+ o.some(function (t) {
5171
+ return Fe(e, t);
5172
+ })) ||
5173
+ (a &&
5174
+ !a.some(function (t) {
5175
+ return Fe(e, t);
5176
+ })) ||
5177
+ (i && !i(Te(e))) ||
5178
+ !1
5179
+ );
5180
+ }
5181
+ function Ze(e, t, n, r) {
5182
+ var o = D(e),
5183
+ a = S(e),
5184
+ i = D(t),
5185
+ s = S(t),
5186
+ l = D(r);
5187
+ return o === i && o === l
5188
+ ? a <= n && n <= s
5189
+ : o < i
5190
+ ? (l === o && a <= n) || (l === i && s >= n) || (l < i && l > o)
5191
+ : void 0;
5192
+ }
5193
+ function et(e) {
5194
+ var t =
5195
+ arguments.length > 1 && void 0 !== arguments[1]
5196
+ ? arguments[1]
5197
+ : {},
5198
+ n = t.minDate,
5199
+ r = t.maxDate;
5200
+ return (n && j(e, n) < 0) || (r && j(e, r) > 0);
5201
+ }
5202
+ function tt(e, t) {
5203
+ for (var n = t.length, r = 0; r < n; r++)
5204
+ if (k(t[r]) === k(e) && w(t[r]) === w(e)) return !0;
5205
+ return !1;
5206
+ }
5207
+ function nt(e, t) {
5208
+ var n = t.minTime,
5209
+ r = t.maxTime;
5210
+ if (!n || !r)
5211
+ throw new Error("Both minTime and maxTime props required");
5212
+ var o,
5213
+ a = Te(),
5214
+ i = O(P(a, w(e)), k(e)),
5215
+ s = O(P(a, w(n)), k(n)),
5216
+ l = O(P(a, w(r)), k(r));
5217
+ try {
5218
+ o = !re(i, { start: s, end: l });
5219
+ } catch (e) {
5220
+ o = !1;
5221
+ }
5222
+ return o;
5223
+ }
5224
+ function rt(e) {
5225
+ var t =
5226
+ arguments.length > 1 && void 0 !== arguments[1]
5227
+ ? arguments[1]
5228
+ : {},
5229
+ n = t.minDate,
5230
+ r = t.includeDates,
5231
+ o = v(e, 1);
5232
+ return (
5233
+ (n && F(n, o) > 0) ||
5234
+ (r &&
5235
+ r.every(function (e) {
5236
+ return F(e, o) > 0;
5237
+ })) ||
5238
+ !1
5239
+ );
5240
+ }
5241
+ function ot(e) {
5242
+ var t =
5243
+ arguments.length > 1 && void 0 !== arguments[1]
5244
+ ? arguments[1]
5245
+ : {},
5246
+ n = t.maxDate,
5247
+ r = t.includeDates,
5248
+ o = h(e, 1);
5249
+ return (
5250
+ (n && F(o, n) > 0) ||
5251
+ (r &&
5252
+ r.every(function (e) {
5253
+ return F(o, e) > 0;
5254
+ })) ||
5255
+ !1
5256
+ );
5257
+ }
5258
+ function at(e) {
5259
+ var t =
5260
+ arguments.length > 1 && void 0 !== arguments[1]
5261
+ ? arguments[1]
5262
+ : {},
5263
+ n = t.minDate,
5264
+ r = t.includeDates,
5265
+ o = b(e, 1);
5266
+ return (
5267
+ (n && z(n, o) > 0) ||
5268
+ (r &&
5269
+ r.every(function (e) {
5270
+ return z(e, o) > 0;
5271
+ })) ||
5272
+ !1
5273
+ );
5274
+ }
5275
+ function it(e) {
5276
+ var t =
5277
+ arguments.length > 1 && void 0 !== arguments[1]
5278
+ ? arguments[1]
5279
+ : {},
5280
+ n = t.maxDate,
5281
+ r = t.includeDates,
5282
+ o = p(e, 1);
5283
+ return (
5284
+ (n && z(o, n) > 0) ||
5285
+ (r &&
5286
+ r.every(function (e) {
5287
+ return z(o, e) > 0;
5288
+ })) ||
5289
+ !1
5290
+ );
5291
+ }
5292
+ function st(e) {
5293
+ var t = e.minDate,
5294
+ n = e.includeDates;
5295
+ if (n && t) {
5296
+ var r = n.filter(function (e) {
5297
+ return j(e, t) >= 0;
5298
+ });
5299
+ return R(r);
5300
+ }
5301
+ return n ? R(n) : t;
5302
+ }
5303
+ function lt(e) {
5304
+ var t = e.maxDate,
5305
+ n = e.includeDates;
5306
+ if (n && t) {
5307
+ var r = n.filter(function (e) {
5308
+ return j(e, t) <= 0;
5309
+ });
5310
+ return Y(r);
5311
+ }
5312
+ return n ? Y(n) : t;
5313
+ }
5314
+ function ct() {
5315
+ for (
5316
+ var e =
5317
+ arguments.length > 0 && void 0 !== arguments[0]
5318
+ ? arguments[0]
5319
+ : [],
5320
+ t =
5321
+ arguments.length > 1 && void 0 !== arguments[1]
5322
+ ? arguments[1]
5323
+ : "react-datepicker__day--highlighted",
5324
+ n = new Map(),
5325
+ r = 0,
5326
+ o = e.length;
5327
+ r < o;
5328
+ r++
5329
+ ) {
5330
+ var i = e[r];
5331
+ if (a(i)) {
5332
+ var s = Le(i, "MM.dd.yyyy"),
5333
+ l = n.get(s) || [];
5334
+ l.includes(t) || (l.push(t), n.set(s, l));
5335
+ } else if ("object" === ce(i)) {
5336
+ var c = Object.keys(i),
5337
+ u = c[0],
5338
+ d = i[c[0]];
5339
+ if ("string" == typeof u && d.constructor === Array)
5340
+ for (var h = 0, p = d.length; h < p; h++) {
5341
+ var f = Le(d[h], "MM.dd.yyyy"),
5342
+ m = n.get(f) || [];
5343
+ m.includes(u) || (m.push(u), n.set(f, m));
5344
+ }
5345
+ }
5346
+ }
5347
+ return n;
5348
+ }
5349
+ function ut(e, t, n, r, o) {
5350
+ for (var a = o.length, i = [], s = 0; s < a; s++) {
5351
+ var u = l(c(e, k(o[s])), w(o[s])),
5352
+ d = l(e, (n + 1) * r);
5353
+ te(u, t) && ne(u, d) && i.push(o[s]);
5354
+ }
5355
+ return i;
5356
+ }
5357
+ function dt(e) {
5358
+ return e < 10 ? "0".concat(e) : "".concat(e);
5359
+ }
5360
+ function ht(e, t, n, r) {
5361
+ for (var o = [], a = 0; a < 2 * t + 1; a++) {
5362
+ var i = e + t - a,
5363
+ s = !0;
5364
+ n && (s = D(n) <= i), r && s && (s = D(r) >= i), s && o.push(i);
5365
+ }
5366
+ return o;
5367
+ }
5368
+ var pt = se(
5369
+ (function (e) {
5370
+ _e(r, e);
5371
+ var t = we(r);
5372
+ function r(e) {
5373
+ var o;
5374
+ ue(this, r),
5375
+ pe(be((o = t.call(this, e))), "renderOptions", function () {
5376
+ var e = o.props.year,
5377
+ t = o.state.yearsList.map(function (t) {
5378
+ return n.createElement(
5379
+ "div",
5380
+ {
5381
+ className:
5382
+ e === t
5383
+ ? "react-datepicker__year-option react-datepicker__year-option--selected_year"
5384
+ : "react-datepicker__year-option",
5385
+ key: t,
5386
+ onClick: o.onChange.bind(be(o), t),
5387
+ },
5388
+ e === t
5389
+ ? n.createElement(
5390
+ "span",
5391
+ {
5392
+ className:
5393
+ "react-datepicker__year-option--selected",
5394
+ },
5395
+ "✓"
5396
+ )
5397
+ : "",
5398
+ t
5399
+ );
5400
+ }),
5401
+ r = o.props.minDate ? D(o.props.minDate) : null,
5402
+ a = o.props.maxDate ? D(o.props.maxDate) : null;
5403
+ return (
5404
+ (a &&
5405
+ o.state.yearsList.find(function (e) {
5406
+ return e === a;
5407
+ })) ||
5408
+ t.unshift(
5409
+ n.createElement(
5410
+ "div",
5411
+ {
5412
+ className: "react-datepicker__year-option",
5413
+ key: "upcoming",
5414
+ onClick: o.incrementYears,
5415
+ },
5416
+ n.createElement("a", {
5417
+ className:
5418
+ "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming",
5419
+ })
5420
+ )
5421
+ ),
5422
+ (r &&
5423
+ o.state.yearsList.find(function (e) {
5424
+ return e === r;
5425
+ })) ||
5426
+ t.push(
5427
+ n.createElement(
5428
+ "div",
5429
+ {
5430
+ className: "react-datepicker__year-option",
5431
+ key: "previous",
5432
+ onClick: o.decrementYears,
5433
+ },
5434
+ n.createElement("a", {
5435
+ className:
5436
+ "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous",
5437
+ })
5438
+ )
5439
+ ),
5440
+ t
5441
+ );
5442
+ }),
5443
+ pe(be(o), "onChange", function (e) {
5444
+ o.props.onChange(e);
5445
+ }),
5446
+ pe(be(o), "handleClickOutside", function () {
5447
+ o.props.onCancel();
5448
+ }),
5449
+ pe(be(o), "shiftYears", function (e) {
5450
+ var t = o.state.yearsList.map(function (t) {
5451
+ return t + e;
5452
+ });
5453
+ o.setState({ yearsList: t });
5454
+ }),
5455
+ pe(be(o), "incrementYears", function () {
5456
+ return o.shiftYears(1);
5457
+ }),
5458
+ pe(be(o), "decrementYears", function () {
5459
+ return o.shiftYears(-1);
5460
+ });
5461
+ var a = e.yearDropdownItemNumber,
5462
+ i = e.scrollableYearDropdown,
5463
+ s = a || (i ? 10 : 5);
5464
+ return (
5465
+ (o.state = {
5466
+ yearsList: ht(
5467
+ o.props.year,
5468
+ s,
5469
+ o.props.minDate,
5470
+ o.props.maxDate
5471
+ ),
5472
+ }),
5473
+ o
5474
+ );
5475
+ }
5476
+ return (
5477
+ he(r, [
5478
+ {
5479
+ key: "render",
5480
+ value: function () {
5481
+ var e = o({
5482
+ "react-datepicker__year-dropdown": !0,
5483
+ "react-datepicker__year-dropdown--scrollable": this
5484
+ .props.scrollableYearDropdown,
5485
+ });
5486
+ return n.createElement(
5487
+ "div",
5488
+ { className: e },
5489
+ this.renderOptions()
5490
+ );
5491
+ },
5492
+ },
5493
+ ]),
5494
+ r
5495
+ );
5496
+ })(n.Component)
5497
+ ),
5498
+ ft = (function (e) {
5499
+ _e(r, e);
5500
+ var t = we(r);
5501
+ function r() {
5502
+ var e;
5503
+ ue(this, r);
5504
+ for (
5505
+ var o = arguments.length, a = new Array(o), i = 0;
5506
+ i < o;
5507
+ i++
5508
+ )
5509
+ a[i] = arguments[i];
5510
+ return (
5511
+ pe(be((e = t.call.apply(t, [this].concat(a)))), "state", {
5512
+ dropdownVisible: !1,
5513
+ }),
5514
+ pe(be(e), "renderSelectOptions", function () {
5515
+ for (
5516
+ var t = e.props.minDate ? D(e.props.minDate) : 1900,
5517
+ r = e.props.maxDate ? D(e.props.maxDate) : 2100,
5518
+ o = [],
5519
+ a = t;
5520
+ a <= r;
5521
+ a++
5522
+ )
5523
+ o.push(n.createElement("option", { key: a, value: a }, a));
5524
+ return o;
5525
+ }),
5526
+ pe(be(e), "onSelectChange", function (t) {
5527
+ e.onChange(t.target.value);
5528
+ }),
5529
+ pe(be(e), "renderSelectMode", function () {
5530
+ return n.createElement(
5531
+ "select",
5532
+ {
5533
+ value: e.props.year,
5534
+ className: "react-datepicker__year-select",
5535
+ onChange: e.onSelectChange,
5536
+ },
5537
+ e.renderSelectOptions()
5538
+ );
5539
+ }),
5540
+ pe(be(e), "renderReadView", function (t) {
5541
+ return n.createElement(
5542
+ "div",
5543
+ {
5544
+ key: "read",
5545
+ style: { visibility: t ? "visible" : "hidden" },
5546
+ className: "react-datepicker__year-read-view",
5547
+ onClick: function (t) {
5548
+ return e.toggleDropdown(t);
5549
+ },
5550
+ },
5551
+ n.createElement("span", {
5552
+ className: "react-datepicker__year-read-view--down-arrow",
5553
+ }),
5554
+ n.createElement(
5555
+ "span",
5556
+ {
5557
+ className:
5558
+ "react-datepicker__year-read-view--selected-year",
5559
+ },
5560
+ e.props.year
5561
+ )
5562
+ );
5563
+ }),
5564
+ pe(be(e), "renderDropdown", function () {
5565
+ return n.createElement(pt, {
5566
+ key: "dropdown",
5567
+ year: e.props.year,
5568
+ onChange: e.onChange,
5569
+ onCancel: e.toggleDropdown,
5570
+ minDate: e.props.minDate,
5571
+ maxDate: e.props.maxDate,
5572
+ scrollableYearDropdown: e.props.scrollableYearDropdown,
5573
+ yearDropdownItemNumber: e.props.yearDropdownItemNumber,
5574
+ });
5575
+ }),
5576
+ pe(be(e), "renderScrollMode", function () {
5577
+ var t = e.state.dropdownVisible,
5578
+ n = [e.renderReadView(!t)];
5579
+ return t && n.unshift(e.renderDropdown()), n;
5580
+ }),
5581
+ pe(be(e), "onChange", function (t) {
5582
+ e.toggleDropdown(), t !== e.props.year && e.props.onChange(t);
5583
+ }),
5584
+ pe(be(e), "toggleDropdown", function (t) {
5585
+ e.setState(
5586
+ { dropdownVisible: !e.state.dropdownVisible },
5587
+ function () {
5588
+ e.props.adjustDateOnChange &&
5589
+ e.handleYearChange(e.props.date, t);
5590
+ }
5591
+ );
5592
+ }),
5593
+ pe(be(e), "handleYearChange", function (t, n) {
5594
+ e.onSelect(t, n), e.setOpen();
5595
+ }),
5596
+ pe(be(e), "onSelect", function (t, n) {
5597
+ e.props.onSelect && e.props.onSelect(t, n);
5598
+ }),
5599
+ pe(be(e), "setOpen", function () {
5600
+ e.props.setOpen && e.props.setOpen(!0);
5601
+ }),
5602
+ e
5603
+ );
5604
+ }
5605
+ return (
5606
+ he(r, [
5607
+ {
5608
+ key: "render",
5609
+ value: function () {
5610
+ var e;
5611
+ switch (this.props.dropdownMode) {
5612
+ case "scroll":
5613
+ e = this.renderScrollMode();
5614
+ break;
5615
+ case "select":
5616
+ e = this.renderSelectMode();
5617
+ }
5618
+ return n.createElement(
5619
+ "div",
5620
+ {
5621
+ className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(
5622
+ this.props.dropdownMode
5623
+ ),
5624
+ },
5625
+ e
5626
+ );
5627
+ },
5628
+ },
5629
+ ]),
5630
+ r
5631
+ );
5632
+ })(n.Component),
5633
+ mt = se(
5634
+ (function (e) {
5635
+ _e(r, e);
5636
+ var t = we(r);
5637
+ function r() {
5638
+ var e;
5639
+ ue(this, r);
5640
+ for (
5641
+ var o = arguments.length, a = new Array(o), i = 0;
5642
+ i < o;
5643
+ i++
5644
+ )
5645
+ a[i] = arguments[i];
5646
+ return (
5647
+ pe(
5648
+ be((e = t.call.apply(t, [this].concat(a)))),
5649
+ "renderOptions",
5650
+ function () {
5651
+ return e.props.monthNames.map(function (t, r) {
5652
+ return n.createElement(
5653
+ "div",
5654
+ {
5655
+ className:
5656
+ e.props.month === r
5657
+ ? "react-datepicker__month-option react-datepicker__month-option--selected_month"
5658
+ : "react-datepicker__month-option",
5659
+ key: t,
5660
+ onClick: e.onChange.bind(be(e), r),
5661
+ },
5662
+ e.props.month === r
5663
+ ? n.createElement(
5664
+ "span",
5665
+ {
5666
+ className:
5667
+ "react-datepicker__month-option--selected",
5668
+ },
5669
+ "✓"
5670
+ )
5671
+ : "",
5672
+ t
5673
+ );
5674
+ });
5675
+ }
5676
+ ),
5677
+ pe(be(e), "onChange", function (t) {
5678
+ return e.props.onChange(t);
5679
+ }),
5680
+ pe(be(e), "handleClickOutside", function () {
5681
+ return e.props.onCancel();
5682
+ }),
5683
+ e
5684
+ );
5685
+ }
5686
+ return (
5687
+ he(r, [
5688
+ {
5689
+ key: "render",
5690
+ value: function () {
5691
+ return n.createElement(
5692
+ "div",
5693
+ { className: "react-datepicker__month-dropdown" },
5694
+ this.renderOptions()
5695
+ );
5696
+ },
5697
+ },
5698
+ ]),
5699
+ r
5700
+ );
5701
+ })(n.Component)
5702
+ ),
5703
+ gt = (function (e) {
5704
+ _e(r, e);
5705
+ var t = we(r);
5706
+ function r() {
5707
+ var e;
5708
+ ue(this, r);
5709
+ for (
5710
+ var o = arguments.length, a = new Array(o), i = 0;
5711
+ i < o;
5712
+ i++
5713
+ )
5714
+ a[i] = arguments[i];
5715
+ return (
5716
+ pe(be((e = t.call.apply(t, [this].concat(a)))), "state", {
5717
+ dropdownVisible: !1,
5718
+ }),
5719
+ pe(be(e), "renderSelectOptions", function (e) {
5720
+ return e.map(function (e, t) {
5721
+ return n.createElement("option", { key: t, value: t }, e);
5722
+ });
5723
+ }),
5724
+ pe(be(e), "renderSelectMode", function (t) {
5725
+ return n.createElement(
5726
+ "select",
5727
+ {
5728
+ value: e.props.month,
5729
+ className: "react-datepicker__month-select",
5730
+ onChange: function (t) {
5731
+ return e.onChange(t.target.value);
5732
+ },
5733
+ },
5734
+ e.renderSelectOptions(t)
5735
+ );
5736
+ }),
5737
+ pe(be(e), "renderReadView", function (t, r) {
5738
+ return n.createElement(
5739
+ "div",
5740
+ {
5741
+ key: "read",
5742
+ style: { visibility: t ? "visible" : "hidden" },
5743
+ className: "react-datepicker__month-read-view",
5744
+ onClick: e.toggleDropdown,
5745
+ },
5746
+ n.createElement("span", {
5747
+ className:
5748
+ "react-datepicker__month-read-view--down-arrow",
5749
+ }),
5750
+ n.createElement(
5751
+ "span",
5752
+ {
5753
+ className:
5754
+ "react-datepicker__month-read-view--selected-month",
5755
+ },
5756
+ r[e.props.month]
5757
+ )
5758
+ );
5759
+ }),
5760
+ pe(be(e), "renderDropdown", function (t) {
5761
+ return n.createElement(mt, {
5762
+ key: "dropdown",
5763
+ month: e.props.month,
5764
+ monthNames: t,
5765
+ onChange: e.onChange,
5766
+ onCancel: e.toggleDropdown,
5767
+ });
5768
+ }),
5769
+ pe(be(e), "renderScrollMode", function (t) {
5770
+ var n = e.state.dropdownVisible,
5771
+ r = [e.renderReadView(!n, t)];
5772
+ return n && r.unshift(e.renderDropdown(t)), r;
5773
+ }),
5774
+ pe(be(e), "onChange", function (t) {
5775
+ e.toggleDropdown(),
5776
+ t !== e.props.month && e.props.onChange(t);
5777
+ }),
5778
+ pe(be(e), "toggleDropdown", function () {
5779
+ return e.setState({
5780
+ dropdownVisible: !e.state.dropdownVisible,
5781
+ });
5782
+ }),
5783
+ e
5784
+ );
5785
+ }
5786
+ return (
5787
+ he(r, [
5788
+ {
5789
+ key: "render",
5790
+ value: function () {
5791
+ var e,
5792
+ t = this,
5793
+ r = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(
5794
+ this.props.useShortMonthInDropdown
5795
+ ? function (e) {
5796
+ return qe(e, t.props.locale);
5797
+ }
5798
+ : function (e) {
5799
+ return We(e, t.props.locale);
5800
+ }
5801
+ );
5802
+ switch (this.props.dropdownMode) {
5803
+ case "scroll":
5804
+ e = this.renderScrollMode(r);
5805
+ break;
5806
+ case "select":
5807
+ e = this.renderSelectMode(r);
5808
+ }
5809
+ return n.createElement(
5810
+ "div",
5811
+ {
5812
+ className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(
5813
+ this.props.dropdownMode
5814
+ ),
5815
+ },
5816
+ e
5817
+ );
5818
+ },
5819
+ },
5820
+ ]),
5821
+ r
5822
+ );
5823
+ })(n.Component);
5824
+ function _t(e, t) {
5825
+ for (var n = [], r = Ie(e), o = Ie(t); !te(r, o); )
5826
+ n.push(Te(r)), (r = h(r, 1));
5827
+ return n;
5828
+ }
5829
+ var vt = se(
5830
+ (function (e) {
5831
+ _e(r, e);
5832
+ var t = we(r);
5833
+ function r(e) {
5834
+ var o;
5835
+ return (
5836
+ ue(this, r),
5837
+ pe(be((o = t.call(this, e))), "renderOptions", function () {
5838
+ return o.state.monthYearsList.map(function (e) {
5839
+ var t = L(e),
5840
+ r = Ye(o.props.date, e) && je(o.props.date, e);
5841
+ return n.createElement(
5842
+ "div",
5843
+ {
5844
+ className: r
5845
+ ? "react-datepicker__month-year-option --selected_month-year"
5846
+ : "react-datepicker__month-year-option",
5847
+ key: t,
5848
+ onClick: o.onChange.bind(be(o), t),
5849
+ },
5850
+ r
5851
+ ? n.createElement(
5852
+ "span",
5853
+ {
5854
+ className:
5855
+ "react-datepicker__month-year-option--selected",
5856
+ },
5857
+ "✓"
5858
+ )
5859
+ : "",
5860
+ Le(e, o.props.dateFormat)
5861
+ );
5862
+ });
5863
+ }),
5864
+ pe(be(o), "onChange", function (e) {
5865
+ return o.props.onChange(e);
5866
+ }),
5867
+ pe(be(o), "handleClickOutside", function () {
5868
+ o.props.onCancel();
5869
+ }),
5870
+ (o.state = {
5871
+ monthYearsList: _t(o.props.minDate, o.props.maxDate),
5872
+ }),
5873
+ o
5874
+ );
5875
+ }
5876
+ return (
5877
+ he(r, [
5878
+ {
5879
+ key: "render",
5880
+ value: function () {
5881
+ var e = o({
5882
+ "react-datepicker__month-year-dropdown": !0,
5883
+ "react-datepicker__month-year-dropdown--scrollable": this
5884
+ .props.scrollableMonthYearDropdown,
5885
+ });
5886
+ return n.createElement(
5887
+ "div",
5888
+ { className: e },
5889
+ this.renderOptions()
5890
+ );
5891
+ },
5892
+ },
5893
+ ]),
5894
+ r
5895
+ );
5896
+ })(n.Component)
5897
+ ),
5898
+ bt = (function (e) {
5899
+ _e(r, e);
5900
+ var t = we(r);
5901
+ function r() {
5902
+ var e;
5903
+ ue(this, r);
5904
+ for (
5905
+ var o = arguments.length, a = new Array(o), i = 0;
5906
+ i < o;
5907
+ i++
5908
+ )
5909
+ a[i] = arguments[i];
5910
+ return (
5911
+ pe(be((e = t.call.apply(t, [this].concat(a)))), "state", {
5912
+ dropdownVisible: !1,
5913
+ }),
5914
+ pe(be(e), "renderSelectOptions", function () {
5915
+ for (
5916
+ var t = Ie(e.props.minDate),
5917
+ r = Ie(e.props.maxDate),
5918
+ o = [];
5919
+ !te(t, r);
5920
+
5921
+ ) {
5922
+ var a = L(t);
5923
+ o.push(
5924
+ n.createElement(
5925
+ "option",
5926
+ { key: a, value: a },
5927
+ Le(t, e.props.dateFormat, e.props.locale)
5928
+ )
5929
+ ),
5930
+ (t = h(t, 1));
5931
+ }
5932
+ return o;
5933
+ }),
5934
+ pe(be(e), "onSelectChange", function (t) {
5935
+ e.onChange(t.target.value);
5936
+ }),
5937
+ pe(be(e), "renderSelectMode", function () {
5938
+ return n.createElement(
5939
+ "select",
5940
+ {
5941
+ value: L(Ie(e.props.date)),
5942
+ className: "react-datepicker__month-year-select",
5943
+ onChange: e.onSelectChange,
5944
+ },
5945
+ e.renderSelectOptions()
5946
+ );
5947
+ }),
5948
+ pe(be(e), "renderReadView", function (t) {
5949
+ var r = Le(e.props.date, e.props.dateFormat, e.props.locale);
5950
+ return n.createElement(
5951
+ "div",
5952
+ {
5953
+ key: "read",
5954
+ style: { visibility: t ? "visible" : "hidden" },
5955
+ className: "react-datepicker__month-year-read-view",
5956
+ onClick: function (t) {
5957
+ return e.toggleDropdown(t);
5958
+ },
5959
+ },
5960
+ n.createElement("span", {
5961
+ className:
5962
+ "react-datepicker__month-year-read-view--down-arrow",
5963
+ }),
5964
+ n.createElement(
5965
+ "span",
5966
+ {
5967
+ className:
5968
+ "react-datepicker__month-year-read-view--selected-month-year",
5969
+ },
5970
+ r
5971
+ )
5972
+ );
5973
+ }),
5974
+ pe(be(e), "renderDropdown", function () {
5975
+ return n.createElement(vt, {
5976
+ key: "dropdown",
5977
+ date: e.props.date,
5978
+ dateFormat: e.props.dateFormat,
5979
+ onChange: e.onChange,
5980
+ onCancel: e.toggleDropdown,
5981
+ minDate: e.props.minDate,
5982
+ maxDate: e.props.maxDate,
5983
+ scrollableMonthYearDropdown:
5984
+ e.props.scrollableMonthYearDropdown,
5985
+ });
5986
+ }),
5987
+ pe(be(e), "renderScrollMode", function () {
5988
+ var t = e.state.dropdownVisible,
5989
+ n = [e.renderReadView(!t)];
5990
+ return t && n.unshift(e.renderDropdown()), n;
5991
+ }),
5992
+ pe(be(e), "onChange", function (t) {
5993
+ e.toggleDropdown();
5994
+ var n = Te(parseInt(t));
5995
+ (Ye(e.props.date, n) && je(e.props.date, n)) ||
5996
+ e.props.onChange(n);
5997
+ }),
5998
+ pe(be(e), "toggleDropdown", function () {
5999
+ return e.setState({
6000
+ dropdownVisible: !e.state.dropdownVisible,
6001
+ });
6002
+ }),
6003
+ e
6004
+ );
6005
+ }
6006
+ return (
6007
+ he(r, [
6008
+ {
6009
+ key: "render",
6010
+ value: function () {
6011
+ var e;
6012
+ switch (this.props.dropdownMode) {
6013
+ case "scroll":
6014
+ e = this.renderScrollMode();
6015
+ break;
6016
+ case "select":
6017
+ e = this.renderSelectMode();
6018
+ }
6019
+ return n.createElement(
6020
+ "div",
6021
+ {
6022
+ className: "react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(
6023
+ this.props.dropdownMode
6024
+ ),
6025
+ },
6026
+ e
6027
+ );
6028
+ },
6029
+ },
6030
+ ]),
6031
+ r
6032
+ );
6033
+ })(n.Component),
6034
+ yt = (function (e) {
6035
+ _e(r, e);
6036
+ var t = we(r);
6037
+ function r() {
6038
+ var e;
6039
+ ue(this, r);
6040
+ for (
6041
+ var a = arguments.length, i = new Array(a), s = 0;
6042
+ s < a;
6043
+ s++
6044
+ )
6045
+ i[s] = arguments[s];
6046
+ return (
6047
+ pe(
6048
+ be((e = t.call.apply(t, [this].concat(i)))),
6049
+ "dayEl",
6050
+ n.createRef()
6051
+ ),
6052
+ pe(be(e), "handleClick", function (t) {
6053
+ !e.isDisabled() && e.props.onClick && e.props.onClick(t);
6054
+ }),
6055
+ pe(be(e), "handleMouseEnter", function (t) {
6056
+ !e.isDisabled() &&
6057
+ e.props.onMouseEnter &&
6058
+ e.props.onMouseEnter(t);
6059
+ }),
6060
+ pe(be(e), "handleOnKeyDown", function (t) {
6061
+ " " === t.key && (t.preventDefault(), (t.key = "Enter")),
6062
+ e.props.handleOnKeyDown(t);
6063
+ }),
6064
+ pe(be(e), "isSameDay", function (t) {
6065
+ return He(e.props.day, t);
6066
+ }),
6067
+ pe(be(e), "isKeyboardSelected", function () {
6068
+ return (
6069
+ !e.props.disabledKeyboardNavigation &&
6070
+ !e.props.inline &&
6071
+ !e.isSameDay(e.props.selected) &&
6072
+ e.isSameDay(e.props.preSelection)
6073
+ );
6074
+ }),
6075
+ pe(be(e), "isDisabled", function () {
6076
+ return Je(e.props.day, e.props);
6077
+ }),
6078
+ pe(be(e), "isExcluded", function () {
6079
+ return Ke(e.props.day, e.props);
6080
+ }),
6081
+ pe(be(e), "getHighLightedClass", function (t) {
6082
+ var n = e.props,
6083
+ r = n.day,
6084
+ o = n.highlightDates;
6085
+ if (!o) return !1;
6086
+ var a = Le(r, "MM.dd.yyyy");
6087
+ return o.get(a);
6088
+ }),
6089
+ pe(be(e), "isInRange", function () {
6090
+ var t = e.props,
6091
+ n = t.day,
6092
+ r = t.startDate,
6093
+ o = t.endDate;
6094
+ return !(!r || !o) && Be(n, r, o);
6095
+ }),
6096
+ pe(be(e), "isInSelectingRange", function () {
6097
+ var t = e.props,
6098
+ n = t.day,
6099
+ r = t.selectsStart,
6100
+ o = t.selectsEnd,
6101
+ a = t.selectingDate,
6102
+ i = t.startDate,
6103
+ s = t.endDate;
6104
+ return (
6105
+ !((!r && !o) || !a || e.isDisabled()) &&
6106
+ (r && s && (ne(a, s) || ze(a, s))
6107
+ ? Be(n, a, s)
6108
+ : !(!o || !i || (!te(a, i) && !ze(a, i))) && Be(n, i, a))
6109
+ );
6110
+ }),
6111
+ pe(be(e), "isSelectingRangeStart", function () {
6112
+ if (!e.isInSelectingRange()) return !1;
6113
+ var t = e.props,
6114
+ n = t.day,
6115
+ r = t.selectingDate,
6116
+ o = t.startDate;
6117
+ return He(n, t.selectsStart ? r : o);
6118
+ }),
6119
+ pe(be(e), "isSelectingRangeEnd", function () {
6120
+ if (!e.isInSelectingRange()) return !1;
6121
+ var t = e.props,
6122
+ n = t.day,
6123
+ r = t.selectingDate,
6124
+ o = t.endDate;
6125
+ return He(n, t.selectsEnd ? r : o);
6126
+ }),
6127
+ pe(be(e), "isRangeStart", function () {
6128
+ var t = e.props,
6129
+ n = t.day,
6130
+ r = t.startDate,
6131
+ o = t.endDate;
6132
+ return !(!r || !o) && He(r, n);
6133
+ }),
6134
+ pe(be(e), "isRangeEnd", function () {
6135
+ var t = e.props,
6136
+ n = t.day,
6137
+ r = t.startDate,
6138
+ o = t.endDate;
6139
+ return !(!r || !o) && He(o, n);
6140
+ }),
6141
+ pe(be(e), "isWeekend", function () {
6142
+ var t = x(e.props.day);
6143
+ return 0 === t || 6 === t;
6144
+ }),
6145
+ pe(be(e), "isOutsideMonth", function () {
6146
+ return (
6147
+ void 0 !== e.props.month && e.props.month !== T(e.props.day)
6148
+ );
6149
+ }),
6150
+ pe(be(e), "getClassNames", function (t) {
6151
+ var n = e.props.dayClassName
6152
+ ? e.props.dayClassName(t)
6153
+ : void 0;
6154
+ return o(
6155
+ "react-datepicker__day",
6156
+ n,
6157
+ "react-datepicker__day--" + Oe(e.props.day),
6158
+ {
6159
+ "react-datepicker__day--disabled": e.isDisabled(),
6160
+ "react-datepicker__day--excluded": e.isExcluded(),
6161
+ "react-datepicker__day--selected": e.isSameDay(
6162
+ e.props.selected
6163
+ ),
6164
+ "react-datepicker__day--keyboard-selected": e.isKeyboardSelected(),
6165
+ "react-datepicker__day--range-start": e.isRangeStart(),
6166
+ "react-datepicker__day--range-end": e.isRangeEnd(),
6167
+ "react-datepicker__day--in-range": e.isInRange(),
6168
+ "react-datepicker__day--in-selecting-range": e.isInSelectingRange(),
6169
+ "react-datepicker__day--selecting-range-start": e.isSelectingRangeStart(),
6170
+ "react-datepicker__day--selecting-range-end": e.isSelectingRangeEnd(),
6171
+ "react-datepicker__day--today": e.isSameDay(Te()),
6172
+ "react-datepicker__day--weekend": e.isWeekend(),
6173
+ "react-datepicker__day--outside-month": e.isOutsideMonth(),
6174
+ },
6175
+ e.getHighLightedClass("react-datepicker__day--highlighted")
6176
+ );
6177
+ }),
6178
+ pe(be(e), "getAriaLabel", function () {
6179
+ var t = e.props,
6180
+ n = t.day,
6181
+ r = t.ariaLabelPrefixWhenEnabled,
6182
+ o = void 0 === r ? "Choose" : r,
6183
+ a = t.ariaLabelPrefixWhenDisabled,
6184
+ i = void 0 === a ? "Not available" : a,
6185
+ s = e.isDisabled() || e.isExcluded() ? i : o;
6186
+ return "".concat(s, " ").concat(Le(n, "PPPP"));
6187
+ }),
6188
+ pe(be(e), "getTabIndex", function (t, n) {
6189
+ var r = t || e.props.selected,
6190
+ o = n || e.props.preSelection;
6191
+ return e.isKeyboardSelected() || (e.isSameDay(r) && He(o, r))
6192
+ ? 0
6193
+ : -1;
6194
+ }),
6195
+ pe(be(e), "handleFocusDay", function () {
6196
+ var t =
6197
+ arguments.length > 0 && void 0 !== arguments[0]
6198
+ ? arguments[0]
6199
+ : {},
6200
+ n = !1;
6201
+ 0 === e.getTabIndex() &&
6202
+ !t.isInputFocused &&
6203
+ e.isSameDay(e.props.preSelection) &&
6204
+ ((document.activeElement &&
6205
+ document.activeElement !== document.body) ||
6206
+ (n = !0),
6207
+ e.props.containerRef &&
6208
+ e.props.containerRef.current &&
6209
+ e.props.containerRef.current.contains(
6210
+ document.activeElement
6211
+ ) &&
6212
+ document.activeElement.classList.contains(
6213
+ "react-datepicker__day"
6214
+ ) &&
6215
+ (n = !0)),
6216
+ n && e.dayEl.current.focus();
6217
+ }),
6218
+ pe(be(e), "render", function () {
6219
+ return n.createElement(
6220
+ "div",
6221
+ {
6222
+ ref: e.dayEl,
6223
+ className: e.getClassNames(e.props.day),
6224
+ onKeyDown: e.handleOnKeyDown,
6225
+ onClick: e.handleClick,
6226
+ onMouseEnter: e.handleMouseEnter,
6227
+ tabIndex: e.getTabIndex(),
6228
+ "aria-label": e.getAriaLabel(),
6229
+ role: "button",
6230
+ "aria-disabled": e.isDisabled(),
6231
+ },
6232
+ e.props.renderDayContents
6233
+ ? e.props.renderDayContents(M(e.props.day), e.props.day)
6234
+ : M(e.props.day)
6235
+ );
6236
+ }),
6237
+ e
6238
+ );
6239
+ }
6240
+ return (
6241
+ he(r, [
6242
+ {
6243
+ key: "componentDidMount",
6244
+ value: function () {
6245
+ this.handleFocusDay();
6246
+ },
6247
+ },
6248
+ {
6249
+ key: "componentDidUpdate",
6250
+ value: function (e) {
6251
+ this.handleFocusDay(e);
6252
+ },
6253
+ },
6254
+ ]),
6255
+ r
6256
+ );
6257
+ })(n.Component),
6258
+ wt = (function (e) {
6259
+ _e(r, e);
6260
+ var t = we(r);
6261
+ function r() {
6262
+ var e;
6263
+ ue(this, r);
6264
+ for (
6265
+ var n = arguments.length, o = new Array(n), a = 0;
6266
+ a < n;
6267
+ a++
6268
+ )
6269
+ o[a] = arguments[a];
6270
+ return (
6271
+ pe(
6272
+ be((e = t.call.apply(t, [this].concat(o)))),
6273
+ "handleClick",
6274
+ function (t) {
6275
+ e.props.onClick && e.props.onClick(t);
6276
+ }
6277
+ ),
6278
+ e
6279
+ );
6280
+ }
6281
+ return (
6282
+ he(r, [
6283
+ {
6284
+ key: "render",
6285
+ value: function () {
6286
+ var e = this.props,
6287
+ t = e.weekNumber,
6288
+ r = e.ariaLabelPrefix,
6289
+ a = void 0 === r ? "week " : r,
6290
+ i = {
6291
+ "react-datepicker__week-number": !0,
6292
+ "react-datepicker__week-number--clickable": !!e.onClick,
6293
+ };
6294
+ return n.createElement(
6295
+ "div",
6296
+ {
6297
+ className: o(i),
6298
+ "aria-label": ""
6299
+ .concat(a, " ")
6300
+ .concat(this.props.weekNumber),
6301
+ onClick: this.handleClick,
6302
+ },
6303
+ t
6304
+ );
6305
+ },
6306
+ },
6307
+ ]),
6308
+ r
6309
+ );
6310
+ })(n.Component),
6311
+ kt = (function (e) {
6312
+ _e(r, e);
6313
+ var t = we(r);
6314
+ function r() {
6315
+ var e;
6316
+ ue(this, r);
6317
+ for (
6318
+ var o = arguments.length, a = new Array(o), i = 0;
6319
+ i < o;
6320
+ i++
6321
+ )
6322
+ a[i] = arguments[i];
6323
+ return (
6324
+ pe(
6325
+ be((e = t.call.apply(t, [this].concat(a)))),
6326
+ "handleDayClick",
6327
+ function (t, n) {
6328
+ e.props.onDayClick && e.props.onDayClick(t, n);
6329
+ }
6330
+ ),
6331
+ pe(be(e), "handleDayMouseEnter", function (t) {
6332
+ e.props.onDayMouseEnter && e.props.onDayMouseEnter(t);
6333
+ }),
6334
+ pe(be(e), "handleWeekClick", function (t, n, r) {
6335
+ "function" == typeof e.props.onWeekSelect &&
6336
+ e.props.onWeekSelect(t, n, r),
6337
+ e.props.shouldCloseOnSelect && e.props.setOpen(!1);
6338
+ }),
6339
+ pe(be(e), "formatWeekNumber", function (t) {
6340
+ return e.props.formatWeekNumber
6341
+ ? e.props.formatWeekNumber(t)
6342
+ : Pe(t, e.props.locale);
6343
+ }),
6344
+ pe(be(e), "renderDays", function () {
6345
+ var t = Ae(e.props.day, e.props.locale),
6346
+ r = [],
6347
+ o = e.formatWeekNumber(t);
6348
+ if (e.props.showWeekNumber) {
6349
+ var a = e.props.onWeekSelect
6350
+ ? e.handleWeekClick.bind(be(e), t, o)
6351
+ : void 0;
6352
+ r.push(
6353
+ n.createElement(wt, {
6354
+ key: "W",
6355
+ weekNumber: o,
6356
+ onClick: a,
6357
+ ariaLabelPrefix: e.props.ariaLabelPrefix,
6358
+ })
6359
+ );
6360
+ }
6361
+ return r.concat(
6362
+ [0, 1, 2, 3, 4, 5, 6].map(function (r) {
6363
+ var o = u(t, r);
6364
+ return n.createElement(yt, {
6365
+ ariaLabelPrefixWhenEnabled:
6366
+ e.props.chooseDayAriaLabelPrefix,
6367
+ ariaLabelPrefixWhenDisabled:
6368
+ e.props.disabledDayAriaLabelPrefix,
6369
+ key: o.valueOf(),
6370
+ day: o,
6371
+ month: e.props.month,
6372
+ onClick: e.handleDayClick.bind(be(e), o),
6373
+ onMouseEnter: e.handleDayMouseEnter.bind(be(e), o),
6374
+ minDate: e.props.minDate,
6375
+ maxDate: e.props.maxDate,
6376
+ excludeDates: e.props.excludeDates,
6377
+ includeDates: e.props.includeDates,
6378
+ inline: e.props.inline,
6379
+ highlightDates: e.props.highlightDates,
6380
+ selectingDate: e.props.selectingDate,
6381
+ filterDate: e.props.filterDate,
6382
+ preSelection: e.props.preSelection,
6383
+ selected: e.props.selected,
6384
+ selectsStart: e.props.selectsStart,
6385
+ selectsEnd: e.props.selectsEnd,
6386
+ startDate: e.props.startDate,
6387
+ endDate: e.props.endDate,
6388
+ dayClassName: e.props.dayClassName,
6389
+ renderDayContents: e.props.renderDayContents,
6390
+ disabledKeyboardNavigation:
6391
+ e.props.disabledKeyboardNavigation,
6392
+ handleOnKeyDown: e.props.handleOnKeyDown,
6393
+ isInputFocused: e.props.isInputFocused,
6394
+ containerRef: e.props.containerRef,
6395
+ });
6396
+ })
6397
+ );
6398
+ }),
6399
+ e
6400
+ );
6401
+ }
6402
+ return (
6403
+ he(
6404
+ r,
6405
+ [
6406
+ {
6407
+ key: "render",
6408
+ value: function () {
6409
+ return n.createElement(
6410
+ "div",
6411
+ { className: "react-datepicker__week" },
6412
+ this.renderDays()
6413
+ );
6414
+ },
6415
+ },
6416
+ ],
6417
+ [
6418
+ {
6419
+ key: "defaultProps",
6420
+ get: function () {
6421
+ return { shouldCloseOnSelect: !0 };
6422
+ },
6423
+ },
6424
+ ]
6425
+ ),
6426
+ r
6427
+ );
6428
+ })(n.Component),
6429
+ xt = (function (e) {
6430
+ _e(r, e);
6431
+ var t = we(r);
6432
+ function r() {
6433
+ var e;
6434
+ ue(this, r);
6435
+ for (
6436
+ var a = arguments.length, i = new Array(a), s = 0;
6437
+ s < a;
6438
+ s++
6439
+ )
6440
+ i[s] = arguments[s];
6441
+ return (
6442
+ pe(
6443
+ be((e = t.call.apply(t, [this].concat(i)))),
6444
+ "handleDayClick",
6445
+ function (t, n) {
6446
+ e.props.onDayClick &&
6447
+ e.props.onDayClick(t, n, e.props.orderInDisplay);
6448
+ }
6449
+ ),
6450
+ pe(be(e), "handleDayMouseEnter", function (t) {
6451
+ e.props.onDayMouseEnter && e.props.onDayMouseEnter(t);
6452
+ }),
6453
+ pe(be(e), "handleMouseLeave", function () {
6454
+ e.props.onMouseLeave && e.props.onMouseLeave();
6455
+ }),
6456
+ pe(be(e), "isRangeStartMonth", function (t) {
6457
+ var n = e.props,
6458
+ r = n.day,
6459
+ o = n.startDate,
6460
+ a = n.endDate;
6461
+ return !(!o || !a) && je(N(r, t), o);
6462
+ }),
6463
+ pe(be(e), "isRangeStartQuarter", function (t) {
6464
+ var n = e.props,
6465
+ r = n.day,
6466
+ o = n.startDate,
6467
+ a = n.endDate;
6468
+ return !(!o || !a) && Fe(A(r, t), o);
6469
+ }),
6470
+ pe(be(e), "isRangeEndMonth", function (t) {
6471
+ var n = e.props,
6472
+ r = n.day,
6473
+ o = n.startDate,
6474
+ a = n.endDate;
6475
+ return !(!o || !a) && je(N(r, t), a);
6476
+ }),
6477
+ pe(be(e), "isRangeEndQuarter", function (t) {
6478
+ var n = e.props,
6479
+ r = n.day,
6480
+ o = n.startDate,
6481
+ a = n.endDate;
6482
+ return !(!o || !a) && Fe(A(r, t), a);
6483
+ }),
6484
+ pe(be(e), "isWeekInMonth", function (t) {
6485
+ var n = e.props.day,
6486
+ r = u(t, 6);
6487
+ return je(t, n) || je(r, n);
6488
+ }),
6489
+ pe(be(e), "renderWeeks", function () {
6490
+ for (
6491
+ var t = [],
6492
+ r = e.props.fixedHeight,
6493
+ o = Ae(Ie(e.props.day), e.props.locale),
6494
+ a = 0,
6495
+ i = !1;
6496
+ t.push(
6497
+ n.createElement(kt, {
6498
+ ariaLabelPrefix: e.props.weekAriaLabelPrefix,
6499
+ chooseDayAriaLabelPrefix:
6500
+ e.props.chooseDayAriaLabelPrefix,
6501
+ disabledDayAriaLabelPrefix:
6502
+ e.props.disabledDayAriaLabelPrefix,
6503
+ key: a,
6504
+ day: o,
6505
+ month: T(e.props.day),
6506
+ onDayClick: e.handleDayClick,
6507
+ onDayMouseEnter: e.handleDayMouseEnter,
6508
+ onWeekSelect: e.props.onWeekSelect,
6509
+ formatWeekNumber: e.props.formatWeekNumber,
6510
+ locale: e.props.locale,
6511
+ minDate: e.props.minDate,
6512
+ maxDate: e.props.maxDate,
6513
+ excludeDates: e.props.excludeDates,
6514
+ includeDates: e.props.includeDates,
6515
+ inline: e.props.inline,
6516
+ highlightDates: e.props.highlightDates,
6517
+ selectingDate: e.props.selectingDate,
6518
+ filterDate: e.props.filterDate,
6519
+ preSelection: e.props.preSelection,
6520
+ selected: e.props.selected,
6521
+ selectsStart: e.props.selectsStart,
6522
+ selectsEnd: e.props.selectsEnd,
6523
+ showWeekNumber: e.props.showWeekNumbers,
6524
+ startDate: e.props.startDate,
6525
+ endDate: e.props.endDate,
6526
+ dayClassName: e.props.dayClassName,
6527
+ setOpen: e.props.setOpen,
6528
+ shouldCloseOnSelect: e.props.shouldCloseOnSelect,
6529
+ disabledKeyboardNavigation:
6530
+ e.props.disabledKeyboardNavigation,
6531
+ renderDayContents: e.props.renderDayContents,
6532
+ handleOnKeyDown: e.props.handleOnKeyDown,
6533
+ isInputFocused: e.props.isInputFocused,
6534
+ containerRef: e.props.containerRef,
6535
+ })
6536
+ ),
6537
+ !i;
6538
+
6539
+ ) {
6540
+ a++, (o = d(o, 1));
6541
+ var s = r && a >= 6,
6542
+ l = !r && !e.isWeekInMonth(o);
6543
+ if (s || l) {
6544
+ if (!e.props.peekNextMonth) break;
6545
+ i = !0;
6546
+ }
6547
+ }
6548
+ return t;
6549
+ }),
6550
+ pe(be(e), "onMonthClick", function (t, n) {
6551
+ e.handleDayClick(Ie(N(e.props.day, n)), t);
6552
+ }),
6553
+ pe(be(e), "onQuarterClick", function (t, n) {
6554
+ e.handleDayClick(Re(A(e.props.day, n)), t);
6555
+ }),
6556
+ pe(be(e), "getMonthClassNames", function (t) {
6557
+ var n = e.props,
6558
+ r = n.day,
6559
+ a = n.startDate,
6560
+ i = n.endDate,
6561
+ s = n.selected,
6562
+ l = n.minDate,
6563
+ c = n.maxDate;
6564
+ return o(
6565
+ "react-datepicker__month-text",
6566
+ "react-datepicker__month-".concat(t),
6567
+ {
6568
+ "react-datepicker__month--disabled":
6569
+ (l || c) && Qe(N(r, t), e.props),
6570
+ "react-datepicker__month--selected":
6571
+ T(r) === t && D(r) === D(s),
6572
+ "react-datepicker__month--in-range": Xe(a, i, t, r),
6573
+ "react-datepicker__month--range-start": e.isRangeStartMonth(
6574
+ t
6575
+ ),
6576
+ "react-datepicker__month--range-end": e.isRangeEndMonth(
6577
+ t
6578
+ ),
6579
+ }
6580
+ );
6581
+ }),
6582
+ pe(be(e), "getQuarterClassNames", function (t) {
6583
+ var n = e.props,
6584
+ r = n.day,
6585
+ a = n.startDate,
6586
+ i = n.endDate,
6587
+ s = n.selected,
6588
+ l = n.minDate,
6589
+ c = n.maxDate;
6590
+ return o(
6591
+ "react-datepicker__quarter-text",
6592
+ "react-datepicker__quarter-".concat(t),
6593
+ {
6594
+ "react-datepicker__quarter--disabled":
6595
+ (l || c) && $e(A(r, t), e.props),
6596
+ "react-datepicker__quarter--selected":
6597
+ S(r) === t && D(r) === D(s),
6598
+ "react-datepicker__quarter--in-range": Ze(a, i, t, r),
6599
+ "react-datepicker__quarter--range-start": e.isRangeStartQuarter(
6600
+ t
6601
+ ),
6602
+ "react-datepicker__quarter--range-end": e.isRangeEndQuarter(
6603
+ t
6604
+ ),
6605
+ }
6606
+ );
6607
+ }),
6608
+ pe(be(e), "renderMonths", function () {
6609
+ var t = e.props,
6610
+ r = t.showFullMonthYearPicker,
6611
+ o = t.locale;
6612
+ return [
6613
+ [0, 1, 2],
6614
+ [3, 4, 5],
6615
+ [6, 7, 8],
6616
+ [9, 10, 11],
6617
+ ].map(function (t, a) {
6618
+ return n.createElement(
6619
+ "div",
6620
+ { className: "react-datepicker__month-wrapper", key: a },
6621
+ t.map(function (t, a) {
6622
+ return n.createElement(
6623
+ "div",
6624
+ {
6625
+ key: a,
6626
+ onClick: function (n) {
6627
+ e.onMonthClick(n, t);
6628
+ },
6629
+ className: e.getMonthClassNames(t),
6630
+ },
6631
+ r ? We(t, o) : qe(t, o)
6632
+ );
6633
+ })
6634
+ );
6635
+ });
6636
+ }),
6637
+ pe(be(e), "renderQuarters", function () {
6638
+ return n.createElement(
6639
+ "div",
6640
+ { className: "react-datepicker__quarter-wrapper" },
6641
+ [1, 2, 3, 4].map(function (t, r) {
6642
+ return n.createElement(
6643
+ "div",
6644
+ {
6645
+ key: r,
6646
+ onClick: function (n) {
6647
+ e.onQuarterClick(n, t);
6648
+ },
6649
+ className: e.getQuarterClassNames(t),
6650
+ },
6651
+ Ge(t, e.props.locale)
6652
+ );
6653
+ })
6654
+ );
6655
+ }),
6656
+ pe(be(e), "getClassNames", function () {
6657
+ var t = e.props,
6658
+ n = t.selectingDate,
6659
+ r = t.selectsStart,
6660
+ a = t.selectsEnd,
6661
+ i = t.showMonthYearPicker,
6662
+ s = t.showQuarterYearPicker;
6663
+ return o(
6664
+ "react-datepicker__month",
6665
+ {
6666
+ "react-datepicker__month--selecting-range": n && (r || a),
6667
+ },
6668
+ { "react-datepicker__monthPicker": i },
6669
+ { "react-datepicker__quarterPicker": s }
6670
+ );
6671
+ }),
6672
+ e
6673
+ );
6674
+ }
6675
+ return (
6676
+ he(r, [
6677
+ {
6678
+ key: "render",
6679
+ value: function () {
6680
+ var e = this.props,
6681
+ t = e.showMonthYearPicker,
6682
+ r = e.showQuarterYearPicker,
6683
+ o = e.day,
6684
+ a = e.ariaLabelPrefix,
6685
+ i = void 0 === a ? "month " : a;
6686
+ return n.createElement(
6687
+ "div",
6688
+ {
6689
+ className: this.getClassNames(),
6690
+ onMouseLeave: this.handleMouseLeave,
6691
+ "aria-label": ""
6692
+ .concat(i, " ")
6693
+ .concat(Le(o, "yyyy-MM")),
6694
+ },
6695
+ t
6696
+ ? this.renderMonths()
6697
+ : r
6698
+ ? this.renderQuarters()
6699
+ : this.renderWeeks()
6700
+ );
6701
+ },
6702
+ },
6703
+ ]),
6704
+ r
6705
+ );
6706
+ })(n.Component),
6707
+ Mt = (function (e) {
6708
+ _e(r, e);
6709
+ var t = we(r);
6710
+ function r() {
6711
+ var e;
6712
+ ue(this, r);
6713
+ for (
6714
+ var o = arguments.length, a = new Array(o), i = 0;
6715
+ i < o;
6716
+ i++
6717
+ )
6718
+ a[i] = arguments[i];
6719
+ return (
6720
+ pe(be((e = t.call.apply(t, [this].concat(a)))), "state", {
6721
+ height: null,
6722
+ }),
6723
+ pe(be(e), "handleClick", function (t) {
6724
+ ((e.props.minTime || e.props.maxTime) && nt(t, e.props)) ||
6725
+ (e.props.excludeTimes && tt(t, e.props.excludeTimes)) ||
6726
+ (e.props.includeTimes && !tt(t, e.props.includeTimes)) ||
6727
+ e.props.onChange(t);
6728
+ }),
6729
+ pe(be(e), "liClasses", function (t, n, r) {
6730
+ var o = [
6731
+ "react-datepicker__time-list-item",
6732
+ e.props.timeClassName
6733
+ ? e.props.timeClassName(t, n, r)
6734
+ : void 0,
6735
+ ];
6736
+ return (
6737
+ e.props.selected &&
6738
+ n === k(t) &&
6739
+ r === w(t) &&
6740
+ o.push("react-datepicker__time-list-item--selected"),
6741
+ (((e.props.minTime || e.props.maxTime) && nt(t, e.props)) ||
6742
+ (e.props.excludeTimes && tt(t, e.props.excludeTimes)) ||
6743
+ (e.props.includeTimes && !tt(t, e.props.includeTimes))) &&
6744
+ o.push("react-datepicker__time-list-item--disabled"),
6745
+ e.props.injectTimes &&
6746
+ (60 * k(t) + w(t)) % e.props.intervals != 0 &&
6747
+ o.push("react-datepicker__time-list-item--injected"),
6748
+ o.join(" ")
6749
+ );
6750
+ }),
6751
+ pe(be(e), "renderTimes", function () {
6752
+ for (
6753
+ var t = [],
6754
+ r = e.props.format ? e.props.format : "p",
6755
+ o = e.props.intervals,
6756
+ a = e.props.selected || e.props.openToDate || Te(),
6757
+ i = k(a),
6758
+ s = w(a),
6759
+ c = Ne(Te()),
6760
+ u = 1440 / o,
6761
+ d =
6762
+ e.props.injectTimes &&
6763
+ e.props.injectTimes.sort(function (e, t) {
6764
+ return e - t;
6765
+ }),
6766
+ h = 0;
6767
+ h < u;
6768
+ h++
6769
+ ) {
6770
+ var p = l(c, h * o);
6771
+ if ((t.push(p), d)) {
6772
+ var f = ut(c, p, h, o, d);
6773
+ t = t.concat(f);
6774
+ }
6775
+ }
6776
+ return t.map(function (t, o) {
6777
+ return n.createElement(
6778
+ "li",
6779
+ {
6780
+ key: o,
6781
+ onClick: e.handleClick.bind(be(e), t),
6782
+ className: e.liClasses(t, i, s),
6783
+ ref: function (n) {
6784
+ i === k(t) && s >= w(t) && (e.centerLi = n);
6785
+ },
6786
+ },
6787
+ Le(t, r, e.props.locale)
6788
+ );
6789
+ });
6790
+ }),
6791
+ e
6792
+ );
6793
+ }
6794
+ return (
6795
+ he(
6796
+ r,
6797
+ [
6798
+ {
6799
+ key: "componentDidMount",
6800
+ value: function () {
6801
+ (this.list.scrollTop = r.calcCenterPosition(
6802
+ this.props.monthRef
6803
+ ? this.props.monthRef.clientHeight -
6804
+ this.header.clientHeight
6805
+ : this.list.clientHeight,
6806
+ this.centerLi
6807
+ )),
6808
+ this.props.monthRef &&
6809
+ this.header &&
6810
+ this.setState({
6811
+ height:
6812
+ this.props.monthRef.clientHeight -
6813
+ this.header.clientHeight,
6814
+ });
6815
+ },
6816
+ },
6817
+ {
6818
+ key: "render",
6819
+ value: function () {
6820
+ var e = this,
6821
+ t = this.state.height;
6822
+ return n.createElement(
6823
+ "div",
6824
+ {
6825
+ className: "react-datepicker__time-container ".concat(
6826
+ this.props.todayButton
6827
+ ? "react-datepicker__time-container--with-today-button"
6828
+ : ""
6829
+ ),
6830
+ },
6831
+ n.createElement(
6832
+ "div",
6833
+ {
6834
+ className:
6835
+ "react-datepicker__header react-datepicker__header--time",
6836
+ ref: function (t) {
6837
+ e.header = t;
6838
+ },
6839
+ },
6840
+ n.createElement(
6841
+ "div",
6842
+ { className: "react-datepicker-time__header" },
6843
+ this.props.timeCaption
6844
+ )
6845
+ ),
6846
+ n.createElement(
6847
+ "div",
6848
+ { className: "react-datepicker__time" },
6849
+ n.createElement(
6850
+ "div",
6851
+ { className: "react-datepicker__time-box" },
6852
+ n.createElement(
6853
+ "ul",
6854
+ {
6855
+ className: "react-datepicker__time-list",
6856
+ ref: function (t) {
6857
+ e.list = t;
6858
+ },
6859
+ style: t ? { height: t } : {},
6860
+ },
6861
+ this.renderTimes()
6862
+ )
6863
+ )
6864
+ )
6865
+ );
6866
+ },
6867
+ },
6868
+ ],
6869
+ [
6870
+ {
6871
+ key: "defaultProps",
6872
+ get: function () {
6873
+ return {
6874
+ intervals: 30,
6875
+ onTimeChange: function () {},
6876
+ todayButton: null,
6877
+ timeCaption: "Time",
6878
+ };
6879
+ },
6880
+ },
6881
+ ]
6882
+ ),
6883
+ r
6884
+ );
6885
+ })(n.Component);
6886
+ pe(Mt, "calcCenterPosition", function (e, t) {
6887
+ return t.offsetTop - (e / 2 - t.clientHeight / 2);
6888
+ });
6889
+ var Et = (function (e) {
6890
+ _e(r, e);
6891
+ var t = we(r);
6892
+ function r(e) {
6893
+ var n;
6894
+ return (
6895
+ ue(this, r),
6896
+ pe(
6897
+ be((n = t.call(this, e))),
6898
+ "handleYearClick",
6899
+ function (e, t) {
6900
+ n.props.onDayClick && n.props.onDayClick(e, t);
6901
+ }
6902
+ ),
6903
+ pe(be(n), "onYearClick", function (e, t) {
6904
+ var r;
6905
+ n.handleYearClick(((r = I(n.props.date, t)), q(r)), e);
6906
+ }),
6907
+ n
6908
+ );
6909
+ }
6910
+ return (
6911
+ he(r, [
6912
+ {
6913
+ key: "render",
6914
+ value: function () {
6915
+ for (
6916
+ var e = this,
6917
+ t = [],
6918
+ r = this.props.date,
6919
+ o = function (r, o) {
6920
+ t.push(
6921
+ n.createElement(
6922
+ "div",
6923
+ {
6924
+ onClick: function (t) {
6925
+ e.onYearClick(t, r);
6926
+ },
6927
+ className:
6928
+ "react-datepicker__year-container-text",
6929
+ key: r,
6930
+ },
6931
+ r
6932
+ )
6933
+ );
6934
+ },
6935
+ a = D(r) - 11,
6936
+ i = 0;
6937
+ a <= D(r);
6938
+ a++, i++
6939
+ )
6940
+ o(a);
6941
+ return n.createElement(
6942
+ "div",
6943
+ { className: "react-datepicker__year-container" },
6944
+ t
6945
+ );
6946
+ },
6947
+ },
6948
+ ]),
6949
+ r
6950
+ );
6951
+ })(n.Component),
6952
+ Tt = (function (e) {
6953
+ _e(r, e);
6954
+ var t = we(r);
6955
+ function r(e) {
6956
+ var o;
6957
+ return (
6958
+ ue(this, r),
6959
+ pe(be((o = t.call(this, e))), "onTimeChange", function (e) {
6960
+ o.setState({ time: e });
6961
+ var t = new Date();
6962
+ t.setHours(e.split(":")[0]),
6963
+ t.setMinutes(e.split(":")[1]),
6964
+ o.props.onChange(t);
6965
+ }),
6966
+ pe(be(o), "renderTimeInput", function () {
6967
+ var e = o.state.time,
6968
+ t = o.props,
6969
+ r = t.timeString,
6970
+ a = t.customTimeInput;
6971
+ return a
6972
+ ? n.cloneElement(a, { value: e, onChange: o.onTimeChange })
6973
+ : n.createElement("input", {
6974
+ type: "time",
6975
+ className: "react-datepicker-time__input",
6976
+ placeholder: "Time",
6977
+ name: "time-input",
6978
+ required: !0,
6979
+ value: e,
6980
+ onChange: function (e) {
6981
+ o.onTimeChange(e.target.value || r);
6982
+ },
6983
+ });
6984
+ }),
6985
+ (o.state = { time: o.props.timeString }),
6986
+ o
6987
+ );
6988
+ }
6989
+ return (
6990
+ he(r, [
6991
+ {
6992
+ key: "render",
6993
+ value: function () {
6994
+ return n.createElement(
6995
+ "div",
6996
+ { className: "react-datepicker__input-time-container" },
6997
+ n.createElement(
6998
+ "div",
6999
+ { className: "react-datepicker-time__caption" },
7000
+ this.props.timeInputLabel
7001
+ ),
7002
+ n.createElement(
7003
+ "div",
7004
+ { className: "react-datepicker-time__input-container" },
7005
+ n.createElement(
7006
+ "div",
7007
+ { className: "react-datepicker-time__input" },
7008
+ this.renderTimeInput()
7009
+ )
7010
+ )
7011
+ );
7012
+ },
7013
+ },
7014
+ ]),
7015
+ r
7016
+ );
7017
+ })(n.Component);
7018
+ function St(e) {
7019
+ var t = e.className,
7020
+ r = e.children,
7021
+ o = e.showPopperArrow,
7022
+ a = e.arrowProps,
7023
+ i = void 0 === a ? {} : a;
7024
+ return n.createElement(
7025
+ "div",
7026
+ { className: t },
7027
+ o &&
7028
+ n.createElement(
7029
+ "div",
7030
+ fe({ className: "react-datepicker__triangle" }, i)
7031
+ ),
7032
+ r
7033
+ );
7034
+ }
7035
+ var Dt = [
7036
+ "react-datepicker__year-select",
7037
+ "react-datepicker__month-select",
7038
+ "react-datepicker__month-year-select",
7039
+ ],
7040
+ Lt = (function (e) {
7041
+ _e(r, e);
7042
+ var t = we(r);
7043
+ function r(e) {
7044
+ var a;
7045
+ return (
7046
+ ue(this, r),
7047
+ pe(
7048
+ be((a = t.call(this, e))),
7049
+ "handleClickOutside",
7050
+ function (e) {
7051
+ a.props.onClickOutside(e);
7052
+ }
7053
+ ),
7054
+ pe(be(a), "setClickOutsideRef", function () {
7055
+ return a.containerRef.current;
7056
+ }),
7057
+ pe(be(a), "handleDropdownFocus", function (e) {
7058
+ (function () {
7059
+ var e =
7060
+ arguments.length > 0 && void 0 !== arguments[0]
7061
+ ? arguments[0]
7062
+ : {},
7063
+ t = (e.className || "").split(/\s+/);
7064
+ return Dt.some(function (e) {
7065
+ return t.indexOf(e) >= 0;
7066
+ });
7067
+ })(e.target) && a.props.onDropdownFocus();
7068
+ }),
7069
+ pe(be(a), "getDateInView", function () {
7070
+ var e = a.props,
7071
+ t = e.preSelection,
7072
+ n = e.selected,
7073
+ r = e.openToDate,
7074
+ o = st(a.props),
7075
+ i = lt(a.props),
7076
+ s = Te();
7077
+ return (
7078
+ r || n || t || (o && ne(s, o) ? o : i && te(s, i) ? i : s)
7079
+ );
7080
+ }),
7081
+ pe(be(a), "increaseMonth", function () {
7082
+ a.setState(
7083
+ function (e) {
7084
+ var t = e.date;
7085
+ return { date: h(t, 1) };
7086
+ },
7087
+ function () {
7088
+ return a.handleMonthChange(a.state.date);
7089
+ }
7090
+ );
7091
+ }),
7092
+ pe(be(a), "decreaseMonth", function () {
7093
+ a.setState(
7094
+ function (e) {
7095
+ var t = e.date;
7096
+ return { date: v(t, 1) };
7097
+ },
7098
+ function () {
7099
+ return a.handleMonthChange(a.state.date);
7100
+ }
7101
+ );
7102
+ }),
7103
+ pe(be(a), "handleDayClick", function (e, t, n) {
7104
+ return a.props.onSelect(e, t, n);
7105
+ }),
7106
+ pe(be(a), "handleDayMouseEnter", function (e) {
7107
+ a.setState({ selectingDate: e }),
7108
+ a.props.onDayMouseEnter && a.props.onDayMouseEnter(e);
7109
+ }),
7110
+ pe(be(a), "handleMonthMouseLeave", function () {
7111
+ a.setState({ selectingDate: null }),
7112
+ a.props.onMonthMouseLeave && a.props.onMonthMouseLeave();
7113
+ }),
7114
+ pe(be(a), "handleYearChange", function (e) {
7115
+ a.props.onYearChange && a.props.onYearChange(e);
7116
+ }),
7117
+ pe(be(a), "handleMonthChange", function (e) {
7118
+ a.props.onMonthChange && a.props.onMonthChange(e),
7119
+ a.props.adjustDateOnChange &&
7120
+ (a.props.onSelect && a.props.onSelect(e),
7121
+ a.props.setOpen && a.props.setOpen(!0)),
7122
+ a.props.setPreSelection && a.props.setPreSelection(e);
7123
+ }),
7124
+ pe(be(a), "handleMonthYearChange", function (e) {
7125
+ a.handleYearChange(e), a.handleMonthChange(e);
7126
+ }),
7127
+ pe(be(a), "changeYear", function (e) {
7128
+ a.setState(
7129
+ function (t) {
7130
+ var n = t.date;
7131
+ return { date: I(n, e) };
7132
+ },
7133
+ function () {
7134
+ return a.handleYearChange(a.state.date);
7135
+ }
7136
+ );
7137
+ }),
7138
+ pe(be(a), "changeMonth", function (e) {
7139
+ a.setState(
7140
+ function (t) {
7141
+ var n = t.date;
7142
+ return { date: N(n, e) };
7143
+ },
7144
+ function () {
7145
+ return a.handleMonthChange(a.state.date);
7146
+ }
7147
+ );
7148
+ }),
7149
+ pe(be(a), "changeMonthYear", function (e) {
7150
+ a.setState(
7151
+ function (t) {
7152
+ var n = t.date;
7153
+ return { date: I(N(n, T(e)), D(e)) };
7154
+ },
7155
+ function () {
7156
+ return a.handleMonthYearChange(a.state.date);
7157
+ }
7158
+ );
7159
+ }),
7160
+ pe(be(a), "header", function () {
7161
+ var e =
7162
+ arguments.length > 0 && void 0 !== arguments[0]
7163
+ ? arguments[0]
7164
+ : a.state.date,
7165
+ t = Ae(e, a.props.locale),
7166
+ r = [];
7167
+ return (
7168
+ a.props.showWeekNumbers &&
7169
+ r.push(
7170
+ n.createElement(
7171
+ "div",
7172
+ { key: "W", className: "react-datepicker__day-name" },
7173
+ a.props.weekLabel || "#"
7174
+ )
7175
+ ),
7176
+ r.concat(
7177
+ [0, 1, 2, 3, 4, 5, 6].map(function (e) {
7178
+ var r = u(t, e),
7179
+ i = a.formatWeekday(r, a.props.locale),
7180
+ s = a.props.weekDayClassName
7181
+ ? a.props.weekDayClassName(r)
7182
+ : void 0;
7183
+ return n.createElement(
7184
+ "div",
7185
+ {
7186
+ key: e,
7187
+ className: o("react-datepicker__day-name", s),
7188
+ },
7189
+ i
7190
+ );
7191
+ })
7192
+ )
7193
+ );
7194
+ }),
7195
+ pe(be(a), "formatWeekday", function (e, t) {
7196
+ return a.props.formatWeekDay
7197
+ ? (function (e, t, n) {
7198
+ return t(Le(e, "EEEE", n));
7199
+ })(e, a.props.formatWeekDay, t)
7200
+ : a.props.useWeekdaysShort
7201
+ ? (function (e, t) {
7202
+ return Le(e, "EEE", t);
7203
+ })(e, t)
7204
+ : (function (e, t) {
7205
+ return Le(e, "EEEEEE", t);
7206
+ })(e, t);
7207
+ }),
7208
+ pe(be(a), "decreaseYear", function () {
7209
+ a.setState(
7210
+ function (e) {
7211
+ var t = e.date;
7212
+ return { date: b(t, a.props.showYearPicker ? 11 : 1) };
7213
+ },
7214
+ function () {
7215
+ return a.handleYearChange(a.state.date);
7216
+ }
7217
+ );
7218
+ }),
7219
+ pe(be(a), "renderPreviousButton", function () {
7220
+ if (!a.props.renderCustomHeader) {
7221
+ var e = a.props.showMonthYearPicker
7222
+ ? at(a.state.date, a.props)
7223
+ : rt(a.state.date, a.props);
7224
+ if (
7225
+ (a.props.forceShowMonthNavigation ||
7226
+ a.props.showDisabledMonthNavigation ||
7227
+ !e) &&
7228
+ !a.props.showTimeSelectOnly
7229
+ ) {
7230
+ var t = [
7231
+ "react-datepicker__navigation",
7232
+ "react-datepicker__navigation--previous",
7233
+ ],
7234
+ r = a.decreaseMonth;
7235
+ (a.props.showMonthYearPicker ||
7236
+ a.props.showQuarterYearPicker ||
7237
+ a.props.showYearPicker) &&
7238
+ (r = a.decreaseYear),
7239
+ e &&
7240
+ a.props.showDisabledMonthNavigation &&
7241
+ (t.push(
7242
+ "react-datepicker__navigation--previous--disabled"
7243
+ ),
7244
+ (r = null));
7245
+ var o =
7246
+ a.props.showMonthYearPicker ||
7247
+ a.props.showQuarterYearPicker,
7248
+ i = a.props,
7249
+ s = i.previousMonthAriaLabel,
7250
+ l = void 0 === s ? "Previous Month" : s,
7251
+ c = i.previousYearAriaLabel,
7252
+ u = void 0 === c ? "Previous Year" : c;
7253
+ return n.createElement(
7254
+ "button",
7255
+ {
7256
+ type: "button",
7257
+ className: t.join(" "),
7258
+ onClick: r,
7259
+ "aria-label": o ? u : l,
7260
+ },
7261
+ o
7262
+ ? a.props.previousYearButtonLabel
7263
+ : a.props.previousMonthButtonLabel
7264
+ );
7265
+ }
7266
+ }
7267
+ }),
7268
+ pe(be(a), "increaseYear", function () {
7269
+ a.setState(
7270
+ function (e) {
7271
+ var t = e.date;
7272
+ return { date: p(t, a.props.showYearPicker ? 11 : 1) };
7273
+ },
7274
+ function () {
7275
+ return a.handleYearChange(a.state.date);
7276
+ }
7277
+ );
7278
+ }),
7279
+ pe(be(a), "renderNextButton", function () {
7280
+ if (!a.props.renderCustomHeader) {
7281
+ var e = a.props.showMonthYearPicker
7282
+ ? it(a.state.date, a.props)
7283
+ : ot(a.state.date, a.props);
7284
+ if (
7285
+ (a.props.forceShowMonthNavigation ||
7286
+ a.props.showDisabledMonthNavigation ||
7287
+ !e) &&
7288
+ !a.props.showTimeSelectOnly
7289
+ ) {
7290
+ var t = [
7291
+ "react-datepicker__navigation",
7292
+ "react-datepicker__navigation--next",
7293
+ ];
7294
+ a.props.showTimeSelect &&
7295
+ t.push("react-datepicker__navigation--next--with-time"),
7296
+ a.props.todayButton &&
7297
+ t.push(
7298
+ "react-datepicker__navigation--next--with-today-button"
7299
+ );
7300
+ var r = a.increaseMonth;
7301
+ (a.props.showMonthYearPicker ||
7302
+ a.props.showQuarterYearPicker ||
7303
+ a.props.showYearPicker) &&
7304
+ (r = a.increaseYear),
7305
+ e &&
7306
+ a.props.showDisabledMonthNavigation &&
7307
+ (t.push(
7308
+ "react-datepicker__navigation--next--disabled"
7309
+ ),
7310
+ (r = null));
7311
+ var o =
7312
+ a.props.showMonthYearPicker ||
7313
+ a.props.showQuarterYearPicker,
7314
+ i = a.props,
7315
+ s = i.nextMonthAriaLabel,
7316
+ l = void 0 === s ? "Next Month" : s,
7317
+ c = i.nextYearAriaLabel,
7318
+ u = void 0 === c ? "Next Year" : c;
7319
+ return n.createElement(
7320
+ "button",
7321
+ {
7322
+ type: "button",
7323
+ className: t.join(" "),
7324
+ onClick: r,
7325
+ "aria-label": o ? u : l,
7326
+ },
7327
+ o
7328
+ ? a.props.nextYearButtonLabel
7329
+ : a.props.nextMonthButtonLabel
7330
+ );
7331
+ }
7332
+ }
7333
+ }),
7334
+ pe(be(a), "renderCurrentMonth", function () {
7335
+ var e =
7336
+ arguments.length > 0 && void 0 !== arguments[0]
7337
+ ? arguments[0]
7338
+ : a.state.date,
7339
+ t = ["react-datepicker__current-month"];
7340
+ return (
7341
+ a.props.showYearDropdown &&
7342
+ t.push(
7343
+ "react-datepicker__current-month--hasYearDropdown"
7344
+ ),
7345
+ a.props.showMonthDropdown &&
7346
+ t.push(
7347
+ "react-datepicker__current-month--hasMonthDropdown"
7348
+ ),
7349
+ a.props.showMonthYearDropdown &&
7350
+ t.push(
7351
+ "react-datepicker__current-month--hasMonthYearDropdown"
7352
+ ),
7353
+ n.createElement(
7354
+ "div",
7355
+ { className: t.join(" ") },
7356
+ Le(e, a.props.dateFormat, a.props.locale)
7357
+ )
7358
+ );
7359
+ }),
7360
+ pe(be(a), "renderYearDropdown", function () {
7361
+ var e =
7362
+ arguments.length > 0 &&
7363
+ void 0 !== arguments[0] &&
7364
+ arguments[0];
7365
+ if (a.props.showYearDropdown && !e)
7366
+ return n.createElement(ft, {
7367
+ adjustDateOnChange: a.props.adjustDateOnChange,
7368
+ date: a.state.date,
7369
+ onSelect: a.props.onSelect,
7370
+ setOpen: a.props.setOpen,
7371
+ dropdownMode: a.props.dropdownMode,
7372
+ onChange: a.changeYear,
7373
+ minDate: a.props.minDate,
7374
+ maxDate: a.props.maxDate,
7375
+ year: D(a.state.date),
7376
+ scrollableYearDropdown: a.props.scrollableYearDropdown,
7377
+ yearDropdownItemNumber: a.props.yearDropdownItemNumber,
7378
+ });
7379
+ }),
7380
+ pe(be(a), "renderMonthDropdown", function () {
7381
+ var e =
7382
+ arguments.length > 0 &&
7383
+ void 0 !== arguments[0] &&
7384
+ arguments[0];
7385
+ if (a.props.showMonthDropdown && !e)
7386
+ return n.createElement(gt, {
7387
+ dropdownMode: a.props.dropdownMode,
7388
+ locale: a.props.locale,
7389
+ onChange: a.changeMonth,
7390
+ month: T(a.state.date),
7391
+ useShortMonthInDropdown: a.props.useShortMonthInDropdown,
7392
+ });
7393
+ }),
7394
+ pe(be(a), "renderMonthYearDropdown", function () {
7395
+ var e =
7396
+ arguments.length > 0 &&
7397
+ void 0 !== arguments[0] &&
7398
+ arguments[0];
7399
+ if (a.props.showMonthYearDropdown && !e)
7400
+ return n.createElement(bt, {
7401
+ dropdownMode: a.props.dropdownMode,
7402
+ locale: a.props.locale,
7403
+ dateFormat: a.props.dateFormat,
7404
+ onChange: a.changeMonthYear,
7405
+ minDate: a.props.minDate,
7406
+ maxDate: a.props.maxDate,
7407
+ date: a.state.date,
7408
+ scrollableMonthYearDropdown:
7409
+ a.props.scrollableMonthYearDropdown,
7410
+ });
7411
+ }),
7412
+ pe(be(a), "renderTodayButton", function () {
7413
+ if (a.props.todayButton && !a.props.showTimeSelectOnly)
7414
+ return n.createElement(
7415
+ "div",
7416
+ {
7417
+ className: "react-datepicker__today-button",
7418
+ onClick: function (e) {
7419
+ return a.props.onSelect(B(Te()), e);
7420
+ },
7421
+ },
7422
+ a.props.todayButton
7423
+ );
7424
+ }),
7425
+ pe(be(a), "renderDefaultHeader", function (e) {
7426
+ var t = e.monthDate,
7427
+ r = e.i;
7428
+ return n.createElement(
7429
+ "div",
7430
+ { className: "react-datepicker__header" },
7431
+ a.renderCurrentMonth(t),
7432
+ n.createElement(
7433
+ "div",
7434
+ {
7435
+ className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(
7436
+ a.props.dropdownMode
7437
+ ),
7438
+ onFocus: a.handleDropdownFocus,
7439
+ },
7440
+ a.renderMonthDropdown(0 !== r),
7441
+ a.renderMonthYearDropdown(0 !== r),
7442
+ a.renderYearDropdown(0 !== r)
7443
+ ),
7444
+ n.createElement(
7445
+ "div",
7446
+ { className: "react-datepicker__day-names" },
7447
+ a.header(t)
7448
+ )
7449
+ );
7450
+ }),
7451
+ pe(be(a), "renderCustomHeader", function () {
7452
+ var e =
7453
+ arguments.length > 0 && void 0 !== arguments[0]
7454
+ ? arguments[0]
7455
+ : {},
7456
+ t = e.monthDate,
7457
+ r = e.i;
7458
+ if (0 !== r && void 0 !== r) return null;
7459
+ var o = rt(a.state.date, a.props),
7460
+ i = ot(a.state.date, a.props),
7461
+ s = at(a.state.date, a.props),
7462
+ l = it(a.state.date, a.props),
7463
+ c =
7464
+ !a.props.showMonthYearPicker &&
7465
+ !a.props.showQuarterYearPicker &&
7466
+ !a.props.showYearPicker;
7467
+ return n.createElement(
7468
+ "div",
7469
+ {
7470
+ className:
7471
+ "react-datepicker__header react-datepicker__header--custom",
7472
+ onFocus: a.props.onDropdownFocus,
7473
+ },
7474
+ a.props.renderCustomHeader(
7475
+ ge(
7476
+ ge({}, a.state),
7477
+ {},
7478
+ {
7479
+ changeMonth: a.changeMonth,
7480
+ changeYear: a.changeYear,
7481
+ decreaseMonth: a.decreaseMonth,
7482
+ increaseMonth: a.increaseMonth,
7483
+ decreaseYear: a.decreaseYear,
7484
+ increaseYear: a.increaseYear,
7485
+ prevMonthButtonDisabled: o,
7486
+ nextMonthButtonDisabled: i,
7487
+ prevYearButtonDisabled: s,
7488
+ nextYearButtonDisabled: l,
7489
+ }
7490
+ )
7491
+ ),
7492
+ c &&
7493
+ n.createElement(
7494
+ "div",
7495
+ { className: "react-datepicker__day-names" },
7496
+ a.header(t)
7497
+ )
7498
+ );
7499
+ }),
7500
+ pe(be(a), "renderYearHeader", function () {
7501
+ return n.createElement(
7502
+ "div",
7503
+ {
7504
+ className:
7505
+ "react-datepicker__header react-datepicker-year-header",
7506
+ },
7507
+ a.props.showYearPicker
7508
+ ? ""
7509
+ .concat(D(a.state.date) - 11, " - ")
7510
+ .concat(D(a.state.date))
7511
+ : D(a.state.date)
7512
+ );
7513
+ }),
7514
+ pe(be(a), "renderHeader", function (e) {
7515
+ switch (!0) {
7516
+ case void 0 !== a.props.renderCustomHeader:
7517
+ return a.renderCustomHeader(e);
7518
+ case a.props.showMonthYearPicker ||
7519
+ a.props.showQuarterYearPicker ||
7520
+ a.props.showYearPicker:
7521
+ return a.renderYearHeader(e);
7522
+ default:
7523
+ return a.renderDefaultHeader(e);
7524
+ }
7525
+ }),
7526
+ pe(be(a), "renderMonths", function () {
7527
+ if (!a.props.showTimeSelectOnly && !a.props.showYearPicker) {
7528
+ for (
7529
+ var e = [],
7530
+ t = a.props.showPreviousMonths
7531
+ ? a.props.monthsShown - 1
7532
+ : 0,
7533
+ r = v(a.state.date, t),
7534
+ o = 0;
7535
+ o < a.props.monthsShown;
7536
+ ++o
7537
+ ) {
7538
+ var i = o - a.props.monthSelectedIn,
7539
+ s = h(r, i),
7540
+ l = "month-".concat(o);
7541
+ e.push(
7542
+ n.createElement(
7543
+ "div",
7544
+ {
7545
+ key: l,
7546
+ ref: function (e) {
7547
+ a.monthContainer = e;
7548
+ },
7549
+ className: "react-datepicker__month-container",
7550
+ },
7551
+ a.renderHeader({ monthDate: s, i: o }),
7552
+ n.createElement(xt, {
7553
+ chooseDayAriaLabelPrefix:
7554
+ a.props.chooseDayAriaLabelPrefix,
7555
+ disabledDayAriaLabelPrefix:
7556
+ a.props.disabledDayAriaLabelPrefix,
7557
+ weekAriaLabelPrefix: a.props.weekAriaLabelPrefix,
7558
+ onChange: a.changeMonthYear,
7559
+ day: s,
7560
+ dayClassName: a.props.dayClassName,
7561
+ monthClassName: a.props.monthClassName,
7562
+ onDayClick: a.handleDayClick,
7563
+ handleOnKeyDown: a.props.handleOnKeyDown,
7564
+ onDayMouseEnter: a.handleDayMouseEnter,
7565
+ onMouseLeave: a.handleMonthMouseLeave,
7566
+ onWeekSelect: a.props.onWeekSelect,
7567
+ orderInDisplay: o,
7568
+ formatWeekNumber: a.props.formatWeekNumber,
7569
+ locale: a.props.locale,
7570
+ minDate: a.props.minDate,
7571
+ maxDate: a.props.maxDate,
7572
+ excludeDates: a.props.excludeDates,
7573
+ highlightDates: a.props.highlightDates,
7574
+ selectingDate: a.state.selectingDate,
7575
+ includeDates: a.props.includeDates,
7576
+ inline: a.props.inline,
7577
+ fixedHeight: a.props.fixedHeight,
7578
+ filterDate: a.props.filterDate,
7579
+ preSelection: a.props.preSelection,
7580
+ selected: a.props.selected,
7581
+ selectsStart: a.props.selectsStart,
7582
+ selectsEnd: a.props.selectsEnd,
7583
+ showWeekNumbers: a.props.showWeekNumbers,
7584
+ startDate: a.props.startDate,
7585
+ endDate: a.props.endDate,
7586
+ peekNextMonth: a.props.peekNextMonth,
7587
+ setOpen: a.props.setOpen,
7588
+ shouldCloseOnSelect: a.props.shouldCloseOnSelect,
7589
+ renderDayContents: a.props.renderDayContents,
7590
+ disabledKeyboardNavigation:
7591
+ a.props.disabledKeyboardNavigation,
7592
+ showMonthYearPicker: a.props.showMonthYearPicker,
7593
+ showFullMonthYearPicker:
7594
+ a.props.showFullMonthYearPicker,
7595
+ showYearPicker: a.props.showYearPicker,
7596
+ showQuarterYearPicker:
7597
+ a.props.showQuarterYearPicker,
7598
+ isInputFocused: a.props.isInputFocused,
7599
+ containerRef: a.containerRef,
7600
+ })
7601
+ )
7602
+ );
7603
+ }
7604
+ return e;
7605
+ }
7606
+ }),
7607
+ pe(be(a), "renderYears", function () {
7608
+ if (!a.props.showTimeSelectOnly)
7609
+ return a.props.showYearPicker
7610
+ ? n.createElement(
7611
+ "div",
7612
+ { className: "react-datepicker__year" },
7613
+ a.renderHeader(),
7614
+ n.createElement(Et, {
7615
+ onDayClick: a.handleDayClick,
7616
+ date: a.state.date,
7617
+ })
7618
+ )
7619
+ : void 0;
7620
+ }),
7621
+ pe(be(a), "renderTimeSection", function () {
7622
+ if (
7623
+ a.props.showTimeSelect &&
7624
+ (a.state.monthContainer || a.props.showTimeSelectOnly)
7625
+ )
7626
+ return n.createElement(Mt, {
7627
+ selected: a.props.selected,
7628
+ openToDate: a.props.openToDate,
7629
+ onChange: a.props.onTimeChange,
7630
+ timeClassName: a.props.timeClassName,
7631
+ format: a.props.timeFormat,
7632
+ includeTimes: a.props.includeTimes,
7633
+ intervals: a.props.timeIntervals,
7634
+ minTime: a.props.minTime,
7635
+ maxTime: a.props.maxTime,
7636
+ excludeTimes: a.props.excludeTimes,
7637
+ timeCaption: a.props.timeCaption,
7638
+ todayButton: a.props.todayButton,
7639
+ showMonthDropdown: a.props.showMonthDropdown,
7640
+ showMonthYearDropdown: a.props.showMonthYearDropdown,
7641
+ showYearDropdown: a.props.showYearDropdown,
7642
+ withPortal: a.props.withPortal,
7643
+ monthRef: a.state.monthContainer,
7644
+ injectTimes: a.props.injectTimes,
7645
+ locale: a.props.locale,
7646
+ });
7647
+ }),
7648
+ pe(be(a), "renderInputTimeSection", function () {
7649
+ var e = new Date(a.props.selected),
7650
+ t = ""
7651
+ .concat(dt(e.getHours()), ":")
7652
+ .concat(dt(e.getMinutes()));
7653
+ if (a.props.showTimeInput)
7654
+ return n.createElement(Tt, {
7655
+ timeString: t,
7656
+ timeInputLabel: a.props.timeInputLabel,
7657
+ onChange: a.props.onTimeChange,
7658
+ customTimeInput: a.props.customTimeInput,
7659
+ });
7660
+ }),
7661
+ (a.containerRef = n.createRef()),
7662
+ (a.state = {
7663
+ date: a.getDateInView(),
7664
+ selectingDate: null,
7665
+ monthContainer: null,
7666
+ }),
7667
+ a
7668
+ );
7669
+ }
7670
+ return (
7671
+ he(r, null, [
7672
+ {
7673
+ key: "defaultProps",
7674
+ get: function () {
7675
+ return {
7676
+ onDropdownFocus: function () {},
7677
+ monthsShown: 1,
7678
+ monthSelectedIn: 0,
7679
+ forceShowMonthNavigation: !1,
7680
+ timeCaption: "Time",
7681
+ previousYearButtonLabel: "Previous Year",
7682
+ nextYearButtonLabel: "Next Year",
7683
+ previousMonthButtonLabel: "Previous Month",
7684
+ nextMonthButtonLabel: "Next Month",
7685
+ customTimeInput: null,
7686
+ };
7687
+ },
7688
+ },
7689
+ ]),
7690
+ he(r, [
7691
+ {
7692
+ key: "componentDidMount",
7693
+ value: function () {
7694
+ this.props.showTimeSelect &&
7695
+ (this.assignMonthContainer = void this.setState({
7696
+ monthContainer: this.monthContainer,
7697
+ }));
7698
+ },
7699
+ },
7700
+ {
7701
+ key: "componentDidUpdate",
7702
+ value: function (e) {
7703
+ this.props.preSelection &&
7704
+ !He(this.props.preSelection, e.preSelection)
7705
+ ? this.setState({ date: this.props.preSelection })
7706
+ : this.props.openToDate &&
7707
+ !He(this.props.openToDate, e.openToDate) &&
7708
+ this.setState({ date: this.props.openToDate });
7709
+ },
7710
+ },
7711
+ {
7712
+ key: "render",
7713
+ value: function () {
7714
+ var e = this.props.container || St;
7715
+ return n.createElement(
7716
+ "div",
7717
+ { ref: this.containerRef },
7718
+ n.createElement(
7719
+ e,
7720
+ {
7721
+ className: o(
7722
+ "react-datepicker",
7723
+ this.props.className,
7724
+ {
7725
+ "react-datepicker--time-only": this.props
7726
+ .showTimeSelectOnly,
7727
+ }
7728
+ ),
7729
+ showPopperArrow: this.props.showPopperArrow,
7730
+ },
7731
+ this.renderPreviousButton(),
7732
+ this.renderNextButton(),
7733
+ this.renderMonths(),
7734
+ this.renderYears(),
7735
+ this.renderTodayButton(),
7736
+ this.renderTimeSection(),
7737
+ this.renderInputTimeSection(),
7738
+ this.props.children
7739
+ )
7740
+ );
7741
+ },
7742
+ },
7743
+ ]),
7744
+ r
7745
+ );
7746
+ })(n.Component),
7747
+ Ct = function (e) {
7748
+ return !e.disabled && -1 !== e.tabIndex;
7749
+ },
7750
+ Pt = (function (e) {
7751
+ _e(r, e);
7752
+ var t = we(r);
7753
+ function r(e) {
7754
+ var o;
7755
+ return (
7756
+ ue(this, r),
7757
+ pe(be((o = t.call(this, e))), "getTabChildren", function () {
7758
+ return Array.prototype.slice
7759
+ .call(
7760
+ o.tabLoopRef.current.querySelectorAll(
7761
+ "[tabindex], a, button, input, select, textarea"
7762
+ ),
7763
+ 1,
7764
+ -1
7765
+ )
7766
+ .filter(Ct);
7767
+ }),
7768
+ pe(be(o), "handleFocusStart", function (e) {
7769
+ var t = o.getTabChildren();
7770
+ t && t.length > 1 && t[t.length - 1].focus();
7771
+ }),
7772
+ pe(be(o), "handleFocusEnd", function (e) {
7773
+ var t = o.getTabChildren();
7774
+ t && t.length > 1 && t[0].focus();
7775
+ }),
7776
+ (o.tabLoopRef = n.createRef()),
7777
+ o
7778
+ );
7779
+ }
7780
+ return (
7781
+ he(r, null, [
7782
+ {
7783
+ key: "defaultProps",
7784
+ get: function () {
7785
+ return { enableTabLoop: !0 };
7786
+ },
7787
+ },
7788
+ ]),
7789
+ he(r, [
7790
+ {
7791
+ key: "render",
7792
+ value: function () {
7793
+ return this.props.enableTabLoop
7794
+ ? n.createElement(
7795
+ "div",
7796
+ {
7797
+ className: "react-datepicker__tab-loop",
7798
+ ref: this.tabLoopRef,
7799
+ },
7800
+ n.createElement("div", {
7801
+ className: "react-datepicker__tab-loop__start",
7802
+ tabIndex: "0",
7803
+ onFocus: this.handleFocusStart,
7804
+ }),
7805
+ this.props.children,
7806
+ n.createElement("div", {
7807
+ className: "react-datepicker__tab-loop__end",
7808
+ tabIndex: "0",
7809
+ onFocus: this.handleFocusEnd,
7810
+ })
7811
+ )
7812
+ : this.props.children;
7813
+ },
7814
+ },
7815
+ ]),
7816
+ r
7817
+ );
7818
+ })(n.Component),
7819
+ Ot = (function (e) {
7820
+ _e(r, e);
7821
+ var t = we(r);
7822
+ function r() {
7823
+ return ue(this, r), t.apply(this, arguments);
7824
+ }
7825
+ return (
7826
+ he(
7827
+ r,
7828
+ [
7829
+ {
7830
+ key: "render",
7831
+ value: function () {
7832
+ var e,
7833
+ t = this.props,
7834
+ r = t.className,
7835
+ a = t.wrapperClassName,
7836
+ i = t.hidePopper,
7837
+ s = t.popperComponent,
7838
+ l = t.popperModifiers,
7839
+ c = t.popperPlacement,
7840
+ u = t.popperProps,
7841
+ d = t.targetComponent,
7842
+ h = t.enableTabLoop,
7843
+ p = t.popperOnKeyDown;
7844
+ if (!i) {
7845
+ var f = o("react-datepicker-popper", r);
7846
+ e = n.createElement(
7847
+ le.Popper,
7848
+ fe({ modifiers: l, placement: c }, u),
7849
+ function (e) {
7850
+ var t = e.ref,
7851
+ r = e.style,
7852
+ o = e.placement,
7853
+ a = e.arrowProps;
7854
+ return n.createElement(
7855
+ Pt,
7856
+ { enableTabLoop: h },
7857
+ n.createElement(
7858
+ "div",
7859
+ fe(
7860
+ { ref: t, style: r },
7861
+ {
7862
+ className: f,
7863
+ "data-placement": o,
7864
+ onKeyDown: p,
7865
+ }
7866
+ ),
7867
+ n.cloneElement(s, { arrowProps: a })
7868
+ )
7869
+ );
7870
+ }
7871
+ );
7872
+ }
7873
+ this.props.popperContainer &&
7874
+ (e = n.createElement(
7875
+ this.props.popperContainer,
7876
+ {},
7877
+ e
7878
+ ));
7879
+ var m = o("react-datepicker-wrapper", a);
7880
+ return n.createElement(
7881
+ le.Manager,
7882
+ { className: "react-datepicker-manager" },
7883
+ n.createElement(le.Reference, null, function (e) {
7884
+ var t = e.ref;
7885
+ return n.createElement(
7886
+ "div",
7887
+ { ref: t, className: m },
7888
+ d
7889
+ );
7890
+ }),
7891
+ e
7892
+ );
7893
+ },
7894
+ },
7895
+ ],
7896
+ [
7897
+ {
7898
+ key: "defaultProps",
7899
+ get: function () {
7900
+ return {
7901
+ hidePopper: !0,
7902
+ popperModifiers: {
7903
+ preventOverflow: {
7904
+ enabled: !0,
7905
+ escapeWithReference: !0,
7906
+ boundariesElement: "viewport",
7907
+ },
7908
+ },
7909
+ popperProps: {},
7910
+ popperPlacement: "bottom-start",
7911
+ };
7912
+ },
7913
+ },
7914
+ ]
7915
+ ),
7916
+ r
7917
+ );
7918
+ })(n.Component),
7919
+ Nt = se(Lt),
7920
+ At = (function (e) {
7921
+ _e(r, e);
7922
+ var t = we(r);
7923
+ function r(e) {
7924
+ var i;
7925
+ return (
7926
+ ue(this, r),
7927
+ pe(be((i = t.call(this, e))), "getPreSelection", function () {
7928
+ return i.props.openToDate
7929
+ ? i.props.openToDate
7930
+ : i.props.selectsEnd && i.props.startDate
7931
+ ? i.props.startDate
7932
+ : i.props.selectsStart && i.props.endDate
7933
+ ? i.props.endDate
7934
+ : Te();
7935
+ }),
7936
+ pe(be(i), "calcInitialState", function () {
7937
+ var e = i.getPreSelection(),
7938
+ t = st(i.props),
7939
+ n = lt(i.props),
7940
+ r = t && ne(e, t) ? t : n && te(e, n) ? n : e;
7941
+ return {
7942
+ open: i.props.startOpen || !1,
7943
+ preventFocus: !1,
7944
+ preSelection: i.props.selected ? i.props.selected : r,
7945
+ highlightDates: ct(i.props.highlightDates),
7946
+ focused: !1,
7947
+ };
7948
+ }),
7949
+ pe(be(i), "clearPreventFocusTimeout", function () {
7950
+ i.preventFocusTimeout && clearTimeout(i.preventFocusTimeout);
7951
+ }),
7952
+ pe(be(i), "setFocus", function () {
7953
+ i.input && i.input.focus && i.input.focus();
7954
+ }),
7955
+ pe(be(i), "setBlur", function () {
7956
+ i.input && i.input.blur && i.input.blur(),
7957
+ i.cancelFocusInput();
7958
+ }),
7959
+ pe(be(i), "setOpen", function (e) {
7960
+ var t =
7961
+ arguments.length > 1 &&
7962
+ void 0 !== arguments[1] &&
7963
+ arguments[1];
7964
+ i.setState(
7965
+ {
7966
+ open: e,
7967
+ preSelection:
7968
+ e && i.state.open
7969
+ ? i.state.preSelection
7970
+ : i.calcInitialState().preSelection,
7971
+ lastPreSelectChange: Rt,
7972
+ },
7973
+ function () {
7974
+ e ||
7975
+ i.setState(
7976
+ function (e) {
7977
+ return { focused: !!t && e.focused };
7978
+ },
7979
+ function () {
7980
+ !t && i.setBlur(), i.setState({ inputValue: null });
7981
+ }
7982
+ );
7983
+ }
7984
+ );
7985
+ }),
7986
+ pe(be(i), "inputOk", function () {
7987
+ return a(i.state.preSelection);
7988
+ }),
7989
+ pe(be(i), "isCalendarOpen", function () {
7990
+ return void 0 === i.props.open
7991
+ ? i.state.open && !i.props.disabled && !i.props.readOnly
7992
+ : i.props.open;
7993
+ }),
7994
+ pe(be(i), "handleFocus", function (e) {
7995
+ i.state.preventFocus ||
7996
+ (i.props.onFocus(e),
7997
+ i.props.preventOpenOnFocus ||
7998
+ i.props.readOnly ||
7999
+ i.setOpen(!0)),
8000
+ i.setState({ focused: !0 });
8001
+ }),
8002
+ pe(be(i), "cancelFocusInput", function () {
8003
+ clearTimeout(i.inputFocusTimeout),
8004
+ (i.inputFocusTimeout = null);
8005
+ }),
8006
+ pe(be(i), "deferFocusInput", function () {
8007
+ i.cancelFocusInput(),
8008
+ (i.inputFocusTimeout = setTimeout(function () {
8009
+ return i.setFocus();
8010
+ }, 1));
8011
+ }),
8012
+ pe(be(i), "handleDropdownFocus", function () {
8013
+ i.cancelFocusInput();
8014
+ }),
8015
+ pe(be(i), "handleBlur", function (e) {
8016
+ (!i.state.open ||
8017
+ i.props.withPortal ||
8018
+ i.props.showTimeInput) &&
8019
+ i.props.onBlur(e),
8020
+ i.setState({ focused: !1 });
8021
+ }),
8022
+ pe(be(i), "handleCalendarClickOutside", function (e) {
8023
+ i.props.inline || i.setOpen(!1),
8024
+ i.props.onClickOutside(e),
8025
+ i.props.withPortal && e.preventDefault();
8026
+ }),
8027
+ pe(be(i), "handleChange", function () {
8028
+ for (
8029
+ var e = arguments.length, t = new Array(e), n = 0;
8030
+ n < e;
8031
+ n++
8032
+ )
8033
+ t[n] = arguments[n];
8034
+ var r = t[0];
8035
+ if (
8036
+ !i.props.onChangeRaw ||
8037
+ (i.props.onChangeRaw.apply(be(i), t),
8038
+ "function" == typeof r.isDefaultPrevented &&
8039
+ !r.isDefaultPrevented())
8040
+ ) {
8041
+ i.setState({
8042
+ inputValue: r.target.value,
8043
+ lastPreSelectChange: It,
8044
+ });
8045
+ var o = Se(
8046
+ r.target.value,
8047
+ i.props.dateFormat,
8048
+ i.props.locale,
8049
+ i.props.strictParsing
8050
+ );
8051
+ (!o && r.target.value) || i.setSelected(o, r, !0);
8052
+ }
8053
+ }),
8054
+ pe(be(i), "handleSelect", function (e, t, n) {
8055
+ i.setState({ preventFocus: !0 }, function () {
8056
+ return (
8057
+ (i.preventFocusTimeout = setTimeout(function () {
8058
+ return i.setState({ preventFocus: !1 });
8059
+ }, 50)),
8060
+ i.preventFocusTimeout
8061
+ );
8062
+ }),
8063
+ i.setSelected(e, t, !1, n),
8064
+ !i.props.shouldCloseOnSelect || i.props.showTimeSelect
8065
+ ? i.setPreSelection(e)
8066
+ : i.props.inline || i.setOpen(!1);
8067
+ }),
8068
+ pe(be(i), "setSelected", function (e, t, n, r) {
8069
+ var o = e;
8070
+ (null !== o && Je(o, i.props)) ||
8071
+ ((ze(i.props.selected, o) && !i.props.allowSameDay) ||
8072
+ (null !== o &&
8073
+ (!i.props.selected ||
8074
+ (n &&
8075
+ (i.props.showTimeSelect ||
8076
+ i.props.showTimeSelectOnly ||
8077
+ i.props.showTimeInput)) ||
8078
+ (o = Ce(o, {
8079
+ hour: k(i.props.selected),
8080
+ minute: w(i.props.selected),
8081
+ second: y(i.props.selected),
8082
+ })),
8083
+ i.props.inline || i.setState({ preSelection: o }),
8084
+ i.props.inline &&
8085
+ i.props.monthsShown > 1 &&
8086
+ !i.props.inlineFocusSelectedMonth &&
8087
+ i.setState({ monthSelectedIn: r })),
8088
+ i.props.onChange(o, t)),
8089
+ i.props.onSelect(o, t),
8090
+ n || i.setState({ inputValue: null }));
8091
+ }),
8092
+ pe(be(i), "setPreSelection", function (e) {
8093
+ var t = void 0 !== i.props.minDate,
8094
+ n = void 0 !== i.props.maxDate,
8095
+ r = !0;
8096
+ e &&
8097
+ (t && n
8098
+ ? (r = Be(e, i.props.minDate, i.props.maxDate))
8099
+ : t
8100
+ ? (r = te(e, i.props.minDate))
8101
+ : n && (r = ne(e, i.props.maxDate))),
8102
+ r && i.setState({ preSelection: e });
8103
+ }),
8104
+ pe(be(i), "handleTimeChange", function (e) {
8105
+ var t = Ce(
8106
+ i.props.selected ? i.props.selected : i.getPreSelection(),
8107
+ { hour: k(e), minute: w(e) }
8108
+ );
8109
+ i.setState({ preSelection: t }),
8110
+ i.props.onChange(t),
8111
+ i.props.shouldCloseOnSelect && i.setOpen(!1),
8112
+ i.props.showTimeInput && i.setOpen(!0),
8113
+ i.setState({ inputValue: null });
8114
+ }),
8115
+ pe(be(i), "onInputClick", function () {
8116
+ i.props.disabled || i.props.readOnly || i.setOpen(!0),
8117
+ i.props.onInputClick();
8118
+ }),
8119
+ pe(be(i), "onInputKeyDown", function (e) {
8120
+ i.props.onKeyDown(e);
8121
+ var t = e.key;
8122
+ if (
8123
+ i.state.open ||
8124
+ i.props.inline ||
8125
+ i.props.preventOpenOnFocus
8126
+ ) {
8127
+ if (i.state.open) {
8128
+ if ("ArrowDown" === t || "ArrowUp" === t) {
8129
+ e.preventDefault();
8130
+ var n =
8131
+ i.calendar.componentNode &&
8132
+ i.calendar.componentNode.querySelector(
8133
+ '.react-datepicker__day[tabindex="0"]'
8134
+ );
8135
+ return void (n && n.focus());
8136
+ }
8137
+ var r = Te(i.state.preSelection);
8138
+ "Enter" === t
8139
+ ? (e.preventDefault(),
8140
+ i.inputOk() && i.state.lastPreSelectChange === Rt
8141
+ ? (i.handleSelect(r, e),
8142
+ !i.props.shouldCloseOnSelect &&
8143
+ i.setPreSelection(r))
8144
+ : i.setOpen(!1))
8145
+ : "Escape" === t && (e.preventDefault(), i.setOpen(!1)),
8146
+ i.inputOk() ||
8147
+ i.props.onInputError({
8148
+ code: 1,
8149
+ msg: "Date input not valid.",
8150
+ });
8151
+ }
8152
+ } else ("ArrowDown" !== t && "ArrowUp" !== t && "Enter" !== t) || i.onInputClick();
8153
+ }),
8154
+ pe(be(i), "onDayKeyDown", function (e) {
8155
+ i.props.onKeyDown(e);
8156
+ var t = e.key,
8157
+ n = Te(i.state.preSelection);
8158
+ if ("Enter" === t)
8159
+ e.preventDefault(),
8160
+ i.handleSelect(n, e),
8161
+ !i.props.shouldCloseOnSelect && i.setPreSelection(n);
8162
+ else if ("Escape" === t)
8163
+ e.preventDefault(),
8164
+ i.setOpen(!1),
8165
+ i.inputOk() ||
8166
+ i.props.onInputError({
8167
+ code: 1,
8168
+ msg: "Date input not valid.",
8169
+ });
8170
+ else if (!i.props.disabledKeyboardNavigation) {
8171
+ var r;
8172
+ switch (t) {
8173
+ case "ArrowLeft":
8174
+ r = g(n, 1);
8175
+ break;
8176
+ case "ArrowRight":
8177
+ r = u(n, 1);
8178
+ break;
8179
+ case "ArrowUp":
8180
+ r = _(n, 1);
8181
+ break;
8182
+ case "ArrowDown":
8183
+ r = d(n, 1);
8184
+ break;
8185
+ case "PageUp":
8186
+ r = v(n, 1);
8187
+ break;
8188
+ case "PageDown":
8189
+ r = h(n, 1);
8190
+ break;
8191
+ case "Home":
8192
+ r = b(n, 1);
8193
+ break;
8194
+ case "End":
8195
+ r = p(n, 1);
8196
+ }
8197
+ if (!r)
8198
+ return void (
8199
+ i.props.onInputError &&
8200
+ i.props.onInputError({
8201
+ code: 1,
8202
+ msg: "Date input not valid.",
8203
+ })
8204
+ );
8205
+ e.preventDefault(),
8206
+ i.setState({ lastPreSelectChange: Rt }),
8207
+ i.props.adjustDateOnChange && i.setSelected(r),
8208
+ i.setPreSelection(r);
8209
+ }
8210
+ }),
8211
+ pe(be(i), "onPopperKeyDown", function (e) {
8212
+ "Escape" === e.key &&
8213
+ (e.preventDefault(),
8214
+ i.setState({ preventFocus: !0 }, function () {
8215
+ i.setOpen(!1),
8216
+ setTimeout(function () {
8217
+ i.setFocus(), i.setState({ preventFocus: !1 });
8218
+ });
8219
+ }));
8220
+ }),
8221
+ pe(be(i), "onClearClick", function (e) {
8222
+ e && e.preventDefault && e.preventDefault(),
8223
+ i.props.onChange(null, e),
8224
+ i.setState({ inputValue: null });
8225
+ }),
8226
+ pe(be(i), "clear", function () {
8227
+ i.onClearClick();
8228
+ }),
8229
+ pe(be(i), "renderCalendar", function () {
8230
+ return i.props.inline || i.isCalendarOpen()
8231
+ ? n.createElement(
8232
+ Nt,
8233
+ {
8234
+ ref: function (e) {
8235
+ i.calendar = e;
8236
+ },
8237
+ locale: i.props.locale,
8238
+ chooseDayAriaLabelPrefix:
8239
+ i.props.chooseDayAriaLabelPrefix,
8240
+ disabledDayAriaLabelPrefix:
8241
+ i.props.disabledDayAriaLabelPrefix,
8242
+ weekAriaLabelPrefix: i.props.weekAriaLabelPrefix,
8243
+ adjustDateOnChange: i.props.adjustDateOnChange,
8244
+ setOpen: i.setOpen,
8245
+ shouldCloseOnSelect: i.props.shouldCloseOnSelect,
8246
+ dateFormat: i.props.dateFormatCalendar,
8247
+ useWeekdaysShort: i.props.useWeekdaysShort,
8248
+ formatWeekDay: i.props.formatWeekDay,
8249
+ dropdownMode: i.props.dropdownMode,
8250
+ selected: i.props.selected,
8251
+ preSelection: i.state.preSelection,
8252
+ onSelect: i.handleSelect,
8253
+ onWeekSelect: i.props.onWeekSelect,
8254
+ openToDate: i.props.openToDate,
8255
+ minDate: i.props.minDate,
8256
+ maxDate: i.props.maxDate,
8257
+ selectsStart: i.props.selectsStart,
8258
+ selectsEnd: i.props.selectsEnd,
8259
+ startDate: i.props.startDate,
8260
+ endDate: i.props.endDate,
8261
+ excludeDates: i.props.excludeDates,
8262
+ filterDate: i.props.filterDate,
8263
+ onClickOutside: i.handleCalendarClickOutside,
8264
+ formatWeekNumber: i.props.formatWeekNumber,
8265
+ highlightDates: i.state.highlightDates,
8266
+ includeDates: i.props.includeDates,
8267
+ includeTimes: i.props.includeTimes,
8268
+ injectTimes: i.props.injectTimes,
8269
+ inline: i.props.inline,
8270
+ peekNextMonth: i.props.peekNextMonth,
8271
+ showMonthDropdown: i.props.showMonthDropdown,
8272
+ showPreviousMonths: i.props.showPreviousMonths,
8273
+ useShortMonthInDropdown:
8274
+ i.props.useShortMonthInDropdown,
8275
+ showMonthYearDropdown: i.props.showMonthYearDropdown,
8276
+ showWeekNumbers: i.props.showWeekNumbers,
8277
+ showYearDropdown: i.props.showYearDropdown,
8278
+ withPortal: i.props.withPortal,
8279
+ forceShowMonthNavigation:
8280
+ i.props.forceShowMonthNavigation,
8281
+ showDisabledMonthNavigation:
8282
+ i.props.showDisabledMonthNavigation,
8283
+ scrollableYearDropdown:
8284
+ i.props.scrollableYearDropdown,
8285
+ scrollableMonthYearDropdown:
8286
+ i.props.scrollableMonthYearDropdown,
8287
+ todayButton: i.props.todayButton,
8288
+ weekLabel: i.props.weekLabel,
8289
+ outsideClickIgnoreClass:
8290
+ "react-datepicker-ignore-onclickoutside",
8291
+ fixedHeight: i.props.fixedHeight,
8292
+ monthsShown: i.props.monthsShown,
8293
+ monthSelectedIn: i.state.monthSelectedIn,
8294
+ onDropdownFocus: i.handleDropdownFocus,
8295
+ onMonthChange: i.props.onMonthChange,
8296
+ onYearChange: i.props.onYearChange,
8297
+ dayClassName: i.props.dayClassName,
8298
+ weekDayClassName: i.props.weekDayClassName,
8299
+ monthClassName: i.props.monthClassName,
8300
+ timeClassName: i.props.timeClassName,
8301
+ showTimeSelect: i.props.showTimeSelect,
8302
+ showTimeSelectOnly: i.props.showTimeSelectOnly,
8303
+ onTimeChange: i.handleTimeChange,
8304
+ timeFormat: i.props.timeFormat,
8305
+ timeIntervals: i.props.timeIntervals,
8306
+ minTime: i.props.minTime,
8307
+ maxTime: i.props.maxTime,
8308
+ excludeTimes: i.props.excludeTimes,
8309
+ timeCaption: i.props.timeCaption,
8310
+ className: i.props.calendarClassName,
8311
+ container: i.props.calendarContainer,
8312
+ yearDropdownItemNumber:
8313
+ i.props.yearDropdownItemNumber,
8314
+ previousMonthButtonLabel:
8315
+ i.props.previousMonthButtonLabel,
8316
+ nextMonthButtonLabel: i.props.nextMonthButtonLabel,
8317
+ previousYearButtonLabel:
8318
+ i.props.previousYearButtonLabel,
8319
+ nextYearButtonLabel: i.props.nextYearButtonLabel,
8320
+ timeInputLabel: i.props.timeInputLabel,
8321
+ disabledKeyboardNavigation:
8322
+ i.props.disabledKeyboardNavigation,
8323
+ renderCustomHeader: i.props.renderCustomHeader,
8324
+ popperProps: i.props.popperProps,
8325
+ renderDayContents: i.props.renderDayContents,
8326
+ onDayMouseEnter: i.props.onDayMouseEnter,
8327
+ onMonthMouseLeave: i.props.onMonthMouseLeave,
8328
+ showTimeInput: i.props.showTimeInput,
8329
+ showMonthYearPicker: i.props.showMonthYearPicker,
8330
+ showFullMonthYearPicker:
8331
+ i.props.showFullMonthYearPicker,
8332
+ showYearPicker: i.props.showYearPicker,
8333
+ showQuarterYearPicker: i.props.showQuarterYearPicker,
8334
+ showPopperArrow: i.props.showPopperArrow,
8335
+ excludeScrollbar: i.props.excludeScrollbar,
8336
+ handleOnKeyDown: i.onDayKeyDown,
8337
+ isInputFocused: i.state.focused,
8338
+ customTimeInput: i.props.customTimeInput,
8339
+ setPreSelection: i.setPreSelection,
8340
+ },
8341
+ i.props.children
8342
+ )
8343
+ : null;
8344
+ }),
8345
+ pe(be(i), "renderDateInput", function () {
8346
+ var e,
8347
+ t,
8348
+ r,
8349
+ a,
8350
+ s,
8351
+ l = o(
8352
+ i.props.className,
8353
+ pe(
8354
+ {},
8355
+ "react-datepicker-ignore-onclickoutside",
8356
+ i.state.open
8357
+ )
8358
+ ),
8359
+ c =
8360
+ i.props.customInput ||
8361
+ n.createElement("input", { type: "text" }),
8362
+ u = i.props.customInputRef || "ref",
8363
+ d =
8364
+ "string" == typeof i.props.value
8365
+ ? i.props.value
8366
+ : "string" == typeof i.state.inputValue
8367
+ ? i.state.inputValue
8368
+ : ((t = i.props.selected),
8369
+ (a = (r = i.props).dateFormat),
8370
+ (s = r.locale),
8371
+ (t && Le(t, Array.isArray(a) ? a[0] : a, s)) || "");
8372
+ return n.cloneElement(
8373
+ c,
8374
+ (pe((e = {}), u, function (e) {
8375
+ i.input = e;
8376
+ }),
8377
+ pe(e, "value", d),
8378
+ pe(e, "onBlur", i.handleBlur),
8379
+ pe(e, "onChange", i.handleChange),
8380
+ pe(e, "onClick", i.onInputClick),
8381
+ pe(e, "onFocus", i.handleFocus),
8382
+ pe(e, "onKeyDown", i.onInputKeyDown),
8383
+ pe(e, "id", i.props.id),
8384
+ pe(e, "name", i.props.name),
8385
+ pe(e, "autoFocus", i.props.autoFocus),
8386
+ pe(e, "placeholder", i.props.placeholderText),
8387
+ pe(e, "disabled", i.props.disabled),
8388
+ pe(e, "autoComplete", i.props.autoComplete),
8389
+ pe(e, "className", o(c.props.className, l)),
8390
+ pe(e, "title", i.props.title),
8391
+ pe(e, "readOnly", i.props.readOnly),
8392
+ pe(e, "required", i.props.required),
8393
+ pe(e, "tabIndex", i.props.tabIndex),
8394
+ pe(e, "aria-labelledby", i.props.ariaLabelledBy),
8395
+ e)
8396
+ );
8397
+ }),
8398
+ pe(be(i), "renderClearButton", function () {
8399
+ var e = i.props,
8400
+ t = e.isClearable,
8401
+ r = e.selected,
8402
+ o = e.clearButtonTitle,
8403
+ a = e.ariaLabelClose,
8404
+ s = void 0 === a ? "Close" : a;
8405
+ return t && null != r
8406
+ ? n.createElement("button", {
8407
+ type: "button",
8408
+ className: "react-datepicker__close-icon",
8409
+ "aria-label": s,
8410
+ onClick: i.onClearClick,
8411
+ title: o,
8412
+ tabIndex: -1,
8413
+ })
8414
+ : null;
8415
+ }),
8416
+ (i.state = i.calcInitialState()),
8417
+ i
8418
+ );
8419
+ }
8420
+ return (
8421
+ he(r, null, [
8422
+ {
8423
+ key: "defaultProps",
8424
+ get: function () {
8425
+ return {
8426
+ allowSameDay: !1,
8427
+ dateFormat: "MM/dd/yyyy",
8428
+ dateFormatCalendar: "LLLL yyyy",
8429
+ onChange: function () {},
8430
+ disabled: !1,
8431
+ disabledKeyboardNavigation: !1,
8432
+ dropdownMode: "scroll",
8433
+ onFocus: function () {},
8434
+ onBlur: function () {},
8435
+ onKeyDown: function () {},
8436
+ onInputClick: function () {},
8437
+ onSelect: function () {},
8438
+ onClickOutside: function () {},
8439
+ onMonthChange: function () {},
8440
+ onCalendarOpen: function () {},
8441
+ onCalendarClose: function () {},
8442
+ preventOpenOnFocus: !1,
8443
+ onYearChange: function () {},
8444
+ onInputError: function () {},
8445
+ monthsShown: 1,
8446
+ readOnly: !1,
8447
+ withPortal: !1,
8448
+ shouldCloseOnSelect: !0,
8449
+ showTimeSelect: !1,
8450
+ showTimeInput: !1,
8451
+ showPreviousMonths: !1,
8452
+ showMonthYearPicker: !1,
8453
+ showFullMonthYearPicker: !1,
8454
+ showYearPicker: !1,
8455
+ showQuarterYearPicker: !1,
8456
+ strictParsing: !1,
8457
+ timeIntervals: 30,
8458
+ timeCaption: "Time",
8459
+ previousMonthButtonLabel: "Previous Month",
8460
+ nextMonthButtonLabel: "Next Month",
8461
+ previousYearButtonLabel: "Previous Year",
8462
+ nextYearButtonLabel: "Next Year",
8463
+ timeInputLabel: "Time",
8464
+ enableTabLoop: !0,
8465
+ renderDayContents: function (e) {
8466
+ return e;
8467
+ },
8468
+ inlineFocusSelectedMonth: !1,
8469
+ showPopperArrow: !0,
8470
+ excludeScrollbar: !0,
8471
+ customTimeInput: null,
8472
+ };
8473
+ },
8474
+ },
8475
+ ]),
8476
+ he(r, [
8477
+ {
8478
+ key: "componentDidUpdate",
8479
+ value: function (e, t) {
8480
+ var n, r;
8481
+ e.inline &&
8482
+ ((n = e.selected),
8483
+ (r = this.props.selected),
8484
+ n && r ? T(n) !== T(r) || D(n) !== D(r) : n !== r) &&
8485
+ this.setPreSelection(this.props.selected),
8486
+ void 0 !== this.state.monthSelectedIn &&
8487
+ e.monthsShown !== this.props.monthsShown &&
8488
+ this.setState({ monthSelectedIn: 0 }),
8489
+ e.highlightDates !== this.props.highlightDates &&
8490
+ this.setState({
8491
+ highlightDates: ct(this.props.highlightDates),
8492
+ }),
8493
+ t.focused ||
8494
+ ze(e.selected, this.props.selected) ||
8495
+ this.setState({ inputValue: null }),
8496
+ t.open !== this.state.open &&
8497
+ (!1 === t.open &&
8498
+ !0 === this.state.open &&
8499
+ this.props.onCalendarOpen(),
8500
+ !0 === t.open &&
8501
+ !1 === this.state.open &&
8502
+ this.props.onCalendarClose());
8503
+ },
8504
+ },
8505
+ {
8506
+ key: "componentWillUnmount",
8507
+ value: function () {
8508
+ this.clearPreventFocusTimeout();
8509
+ },
8510
+ },
8511
+ {
8512
+ key: "render",
8513
+ value: function () {
8514
+ var e = this.renderCalendar();
8515
+ return this.props.inline && !this.props.withPortal
8516
+ ? e
8517
+ : this.props.withPortal
8518
+ ? n.createElement(
8519
+ "div",
8520
+ null,
8521
+ this.props.inline
8522
+ ? null
8523
+ : n.createElement(
8524
+ "div",
8525
+ {
8526
+ className:
8527
+ "react-datepicker__input-container",
8528
+ },
8529
+ this.renderDateInput(),
8530
+ this.renderClearButton()
8531
+ ),
8532
+ this.state.open || this.props.inline
8533
+ ? n.createElement(
8534
+ "div",
8535
+ { className: "react-datepicker__portal" },
8536
+ e
8537
+ )
8538
+ : null
8539
+ )
8540
+ : n.createElement(Ot, {
8541
+ className: this.props.popperClassName,
8542
+ wrapperClassName: this.props.wrapperClassName,
8543
+ hidePopper: !this.isCalendarOpen(),
8544
+ popperModifiers: this.props.popperModifiers,
8545
+ targetComponent: n.createElement(
8546
+ "div",
8547
+ { className: "react-datepicker__input-container" },
8548
+ this.renderDateInput(),
8549
+ this.renderClearButton()
8550
+ ),
8551
+ popperContainer: this.props.popperContainer,
8552
+ popperComponent: e,
8553
+ popperPlacement: this.props.popperPlacement,
8554
+ popperProps: this.props.popperProps,
8555
+ popperOnKeyDown: this.onPopperKeyDown,
8556
+ enableTabLoop: this.props.enableTabLoop,
8557
+ });
8558
+ },
8559
+ },
8560
+ ]),
8561
+ r
8562
+ );
8563
+ })(n.Component),
8564
+ It = "input",
8565
+ Rt = "navigate";
8566
+ (t.CalendarContainer = St),
8567
+ (t.default = At),
8568
+ (t.getDefaultLocale = Ue),
8569
+ (t.registerLocale = function (t, n) {
8570
+ var r = "undefined" != typeof window ? window : e;
8571
+ r.__localeData__ || (r.__localeData__ = {}),
8572
+ (r.__localeData__[t] = n);
8573
+ }),
8574
+ (t.setDefaultLocale = function (t) {
8575
+ ("undefined" != typeof window ? window : e).__localeId__ = t;
8576
+ }),
8577
+ Object.defineProperty(t, "__esModule", { value: !0 });
8578
+ })(
8579
+ t,
8580
+ n(0),
8581
+ n(19),
8582
+ n(44),
8583
+ n(295),
8584
+ n(74),
8585
+ n(457),
8586
+ n(75),
8587
+ n(76),
8588
+ n(42),
8589
+ n(77),
8590
+ n(43),
8591
+ n(78),
8592
+ n(296),
8593
+ n(297),
8594
+ n(298),
8595
+ n(299),
8596
+ n(300),
8597
+ n(301),
8598
+ n(302),
8599
+ n(303),
8600
+ n(304),
8601
+ n(305),
8602
+ n(306),
8603
+ n(459),
8604
+ n(307),
8605
+ n(308),
8606
+ n(309),
8607
+ n(310),
8608
+ n(311),
8609
+ n(312),
8610
+ n(313),
8611
+ n(80),
8612
+ n(314),
8613
+ n(315),
8614
+ n(316),
8615
+ n(317),
8616
+ n(318),
8617
+ n(319),
8618
+ n(320),
8619
+ n(321),
8620
+ n(28),
8621
+ n(17),
8622
+ n(322),
8623
+ n(54),
8624
+ n(323),
8625
+ n(324),
8626
+ n(325),
8627
+ n(326),
8628
+ n(327),
8629
+ n(328),
8630
+ n(329),
8631
+ n(330),
8632
+ n(331),
8633
+ n(332),
8634
+ n(333),
8635
+ n(334),
8636
+ n(5),
8637
+ n(456),
8638
+ n(335),
8639
+ n(336),
8640
+ n(458)
8641
+ );
8642
+ }.call(this, n(35)));
8643
+ },
8644
+ function (e, t, n) {
8645
+ "use strict";
8646
+ n.r(t),
8647
+ n.d(t, "default", function () {
8648
+ return i;
8649
+ });
8650
+ var r = n(7),
8651
+ o = n(5),
8652
+ a = n(2);
8653
+ function i(e, t) {
8654
+ Object(a.a)(2, arguments);
8655
+ var n = Object(o.default)(e),
8656
+ i = Object(r.a)(t);
8657
+ return isNaN(i) ? new Date(NaN) : i ? (n.setDate(n.getDate() + i), n) : n;
8658
+ }
8659
+ },
8660
+ function (e, t, n) {
8661
+ "use strict";
8662
+ n.r(t),
8663
+ n.d(t, "default", function () {
8664
+ return i;
8665
+ });
8666
+ var r = n(7),
8667
+ o = n(5),
8668
+ a = n(2);
8669
+ function i(e, t) {
8670
+ Object(a.a)(2, arguments);
8671
+ var n = Object(o.default)(e),
8672
+ i = Object(r.a)(t);
8673
+ if (isNaN(i)) return new Date(NaN);
8674
+ if (!i) return n;
8675
+ var s = n.getDate(),
8676
+ l = new Date(n.getTime());
8677
+ l.setMonth(n.getMonth() + i + 1, 0);
8678
+ var c = l.getDate();
8679
+ return s >= c ? l : (n.setFullYear(l.getFullYear(), l.getMonth(), s), n);
8680
+ }
8681
+ },
8682
+ function (e, t, n) {
8683
+ var r;
8684
+ /*!
8685
  Copyright (c) 2017 Jed Watson.
8686
  Licensed under the MIT License (MIT), see
8687
  http://jedwatson.github.io/classnames
8688
+ */ !(function () {
8689
+ "use strict";
8690
+ var n = {}.hasOwnProperty;
8691
+ function o() {
8692
+ for (var e = [], t = 0; t < arguments.length; t++) {
8693
+ var r = arguments[t];
8694
+ if (r) {
8695
+ var a = typeof r;
8696
+ if ("string" === a || "number" === a) e.push(r);
8697
+ else if (Array.isArray(r) && r.length) {
8698
+ var i = o.apply(null, r);
8699
+ i && e.push(i);
8700
+ } else if ("object" === a)
8701
+ for (var s in r) n.call(r, s) && r[s] && e.push(s);
8702
+ }
8703
+ }
8704
+ return e.join(" ");
8705
+ }
8706
+ e.exports
8707
+ ? ((o.default = o), (e.exports = o))
8708
+ : void 0 ===
8709
+ (r = function () {
8710
+ return o;
8711
+ }.apply(t, [])) || (e.exports = r);
8712
+ })();
8713
+ },
8714
+ function (e, t, n) {
8715
+ var r = n(356),
8716
+ o = n(357),
8717
+ a = n(358),
8718
+ i = n(359),
8719
+ s = n(360);
8720
+ function l(e) {
8721
+ var t = -1,
8722
+ n = null == e ? 0 : e.length;
8723
+ for (this.clear(); ++t < n; ) {
8724
+ var r = e[t];
8725
+ this.set(r[0], r[1]);
8726
+ }
8727
+ }
8728
+ (l.prototype.clear = r),
8729
+ (l.prototype.delete = o),
8730
+ (l.prototype.get = a),
8731
+ (l.prototype.has = i),
8732
+ (l.prototype.set = s),
8733
+ (e.exports = l);
8734
+ },
8735
+ function (e, t, n) {
8736
+ var r = n(239);
8737
+ e.exports = function (e, t) {
8738
+ for (var n = e.length; n--; ) if (r(e[n][0], t)) return n;
8739
+ return -1;
8740
+ };
8741
+ },
8742
+ function (e, t, n) {
8743
+ var r = n(24).Symbol;
8744
+ e.exports = r;
8745
+ },
8746
+ function (e, t, n) {
8747
+ var r = n(27)(Object, "create");
8748
+ e.exports = r;
8749
+ },
8750
+ function (e, t, n) {
8751
+ var r = n(380);
8752
+ e.exports = function (e, t) {
8753
+ var n = e.__data__;
8754
+ return r(t) ? n["string" == typeof t ? "string" : "hash"] : n.map;
8755
+ };
8756
+ },
8757
+ function (e, t, n) {
8758
+ var r = n(73);
8759
+ e.exports = function (e) {
8760
+ if ("string" == typeof e || r(e)) return e;
8761
+ var t = e + "";
8762
+ return "0" == t && 1 / e == -1 / 0 ? "-0" : t;
8763
+ };
8764
+ },
8765
+ function (e, t, n) {
8766
+ "use strict";
8767
+ n.d(t, "a", function () {
8768
+ return i;
8769
+ });
8770
+ var r = n(7),
8771
+ o = n(30),
8772
+ a = n(2);
8773
+ function i(e, t) {
8774
+ Object(a.a)(2, arguments);
8775
+ var n = Object(r.a)(t);
8776
+ return Object(o.a)(e, -n);
8777
+ }
8778
+ },
8779
+ function (e, t, n) {
8780
+ "use strict";
8781
+ function r(e, t) {
8782
+ switch (e) {
8783
+ case "P":
8784
+ return t.date({ width: "short" });
8785
+ case "PP":
8786
+ return t.date({ width: "medium" });
8787
+ case "PPP":
8788
+ return t.date({ width: "long" });
8789
+ case "PPPP":
8790
+ default:
8791
+ return t.date({ width: "full" });
8792
+ }
8793
+ }
8794
+ function o(e, t) {
8795
+ switch (e) {
8796
+ case "p":
8797
+ return t.time({ width: "short" });
8798
+ case "pp":
8799
+ return t.time({ width: "medium" });
8800
+ case "ppp":
8801
+ return t.time({ width: "long" });
8802
+ case "pppp":
8803
+ default:
8804
+ return t.time({ width: "full" });
8805
+ }
8806
+ }
8807
+ var a = {
8808
+ p: o,
8809
+ P: function (e, t) {
8810
+ var n,
8811
+ a = e.match(/(P+)(p+)?/),
8812
+ i = a[1],
8813
+ s = a[2];
8814
+ if (!s) return r(e, t);
8815
+ switch (i) {
8816
+ case "P":
8817
+ n = t.dateTime({ width: "short" });
8818
+ break;
8819
+ case "PP":
8820
+ n = t.dateTime({ width: "medium" });
8821
+ break;
8822
+ case "PPP":
8823
+ n = t.dateTime({ width: "long" });
8824
+ break;
8825
+ case "PPPP":
8826
+ default:
8827
+ n = t.dateTime({ width: "full" });
8828
+ }
8829
+ return n.replace("{{date}}", r(i, t)).replace("{{time}}", o(s, t));
8830
+ },
8831
+ };
8832
+ t.a = a;
8833
+ },
8834
+ function (e, t, n) {
8835
+ "use strict";
8836
+ n.d(t, "a", function () {
8837
+ return i;
8838
+ });
8839
+ var r = n(5),
8840
+ o = n(21),
8841
+ a = n(2);
8842
+ function i(e) {
8843
+ Object(a.a)(1, arguments);
8844
+ var t = Object(r.default)(e),
8845
+ n = t.getUTCFullYear(),
8846
+ i = new Date(0);
8847
+ i.setUTCFullYear(n + 1, 0, 4), i.setUTCHours(0, 0, 0, 0);
8848
+ var s = Object(o.a)(i),
8849
+ l = new Date(0);
8850
+ l.setUTCFullYear(n, 0, 4), l.setUTCHours(0, 0, 0, 0);
8851
+ var c = Object(o.a)(l);
8852
+ return t.getTime() >= s.getTime()
8853
+ ? n + 1
8854
+ : t.getTime() >= c.getTime()
8855
+ ? n
8856
+ : n - 1;
8857
+ }
8858
+ },
8859
+ function (e, t, n) {
8860
+ "use strict";
8861
+ n.r(t),
8862
+ n.d(t, "default", function () {
8863
+ return a;
8864
+ });
8865
+ var r = n(5),
8866
+ o = n(2);
8867
+ function a(e) {
8868
+ Object(o.a)(1, arguments);
8869
+ var t = Object(r.default)(e),
8870
+ n = t.getMonth(),
8871
+ a = n - (n % 3);
8872
+ return t.setMonth(a, 1), t.setHours(0, 0, 0, 0), t;
8873
+ }
8874
+ },
8875
+ function (e, t, n) {
8876
+ var r;
8877
+ window,
8878
+ (e.exports =
8879
+ ((r = n(0)),
8880
+ (function (e) {
8881
+ var t = {};
8882
+ function n(r) {
8883
+ if (t[r]) return t[r].exports;
8884
+ var o = (t[r] = { i: r, l: !1, exports: {} });
8885
+ return e[r].call(o.exports, o, o.exports, n), (o.l = !0), o.exports;
8886
+ }
8887
+ return (
8888
+ (n.m = e),
8889
+ (n.c = t),
8890
+ (n.d = function (e, t, r) {
8891
+ n.o(e, t) ||
8892
+ Object.defineProperty(e, t, { enumerable: !0, get: r });
8893
+ }),
8894
+ (n.r = function (e) {
8895
+ "undefined" != typeof Symbol &&
8896
+ Symbol.toStringTag &&
8897
+ Object.defineProperty(e, Symbol.toStringTag, {
8898
+ value: "Module",
8899
+ }),
8900
+ Object.defineProperty(e, "__esModule", { value: !0 });
8901
+ }),
8902
+ (n.t = function (e, t) {
8903
+ if ((1 & t && (e = n(e)), 8 & t)) return e;
8904
+ if (4 & t && "object" == typeof e && e && e.__esModule) return e;
8905
+ var r = Object.create(null);
8906
+ if (
8907
+ (n.r(r),
8908
+ Object.defineProperty(r, "default", {
8909
+ enumerable: !0,
8910
+ value: e,
8911
+ }),
8912
+ 2 & t && "string" != typeof e)
8913
+ )
8914
+ for (var o in e)
8915
+ n.d(
8916
+ r,
8917
+ o,
8918
+ function (t) {
8919
+ return e[t];
8920
+ }.bind(null, o)
8921
+ );
8922
+ return r;
8923
+ }),
8924
+ (n.n = function (e) {
8925
+ var t =
8926
+ e && e.__esModule
8927
+ ? function () {
8928
+ return e.default;
8929
+ }
8930
+ : function () {
8931
+ return e;
8932
+ };
8933
+ return n.d(t, "a", t), t;
8934
+ }),
8935
+ (n.o = function (e, t) {
8936
+ return Object.prototype.hasOwnProperty.call(e, t);
8937
+ }),
8938
+ (n.p = ""),
8939
+ n((n.s = 2))
8940
+ );
8941
+ })([
8942
+ function (e, t, n) {
8943
+ e.exports = n(3)();
8944
+ },
8945
+ function (e, t) {
8946
+ e.exports = r;
8947
+ },
8948
+ function (e, t, n) {
8949
+ "use strict";
8950
+ n.r(t),
8951
+