Ultimate CSV Importer - Version 6.2.4

Version Description

Download this release

Release Info

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

Code changes from version 6.2.3 to 6.2.4

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.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/
@@ -13,148 +13,83 @@ License: GPLv2 or later
13
  Simple and powerful CSV / XML Import plugin even for advanced and novice users.
14
 
15
  == Description ==
16
- Now both CSV and XML import options available within the core plugin.
17
 
18
- Ultimate CSV Importer provides all the necessary Import and Export features in one bundle with simplified steps to follow. Note the added export, woocommerce and User import feature available as add-ons, you can install below add-ons to benefit those features
19
 
20
- 1. [Export any WordPress data](https://wordpress.org/plugins/ultimate-exporter)
21
- 2. [Product Import Export for WooCommerce](https://wordpress.org/plugins/import-woocommerce/)
22
-
23
- WooCommerce CSV Import Tutorial – Eay steps using WP Ultimate CSV Importer
24
 
25
- [youtube https://www.youtube.com/watch?v=b3Ix0WB3Bwg&feature=youtu.be]
 
 
 
 
26
 
27
- 3. [Import Export WordPress Users](https://wordpress.org/plugins/import-users/)
 
28
 
29
- How to import data to your WordPress?
30
-
31
- There are 3 simple steps to follow,
32
-
33
- 1. Upload your CSV or XML file.
34
- 2. Relate or map your CSV or XML fields with WP fields using drag and drop or simple left/right pick list method.
35
- 3. Click Import once you finished your field mappings.
36
-
37
- Overview: Whats new with WP Ultimate CSV Importer Latest version
38
- [youtube https://www.youtube.com/watch?v=yg9Z6yJqRfo&feature=youtu.be]
39
-
40
- There are more features bundled to make even complicated post data import simplified.
41
-
42
- = 1.Upload your CSV/XML =
43
-
44
- * Upload your CSV or XML file from different sources like desktop, FTP/SFTP, remote URLs or a location from your host server.
45
- * CSV, Zip, txt and XMl data (pro) file types supported.
46
- * Once uploaded, choose New items if you want to import as new posts.
47
- * Choose existing option in case to import the data to update or replace existing posts records.
48
- * Pick a post type like Post, Page, Custom Post, Comments or any other from the drop down.
49
- * This is under which post type your data gets imported.
50
- * It can be a complete post content replacement or partial update like selected set of fields for each post in CSV/XML.
51
- * Click continue button.
52
-
53
- = 2.Relate or map your CSV or XML fields to WP fields =
54
-
55
- In mapping section, CSV or XML Importer plugin allows you to relate the uploaded data set against WordPress fields. There are two methods available to relate your data set.
56
-
57
- * A simple left and right drop downs that allows you to map your CSV/XML data with the related WordPress fields.
58
- * You can choose each field from left side and assign a field from right to where it should go.
59
-
60
- = Drag 'n' Drop method =
61
-
62
- * You can visually drag field by field from the right side bar and drop it to post create view like place holder.
63
- * For e.g. you can drag title filed and drop it under post title box.
64
- * To make it easier you can see both field label and sample record in side bar, which allows you to understand how data placed.
65
- * In top side bar header, you can rotate this sample records by choosing a row item no. in case the default sample data is not helpful.
66
-
67
- = 3. Click Import =
68
-
69
- * Once the mapping completed, click import to start the import process.
70
- * In import view, if required you can also pause and resume the import process.
71
- * A section shows post count and status of successful imports with a timer.
72
- * A log section shows you detailed real time log of the process step by step.
73
- * Log is downloadable using the link provided.
74
-
75
- = What can you import in WordPress =
76
- Core Modules – Post, Page, Custom Post, Comments.
77
- Users – Import Users add-on to import your WordPress Users
78
- Custom Post – CPT UI, Pods, Toolset, Custom Press and default WordPress Custom Post.
79
- Custom Field – WordPress default Text and Text area fields.
80
-
81
- = Supported thirdparty plugins =
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.
94
- * Can handle 1000s of records on the fly.
95
- * Supports WordPress Custom Fields, Custom Press fields, WP Customer Reviews and All in One SEO fields.
96
- * Media images from any external URL like Google Images, pixabay, shutterstock, or any domain you own can be imported.
97
- * Image import processed from the background using WP-CRON to improve the performance.
98
- * Import with duplicate handling for optimized database.
99
- * Free add-on to Import Users <link> to upload user info into WordPress.
100
- * WordPress core custom fields registered dynamically on the flow of CSV/XML import.
101
- * Post type import with terms & taxonomies with any of depth of parent-child values.
102
- * WordPress multisite import supported.
103
- * Post Type CSV or XML import along with multi category & multi tag.
104
- * Import CSV with any delimiter in UTF-8 format can be imported.
105
- * Free export add-on to export <link> all your WP content in CSV file.
106
-
107
- = Important Notes =
108
- * Featured image import from any publicly accessible external URL.
109
- * All languages supported by WordPress imported in UTF-8 without BOM format.
110
-
111
- = Other useful tools =
112
- * Dashboard
113
- * General settings >> Scheduled log emails, send password in users get imported etc.
114
- * Database optimization
115
- * Security and performance monitoring
116
- * Manager >>File manager, log manager
117
- * Support >> Documentation
118
 
119
- = Premium Features =
120
- * CSV and XML import
121
- * Reusable Mapping Templates with Template manager
122
- * Smart Schedule/Recurring Import to run import periodically without any manual interaction.
123
- * Toolset Types Import – Custom fields, Post Relation, Intermediate post, Repeatable Field & Repeater Field Group support
124
- * Multilingual import support for the import of WPML & qTranslate X add-on
125
- * WooCommerce product import along with six WooCommerce add-on
126
- * Handles Custom Fields of ACF (FREE & Pro), Types, Pods and WordPress fields with the flow of import
127
- * Import history i.e. detailed log maintained in the Log manager.
128
- * Import all the supported features with Rest API.
129
- * Extendable for your needs with API.
130
-
131
- = HELPFUL LINKS =
132
- [Documentation](https://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-csv?utm_source=web&utm_campaign=readme&utm_medium=wp_org)
133
 
134
- [Try our live demo here](https://demo.smackcoders.com/wordpress/wp-admin/admin.php?page=com.smackcoders.csvimporternewpro.menu)
135
 
136
- [Request a free trial by visiting here](https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org) and Click Try Now option to generate your own WordPress test environment.
 
137
 
138
- [For samples and tutorials, visit our blog](https://www.smackcoders.com/blog.html?utm_source=wp.org&utm_medium=plugin&utm_campaign=readme)
 
 
139
 
140
- == Translations ==
141
 
142
- Many thanks to the generous efforts of our translators:
 
 
 
 
 
 
 
 
143
 
144
- * French (fr_FR) -- [the French translation team](https://translate.wordpress.org/locale/fr/default/wp-plugins/wp-ultimate-csv-importer)
145
- * Italian (it_IT) -- [the Italian translation team](https://translate.wordpress.org/locale/it/default/wp-plugins/wp-ultimate-csv-importer)
146
- * Spanish (es_ES) -- [the Spanish translation team](https://translate.wordpress.org/locale/es/default/wp-plugins/wp-ultimate-csv-importer)
147
- * German (de_DE) -- [the German translation team](https://translate.wordpress.org/locale/de/default/wp-plugins/wp-ultimate-csv-importer)
148
- * Japanese (ja) -- [the Japanese translation team](https://translate.wordpress.org/locale/ja/default/wp-plugins/wp-ultimate-csv-importer)
149
- * Russian (ru_RU) -- [the Russian translation team](https://translate.wordpress.org/locale/ru/default/wp-plugins/wp-ultimate-csv-importer)
150
- * Dutch (nl_NL) -- [the Dutch translation team](https://translate.wordpress.org/locale/nl/default/wp-plugins/wp-ultimate-csv-importer)
151
- * Turkish (tr_TR) -- [the Turkish translation team](https://translate.wordpress.org/locale/tr/default/wp-plugins/wp-ultimate-csv-importer)
152
- * English (en_CA) -- [the English (Canadian) translation team](https://translate.wordpress.org/locale/en-ca/default/wp-plugins/wp-ultimate-csv-importer)
153
- * English (en_GB) -- [the English (British) translation team](https://translate.wordpress.org/locale/en-gb/default/wp-plugins/wp-ultimate-csv-importer)
154
- * English (en_ZA) -- [the English (South African) translation team](https://translate.wordpress.org/locale/en-za/default/wp-plugins/wp-ultimate-csv-importer)
155
- * French (fr_BE) -- [the French (Belgium) translation team](https://translate.wordpress.org/locale/fr-be/default/wp-plugins/wp-ultimate-csv-importer)
156
 
157
- If you'd like to help out by translating this plugin, please [sign up for an account and dig in](https://translate.wordpress.org/projects/wp-plugins/wp-ultimate-csv-importer).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
  == Screenshots ==
160
  1. Dashboard view of the importer.
@@ -169,13 +104,13 @@ If you'd like to help out by translating this plugin, please [sign up for an acc
169
  == Frequently Asked Questions ==
170
 
171
  * What is a CSV file?
172
- A CSV or comma separated value file is a simple text based file format to store tabular data. In general, a character like a comma used as a separator between commas separated values as tables.
173
 
174
- * How to open or edit CSV file?
175
- A CSV file could be edited in any program like notepad or notepad+. However, a spreadsheet editor like MS Office, Open Office Calc is more useful to directly edit as tabled structure.
176
 
177
  * What are the types of CSV files?
178
- Most common type is csv or comma separated value file. The other one is delimited file where a character like a tab or a semicolon used instead of comma as a delimiter.
179
 
180
  * What is CSV file format?
181
  There are different file formats available based on encode like ANSI, UTF-8, UTF-8 without BOM, USC-2 BE BOM and USC-2 LE BOM. For WordPress, the default format will be UTF-8 and for non-Latin character data, UTF-8 without BOM used.
@@ -183,29 +118,39 @@ There are different file formats available based on encode like ANSI, UTF-8, UTF
183
  * How to validate a CSV?
184
  You can validate a csv file using [CSV Lint](https://csvlint.io/). Your CSV may miss escaping characters and misplaced/skipped character, which may cause the import to cease. Validate any csv file for issues or warning and fix them before importing it to WordPress.
185
 
186
- * What is a XML file?
187
  An XML document is a basic unit of XML information composed of elements and other markup in an orderly package. An XML document can contains wide variety of data.
188
 
189
  * How to import content to WordPress?
190
- Import to WordPress done in different methods based on content source type, platform, and file types. The most common types of imports are XML, CSV and DB files.
191
- 1. Xml method needs advanced knowledge to edit/update them in case of any changes required on source data. Otherwise, users are limited to do import without any changes to source file. Hence, editing done post by post in WordPress only possible after import.
192
- 2. CSV methods allow any users with basic excel or any spreadsheet knowledge can audit, change, edit or update the data visually in bulk before importing. So painful manual works avoided and time saved. Also, CSV file is the most preferred method for any offline programs.
 
 
 
193
 
194
- * How to import bulk images as csv in wordpress
 
195
 
196
- [youtube https://www.youtube.com/watch?v=6NqFduZUmHI&feature=youtu.be]
 
197
 
198
- * How to handle Types Custom Fields Import in wordpress
199
 
200
- [youtube https://www.youtube.com/watch?v=G_6vwYCDOOk&feature=youtu.be]
201
 
 
202
 
203
- * How to import google sheets data to WordPress
204
 
205
- [youtube https://www.youtube.com/watch?v=8P8xtRY3bCM&feature=youtu.be]
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.
@@ -302,7 +247,7 @@ Import to WordPress done in different methods based on content source type, plat
302
  * Improved: UI - Show export tab by default. If user have not installed the exporter plugin, It contains the download link.
303
  * Improved: UI - In plugins page inside csv importer. If a plugin is installed show it as already installed.
304
  * Fixed: : Timer not stopping after import issue.
305
- * Modified: Changed video url in documentation. In settings changed file_uploads and allow_url_fopen to on instead of 1.
306
  = 6.0 =
307
  * Improved: user interface and performance.
308
  * Added: Header Manipulation fields can now hold static text content along with any CSV header content.
@@ -687,6 +632,8 @@ Import to WordPress done in different methods based on content source type, plat
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 =
@@ -894,4 +841,4 @@ Import to WordPress done in different methods based on content source type, plat
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.
1
+ === WordPress Import Data as CSV/XML ===
2
  Contributors: smackcoders, smacksupport
3
  Requires at least: 5.0
4
+ Tested up to: 5.7.1
5
+ Stable tag: 6.2.4
6
+ Version: 6.2.4
7
  Requires PHP: 5.2.4
8
  Author: smackcoders
9
  Author URI: http://profiles.wordpress.org/smackcoders/
13
  Simple and powerful CSV / XML Import plugin even for advanced and novice users.
14
 
15
  == Description ==
16
+ WP Ultimate CSV Importer provides all data import features in one bundle. With the easy to understand import steps anyone gets familiar with the plugin on its first try. There is no limit for records to import with CSV Importer and you can import any WordPress content prepared as CSV or XML file following a few simple steps. Migrating your website data to WordPress and updating content on WordPress tasks becomes easier now with CSV Importer.
17
 
18
+ If you are planning to migrate your wordpress content from the old site to the new site, use our support add-on [WP Ultimate Exporter](https://wordpress.org/plugins/wp-ultimate-exporter/). With the Exporter plugin, you will be able to export Posts, Pages, Custom Posts, Comments, Customer Reviews, WooCommerce Products, Users, SEO data, BBpress fields data, LearnPress fields data, and more.
19
 
20
+ = WordPress Import primarily adds features like =
 
 
 
21
 
22
+ * Import any WordPress data types: Easy WordPress Posts, Pages, CustomPosts Import with inline images and featured images support.
23
+ * SEO-friendly Import: Supports importing SEO fields of the most popular SEO plugins like All in One SEO and Rank Math SEO.
24
+ * E-Commerce data import: Perform faster import of your WooCommerce Products along with Images, Categories, Attributes, and Tags.
25
+ * Comments & Reviews: Other important imports like WordPress Comments and Customer Reviews import can be done.
26
+ * Supports default WordPress Custom Fields Import.
27
 
28
+ Glad news for you that we have upgraded this WordPress Import plugin by adding compatibility for the popular SEO plugin, All In One SEO version 4.1.0.2
29
+ Please download the latest version of our plugin to unbox this feature.
30
 
31
+ = Some of the prominent features of WP Ultimate CSV Importer =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
+ * Simple and Advanced mode for uploading files.
34
+ * Upload any files types: .csv, .xml, .txt, .zip files.
35
+ * Support for CSV and XML files import.
36
+ * Maintenance mode option to notify your visitors while importing data at backend.
37
+ * Get Import logs.
38
+ * Import WordPress Users data
39
+ * bbPress and LearnPress data import
40
+ * WPML multilingual data import
41
+ * WP Customer Reviews import
42
+ * WooCommerce Products import
43
+ * AIOSEO, RANKMATH SEO FREE plugin fields import
44
+ * Comments Import
45
+ * Navigation Menus and Widgets Import
 
46
 
47
+ Note the Export features, Woocommerce Product Import, and WordPress Users import are available separately as addons.
48
 
49
+ = Supported Addons of WordPress Import plugin =
50
+ The below listed three supported addons can be jointly used with the WordPress Import data as CSV/XML plugin.
51
 
52
+ 1. [Export any WordPress data](https://wordpress.org/plugins/wp-ultimate-exporter/)
53
+ 2. [Product Import Export for WooCommerce](https://wordpress.org/plugins/import-woocommerce/)
54
+ 3. [Import Export WordPress Users](https://wordpress.org/plugins/import-users/)
55
 
56
+ = Supported Third Party Plugins =
57
 
58
+ * BBPress Plugin Topic, Reply, and Forum Import.
59
+ * LearnPress Plugin – Courses, Lessons, Quizzes, Orders and Questions Import.
60
+ * WooCommerce – Products with categories, attributes, tags, and Images Import.
61
+ * All in One SEO Plugin – SEO Fields Import.
62
+ * RANK MATH SEO Plugin - SEO Fields Import.
63
+ * WP Customer Reviews – Reviews Import.
64
+ * MultiLanguage by Websoft.
65
+ * Post Expirator Plugin.
66
+ * WooCommerce Product Bundles Plugin.
67
 
68
+ = What You can Import with this WordPress Importer =
69
+ Core Modules - Post, Page, Custom Post, Comments.
70
+ Users - Use Import Users add-on to import your WordPress Users.
71
+ Custom Post - CPT UI, Pods, Toolset, Jet engine, Custom Press and default WordPress Custom Post.
72
+ Custom Field - WordPress default Text and Text area fields.
 
 
 
 
 
 
 
73
 
74
+ = Premium Features =
75
+ * Upload files from desktop, FTP/SFTP, external URL or server.
76
+ * Existing WordPress content update with new data.
77
+ * Effective handling of duplicate records when importing.
78
+ * Import data from Google Sheets & Dropbox.
79
+ * Smart schedule import to run without any human intervention.
80
+ * Export any WordPress data types with advanced filters & in different file formats.
81
+ * Reusable mapping templates.
82
+ * eCommerce data import with plugins like WooCommerce, WPeCommerce and Marketpress.
83
+ * WooCommerce Import along with 6 WooCommerce addons.
84
+ * Toolset Types – Custom fields, Post Relation, Intermediate post, Repeatable Field & Repeater Field Group import.
85
+ * Multilingual Import with WPML & qTranslate X add-on.
86
+ * Custom fields import- Supported custom field plugins like ACF(Free & Pro), Toolset Types, Pods, CMB2, CFS, CustomPress, Jet Engine, and WordPress custom fields.
87
+ * SEO data import with plugins like Yoast SEO(free & pro), All in One SEO(free & pro), RANK MATH SEO Free & Pro plugin.
88
+ * Importing data of Events Manager Free & Pro plugin.
89
+ * Bulk image import into NextGEN Gallery plugin.
90
+ * Free technical support via email.
91
+
92
+ If you need any one of the above features, [purchase our pro plugin here](https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org) for the best price.
93
 
94
  == Screenshots ==
95
  1. Dashboard view of the importer.
104
  == Frequently Asked Questions ==
105
 
106
  * What is a CSV file?
107
+ A CSV or Comma Separated Value file is a simple text based file format to store the tabular data. In general, a character like, a comma used as a separator between commas separated values as tables.
108
 
109
+ * How to open or edit a CSV file?
110
+ A CSV file could be edited in any text editors like notepad or notepad+. However, spreadsheet editors like MS Office, Open Office Calc are more useful to directly edit as table structure.
111
 
112
  * What are the types of CSV files?
113
+ Most common type is csv or comma separated value file. The other one is a delimited file where a character like a tab or a semicolon is used instead of comma as a delimiter.
114
 
115
  * What is CSV file format?
116
  There are different file formats available based on encode like ANSI, UTF-8, UTF-8 without BOM, USC-2 BE BOM and USC-2 LE BOM. For WordPress, the default format will be UTF-8 and for non-Latin character data, UTF-8 without BOM used.
118
  * How to validate a CSV?
119
  You can validate a csv file using [CSV Lint](https://csvlint.io/). Your CSV may miss escaping characters and misplaced/skipped character, which may cause the import to cease. Validate any csv file for issues or warning and fix them before importing it to WordPress.
120
 
121
+ * What is an XML file?
122
  An XML document is a basic unit of XML information composed of elements and other markup in an orderly package. An XML document can contains wide variety of data.
123
 
124
  * How to import content to WordPress?
125
+ Import to WordPress done in different methods based on content source type, platform, and file types. The most common types of imports are XML, CSV and DB files.
126
+ 1. Xml method needs advanced knowledge to edit/update them in case of any changes required on source data. Otherwise, users are limited to import without any changes to the source file. Hence, editing done post by post in WordPress is only possible after import.
127
+ 2. CSV methods allow any users with basic excel or any spreadsheet knowledge to audit, change, edit or update the data visually in bulk before importing. So painful manual work is avoided and time saved. Also, the CSV file is the most preferred method for any offline programs.
128
+
129
+ * How to import data with Ultimate CSV Importer plugin?
130
+ You can import data into WordPress by following four simple steps. Start by uploading a CSV/XML file, map the CSV/XML fields with appropriate WP fields, enable the media handling option if you want to import any external images and finally click the ‘Import’ button to import all your data into WordPress in one go.
131
 
132
+ * Can I get any demo data or sample files for test import?
133
+ Yes, you can get [sample CSVs here to test import](https://www.smackcoders.com/blog/wordpress-ultimate-csv-importer-csv-sample-files-and-updates.html?utm_source=web&utm_medium=wp_org&utm_campaign=readme) with WP Ultimate CSV Importer.
134
 
135
+ * In WordPress, how to import xml?
136
+ It is simple with the Ultimate CSV Importer. You can import either XML or CSV using the same methods or UI. Upload your XML file using the browse and upload option. Then follow mapping steps as normal to import the data.
137
 
138
+ For more FAQ’s please check out this [FAQ article for CSV Importer](https://www.smackcoders.com/blog/wp-ultimate-csv-importer-questions.html?utm_source=web&utm_medium=wp_org&utm_campaign=readme).
139
 
140
+ = Other Useful Links to guide you =
141
 
142
+ Check out our [Documentation](https://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-csv?utm_source=web&utm_campaign=readme&utm_medium=wp_org) here to know further details about import & export. Watch out our [youtube video tutorials](https://www.youtube.com/watch?v=S1P8KebpLaU&list=PL2k3Ck1bFtbTtSX3hEFoBvK_Ka0pfYwp_) for better learning.
143
 
144
+ [Try our live demo here](https://demo.smackcoders.com/wordpress/wp-admin/admin.php?page=com.smackcoders.csvimporternewpro.menu)
145
 
146
+ [Request a free trial by visiting here](https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org) and Click Try Now option to generate your own WordPress test environment.
147
 
148
 
149
  == Changelog ==
150
+ = 6.2.4 =
151
+ * Added: Compatibility for WordPress 5.7
152
+ * Added: Compatibility for All in One SEO latest version 4.1.0.2
153
+
154
  = 6.2.3 =
155
  * Added: Compatibility for WordPress 5.7
156
  * Added: Import support for Rank Math SEO PRO Plugin.
247
  * Improved: UI - Show export tab by default. If user have not installed the exporter plugin, It contains the download link.
248
  * Improved: UI - In plugins page inside csv importer. If a plugin is installed show it as already installed.
249
  * Fixed: : Timer not stopping after import issue.
250
+ * Modified: Changed video url in documentation. In settings changed “file_uploads” and “allow_url_fopen” to “on” instead of 1.
251
  = 6.0 =
252
  * Improved: user interface and performance.
253
  * Added: Header Manipulation fields can now hold static text content along with any CSV header content.
632
  * Initial release version. Tested and found works well without any issues.
633
 
634
  == Upgrade Notice ==
635
+ = 6.2.4 =
636
+ * Added: Upgrade now for latest updates.
637
  = 6.2.3 =
638
  * Added: Upgrade now for latest updates.
639
  = 6.2.2 =
841
  = 1.0.1 =
842
  * Added features to import multiple tags and categories with different delimiters.
843
  = 1.0.0 =
844
+ * Initial release of plugin.
SaveMapping.php CHANGED
@@ -364,7 +364,7 @@ class SaveMapping{
364
 
365
  case 'AIOSEO':
366
  $all_seo_instance = AllInOneSeoImport::getInstance();
367
- $all_seo_instance->set_all_seo_values($header_array ,$value_array , $map['AIOSEO'], $post_id , $selected_type);
368
  break;
369
  case 'RANKMATH':
370
  $rankmath_instance = RankMathImport::getInstance();
364
 
365
  case 'AIOSEO':
366
  $all_seo_instance = AllInOneSeoImport::getInstance();
367
+ $all_seo_instance->set_all_seo_values($header_array ,$value_array , $map['AIOSEO'], $post_id , $selected_type,$get_mode);
368
  break;
369
  case 'RANKMATH':
370
  $rankmath_instance = RankMathImport::getInstance();
assets/images/wp-ultimate-csv-importer-old.png CHANGED
Binary file
assets/images/wp-ultimate-csv-importer.png CHANGED
Binary file
assets/js/admin-v6.1.js CHANGED
@@ -1,104712 +1,361 @@
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
- n.d(t, "default", function () {
8952
- return d;
8953
- });
8954
- var r = n(1),
8955
- o = n.n(r),
8956
- a = n(0),
8957
- i = n.n(a);
8958
- function s(e) {
8959
- return (s =
8960
- "function" == typeof Symbol &&
8961
- "symbol" == typeof Symbol.iterator
8962
- ? function (e) {
8963
- return typeof e;
8964
- }
8965
- : function (e) {
8966
- return e &&
8967
- "function" == typeof Symbol &&
8968
- e.constructor === Symbol &&
8969
- e !== Symbol.prototype
8970
- ? "symbol"
8971
- : typeof e;
8972
- })(e);
8973
- }
8974
- function l(e, t) {
8975
- for (var n = 0; n < t.length; n++) {
8976
- var r = t[n];
8977
- (r.enumerable = r.enumerable || !1),
8978
- (r.configurable = !0),
8979
- "value" in r && (r.writable = !0),
8980
- Object.defineProperty(e, r.key, r);
8981
- }
8982
- }
8983
- function c(e) {
8984
- return (c = Object.setPrototypeOf
8985
- ? Object.getPrototypeOf
8986
- : function (e) {
8987
- return e.__proto__ || Object.getPrototypeOf(e);
8988
- })(e);
8989
- }
8990
- function u(e, t) {
8991
- return (u =
8992
- Object.setPrototypeOf ||
8993
- function (e, t) {
8994
- return (e.__proto__ = t), e;
8995
- })(e, t);
8996
- }
8997
- var d = (function (e) {
8998
- function t(e) {
8999
- var n;
9000
- return (
9001
- (function (e, t) {
9002
- if (!(e instanceof t))
9003
- throw new TypeError("Cannot call a class as a function");
9004
- })(this, t),
9005
- ((n = (function (e, t) {
9006
- return !t || ("object" !== s(t) && "function" != typeof t)
9007
- ? (function (e) {
9008
- if (void 0 === e)
9009
- throw new ReferenceError(
9010
- "this hasn't been initialised - super() hasn't been called"
9011
- );
9012
- return e;
9013
- })(e)
9014
- : t;
9015
- })(this, c(t).call(this, e))).editor = null),
9016
- (n.domContainer = o.a.createRef()),
9017
- n
9018
- );
9019
- }
9020
- return (
9021
- (function (e, t) {
9022
- if ("function" != typeof t && null !== t)
9023
- throw new TypeError(
9024
- "Super expression must either be null or a function"
9025
- );
9026
- (e.prototype = Object.create(t && t.prototype, {
9027
- constructor: { value: e, writable: !0, configurable: !0 },
9028
- })),
9029
- t && u(e, t);
9030
- })(t, o.a.Component),
9031
- (function (e, t, n) {
9032
- t && l(e.prototype, t);
9033
- })(t, [
9034
- {
9035
- key: "shouldComponentUpdate",
9036
- value: function (e) {
9037
- return (
9038
- !!this.editor &&
9039
- (this._shouldUpdateContent(e) &&
9040
- this.editor.setData(e.data),
9041
- "disabled" in e &&
9042
- (this.editor.isReadOnly = e.disabled),
9043
- !1)
9044
- );
9045
- },
9046
- },
9047
- {
9048
- key: "componentDidMount",
9049
- value: function () {
9050
- this._initializeEditor();
9051
- },
9052
- },
9053
- {
9054
- key: "componentWillUnmount",
9055
- value: function () {
9056
- this._destroyEditor();
9057
- },
9058
- },
9059
- {
9060
- key: "render",
9061
- value: function () {
9062
- return o.a.createElement("div", {
9063
- ref: this.domContainer,
9064
- dangerouslySetInnerHTML: {
9065
- __html: this.props.data || "",
9066
- },
9067
- });
9068
- },
9069
- },
9070
- {
9071
- key: "_initializeEditor",
9072
- value: function () {
9073
- var e = this;
9074
- this.props.editor
9075
- .create(this.domContainer.current, this.props.config)
9076
- .then(function (t) {
9077
- (e.editor = t),
9078
- "disabled" in e.props &&
9079
- (t.isReadOnly = e.props.disabled),
9080
- e.props.onInit && e.props.onInit(t);
9081
- var n = t.model.document,
9082
- r = t.editing.view.document;
9083
- n.on("change:data", function (n) {
9084
- e.props.onChange && e.props.onChange(n, t);
9085
- }),
9086
- r.on("focus", function (n) {
9087
- e.props.onFocus && e.props.onFocus(n, t);
9088
- }),
9089
- r.on("blur", function (n) {
9090
- e.props.onBlur && e.props.onBlur(n, t);
9091
- });
9092
- })
9093
- .catch(function (e) {
9094
- console.error(e);
9095
- });
9096
- },
9097
- },
9098
- {
9099
- key: "_destroyEditor",
9100
- value: function () {
9101
- var e = this;
9102
- this.editor &&
9103
- this.editor.destroy().then(function () {
9104
- e.editor = null;
9105
- });
9106
- },
9107
- },
9108
- {
9109
- key: "_shouldUpdateContent",
9110
- value: function (e) {
9111
- return (
9112
- this.props.data !== e.data &&
9113
- this.editor.getData() !== e.data
9114
- );
9115
- },
9116
- },
9117
- ]),
9118
- t
9119
- );
9120
- })();
9121
- (d.propTypes = {
9122
- editor: i.a.func.isRequired,
9123
- data: i.a.string,
9124
- config: i.a.object,
9125
- onChange: i.a.func,
9126
- onInit: i.a.func,
9127
- onFocus: i.a.func,
9128
- onBlur: i.a.func,
9129
- disabled: i.a.bool,
9130
- }),
9131
- (d.defaultProps = { config: {} });
9132
- },
9133
- function (e, t, n) {
9134
- "use strict";
9135
- var r = n(4);
9136
- function o() {}
9137
- function a() {}
9138
- (a.resetWarningCache = o),
9139
- (e.exports = function () {
9140
- function e(e, t, n, o, a, i) {
9141
- if (i !== r) {
9142
- var s = new Error(
9143
- "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"
9144
- );
9145
- throw ((s.name = "Invariant Violation"), s);
9146
- }
9147
- }
9148
- function t() {
9149
- return e;
9150
- }
9151
- e.isRequired = e;
9152
- var n = {
9153
- array: e,
9154
- bool: e,
9155
- func: e,
9156
- number: e,
9157
- object: e,
9158
- string: e,
9159
- symbol: e,
9160
- any: e,
9161
- arrayOf: t,
9162
- element: e,
9163
- elementType: e,
9164
- instanceOf: t,
9165
- node: e,
9166
- objectOf: t,
9167
- oneOf: t,
9168
- oneOfType: t,
9169
- shape: t,
9170
- exact: t,
9171
- checkPropTypes: a,
9172
- resetWarningCache: o,
9173
- };
9174
- return (n.PropTypes = n), n;
9175
- });
9176
- },
9177
- function (e, t, n) {
9178
- "use strict";
9179
- e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
9180
- },
9181
- ]).default));
9182
- },
9183
- function (e, t, n) {
9184
- var r;
9185
- ((r =
9186
- window.CKEDITOR_TRANSLATIONS ||
9187
- (window.CKEDITOR_TRANSLATIONS = {})).en = Object.assign(r.en || {}, {
9188
- a: "Cannot upload file:",
9189
- b: "Image toolbar",
9190
- c: "Table toolbar",
9191
- d: "Bold",
9192
- e: "Italic",
9193
- f: "Block quote",
9194
- g: "Insert image or file",
9195
- h: "Choose heading",
9196
- i: "Heading",
9197
- j: "image widget",
9198
- k: "Full size image",
9199
- l: "Side image",
9200
- m: "Left aligned image",
9201
- n: "Centered image",
9202
- o: "Right aligned image",
9203
- p: "Insert image",
9204
- q: "Numbered List",
9205
- r: "Bulleted List",
9206
- s: "Insert table",
9207
- t: "Header column",
9208
- u: "Insert column left",
9209
- v: "Insert column right",
9210
- w: "Delete column",
9211
- x: "Column",
9212
- y: "Header row",
9213
- z: "Insert row below",
9214
- aa: "Insert row above",
9215
- ab: "Delete row",
9216
- ac: "Row",
9217
- ad: "Merge cell up",
9218
- ae: "Merge cell right",
9219
- af: "Merge cell down",
9220
- ag: "Merge cell left",
9221
- ah: "Split cell vertically",
9222
- ai: "Split cell horizontally",
9223
- aj: "Merge cells",
9224
- ak: "Enter image caption",
9225
- al: "Upload failed",
9226
- am: "media widget",
9227
- an: "Insert media",
9228
- ao: "The URL must not be empty.",
9229
- ap: "This media URL is not supported.",
9230
- aq: "Link",
9231
- ar: "Could not obtain resized image URL.",
9232
- as: "Selecting resized image failed",
9233
- at: "Could not insert image at the current position.",
9234
- au: "Inserting image failed",
9235
- av: "Widget toolbar",
9236
- aw: "Upload in progress",
9237
- ax: "Open in a new tab",
9238
- ay: "Downloadable",
9239
- az: "Unlink",
9240
- ba: "Edit link",
9241
- bb: "Open link in new tab",
9242
- bc: "This link has no URL",
9243
- bd: "Save",
9244
- be: "Cancel",
9245
- bf: "Link URL",
9246
- bg: "Paste the media URL in the input.",
9247
- bh: "Tip: Paste the URL into the content to embed faster.",
9248
- bi: "Media URL",
9249
- bj: "Undo",
9250
- bk: "Redo",
9251
- bl: "Editor toolbar",
9252
- bm: "Rich Text Editor, %0",
9253
- bn: "Rich Text Editor",
9254
- bo: "Dropdown toolbar",
9255
- bp: "%0 of %1",
9256
- bq: "Previous",
9257
- br: "Next",
9258
- bs: "Change image text alternative",
9259
- bt: "Paragraph",
9260
- bu: "Heading 1",
9261
- bv: "Heading 2",
9262
- bw: "Heading 3",
9263
- bx: "Heading 4",
9264
- by: "Heading 5",
9265
- bz: "Heading 6",
9266
- ca: "Text alternative",
9267
- })),
9268
- window,
9269
- (e.exports = (function (e) {
9270
- var t = {};
9271
- function n(r) {
9272
- if (t[r]) return t[r].exports;
9273
- var o = (t[r] = { i: r, l: !1, exports: {} });
9274
- return e[r].call(o.exports, o, o.exports, n), (o.l = !0), o.exports;
9275
- }
9276
- return (
9277
- (n.m = e),
9278
- (n.c = t),
9279
- (n.d = function (e, t, r) {
9280
- n.o(e, t) ||
9281
- Object.defineProperty(e, t, { enumerable: !0, get: r });
9282
- }),
9283
- (n.r = function (e) {
9284
- "undefined" != typeof Symbol &&
9285
- Symbol.toStringTag &&
9286
- Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
9287
- Object.defineProperty(e, "__esModule", { value: !0 });
9288
- }),
9289
- (n.t = function (e, t) {
9290
- if ((1 & t && (e = n(e)), 8 & t)) return e;
9291
- if (4 & t && "object" == typeof e && e && e.__esModule) return e;
9292
- var r = Object.create(null);
9293
- if (
9294
- (n.r(r),
9295
- Object.defineProperty(r, "default", { enumerable: !0, value: e }),
9296
- 2 & t && "string" != typeof e)
9297
- )
9298
- for (var o in e)
9299
- n.d(
9300
- r,
9301
- o,
9302
- function (t) {
9303
- return e[t];
9304
- }.bind(null, o)
9305
- );
9306
- return r;
9307
- }),
9308
- (n.n = function (e) {
9309
- var t =
9310
- e && e.__esModule
9311
- ? function () {
9312
- return e.default;
9313
- }
9314
- : function () {
9315
- return e;
9316
- };
9317
- return n.d(t, "a", t), t;
9318
- }),
9319
- (n.o = function (e, t) {
9320
- return Object.prototype.hasOwnProperty.call(e, t);
9321
- }),
9322
- (n.p = ""),
9323
- n((n.s = 91))
9324
- );
9325
- })([
9326
- function (e, t, n) {
9327
- "use strict";
9328
- n.d(t, "b", function () {
9329
- return r;
9330
- }),
9331
- n.d(t, "a", function () {
9332
- return o;
9333
- });
9334
- class r extends Error {
9335
- constructor(e, t, n) {
9336
- (e = o(e)),
9337
- n && (e += " " + JSON.stringify(n)),
9338
- super(e),
9339
- (this.name = "CKEditorError"),
9340
- (this.context = t),
9341
- (this.data = n);
9342
- }
9343
- is(e) {
9344
- return "CKEditorError" === e;
9345
- }
9346
- }
9347
- function o(e) {
9348
- const t = e.match(/^([^:]+):/);
9349
- return t
9350
- ? e +
9351
- ` Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-${t[1]}\n`
9352
- : e;
9353
- }
9354
- },
9355
- function (e, t, n) {
9356
- "use strict";
9357
- var r = {},
9358
- o = (function () {
9359
- var e;
9360
- return function () {
9361
- return (
9362
- void 0 === e &&
9363
- (e = Boolean(
9364
- window && document && document.all && !window.atob
9365
- )),
9366
- e
9367
- );
9368
- };
9369
- })(),
9370
- a = (function () {
9371
- var e = {};
9372
- return function (t) {
9373
- if (void 0 === e[t]) {
9374
- var n = document.querySelector(t);
9375
- if (
9376
- window.HTMLIFrameElement &&
9377
- n instanceof window.HTMLIFrameElement
9378
- )
9379
- try {
9380
- n = n.contentDocument.head;
9381
- } catch (e) {
9382
- n = null;
9383
- }
9384
- e[t] = n;
9385
- }
9386
- return e[t];
9387
- };
9388
- })();
9389
- function i(e, t) {
9390
- for (var n = [], r = {}, o = 0; o < e.length; o++) {
9391
- var a = e[o],
9392
- i = t.base ? a[0] + t.base : a[0],
9393
- s = { css: a[1], media: a[2], sourceMap: a[3] };
9394
- r[i]
9395
- ? r[i].parts.push(s)
9396
- : n.push((r[i] = { id: i, parts: [s] }));
9397
- }
9398
- return n;
9399
- }
9400
- function s(e, t) {
9401
- for (var n = 0; n < e.length; n++) {
9402
- var o = e[n],
9403
- a = r[o.id],
9404
- i = 0;
9405
- if (a) {
9406
- for (a.refs++; i < a.parts.length; i++) a.parts[i](o.parts[i]);
9407
- for (; i < o.parts.length; i++) a.parts.push(p(o.parts[i], t));
9408
- } else {
9409
- for (var s = []; i < o.parts.length; i++)
9410
- s.push(p(o.parts[i], t));
9411
- r[o.id] = { id: o.id, refs: 1, parts: s };
9412
- }
9413
- }
9414
- }
9415
- function l(e) {
9416
- var t = document.createElement("style");
9417
- if (void 0 === e.attributes.nonce) {
9418
- var r = n.nc;
9419
- r && (e.attributes.nonce = r);
9420
- }
9421
- if (
9422
- (Object.keys(e.attributes).forEach(function (n) {
9423
- t.setAttribute(n, e.attributes[n]);
9424
- }),
9425
- "function" == typeof e.insert)
9426
- )
9427
- e.insert(t);
9428
- else {
9429
- var o = a(e.insert || "head");
9430
- if (!o)
9431
- throw new Error(
9432
- "Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."
9433
- );
9434
- o.appendChild(t);
9435
- }
9436
- return t;
9437
- }
9438
- var c = (function () {
9439
- var e = [];
9440
- return function (t, n) {
9441
- return (e[t] = n), e.filter(Boolean).join("\n");
9442
- };
9443
- })();
9444
- function u(e, t, n, r) {
9445
- var o = n ? "" : r.css;
9446
- if (e.styleSheet) e.styleSheet.cssText = c(t, o);
9447
- else {
9448
- var a = document.createTextNode(o),
9449
- i = e.childNodes;
9450
- i[t] && e.removeChild(i[t]),
9451
- i.length ? e.insertBefore(a, i[t]) : e.appendChild(a);
9452
- }
9453
- }
9454
- var d = null,
9455
- h = 0;
9456
- function p(e, t) {
9457
- var n, r, o;
9458
- if (t.singleton) {
9459
- var a = h++;
9460
- (n = d || (d = l(t))),
9461
- (r = u.bind(null, n, a, !1)),
9462
- (o = u.bind(null, n, a, !0));
9463
- } else
9464
- (n = l(t)),
9465
- (r = function (e, t, n) {
9466
- var r = n.css,
9467
- o = n.media,
9468
- a = n.sourceMap;
9469
- if (
9470
- (o && e.setAttribute("media", o),
9471
- a &&
9472
- btoa &&
9473
- (r += "\n/*# sourceMappingURL=data:application/json;base64,".concat(
9474
- btoa(unescape(encodeURIComponent(JSON.stringify(a)))),
9475
- " */"
9476
- )),
9477
- e.styleSheet)
9478
- )
9479
- e.styleSheet.cssText = r;
9480
- else {
9481
- for (; e.firstChild; ) e.removeChild(e.firstChild);
9482
- e.appendChild(document.createTextNode(r));
9483
- }
9484
- }.bind(null, n, t)),
9485
- (o = function () {
9486
- !(function (e) {
9487
- if (null === e.parentNode) return !1;
9488
- e.parentNode.removeChild(e);
9489
- })(n);
9490
- });
9491
- return (
9492
- r(e),
9493
- function (t) {
9494
- if (t) {
9495
- if (
9496
- t.css === e.css &&
9497
- t.media === e.media &&
9498
- t.sourceMap === e.sourceMap
9499
- )
9500
- return;
9501
- r((e = t));
9502
- } else o();
9503
- }
9504
- );
9505
- }
9506
- e.exports = function (e, t) {
9507
- ((t = t || {}).attributes =
9508
- "object" == typeof t.attributes ? t.attributes : {}),
9509
- t.singleton ||
9510
- "boolean" == typeof t.singleton ||
9511
- (t.singleton = o());
9512
- var n = i(e, t);
9513
- return (
9514
- s(n, t),
9515
- function (e) {
9516
- for (var o = [], a = 0; a < n.length; a++) {
9517
- var l = n[a],
9518
- c = r[l.id];
9519
- c && (c.refs--, o.push(c));
9520
- }
9521
- e && s(i(e, t), t);
9522
- for (var u = 0; u < o.length; u++) {
9523
- var d = o[u];
9524
- if (0 === d.refs) {
9525
- for (var h = 0; h < d.parts.length; h++) d.parts[h]();
9526
- delete r[d.id];
9527
- }
9528
- }
9529
- }
9530
- );
9531
- };
9532
- },
9533
- ,
9534
- function (e, t, n) {
9535
- "use strict";
9536
- var r = n(7),
9537
- o =
9538
- "object" == typeof self && self && self.Object === Object && self,
9539
- a = r.a || o || Function("return this")();
9540
- t.a = a;
9541
- },
9542
- function (e, n, r) {
9543
- "use strict";
9544
- (function (e) {
9545
- var o = r(7),
9546
- a = t && !t.nodeType && t,
9547
- i = a && "object" == typeof e && e && !e.nodeType && e,
9548
- s = i && i.exports === a && o.a.process,
9549
- l = (function () {
9550
- try {
9551
- return (
9552
- (i && i.require && i.require("util").types) ||
9553
- (s && s.binding && s.binding("util"))
9554
- );
9555
- } catch (e) {}
9556
- })();
9557
- n.a = l;
9558
- }.call(this, r(8)(e)));
9559
- },
9560
- function (e, n, r) {
9561
- "use strict";
9562
- (function (e) {
9563
- var o = r(3),
9564
- a = r(11),
9565
- i = t && !t.nodeType && t,
9566
- s = i && "object" == typeof e && e && !e.nodeType && e,
9567
- l = s && s.exports === i ? o.a.Buffer : void 0,
9568
- c = (l ? l.isBuffer : void 0) || a.a;
9569
- n.a = c;
9570
- }.call(this, r(8)(e)));
9571
- },
9572
- function (e, t, n) {
9573
- "use strict";
9574
- (function (e) {
9575
- var t = n(13),
9576
- r = n(0);
9577
- const o = "object" == typeof window ? window : e;
9578
- if (o.CKEDITOR_VERSION)
9579
- throw new r.b(
9580
- "ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated.",
9581
- null
9582
- );
9583
- o.CKEDITOR_VERSION = t.a;
9584
- }.call(this, n(9)));
9585
- },
9586
- function (e, t, n) {
9587
- "use strict";
9588
- (function (e) {
9589
- var n = "object" == typeof e && e && e.Object === Object && e;
9590
- t.a = n;
9591
- }.call(this, n(9)));
9592
- },
9593
- function (e, t) {
9594
- e.exports = function (e) {
9595
- if (!e.webpackPolyfill) {
9596
- var t = Object.create(e);
9597
- t.children || (t.children = []),
9598
- Object.defineProperty(t, "loaded", {
9599
- enumerable: !0,
9600
- get: function () {
9601
- return t.l;
9602
- },
9603
- }),
9604
- Object.defineProperty(t, "id", {
9605
- enumerable: !0,
9606
- get: function () {
9607
- return t.i;
9608
- },
9609
- }),
9610
- Object.defineProperty(t, "exports", { enumerable: !0 }),
9611
- (t.webpackPolyfill = 1);
9612
- }
9613
- return t;
9614
- };
9615
- },
9616
- function (e, t) {
9617
- var n;
9618
- n = (function () {
9619
- return this;
9620
- })();
9621
- try {
9622
- n = n || new Function("return this")();
9623
- } catch (e) {
9624
- "object" == typeof window && (n = window);
9625
- }
9626
- e.exports = n;
9627
- },
9628
- function (e, t, n) {
9629
- var r = n(68);
9630
- "string" == typeof r && (r = [[e.i, r, ""]]),
9631
- n(1)(r, {
9632
- injectType: "singletonStyleTag",
9633
- insert: "head",
9634
- singleton: !0,
9635
- }),
9636
- r.locals && (e.exports = r.locals);
9637
- },
9638
- function (e, t, n) {
9639
- "use strict";
9640
- t.a = function () {
9641
- return !1;
9642
- };
9643
- },
9644
- function (e, n, r) {
9645
- "use strict";
9646
- (function (e) {
9647
- var o = r(3),
9648
- a = t && !t.nodeType && t,
9649
- i = a && "object" == typeof e && e && !e.nodeType && e,
9650
- s = i && i.exports === a ? o.a.Buffer : void 0,
9651
- l = s ? s.allocUnsafe : void 0;
9652
- n.a = function (e, t) {
9653
- if (t) return e.slice();
9654
- var n = e.length,
9655
- r = l ? l(n) : new e.constructor(n);
9656
- return e.copy(r), r;
9657
- };
9658
- }.call(this, r(8)(e)));
9659
- },
9660
- function (e) {
9661
- e.exports = JSON.parse('{"a":"12.4.0"}');
9662
- },
9663
- function (e, t, n) {
9664
- var r = n(15);
9665
- "string" == typeof r && (r = [[e.i, r, ""]]),
9666
- n(1)(r, {
9667
- injectType: "singletonStyleTag",
9668
- insert: "head",
9669
- singleton: !0,
9670
- }),
9671
- r.locals && (e.exports = r.locals);
9672
- },
9673
- function (e, t) {
9674
- e.exports =
9675
- ".ck.ck-placeholder:before,.ck .ck-placeholder:before{content:attr(data-placeholder);pointer-events:none;cursor:text;color:var(--ck-color-engine-placeholder-text)}";
9676
- },
9677
- function (e, t, n) {
9678
- var r = n(17);
9679
- "string" == typeof r && (r = [[e.i, r, ""]]),
9680
- n(1)(r, {
9681
- injectType: "singletonStyleTag",
9682
- insert: "head",
9683
- singleton: !0,
9684
- }),
9685
- r.locals && (e.exports = r.locals);
9686
- },
9687
- function (e, t) {
9688
- e.exports =
9689
- ".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)}";
9690
- },
9691
- function (e, t, n) {
9692
- var r = n(19);
9693
- "string" == typeof r && (r = [[e.i, r, ""]]),
9694
- n(1)(r, {
9695
- injectType: "singletonStyleTag",
9696
- insert: "head",
9697
- singleton: !0,
9698
- }),
9699
- r.locals && (e.exports = r.locals);
9700
- },
9701
- function (e, t) {
9702
- e.exports =
9703
- ".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)}";
9704
- },
9705
- function (e, t, n) {
9706
- var r = n(21);
9707
- "string" == typeof r && (r = [[e.i, r, ""]]),
9708
- n(1)(r, {
9709
- injectType: "singletonStyleTag",
9710
- insert: "head",
9711
- singleton: !0,
9712
- }),
9713
- r.locals && (e.exports = r.locals);
9714
- },
9715
- function (e, t) {
9716
- e.exports =
9717
- ".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}";
9718
- },
9719
- function (e, t, n) {
9720
- var r = n(23);
9721
- "string" == typeof r && (r = [[e.i, r, ""]]),
9722
- n(1)(r, {
9723
- injectType: "singletonStyleTag",
9724
- insert: "head",
9725
- singleton: !0,
9726
- }),
9727
- r.locals && (e.exports = r.locals);
9728
- },
9729
- function (e, t) {
9730
- e.exports =
9731
- ".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}";
9732
- },
9733
- function (e, t, n) {
9734
- var r = n(25);
9735
- "string" == typeof r && (r = [[e.i, r, ""]]),
9736
- n(1)(r, {
9737
- injectType: "singletonStyleTag",
9738
- insert: "head",
9739
- singleton: !0,
9740
- }),
9741
- r.locals && (e.exports = r.locals);
9742
- },
9743
- function (e, t) {
9744
- e.exports =
9745
- ".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}";
9746
- },
9747
- function (e, t, n) {
9748
- var r = n(27);
9749
- "string" == typeof r && (r = [[e.i, r, ""]]),
9750
- n(1)(r, {
9751
- injectType: "singletonStyleTag",
9752
- insert: "head",
9753
- singleton: !0,
9754
- }),
9755
- r.locals && (e.exports = r.locals);
9756
- },
9757
- function (e, t) {
9758
- e.exports =
9759
- ".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)}";
9760
- },
9761
- function (e, t, n) {
9762
- var r = n(29);
9763
- "string" == typeof r && (r = [[e.i, r, ""]]),
9764
- n(1)(r, {
9765
- injectType: "singletonStyleTag",
9766
- insert: "head",
9767
- singleton: !0,
9768
- }),
9769
- r.locals && (e.exports = r.locals);
9770
- },
9771
- function (e, t) {
9772
- e.exports =
9773
- ".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}";
9774
- },
9775
- function (e, t, n) {
9776
- var r = n(31);
9777
- "string" == typeof r && (r = [[e.i, r, ""]]),
9778
- n(1)(r, {
9779
- injectType: "singletonStyleTag",
9780
- insert: "head",
9781
- singleton: !0,
9782
- }),
9783
- r.locals && (e.exports = r.locals);
9784
- },
9785
- function (e, t) {
9786
- e.exports =
9787
- '.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}';
9788
- },
9789
- function (e, t, n) {
9790
- var r = n(33);
9791
- "string" == typeof r && (r = [[e.i, r, ""]]),
9792
- n(1)(r, {
9793
- injectType: "singletonStyleTag",
9794
- insert: "head",
9795
- singleton: !0,
9796
- }),
9797
- r.locals && (e.exports = r.locals);
9798
- },
9799
- function (e, t) {
9800
- e.exports =
9801
- ".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}";
9802
- },
9803
- function (e, t, n) {
9804
- var r = n(35);
9805
- "string" == typeof r && (r = [[e.i, r, ""]]),
9806
- n(1)(r, {
9807
- injectType: "singletonStyleTag",
9808
- insert: "head",
9809
- singleton: !0,
9810
- }),
9811
- r.locals && (e.exports = r.locals);
9812
- },
9813
- function (e, t) {
9814
- e.exports =
9815
- ".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}";
9816
- },
9817
- function (e, t, n) {
9818
- var r = n(37);
9819
- "string" == typeof r && (r = [[e.i, r, ""]]),
9820
- n(1)(r, {
9821
- injectType: "singletonStyleTag",
9822
- insert: "head",
9823
- singleton: !0,
9824
- }),
9825
- r.locals && (e.exports = r.locals);
9826
- },
9827
- function (e, t) {
9828
- e.exports =
9829
- ":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}";
9830
- },
9831
- function (e, t, n) {
9832
- var r = n(39);
9833
- "string" == typeof r && (r = [[e.i, r, ""]]),
9834
- n(1)(r, {
9835
- injectType: "singletonStyleTag",
9836
- insert: "head",
9837
- singleton: !0,
9838
- }),
9839
- r.locals && (e.exports = r.locals);
9840
- },
9841
- function (e, t) {
9842
- e.exports =
9843
- ".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)}";
9844
- },
9845
- function (e, t, n) {
9846
- var r = n(41);
9847
- "string" == typeof r && (r = [[e.i, r, ""]]),
9848
- n(1)(r, {
9849
- injectType: "singletonStyleTag",
9850
- insert: "head",
9851
- singleton: !0,
9852
- }),
9853
- r.locals && (e.exports = r.locals);
9854
- },
9855
- function (e, t) {
9856
- e.exports =
9857
- ":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)}}";
9858
- },
9859
- function (e, t, n) {
9860
- var r = n(43);
9861
- "string" == typeof r && (r = [[e.i, r, ""]]),
9862
- n(1)(r, {
9863
- injectType: "singletonStyleTag",
9864
- insert: "head",
9865
- singleton: !0,
9866
- }),
9867
- r.locals && (e.exports = r.locals);
9868
- },
9869
- function (e, t) {
9870
- e.exports =
9871
- ".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)}}";
9872
- },
9873
- function (e, t, n) {
9874
- var r = n(45);
9875
- "string" == typeof r && (r = [[e.i, r, ""]]),
9876
- n(1)(r, {
9877
- injectType: "singletonStyleTag",
9878
- insert: "head",
9879
- singleton: !0,
9880
- }),
9881
- r.locals && (e.exports = r.locals);
9882
- },
9883
- function (e, t) {
9884
- e.exports =
9885
- ':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))}';
9886
- },
9887
- function (e, t, n) {
9888
- var r = n(47);
9889
- "string" == typeof r && (r = [[e.i, r, ""]]),
9890
- n(1)(r, {
9891
- injectType: "singletonStyleTag",
9892
- insert: "head",
9893
- singleton: !0,
9894
- }),
9895
- r.locals && (e.exports = r.locals);
9896
- },
9897
- function (e, t) {
9898
- e.exports =
9899
- ".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}";
9900
- },
9901
- function (e, t, n) {
9902
- var r = n(49);
9903
- "string" == typeof r && (r = [[e.i, r, ""]]),
9904
- n(1)(r, {
9905
- injectType: "singletonStyleTag",
9906
- insert: "head",
9907
- singleton: !0,
9908
- }),
9909
- r.locals && (e.exports = r.locals);
9910
- },
9911
- function (e, t) {
9912
- e.exports =
9913
- ".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}";
9914
- },
9915
- function (e, t, n) {
9916
- var r = n(51);
9917
- "string" == typeof r && (r = [[e.i, r, ""]]),
9918
- n(1)(r, {
9919
- injectType: "singletonStyleTag",
9920
- insert: "head",
9921
- singleton: !0,
9922
- }),
9923
- r.locals && (e.exports = r.locals);
9924
- },
9925
- function (e, t) {
9926
- e.exports =
9927
- ".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}";
9928
- },
9929
- function (e, t, n) {
9930
- var r = n(53);
9931
- "string" == typeof r && (r = [[e.i, r, ""]]),
9932
- n(1)(r, {
9933
- injectType: "singletonStyleTag",
9934
- insert: "head",
9935
- singleton: !0,
9936
- }),
9937
- r.locals && (e.exports = r.locals);
9938
- },
9939
- function (e, t) {
9940
- e.exports =
9941
- ".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}}";
9942
- },
9943
- function (e, t, n) {
9944
- var r = n(55);
9945
- "string" == typeof r && (r = [[e.i, r, ""]]),
9946
- n(1)(r, {
9947
- injectType: "singletonStyleTag",
9948
- insert: "head",
9949
- singleton: !0,
9950
- }),
9951
- r.locals && (e.exports = r.locals);
9952
- },
9953
- function (e, t) {
9954
- e.exports =
9955
- '.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}}';
9956
- },
9957
- function (e, t, n) {
9958
- var r = n(57);
9959
- "string" == typeof r && (r = [[e.i, r, ""]]),
9960
- n(1)(r, {
9961
- injectType: "singletonStyleTag",
9962
- insert: "head",
9963
- singleton: !0,
9964
- }),
9965
- r.locals && (e.exports = r.locals);
9966
- },
9967
- function (e, t) {
9968
- e.exports =
9969
- '.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)}}';
9970
- },
9971
- function (e, t, n) {
9972
- var r = n(59);
9973
- "string" == typeof r && (r = [[e.i, r, ""]]),
9974
- n(1)(r, {
9975
- injectType: "singletonStyleTag",
9976
- insert: "head",
9977
- singleton: !0,
9978
- }),
9979
- r.locals && (e.exports = r.locals);
9980
- },
9981
- function (e, t) {
9982
- e.exports =
9983
- ".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%}";
9984
- },
9985
- function (e, t, n) {
9986
- var r = n(61);
9987
- "string" == typeof r && (r = [[e.i, r, ""]]),
9988
- n(1)(r, {
9989
- injectType: "singletonStyleTag",
9990
- insert: "head",
9991
- singleton: !0,
9992
- }),
9993
- r.locals && (e.exports = r.locals);
9994
- },
9995
- function (e, t) {
9996
- e.exports =
9997
- ".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)}";
9998
- },
9999
- function (e, t, n) {
10000
- var r = n(63);
10001
- "string" == typeof r && (r = [[e.i, r, ""]]),
10002
- n(1)(r, {
10003
- injectType: "singletonStyleTag",
10004
- insert: "head",
10005
- singleton: !0,
10006
- }),
10007
- r.locals && (e.exports = r.locals);
10008
- },
10009
- function (e, t) {
10010
- e.exports =
10011
- ".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)))}";
10012
- },
10013
- function (e, t, n) {
10014
- var r = n(65);
10015
- "string" == typeof r && (r = [[e.i, r, ""]]),
10016
- n(1)(r, {
10017
- injectType: "singletonStyleTag",
10018
- insert: "head",
10019
- singleton: !0,
10020
- }),
10021
- r.locals && (e.exports = r.locals);
10022
- },
10023
- function (e, t) {
10024
- e.exports =
10025
- ".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}";
10026
- },
10027
- function (e, t, n) {
10028
- var r = n(67);
10029
- "string" == typeof r && (r = [[e.i, r, ""]]),
10030
- n(1)(r, {
10031
- injectType: "singletonStyleTag",
10032
- insert: "head",
10033
- singleton: !0,
10034
- }),
10035
- r.locals && (e.exports = r.locals);
10036
- },
10037
- function (e, t) {
10038
- e.exports =
10039
- ".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}";
10040
- },
10041
- function (e, t) {
10042
- e.exports =
10043
- ".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}";
10044
- },
10045
- function (e, t, n) {
10046
- var r = n(70);
10047
- "string" == typeof r && (r = [[e.i, r, ""]]),
10048
- n(1)(r, {
10049
- injectType: "singletonStyleTag",
10050
- insert: "head",
10051
- singleton: !0,
10052
- }),
10053
- r.locals && (e.exports = r.locals);
10054
- },
10055
- function (e, t) {
10056
- e.exports =
10057
- ".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}";
10058
- },
10059
- function (e, t, n) {
10060
- var r = n(72);
10061
- "string" == typeof r && (r = [[e.i, r, ""]]),
10062
- n(1)(r, {
10063
- injectType: "singletonStyleTag",
10064
- insert: "head",
10065
- singleton: !0,
10066
- }),
10067
- r.locals && (e.exports = r.locals);
10068
- },
10069
- function (e, t) {
10070
- e.exports =
10071
- ":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)}";
10072
- },
10073
- function (e, t, n) {
10074
- var r = n(74);
10075
- "string" == typeof r && (r = [[e.i, r, ""]]),
10076
- n(1)(r, {
10077
- injectType: "singletonStyleTag",
10078
- insert: "head",
10079
- singleton: !0,
10080
- }),
10081
- r.locals && (e.exports = r.locals);
10082
- },
10083
- function (e, t) {
10084
- e.exports =
10085
- ".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}";
10086
- },
10087
- function (e, t, n) {
10088
- var r = n(76);
10089
- "string" == typeof r && (r = [[e.i, r, ""]]),
10090
- n(1)(r, {
10091
- injectType: "singletonStyleTag",
10092
- insert: "head",
10093
- singleton: !0,
10094
- }),
10095
- r.locals && (e.exports = r.locals);
10096
- },
10097
- function (e, t) {
10098
- e.exports =
10099
- ".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}";
10100
- },
10101
- function (e, t, n) {
10102
- var r = n(78);
10103
- "string" == typeof r && (r = [[e.i, r, ""]]),
10104
- n(1)(r, {
10105
- injectType: "singletonStyleTag",
10106
- insert: "head",
10107
- singleton: !0,
10108
- }),
10109
- r.locals && (e.exports = r.locals);
10110
- },
10111
- function (e, t) {
10112
- e.exports =
10113
- ".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)}}";
10114
- },
10115
- function (e, t, n) {
10116
- var r = n(80);
10117
- "string" == typeof r && (r = [[e.i, r, ""]]),
10118
- n(1)(r, {
10119
- injectType: "singletonStyleTag",
10120
- insert: "head",
10121
- singleton: !0,
10122
- }),
10123
- r.locals && (e.exports = r.locals);
10124
- },
10125
- function (e, t) {
10126
- e.exports =
10127
- '.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}';
10128
- },
10129
- function (e, t, n) {
10130
- var r = n(82);
10131
- "string" == typeof r && (r = [[e.i, r, ""]]),
10132
- n(1)(r, {
10133
- injectType: "singletonStyleTag",
10134
- insert: "head",
10135
- singleton: !0,
10136
- }),
10137
- r.locals && (e.exports = r.locals);
10138
- },
10139
- function (e, t) {
10140
- e.exports =
10141
- ".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)}}";
10142
- },
10143
- function (e, t, n) {
10144
- var r = n(84);
10145
- "string" == typeof r && (r = [[e.i, r, ""]]),
10146
- n(1)(r, {
10147
- injectType: "singletonStyleTag",
10148
- insert: "head",
10149
- singleton: !0,
10150
- }),
10151
- r.locals && (e.exports = r.locals);
10152
- },
10153
- function (e, t) {
10154
- e.exports =
10155
- ".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}";
10156
- },
10157
- function (e, t, n) {
10158
- var r = n(86);
10159
- "string" == typeof r && (r = [[e.i, r, ""]]),
10160
- n(1)(r, {
10161
- injectType: "singletonStyleTag",
10162
- insert: "head",
10163
- singleton: !0,
10164
- }),
10165
- r.locals && (e.exports = r.locals);
10166
- },
10167
- function (e, t) {
10168
- e.exports =
10169
- ":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}";
10170
- },
10171
- function (e, t, n) {
10172
- var r = n(88);
10173
- "string" == typeof r && (r = [[e.i, r, ""]]),
10174
- n(1)(r, {
10175
- injectType: "singletonStyleTag",
10176
- insert: "head",
10177
- singleton: !0,
10178
- }),
10179
- r.locals && (e.exports = r.locals);
10180
- },
10181
- function (e, t) {
10182
- e.exports =
10183
- ":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)}";
10184
- },
10185
- function (e, t, n) {
10186
- var r = n(90);
10187
- "string" == typeof r && (r = [[e.i, r, ""]]),
10188
- n(1)(r, {
10189
- injectType: "singletonStyleTag",
10190
- insert: "head",
10191
- singleton: !0,
10192
- }),
10193
- r.locals && (e.exports = r.locals);
10194
- },
10195
- function (e, t) {
10196
- e.exports =
10197
- ".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}";
10198
- },
10199
- function (e, t, n) {
10200
- "use strict";
10201
- n.r(t);
10202
- var r = n(3),
10203
- o = r.a.Symbol,
10204
- a = Object.prototype,
10205
- i = a.hasOwnProperty,
10206
- s = a.toString,
10207
- l = o ? o.toStringTag : void 0,
10208
- c = Object.prototype.toString,
10209
- u = o ? o.toStringTag : void 0,
10210
- d = function (e) {
10211
- return null == e
10212
- ? void 0 === e
10213
- ? "[object Undefined]"
10214
- : "[object Null]"
10215
- : u && u in Object(e)
10216
- ? (function (e) {
10217
- var t = i.call(e, l),
10218
- n = e[l];
10219
- try {
10220
- e[l] = void 0;
10221
- var r = !0;
10222
- } catch (e) {}
10223
- var o = s.call(e);
10224
- return r && (t ? (e[l] = n) : delete e[l]), o;
10225
- })(e)
10226
- : (function (e) {
10227
- return c.call(e);
10228
- })(e);
10229
- },
10230
- h = function (e, t) {
10231
- return function (n) {
10232
- return e(t(n));
10233
- };
10234
- },
10235
- p = h(Object.getPrototypeOf, Object),
10236
- f = function (e) {
10237
- return null != e && "object" == typeof e;
10238
- },
10239
- m = Function.prototype,
10240
- g = Object.prototype,
10241
- _ = m.toString,
10242
- v = g.hasOwnProperty,
10243
- b = _.call(Object),
10244
- y = function (e) {
10245
- if (!f(e) || "[object Object]" != d(e)) return !1;
10246
- var t = p(e);
10247
- if (null === t) return !0;
10248
- var n = v.call(t, "constructor") && t.constructor;
10249
- return "function" == typeof n && n instanceof n && _.call(n) == b;
10250
- },
10251
- w = function (e, t) {
10252
- return e === t || (e != e && t != t);
10253
- },
10254
- k = function (e, t) {
10255
- for (var n = e.length; n--; ) if (w(e[n][0], t)) return n;
10256
- return -1;
10257
- },
10258
- x = Array.prototype.splice;
10259
- function M(e) {
10260
- var t = -1,
10261
- n = null == e ? 0 : e.length;
10262
- for (this.clear(); ++t < n; ) {
10263
- var r = e[t];
10264
- this.set(r[0], r[1]);
10265
- }
10266
- }
10267
- (M.prototype.clear = function () {
10268
- (this.__data__ = []), (this.size = 0);
10269
- }),
10270
- (M.prototype.delete = function (e) {
10271
- var t = this.__data__,
10272
- n = k(t, e);
10273
- return !(
10274
- n < 0 ||
10275
- (n == t.length - 1 ? t.pop() : x.call(t, n, 1), --this.size, 0)
10276
- );
10277
- }),
10278
- (M.prototype.get = function (e) {
10279
- var t = this.__data__,
10280
- n = k(t, e);
10281
- return n < 0 ? void 0 : t[n][1];
10282
- }),
10283
- (M.prototype.has = function (e) {
10284
- return k(this.__data__, e) > -1;
10285
- }),
10286
- (M.prototype.set = function (e, t) {
10287
- var n = this.__data__,
10288
- r = k(n, e);
10289
- return (
10290
- r < 0 ? (++this.size, n.push([e, t])) : (n[r][1] = t), this
10291
- );
10292
- });
10293
- var E = M,
10294
- T = function (e) {
10295
- var t = typeof e;
10296
- return null != e && ("object" == t || "function" == t);
10297
- },
10298
- S = function (e) {
10299
- if (!T(e)) return !1;
10300
- var t = d(e);
10301
- return (
10302
- "[object Function]" == t ||
10303
- "[object GeneratorFunction]" == t ||
10304
- "[object AsyncFunction]" == t ||
10305
- "[object Proxy]" == t
10306
- );
10307
- },
10308
- D = r.a["__core-js_shared__"],
10309
- L = (function () {
10310
- var e = /[^.]+$/.exec((D && D.keys && D.keys.IE_PROTO) || "");
10311
- return e ? "Symbol(src)_1." + e : "";
10312
- })(),
10313
- C = Function.prototype.toString,
10314
- P = function (e) {
10315
- if (null != e) {
10316
- try {
10317
- return C.call(e);
10318
- } catch (e) {}
10319
- try {
10320
- return e + "";
10321
- } catch (e) {}
10322
- }
10323
- return "";
10324
- },
10325
- O = /^\[object .+?Constructor\]$/,
10326
- N = Function.prototype,
10327
- A = Object.prototype,
10328
- I = N.toString,
10329
- R = A.hasOwnProperty,
10330
- Y = RegExp(
10331
- "^" +
10332
- I.call(R)
10333
- .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&")
10334
- .replace(
10335
- /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
10336
- "$1.*?"
10337
- ) +
10338
- "$"
10339
- ),
10340
- j = function (e) {
10341
- return (
10342
- !(
10343
- !T(e) ||
10344
- (function (e) {
10345
- return !!L && L in e;
10346
- })(e)
10347
- ) && (S(e) ? Y : O).test(P(e))
10348
- );
10349
- },
10350
- F = function (e, t) {
10351
- var n = (function (e, t) {
10352
- return null == e ? void 0 : e[t];
10353
- })(e, t);
10354
- return j(n) ? n : void 0;
10355
- },
10356
- H = F(r.a, "Map"),
10357
- z = F(Object, "create"),
10358
- B = Object.prototype.hasOwnProperty,
10359
- U = Object.prototype.hasOwnProperty;
10360
- function V(e) {
10361
- var t = -1,
10362
- n = null == e ? 0 : e.length;
10363
- for (this.clear(); ++t < n; ) {
10364
- var r = e[t];
10365
- this.set(r[0], r[1]);
10366
- }
10367
- }
10368
- (V.prototype.clear = function () {
10369
- (this.__data__ = z ? z(null) : {}), (this.size = 0);
10370
- }),
10371
- (V.prototype.delete = function (e) {
10372
- var t = this.has(e) && delete this.__data__[e];
10373
- return (this.size -= t ? 1 : 0), t;
10374
- }),
10375
- (V.prototype.get = function (e) {
10376
- var t = this.__data__;
10377
- if (z) {
10378
- var n = t[e];
10379
- return "__lodash_hash_undefined__" === n ? void 0 : n;
10380
- }
10381
- return B.call(t, e) ? t[e] : void 0;
10382
- }),
10383
- (V.prototype.has = function (e) {
10384
- var t = this.__data__;
10385
- return z ? void 0 !== t[e] : U.call(t, e);
10386
- }),
10387
- (V.prototype.set = function (e, t) {
10388
- var n = this.__data__;
10389
- return (
10390
- (this.size += this.has(e) ? 0 : 1),
10391
- (n[e] = z && void 0 === t ? "__lodash_hash_undefined__" : t),
10392
- this
10393
- );
10394
- });
10395
- var W = V,
10396
- q = function (e, t) {
10397
- var n = e.__data__;
10398
- return (function (e) {
10399
- var t = typeof e;
10400
- return "string" == t ||
10401
- "number" == t ||
10402
- "symbol" == t ||
10403
- "boolean" == t
10404
- ? "__proto__" !== e
10405
- : null === e;
10406
- })(t)
10407
- ? n["string" == typeof t ? "string" : "hash"]
10408
- : n.map;
10409
- };
10410
- function G(e) {
10411
- var t = -1,
10412
- n = null == e ? 0 : e.length;
10413
- for (this.clear(); ++t < n; ) {
10414
- var r = e[t];
10415
- this.set(r[0], r[1]);
10416
- }
10417
- }
10418
- (G.prototype.clear = function () {
10419
- (this.size = 0),
10420
- (this.__data__ = {
10421
- hash: new W(),
10422
- map: new (H || E)(),
10423
- string: new W(),
10424
- });
10425
- }),
10426
- (G.prototype.delete = function (e) {
10427
- var t = q(this, e).delete(e);
10428
- return (this.size -= t ? 1 : 0), t;
10429
- }),
10430
- (G.prototype.get = function (e) {
10431
- return q(this, e).get(e);
10432
- }),
10433
- (G.prototype.has = function (e) {
10434
- return q(this, e).has(e);
10435
- }),
10436
- (G.prototype.set = function (e, t) {
10437
- var n = q(this, e),
10438
- r = n.size;
10439
- return n.set(e, t), (this.size += n.size == r ? 0 : 1), this;
10440
- });
10441
- var J = G;
10442
- function K(e) {
10443
- var t = (this.__data__ = new E(e));
10444
- this.size = t.size;
10445
- }
10446
- (K.prototype.clear = function () {
10447
- (this.__data__ = new E()), (this.size = 0);
10448
- }),
10449
- (K.prototype.delete = function (e) {
10450
- var t = this.__data__,
10451
- n = t.delete(e);
10452
- return (this.size = t.size), n;
10453
- }),
10454
- (K.prototype.get = function (e) {
10455
- return this.__data__.get(e);
10456
- }),
10457
- (K.prototype.has = function (e) {
10458
- return this.__data__.has(e);
10459
- }),
10460
- (K.prototype.set = function (e, t) {
10461
- var n = this.__data__;
10462
- if (n instanceof E) {
10463
- var r = n.__data__;
10464
- if (!H || r.length < 199)
10465
- return r.push([e, t]), (this.size = ++n.size), this;
10466
- n = this.__data__ = new J(r);
10467
- }
10468
- return n.set(e, t), (this.size = n.size), this;
10469
- });
10470
- var Q = K,
10471
- X = (function () {
10472
- try {
10473
- var e = F(Object, "defineProperty");
10474
- return e({}, "", {}), e;
10475
- } catch (e) {}
10476
- })(),
10477
- $ = function (e, t, n) {
10478
- "__proto__" == t && X
10479
- ? X(e, t, {
10480
- configurable: !0,
10481
- enumerable: !0,
10482
- value: n,
10483
- writable: !0,
10484
- })
10485
- : (e[t] = n);
10486
- },
10487
- Z = Object.prototype.hasOwnProperty,
10488
- ee = function (e, t, n) {
10489
- var r = e[t];
10490
- (Z.call(e, t) && w(r, n) && (void 0 !== n || t in e)) ||
10491
- $(e, t, n);
10492
- },
10493
- te = function (e, t, n, r) {
10494
- var o = !n;
10495
- n || (n = {});
10496
- for (var a = -1, i = t.length; ++a < i; ) {
10497
- var s = t[a],
10498
- l = r ? r(n[s], e[s], s, n, e) : void 0;
10499
- void 0 === l && (l = e[s]), o ? $(n, s, l) : ee(n, s, l);
10500
- }
10501
- return n;
10502
- },
10503
- ne = function (e) {
10504
- return f(e) && "[object Arguments]" == d(e);
10505
- },
10506
- re = Object.prototype,
10507
- oe = re.hasOwnProperty,
10508
- ae = re.propertyIsEnumerable,
10509
- ie = ne(
10510
- (function () {
10511
- return arguments;
10512
- })()
10513
- )
10514
- ? ne
10515
- : function (e) {
10516
- return f(e) && oe.call(e, "callee") && !ae.call(e, "callee");
10517
- },
10518
- se = Array.isArray,
10519
- le = n(5),
10520
- ce = /^(?:0|[1-9]\d*)$/,
10521
- ue = function (e, t) {
10522
- var n = typeof e;
10523
- return (
10524
- !!(t = null == t ? 9007199254740991 : t) &&
10525
- ("number" == n || ("symbol" != n && ce.test(e))) &&
10526
- e > -1 &&
10527
- e % 1 == 0 &&
10528
- e < t
10529
- );
10530
- },
10531
- de = function (e) {
10532
- return (
10533
- "number" == typeof e &&
10534
- e > -1 &&
10535
- e % 1 == 0 &&
10536
- e <= 9007199254740991
10537
- );
10538
- },
10539
- he = {};
10540
- (he["[object Float32Array]"] = he["[object Float64Array]"] = he[
10541
- "[object Int8Array]"
10542
- ] = he["[object Int16Array]"] = he["[object Int32Array]"] = he[
10543
- "[object Uint8Array]"
10544
- ] = he["[object Uint8ClampedArray]"] = he[
10545
- "[object Uint16Array]"
10546
- ] = he["[object Uint32Array]"] = !0),
10547
- (he["[object Arguments]"] = he["[object Array]"] = he[
10548
- "[object ArrayBuffer]"
10549
- ] = he["[object Boolean]"] = he["[object DataView]"] = he[
10550
- "[object Date]"
10551
- ] = he["[object Error]"] = he["[object Function]"] = he[
10552
- "[object Map]"
10553
- ] = he["[object Number]"] = he["[object Object]"] = he[
10554
- "[object RegExp]"
10555
- ] = he["[object Set]"] = he["[object String]"] = he[
10556
- "[object WeakMap]"
10557
- ] = !1);
10558
- var pe = function (e) {
10559
- return function (t) {
10560
- return e(t);
10561
- };
10562
- },
10563
- fe = n(4),
10564
- me = fe.a && fe.a.isTypedArray,
10565
- ge = me
10566
- ? pe(me)
10567
- : function (e) {
10568
- return f(e) && de(e.length) && !!he[d(e)];
10569
- },
10570
- _e = Object.prototype.hasOwnProperty,
10571
- ve = function (e, t) {
10572
- var n = se(e),
10573
- r = !n && ie(e),
10574
- o = !n && !r && Object(le.a)(e),
10575
- a = !n && !r && !o && ge(e),
10576
- i = n || r || o || a,
10577
- s = i
10578
- ? (function (e, t) {
10579
- for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n);
10580
- return r;
10581
- })(e.length, String)
10582
- : [],
10583
- l = s.length;
10584
- for (var c in e)
10585
- (!t && !_e.call(e, c)) ||
10586
- (i &&
10587
- ("length" == c ||
10588
- (o && ("offset" == c || "parent" == c)) ||
10589
- (a &&
10590
- ("buffer" == c ||
10591
- "byteLength" == c ||
10592
- "byteOffset" == c)) ||
10593
- ue(c, l))) ||
10594
- s.push(c);
10595
- return s;
10596
- },
10597
- be = Object.prototype,
10598
- ye = function (e) {
10599
- var t = e && e.constructor;
10600
- return e === (("function" == typeof t && t.prototype) || be);
10601
- },
10602
- we = h(Object.keys, Object),
10603
- ke = Object.prototype.hasOwnProperty,
10604
- xe = function (e) {
10605
- return null != e && de(e.length) && !S(e);
10606
- },
10607
- Me = function (e) {
10608
- return xe(e)
10609
- ? ve(e)
10610
- : (function (e) {
10611
- if (!ye(e)) return we(e);
10612
- var t = [];
10613
- for (var n in Object(e))
10614
- ke.call(e, n) && "constructor" != n && t.push(n);
10615
- return t;
10616
- })(e);
10617
- },
10618
- Ee = Object.prototype.hasOwnProperty,
10619
- Te = function (e) {
10620
- if (!T(e))
10621
- return (function (e) {
10622
- var t = [];
10623
- if (null != e) for (var n in Object(e)) t.push(n);
10624
- return t;
10625
- })(e);
10626
- var t = ye(e),
10627
- n = [];
10628
- for (var r in e)
10629
- ("constructor" != r || (!t && Ee.call(e, r))) && n.push(r);
10630
- return n;
10631
- },
10632
- Se = function (e) {
10633
- return xe(e) ? ve(e, !0) : Te(e);
10634
- },
10635
- De = n(12),
10636
- Le = function () {
10637
- return [];
10638
- },
10639
- Ce = Object.prototype.propertyIsEnumerable,
10640
- Pe = Object.getOwnPropertySymbols,
10641
- Oe = Pe
10642
- ? function (e) {
10643
- return null == e
10644
- ? []
10645
- : ((e = Object(e)),
10646
- (function (e, t) {
10647
- for (
10648
- var n = -1,
10649
- r = null == e ? 0 : e.length,
10650
- o = 0,
10651
- a = [];
10652
- ++n < r;
10653
-
10654
- ) {
10655
- var i = e[n];
10656
- t(i, n, e) && (a[o++] = i);
10657
- }
10658
- return a;
10659
- })(Pe(e), function (t) {
10660
- return Ce.call(e, t);
10661
- }));
10662
- }
10663
- : Le,
10664
- Ne = function (e, t) {
10665
- for (var n = -1, r = t.length, o = e.length; ++n < r; )
10666
- e[o + n] = t[n];
10667
- return e;
10668
- },
10669
- Ae = Object.getOwnPropertySymbols
10670
- ? function (e) {
10671
- for (var t = []; e; ) Ne(t, Oe(e)), (e = p(e));
10672
- return t;
10673
- }
10674
- : Le,
10675
- Ie = function (e, t, n) {
10676
- var r = t(e);
10677
- return se(e) ? r : Ne(r, n(e));
10678
- },
10679
- Re = function (e) {
10680
- return Ie(e, Me, Oe);
10681
- },
10682
- Ye = function (e) {
10683
- return Ie(e, Se, Ae);
10684
- },
10685
- je = F(r.a, "DataView"),
10686
- Fe = F(r.a, "Promise"),
10687
- He = F(r.a, "Set"),
10688
- ze = F(r.a, "WeakMap"),
10689
- Be = P(je),
10690
- Ue = P(H),
10691
- Ve = P(Fe),
10692
- We = P(He),
10693
- qe = P(ze),
10694
- Ge = d;
10695
- ((je && "[object DataView]" != Ge(new je(new ArrayBuffer(1)))) ||
10696
- (H && "[object Map]" != Ge(new H())) ||
10697
- (Fe && "[object Promise]" != Ge(Fe.resolve())) ||
10698
- (He && "[object Set]" != Ge(new He())) ||
10699
- (ze && "[object WeakMap]" != Ge(new ze()))) &&
10700
- (Ge = function (e) {
10701
- var t = d(e),
10702
- n = "[object Object]" == t ? e.constructor : void 0,
10703
- r = n ? P(n) : "";
10704
- if (r)
10705
- switch (r) {
10706
- case Be:
10707
- return "[object DataView]";
10708
- case Ue:
10709
- return "[object Map]";
10710
- case Ve:
10711
- return "[object Promise]";
10712
- case We:
10713
- return "[object Set]";
10714
- case qe:
10715
- return "[object WeakMap]";
10716
- }
10717
- return t;
10718
- });
10719
- var Je = Ge,
10720
- Ke = Object.prototype.hasOwnProperty,
10721
- Qe = r.a.Uint8Array,
10722
- Xe = function (e) {
10723
- var t = new e.constructor(e.byteLength);
10724
- return new Qe(t).set(new Qe(e)), t;
10725
- },
10726
- $e = /\w*$/,
10727
- Ze = o ? o.prototype : void 0,
10728
- et = Ze ? Ze.valueOf : void 0,
10729
- tt = function (e, t, n) {
10730
- var r = e.constructor;
10731
- switch (t) {
10732
- case "[object ArrayBuffer]":
10733
- return Xe(e);
10734
- case "[object Boolean]":
10735
- case "[object Date]":
10736
- return new r(+e);
10737
- case "[object DataView]":
10738
- return (function (e, t) {
10739
- var n = t ? Xe(e.buffer) : e.buffer;
10740
- return new e.constructor(n, e.byteOffset, e.byteLength);
10741
- })(e, n);
10742
- case "[object Float32Array]":
10743
- case "[object Float64Array]":
10744
- case "[object Int8Array]":
10745
- case "[object Int16Array]":
10746
- case "[object Int32Array]":
10747
- case "[object Uint8Array]":
10748
- case "[object Uint8ClampedArray]":
10749
- case "[object Uint16Array]":
10750
- case "[object Uint32Array]":
10751
- return (function (e, t) {
10752
- var n = t ? Xe(e.buffer) : e.buffer;
10753
- return new e.constructor(n, e.byteOffset, e.length);
10754
- })(e, n);
10755
- case "[object Map]":
10756
- return new r();
10757
- case "[object Number]":
10758
- case "[object String]":
10759
- return new r(e);
10760
- case "[object RegExp]":
10761
- return (function (e) {
10762
- var t = new e.constructor(e.source, $e.exec(e));
10763
- return (t.lastIndex = e.lastIndex), t;
10764
- })(e);
10765
- case "[object Set]":
10766
- return new r();
10767
- case "[object Symbol]":
10768
- return (function (e) {
10769
- return et ? Object(et.call(e)) : {};
10770
- })(e);
10771
- }
10772
- },
10773
- nt = Object.create,
10774
- rt = (function () {
10775
- function e() {}
10776
- return function (t) {
10777
- if (!T(t)) return {};
10778
- if (nt) return nt(t);
10779
- e.prototype = t;
10780
- var n = new e();
10781
- return (e.prototype = void 0), n;
10782
- };
10783
- })(),
10784
- ot = fe.a && fe.a.isMap,
10785
- at = ot
10786
- ? pe(ot)
10787
- : function (e) {
10788
- return f(e) && "[object Map]" == Je(e);
10789
- },
10790
- it = fe.a && fe.a.isSet,
10791
- st = it
10792
- ? pe(it)
10793
- : function (e) {
10794
- return f(e) && "[object Set]" == Je(e);
10795
- },
10796
- lt = "[object Arguments]",
10797
- ct = "[object Function]",
10798
- ut = "[object Object]",
10799
- dt = {};
10800
- (dt[lt] = dt["[object Array]"] = dt["[object ArrayBuffer]"] = dt[
10801
- "[object DataView]"
10802
- ] = dt["[object Boolean]"] = dt["[object Date]"] = dt[
10803
- "[object Float32Array]"
10804
- ] = dt["[object Float64Array]"] = dt["[object Int8Array]"] = dt[
10805
- "[object Int16Array]"
10806
- ] = dt["[object Int32Array]"] = dt["[object Map]"] = dt[
10807
- "[object Number]"
10808
- ] = dt[ut] = dt["[object RegExp]"] = dt["[object Set]"] = dt[
10809
- "[object String]"
10810
- ] = dt["[object Symbol]"] = dt["[object Uint8Array]"] = dt[
10811
- "[object Uint8ClampedArray]"
10812
- ] = dt["[object Uint16Array]"] = dt["[object Uint32Array]"] = !0),
10813
- (dt["[object Error]"] = dt[ct] = dt["[object WeakMap]"] = !1);
10814
- var ht = function e(t, n, r, o, a, i) {
10815
- var s,
10816
- l = 1 & n,
10817
- c = 2 & n,
10818
- u = 4 & n;
10819
- if ((r && (s = a ? r(t, o, a, i) : r(t)), void 0 !== s)) return s;
10820
- if (!T(t)) return t;
10821
- var d = se(t);
10822
- if (d) {
10823
- if (
10824
- ((s = (function (e) {
10825
- var t = e.length,
10826
- n = new e.constructor(t);
10827
- return (
10828
- t &&
10829
- "string" == typeof e[0] &&
10830
- Ke.call(e, "index") &&
10831
- ((n.index = e.index), (n.input = e.input)),
10832
- n
10833
- );
10834
- })(t)),
10835
- !l)
10836
- )
10837
- return (function (e, t) {
10838
- var n = -1,
10839
- r = e.length;
10840
- for (t || (t = Array(r)); ++n < r; ) t[n] = e[n];
10841
- return t;
10842
- })(t, s);
10843
- } else {
10844
- var h = Je(t),
10845
- f = h == ct || "[object GeneratorFunction]" == h;
10846
- if (Object(le.a)(t)) return Object(De.a)(t, l);
10847
- if (h == ut || h == lt || (f && !a)) {
10848
- if (
10849
- ((s =
10850
- c || f
10851
- ? {}
10852
- : (function (e) {
10853
- return "function" != typeof e.constructor || ye(e)
10854
- ? {}
10855
- : rt(p(e));
10856
- })(t)),
10857
- !l)
10858
- )
10859
- return c
10860
- ? (function (e, t) {
10861
- return te(e, Ae(e), t);
10862
- })(
10863
- t,
10864
- (function (e, t) {
10865
- return e && te(t, Se(t), e);
10866
- })(s, t)
10867
- )
10868
- : (function (e, t) {
10869
- return te(e, Oe(e), t);
10870
- })(
10871
- t,
10872
- (function (e, t) {
10873
- return e && te(t, Me(t), e);
10874
- })(s, t)
10875
- );
10876
- } else {
10877
- if (!dt[h]) return a ? t : {};
10878
- s = tt(t, h, l);
10879
- }
10880
- }
10881
- i || (i = new Q());
10882
- var m = i.get(t);
10883
- if (m) return m;
10884
- i.set(t, s),
10885
- st(t)
10886
- ? t.forEach(function (o) {
10887
- s.add(e(o, n, r, o, t, i));
10888
- })
10889
- : at(t) &&
10890
- t.forEach(function (o, a) {
10891
- s.set(a, e(o, n, r, a, t, i));
10892
- });
10893
- var g = u ? (c ? Ye : Re) : c ? keysIn : Me,
10894
- _ = d ? void 0 : g(t);
10895
- return (
10896
- (function (e, t) {
10897
- for (
10898
- var n = -1, r = null == e ? 0 : e.length;
10899
- ++n < r && !1 !== t(e[n], n, e);
10900
-
10901
- );
10902
- })(_ || t, function (o, a) {
10903
- _ && (o = t[(a = o)]), ee(s, a, e(o, n, r, a, t, i));
10904
- }),
10905
- s
10906
- );
10907
- },
10908
- pt = function (e, t) {
10909
- return ht(e, 5, (t = "function" == typeof t ? t : void 0));
10910
- },
10911
- ft = function (e) {
10912
- return f(e) && 1 === e.nodeType && !y(e);
10913
- };
10914
- class mt {
10915
- constructor(e, t) {
10916
- (this._config = {}),
10917
- t && this.define(t),
10918
- e && this._setObjectToTarget(this._config, e);
10919
- }
10920
- set(e, t) {
10921
- this._setToTarget(this._config, e, t);
10922
- }
10923
- define(e, t) {
10924
- this._setToTarget(this._config, e, t, !0);
10925
- }
10926
- get(e) {
10927
- return this._getFromSource(this._config, e);
10928
- }
10929
- _setToTarget(e, t, n, r = !1) {
10930
- if (y(t)) return void this._setObjectToTarget(e, t, r);
10931
- const o = t.split(".");
10932
- t = o.pop();
10933
- for (const t of o) y(e[t]) || (e[t] = {}), (e = e[t]);
10934
- if (y(n))
10935
- return (
10936
- y(e[t]) || (e[t] = {}),
10937
- (e = e[t]),
10938
- void this._setObjectToTarget(e, n, r)
10939
- );
10940
- (r && void 0 !== e[t]) || (e[t] = n);
10941
- }
10942
- _getFromSource(e, t) {
10943
- const n = t.split(".");
10944
- t = n.pop();
10945
- for (const t of n) {
10946
- if (!y(e[t])) {
10947
- e = null;
10948
- break;
10949
- }
10950
- e = e[t];
10951
- }
10952
- return e
10953
- ? (function (e) {
10954
- return pt(e, gt);
10955
- })(e[t])
10956
- : void 0;
10957
- }
10958
- _setObjectToTarget(e, t, n) {
10959
- Object.keys(t).forEach((r) => {
10960
- this._setToTarget(e, r, t[r], n);
10961
- });
10962
- }
10963
- }
10964
- function gt(e) {
10965
- return ft(e) ? e : void 0;
10966
- }
10967
- var _t = n(0);
10968
- class vt {
10969
- constructor(e, t) {
10970
- (this.source = e),
10971
- (this.name = t),
10972
- (this.path = []),
10973
- (this.stop = function e() {
10974
- e.called = !0;
10975
- }),
10976
- (this.off = function e() {
10977
- e.called = !0;
10978
- });
10979
- }
10980
- }
10981
- function bt() {
10982
- let e = "e";
10983
- for (let t = 0; t < 8; t++)
10984
- e += Math.floor(65536 * (1 + Math.random()))
10985
- .toString(16)
10986
- .substring(1);
10987
- return e;
10988
- }
10989
- var yt = {
10990
- get(e) {
10991
- return "number" != typeof e ? this[e] || this.normal : e;
10992
- },
10993
- highest: 1e5,
10994
- high: 1e3,
10995
- normal: 0,
10996
- low: -1e3,
10997
- lowest: -1e5,
10998
- };
10999
- n(6);
11000
- const wt = Symbol("listeningTo"),
11001
- kt = Symbol("emitterId");
11002
- var xt = {
11003
- on(e, t, n = {}) {
11004
- this.listenTo(this, e, t, n);
11005
- },
11006
- once(e, t, n) {
11007
- let r = !1;
11008
- this.listenTo(
11009
- this,
11010
- e,
11011
- function (e, ...n) {
11012
- r || ((r = !0), e.off(), t.call(this, e, ...n));
11013
- },
11014
- n
11015
- );
11016
- },
11017
- off(e, t) {
11018
- this.stopListening(this, e, t);
11019
- },
11020
- listenTo(e, t, n, r = {}) {
11021
- let o, a;
11022
- this[wt] || (this[wt] = {});
11023
- const i = this[wt];
11024
- Et(e) || Mt(e);
11025
- const s = Et(e);
11026
- (o = i[s]) || (o = i[s] = { emitter: e, callbacks: {} }),
11027
- (a = o.callbacks[t]) || (a = o.callbacks[t] = []),
11028
- a.push(n),
11029
- (function (e, t) {
11030
- const n = Tt(e);
11031
- if (n[t]) return;
11032
- let r = t,
11033
- o = null;
11034
- const a = [];
11035
- for (; "" !== r && !n[r]; )
11036
- (n[r] = { callbacks: [], childEvents: [] }),
11037
- a.push(n[r]),
11038
- o && n[r].childEvents.push(o),
11039
- (o = r),
11040
- (r = r.substr(0, r.lastIndexOf(":")));
11041
- if ("" !== r) {
11042
- for (const e of a) e.callbacks = n[r].callbacks.slice();
11043
- n[r].childEvents.push(o);
11044
- }
11045
- })(e, t);
11046
- const l = St(e, t),
11047
- c = yt.get(r.priority),
11048
- u = { callback: n, priority: c };
11049
- for (const e of l) {
11050
- let t = !1;
11051
- for (let n = 0; n < e.length; n++)
11052
- if (e[n].priority < c) {
11053
- e.splice(n, 0, u), (t = !0);
11054
- break;
11055
- }
11056
- t || e.push(u);
11057
- }
11058
- },
11059
- stopListening(e, t, n) {
11060
- const r = this[wt];
11061
- let o = e && Et(e);
11062
- const a = r && o && r[o],
11063
- i = a && t && a.callbacks[t];
11064
- if (!(!r || (e && !a) || (t && !i)))
11065
- if (n) Lt(e, t, n);
11066
- else if (i) {
11067
- for (; (n = i.pop()); ) Lt(e, t, n);
11068
- delete a.callbacks[t];
11069
- } else if (a) {
11070
- for (t in a.callbacks) this.stopListening(e, t);
11071
- delete r[o];
11072
- } else {
11073
- for (o in r) this.stopListening(r[o].emitter);
11074
- delete this[wt];
11075
- }
11076
- },
11077
- fire(e, ...t) {
11078
- const n = e instanceof vt ? e : new vt(this, e),
11079
- r = n.name;
11080
- let o = (function e(t, n) {
11081
- let r;
11082
- return t._events && (r = t._events[n]) && r.callbacks.length
11083
- ? r.callbacks
11084
- : n.indexOf(":") > -1
11085
- ? e(t, n.substr(0, n.lastIndexOf(":")))
11086
- : null;
11087
- })(this, r);
11088
- if ((n.path.push(this), o)) {
11089
- const e = [n, ...t];
11090
- o = Array.from(o);
11091
- for (
11092
- let t = 0;
11093
- t < o.length &&
11094
- (o[t].callback.apply(this, e),
11095
- n.off.called &&
11096
- (delete n.off.called, Lt(this, r, o[t].callback)),
11097
- !n.stop.called);
11098
- t++
11099
- );
11100
- }
11101
- if (this._delegations) {
11102
- const e = this._delegations.get(r),
11103
- o = this._delegations.get("*");
11104
- e && Dt(e, n, t), o && Dt(o, n, t);
11105
- }
11106
- return n.return;
11107
- },
11108
- delegate(...e) {
11109
- return {
11110
- to: (t, n) => {
11111
- this._delegations || (this._delegations = new Map()),
11112
- e.forEach((e) => {
11113
- const r = this._delegations.get(e);
11114
- r
11115
- ? r.set(t, n)
11116
- : this._delegations.set(e, new Map([[t, n]]));
11117
- });
11118
- },
11119
- };
11120
- },
11121
- stopDelegating(e, t) {
11122
- if (this._delegations)
11123
- if (e)
11124
- if (t) {
11125
- const n = this._delegations.get(e);
11126
- n && n.delete(t);
11127
- } else this._delegations.delete(e);
11128
- else this._delegations.clear();
11129
- },
11130
- };
11131
- function Mt(e, t) {
11132
- e[kt] || (e[kt] = t || bt());
11133
- }
11134
- function Et(e) {
11135
- return e[kt];
11136
- }
11137
- function Tt(e) {
11138
- return (
11139
- e._events || Object.defineProperty(e, "_events", { value: {} }),
11140
- e._events
11141
- );
11142
- }
11143
- function St(e, t) {
11144
- const n = Tt(e)[t];
11145
- if (!n) return [];
11146
- let r = [n.callbacks];
11147
- for (let t = 0; t < n.childEvents.length; t++) {
11148
- const o = St(e, n.childEvents[t]);
11149
- r = r.concat(o);
11150
- }
11151
- return r;
11152
- }
11153
- function Dt(e, t, n) {
11154
- for (let [r, o] of e) {
11155
- o ? "function" == typeof o && (o = o(t.name)) : (o = t.name);
11156
- const e = new vt(t.source, o);
11157
- (e.path = [...t.path]), r.fire(e, ...n);
11158
- }
11159
- }
11160
- function Lt(e, t, n) {
11161
- const r = St(e, t);
11162
- for (const e of r)
11163
- for (let t = 0; t < e.length; t++)
11164
- e[t].callback == n && (e.splice(t, 1), t--);
11165
- }
11166
- function Ct(e, ...t) {
11167
- t.forEach((t) => {
11168
- Object.getOwnPropertyNames(t)
11169
- .concat(Object.getOwnPropertySymbols(t))
11170
- .forEach((n) => {
11171
- if (n in e.prototype) return;
11172
- const r = Object.getOwnPropertyDescriptor(t, n);
11173
- (r.enumerable = !1), Object.defineProperty(e.prototype, n, r);
11174
- });
11175
- });
11176
- }
11177
- function Pt(e, t) {
11178
- const n = Math.min(e.length, t.length);
11179
- for (let r = 0; r < n; r++) if (e[r] != t[r]) return r;
11180
- return e.length == t.length
11181
- ? "same"
11182
- : e.length < t.length
11183
- ? "prefix"
11184
- : "extension";
11185
- }
11186
- var Ot = function (e) {
11187
- return ht(e, 4);
11188
- };
11189
- class Nt {
11190
- constructor() {
11191
- this.parent = null;
11192
- }
11193
- get index() {
11194
- let e;
11195
- if (!this.parent) return null;
11196
- if (-1 == (e = this.parent.getChildIndex(this)))
11197
- throw new _t.b(
11198
- "view-node-not-found-in-parent: The node's parent does not contain this node.",
11199
- this
11200
- );
11201
- return e;
11202
- }
11203
- get nextSibling() {
11204
- const e = this.index;
11205
- return (null !== e && this.parent.getChild(e + 1)) || null;
11206
- }
11207
- get previousSibling() {
11208
- const e = this.index;
11209
- return (null !== e && this.parent.getChild(e - 1)) || null;
11210
- }
11211
- get root() {
11212
- let e = this;
11213
- for (; e.parent; ) e = e.parent;
11214
- return e;
11215
- }
11216
- get document() {
11217
- return this.parent instanceof Nt ? this.parent.document : null;
11218
- }
11219
- getPath() {
11220
- const e = [];
11221
- let t = this;
11222
- for (; t.parent; ) e.unshift(t.index), (t = t.parent);
11223
- return e;
11224
- }
11225
- getAncestors(e = { includeSelf: !1, parentFirst: !1 }) {
11226
- const t = [];
11227
- let n = e.includeSelf ? this : this.parent;
11228
- for (; n; )
11229
- t[e.parentFirst ? "push" : "unshift"](n), (n = n.parent);
11230
- return t;
11231
- }
11232
- getCommonAncestor(e, t = {}) {
11233
- const n = this.getAncestors(t),
11234
- r = e.getAncestors(t);
11235
- let o = 0;
11236
- for (; n[o] == r[o] && n[o]; ) o++;
11237
- return 0 === o ? null : n[o - 1];
11238
- }
11239
- isBefore(e) {
11240
- if (this == e) return !1;
11241
- if (this.root !== e.root) return !1;
11242
- const t = this.getPath(),
11243
- n = e.getPath(),
11244
- r = Pt(t, n);
11245
- switch (r) {
11246
- case "prefix":
11247
- return !0;
11248
- case "extension":
11249
- return !1;
11250
- default:
11251
- return t[r] < n[r];
11252
- }
11253
- }
11254
- isAfter(e) {
11255
- return this != e && this.root === e.root && !this.isBefore(e);
11256
- }
11257
- _remove() {
11258
- this.parent._removeChildren(this.index);
11259
- }
11260
- _fireChange(e, t) {
11261
- this.fire("change:" + e, t),
11262
- this.parent && this.parent._fireChange(e, t);
11263
- }
11264
- toJSON() {
11265
- const e = Ot(this);
11266
- return delete e.parent, e;
11267
- }
11268
- is(e) {
11269
- return "node" == e || "view:node" == e;
11270
- }
11271
- }
11272
- Ct(Nt, xt);
11273
- class At extends Nt {
11274
- constructor(e) {
11275
- super(), (this._textData = e);
11276
- }
11277
- is(e) {
11278
- return "text" == e || "view:text" == e || super.is(e);
11279
- }
11280
- get data() {
11281
- return this._textData;
11282
- }
11283
- get _data() {
11284
- return this.data;
11285
- }
11286
- set _data(e) {
11287
- this._fireChange("text", this), (this._textData = e);
11288
- }
11289
- isSimilar(e) {
11290
- return e instanceof At && (this === e || this.data === e.data);
11291
- }
11292
- _clone() {
11293
- return new At(this.data);
11294
- }
11295
- }
11296
- class It {
11297
- constructor(e, t, n) {
11298
- if (((this.textNode = e), t < 0 || t > e.data.length))
11299
- throw new _t.b(
11300
- "view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",
11301
- this
11302
- );
11303
- if (n < 0 || t + n > e.data.length)
11304
- throw new _t.b(
11305
- "view-textproxy-wrong-length: Given length value is incorrect.",
11306
- this
11307
- );
11308
- (this.data = e.data.substring(t, t + n)), (this.offsetInText = t);
11309
- }
11310
- get offsetSize() {
11311
- return this.data.length;
11312
- }
11313
- get isPartial() {
11314
- return this.data.length !== this.textNode.data.length;
11315
- }
11316
- get parent() {
11317
- return this.textNode.parent;
11318
- }
11319
- get root() {
11320
- return this.textNode.root;
11321
- }
11322
- get document() {
11323
- return this.textNode.document;
11324
- }
11325
- is(e) {
11326
- return "textProxy" == e || "view:textProxy" == e;
11327
- }
11328
- getAncestors(e = { includeSelf: !1, parentFirst: !1 }) {
11329
- const t = [];
11330
- let n = e.includeSelf ? this.textNode : this.parent;
11331
- for (; null !== n; )
11332
- t[e.parentFirst ? "push" : "unshift"](n), (n = n.parent);
11333
- return t;
11334
- }
11335
- }
11336
- function Rt(e) {
11337
- const t = new Map();
11338
- for (const n in e) t.set(n, e[n]);
11339
- return t;
11340
- }
11341
- function Yt(e) {
11342
- return !(!e || !e[Symbol.iterator]);
11343
- }
11344
- class jt {
11345
- constructor(...e) {
11346
- (this._patterns = []), this.add(...e);
11347
- }
11348
- add(...e) {
11349
- for (let t of e)
11350
- ("string" == typeof t || t instanceof RegExp) &&
11351
- (t = { name: t }),
11352
- t.classes &&
11353
- ("string" == typeof t.classes ||
11354
- t.classes instanceof RegExp) &&
11355
- (t.classes = [t.classes]),
11356
- this._patterns.push(t);
11357
- }
11358
- match(...e) {
11359
- for (const t of e)
11360
- for (const e of this._patterns) {
11361
- const n = Ft(t, e);
11362
- if (n) return { element: t, pattern: e, match: n };
11363
- }
11364
- return null;
11365
- }
11366
- matchAll(...e) {
11367
- const t = [];
11368
- for (const n of e)
11369
- for (const e of this._patterns) {
11370
- const r = Ft(n, e);
11371
- r && t.push({ element: n, pattern: e, match: r });
11372
- }
11373
- return t.length > 0 ? t : null;
11374
- }
11375
- getElementName() {
11376
- if (1 !== this._patterns.length) return null;
11377
- const e = this._patterns[0],
11378
- t = e.name;
11379
- return "function" == typeof e || !t || t instanceof RegExp
11380
- ? null
11381
- : t;
11382
- }
11383
- }
11384
- function Ft(e, t) {
11385
- if ("function" == typeof t) return t(e);
11386
- const n = {};
11387
- return (t.name &&
11388
- ((n.name = (function (e, t) {
11389
- return e instanceof RegExp ? e.test(t) : e === t;
11390
- })(t.name, e.name)),
11391
- !n.name)) ||
11392
- (t.attributes &&
11393
- ((n.attributes = (function (e, t) {
11394
- const n = [];
11395
- for (const r in e) {
11396
- const o = e[r];
11397
- if (!t.hasAttribute(r)) return null;
11398
- {
11399
- const e = t.getAttribute(r);
11400
- if (!0 === o) n.push(r);
11401
- else if (o instanceof RegExp) {
11402
- if (!o.test(e)) return null;
11403
- n.push(r);
11404
- } else {
11405
- if (e !== o) return null;
11406
- n.push(r);
11407
- }
11408
- }
11409
- }
11410
- return n;
11411
- })(t.attributes, e)),
11412
- !n.attributes))
11413
- ? null
11414
- : !(
11415
- t.classes &&
11416
- ((n.classes = (function (e, t) {
11417
- const n = [];
11418
- for (const r of e)
11419
- if (r instanceof RegExp) {
11420
- const e = t.getClassNames();
11421
- for (const t of e) r.test(t) && n.push(t);
11422
- if (0 === n.length) return null;
11423
- } else {
11424
- if (!t.hasClass(r)) return null;
11425
- n.push(r);
11426
- }
11427
- return n;
11428
- })(t.classes, e)),
11429
- !n.classes)
11430
- ) &&
11431
- !(
11432
- t.styles &&
11433
- ((n.styles = (function (e, t) {
11434
- const n = [];
11435
- for (const r in e) {
11436
- const o = e[r];
11437
- if (!t.hasStyle(r)) return null;
11438
- {
11439
- const e = t.getStyle(r);
11440
- if (o instanceof RegExp) {
11441
- if (!o.test(e)) return null;
11442
- n.push(r);
11443
- } else {
11444
- if (e !== o) return null;
11445
- n.push(r);
11446
- }
11447
- }
11448
- }
11449
- return n;
11450
- })(t.styles, e)),
11451
- !n.styles)
11452
- ) &&
11453
- n;
11454
- }
11455
- class Ht extends Nt {
11456
- constructor(e, t, n) {
11457
- if (
11458
- (super(),
11459
- (this.name = e),
11460
- (this._attrs = (function (e) {
11461
- e = y(e) ? Rt(e) : new Map(e);
11462
- for (const [t, n] of e)
11463
- null === n
11464
- ? e.delete(t)
11465
- : "string" != typeof n && e.set(t, String(n));
11466
- return e;
11467
- })(t)),
11468
- (this._children = []),
11469
- n && this._insertChild(0, n),
11470
- (this._classes = new Set()),
11471
- this._attrs.has("class"))
11472
- ) {
11473
- const e = this._attrs.get("class");
11474
- Bt(this._classes, e), this._attrs.delete("class");
11475
- }
11476
- (this._styles = new Map()),
11477
- this._attrs.has("style") &&
11478
- (zt(this._styles, this._attrs.get("style")),
11479
- this._attrs.delete("style")),
11480
- (this._customProperties = new Map());
11481
- }
11482
- get childCount() {
11483
- return this._children.length;
11484
- }
11485
- get isEmpty() {
11486
- return 0 === this._children.length;
11487
- }
11488
- is(e, t = null) {
11489
- const n = e.replace(/^view:/, "");
11490
- return t
11491
- ? "element" == n && t == this.name
11492
- : "element" == n || n == this.name || super.is(e);
11493
- }
11494
- getChild(e) {
11495
- return this._children[e];
11496
- }
11497
- getChildIndex(e) {
11498
- return this._children.indexOf(e);
11499
- }
11500
- getChildren() {
11501
- return this._children[Symbol.iterator]();
11502
- }
11503
- *getAttributeKeys() {
11504
- this._classes.size > 0 && (yield "class"),
11505
- this._styles.size > 0 && (yield "style"),
11506
- yield* this._attrs.keys();
11507
- }
11508
- *getAttributes() {
11509
- yield* this._attrs.entries(),
11510
- this._classes.size > 0 &&
11511
- (yield ["class", this.getAttribute("class")]),
11512
- this._styles.size > 0 &&
11513
- (yield ["style", this.getAttribute("style")]);
11514
- }
11515
- getAttribute(e) {
11516
- if ("class" == e)
11517
- return this._classes.size > 0
11518
- ? [...this._classes].join(" ")
11519
- : void 0;
11520
- if ("style" != e) return this._attrs.get(e);
11521
- if (this._styles.size > 0) {
11522
- let e = "";
11523
- for (const [t, n] of this._styles) e += `${t}:${n};`;
11524
- return e;
11525
- }
11526
- }
11527
- hasAttribute(e) {
11528
- return "class" == e
11529
- ? this._classes.size > 0
11530
- : "style" == e
11531
- ? this._styles.size > 0
11532
- : this._attrs.has(e);
11533
- }
11534
- isSimilar(e) {
11535
- if (!(e instanceof Ht)) return !1;
11536
- if (this === e) return !0;
11537
- if (this.name != e.name) return !1;
11538
- if (
11539
- this._attrs.size !== e._attrs.size ||
11540
- this._classes.size !== e._classes.size ||
11541
- this._styles.size !== e._styles.size
11542
- )
11543
- return !1;
11544
- for (const [t, n] of this._attrs)
11545
- if (!e._attrs.has(t) || e._attrs.get(t) !== n) return !1;
11546
- for (const t of this._classes) if (!e._classes.has(t)) return !1;
11547
- for (const [t, n] of this._styles)
11548
- if (!e._styles.has(t) || e._styles.get(t) !== n) return !1;
11549
- return !0;
11550
- }
11551
- hasClass(...e) {
11552
- for (const t of e) if (!this._classes.has(t)) return !1;
11553
- return !0;
11554
- }
11555
- getClassNames() {
11556
- return this._classes.keys();
11557
- }
11558
- getStyle(e) {
11559
- return this._styles.get(e);
11560
- }
11561
- getStyleNames() {
11562
- return this._styles.keys();
11563
- }
11564
- hasStyle(...e) {
11565
- for (const t of e) if (!this._styles.has(t)) return !1;
11566
- return !0;
11567
- }
11568
- findAncestor(...e) {
11569
- const t = new jt(...e);
11570
- let n = this.parent;
11571
- for (; n; ) {
11572
- if (t.match(n)) return n;
11573
- n = n.parent;
11574
- }
11575
- return null;
11576
- }
11577
- getCustomProperty(e) {
11578
- return this._customProperties.get(e);
11579
- }
11580
- *getCustomProperties() {
11581
- yield* this._customProperties.entries();
11582
- }
11583
- getIdentity() {
11584
- const e = Array.from(this._classes).sort().join(","),
11585
- t = Array.from(this._styles)
11586
- .map((e) => `${e[0]}:${e[1]}`)
11587
- .sort()
11588
- .join(";"),
11589
- n = Array.from(this._attrs)
11590
- .map((e) => `${e[0]}="${e[1]}"`)
11591
- .sort()
11592
- .join(" ");
11593
- return (
11594
- this.name +
11595
- ("" == e ? "" : ` class="${e}"`) +
11596
- ("" == t ? "" : ` style="${t}"`) +
11597
- ("" == n ? "" : " " + n)
11598
- );
11599
- }
11600
- _clone(e = !1) {
11601
- const t = [];
11602
- if (e) for (const n of this.getChildren()) t.push(n._clone(e));
11603
- const n = new this.constructor(this.name, this._attrs, t);
11604
- return (
11605
- (n._classes = new Set(this._classes)),
11606
- (n._styles = new Map(this._styles)),
11607
- (n._customProperties = new Map(this._customProperties)),
11608
- (n.getFillerOffset = this.getFillerOffset),
11609
- n
11610
- );
11611
- }
11612
- _appendChild(e) {
11613
- return this._insertChild(this.childCount, e);
11614
- }
11615
- _insertChild(e, t) {
11616
- this._fireChange("children", this);
11617
- let n = 0;
11618
- const r = (function (e) {
11619
- return "string" == typeof e
11620
- ? [new At(e)]
11621
- : (Yt(e) || (e = [e]),
11622
- Array.from(e).map((e) =>
11623
- "string" == typeof e
11624
- ? new At(e)
11625
- : e instanceof It
11626
- ? new At(e.data)
11627
- : e
11628
- ));
11629
- })(t);
11630
- for (const t of r)
11631
- null !== t.parent && t._remove(),
11632
- (t.parent = this),
11633
- this._children.splice(e, 0, t),
11634
- e++,
11635
- n++;
11636
- return n;
11637
- }
11638
- _removeChildren(e, t = 1) {
11639
- this._fireChange("children", this);
11640
- for (let n = e; n < e + t; n++) this._children[n].parent = null;
11641
- return this._children.splice(e, t);
11642
- }
11643
- _setAttribute(e, t) {
11644
- (t = String(t)),
11645
- this._fireChange("attributes", this),
11646
- "class" == e
11647
- ? Bt(this._classes, t)
11648
- : "style" == e
11649
- ? zt(this._styles, t)
11650
- : this._attrs.set(e, t);
11651
- }
11652
- _removeAttribute(e) {
11653
- return (
11654
- this._fireChange("attributes", this),
11655
- "class" == e
11656
- ? this._classes.size > 0 && (this._classes.clear(), !0)
11657
- : "style" == e
11658
- ? this._styles.size > 0 && (this._styles.clear(), !0)
11659
- : this._attrs.delete(e)
11660
- );
11661
- }
11662
- _addClass(e) {
11663
- this._fireChange("attributes", this),
11664
- (e = Array.isArray(e) ? e : [e]).forEach((e) =>
11665
- this._classes.add(e)
11666
- );
11667
- }
11668
- _removeClass(e) {
11669
- this._fireChange("attributes", this),
11670
- (e = Array.isArray(e) ? e : [e]).forEach((e) =>
11671
- this._classes.delete(e)
11672
- );
11673
- }
11674
- _setStyle(e, t) {
11675
- if ((this._fireChange("attributes", this), y(e))) {
11676
- const t = Object.keys(e);
11677
- for (const n of t) this._styles.set(n, e[n]);
11678
- } else this._styles.set(e, t);
11679
- }
11680
- _removeStyle(e) {
11681
- this._fireChange("attributes", this),
11682
- (e = Array.isArray(e) ? e : [e]).forEach((e) =>
11683
- this._styles.delete(e)
11684
- );
11685
- }
11686
- _setCustomProperty(e, t) {
11687
- this._customProperties.set(e, t);
11688
- }
11689
- _removeCustomProperty(e) {
11690
- return this._customProperties.delete(e);
11691
- }
11692
- }
11693
- function zt(e, t) {
11694
- let n = null,
11695
- r = 0,
11696
- o = 0,
11697
- a = null;
11698
- if ((e.clear(), "" !== t)) {
11699
- ";" != t.charAt(t.length - 1) && (t += ";");
11700
- for (let i = 0; i < t.length; i++) {
11701
- const s = t.charAt(i);
11702
- if (null === n)
11703
- switch (s) {
11704
- case ":":
11705
- a || ((a = t.substr(r, i - r)), (o = i + 1));
11706
- break;
11707
- case '"':
11708
- case "'":
11709
- n = s;
11710
- break;
11711
- case ";": {
11712
- const n = t.substr(o, i - o);
11713
- a && e.set(a.trim(), n.trim()), (a = null), (r = i + 1);
11714
- break;
11715
- }
11716
- }
11717
- else s === n && (n = null);
11718
- }
11719
- }
11720
- }
11721
- function Bt(e, t) {
11722
- const n = t.split(/\s+/);
11723
- e.clear(), n.forEach((t) => e.add(t));
11724
- }
11725
- class Ut extends Ht {
11726
- constructor(e, t, n) {
11727
- super(e, t, n), (this.getFillerOffset = Vt);
11728
- }
11729
- is(e, t = null) {
11730
- const n = e && e.replace(/^view:/, "");
11731
- return t
11732
- ? ("containerElement" == n && t == this.name) || super.is(e, t)
11733
- : "containerElement" == n || super.is(e);
11734
- }
11735
- }
11736
- function Vt() {
11737
- const e = [...this.getChildren()],
11738
- t = e[this.childCount - 1];
11739
- if (t && t.is("element", "br")) return this.childCount;
11740
- for (const t of e) if (!t.is("uiElement")) return null;
11741
- return this.childCount;
11742
- }
11743
- var Wt = function (e) {
11744
- return e;
11745
- },
11746
- qt = function (e, t, n) {
11747
- switch (n.length) {
11748
- case 0:
11749
- return e.call(t);
11750
- case 1:
11751
- return e.call(t, n[0]);
11752
- case 2:
11753
- return e.call(t, n[0], n[1]);
11754
- case 3:
11755
- return e.call(t, n[0], n[1], n[2]);
11756
- }
11757
- return e.apply(t, n);
11758
- },
11759
- Gt = Math.max,
11760
- Jt = function (e) {
11761
- return function () {
11762
- return e;
11763
- };
11764
- },
11765
- Kt = X
11766
- ? function (e, t) {
11767
- return X(e, "toString", {
11768
- configurable: !0,
11769
- enumerable: !1,
11770
- value: Jt(t),
11771
- writable: !0,
11772
- });
11773
- }
11774
- : Wt,
11775
- Qt = Date.now,
11776
- Xt = (function (e) {
11777
- var t = 0,
11778
- n = 0;
11779
- return function () {
11780
- var r = Qt(),
11781
- o = 16 - (r - n);
11782
- if (((n = r), o > 0)) {
11783
- if (++t >= 800) return arguments[0];
11784
- } else t = 0;
11785
- return e.apply(void 0, arguments);
11786
- };
11787
- })(Kt),
11788
- $t = function (e, t) {
11789
- return Xt(
11790
- (function (e, t, n) {
11791
- return (
11792
- (t = Gt(void 0 === t ? e.length - 1 : t, 0)),
11793
- function () {
11794
- for (
11795
- var r = arguments,
11796
- o = -1,
11797
- a = Gt(r.length - t, 0),
11798
- i = Array(a);
11799
- ++o < a;
11800
-
11801
- )
11802
- i[o] = r[t + o];
11803
- o = -1;
11804
- for (var s = Array(t + 1); ++o < t; ) s[o] = r[o];
11805
- return (s[t] = n(i)), qt(e, this, s);
11806
- }
11807
- );
11808
- })(e, t, Wt),
11809
- e + ""
11810
- );
11811
- },
11812
- Zt = (function (e) {
11813
- return $t(function (t, n) {
11814
- var r = -1,
11815
- o = n.length,
11816
- a = o > 1 ? n[o - 1] : void 0,
11817
- i = o > 2 ? n[2] : void 0;
11818
- for (
11819
- a =
11820
- e.length > 3 && "function" == typeof a ? (o--, a) : void 0,
11821
- i &&
11822
- (function (e, t, n) {
11823
- if (!T(n)) return !1;
11824
- var r = typeof t;
11825
- return (
11826
- !!("number" == r
11827
- ? xe(n) && ue(t, n.length)
11828
- : "string" == r && (t in n)) && w(n[t], e)
11829
- );
11830
- })(n[0], n[1], i) &&
11831
- ((a = o < 3 ? void 0 : a), (o = 1)),
11832
- t = Object(t);
11833
- ++r < o;
11834
-
11835
- ) {
11836
- var s = n[r];
11837
- s && e(t, s);
11838
- }
11839
- return t;
11840
- });
11841
- })(function (e, t) {
11842
- te(t, Se(t), e);
11843
- });
11844
- const en = Symbol("observableProperties"),
11845
- tn = Symbol("boundObservables"),
11846
- nn = Symbol("boundProperties"),
11847
- rn = {
11848
- set(e, t) {
11849
- if (T(e))
11850
- return void Object.keys(e).forEach((t) => {
11851
- this.set(t, e[t]);
11852
- }, this);
11853
- an(this);
11854
- const n = this[en];
11855
- if (e in this && !n.has(e))
11856
- throw new _t.b(
11857
- "observable-set-cannot-override: Cannot override an existing property.",
11858
- this
11859
- );
11860
- Object.defineProperty(this, e, {
11861
- enumerable: !0,
11862
- configurable: !0,
11863
- get: () => n.get(e),
11864
- set(t) {
11865
- const r = n.get(e);
11866
- let o = this.fire("set:" + e, e, t, r);
11867
- void 0 === o && (o = t),
11868
- (r === o && n.has(e)) ||
11869
- (n.set(e, o), this.fire("change:" + e, e, o, r));
11870
- },
11871
- }),
11872
- (this[e] = t);
11873
- },
11874
- bind(...e) {
11875
- if (!e.length || !cn(e))
11876
- throw new _t.b(
11877
- "observable-bind-wrong-properties: All properties must be strings.",
11878
- this
11879
- );
11880
- if (new Set(e).size !== e.length)
11881
- throw new _t.b(
11882
- "observable-bind-duplicate-properties: Properties must be unique.",
11883
- this
11884
- );
11885
- an(this);
11886
- const t = this[nn];
11887
- e.forEach((e) => {
11888
- if (t.has(e))
11889
- throw new _t.b(
11890
- "observable-bind-rebind: Cannot bind the same property more that once.",
11891
- this
11892
- );
11893
- });
11894
- const n = new Map();
11895
- return (
11896
- e.forEach((e) => {
11897
- const r = { property: e, to: [] };
11898
- t.set(e, r), n.set(e, r);
11899
- }),
11900
- {
11901
- to: sn,
11902
- toMany: ln,
11903
- _observable: this,
11904
- _bindProperties: e,
11905
- _to: [],
11906
- _bindings: n,
11907
- }
11908
- );
11909
- },
11910
- unbind(...e) {
11911
- if (!(en in this)) return;
11912
- const t = this[nn],
11913
- n = this[tn];
11914
- if (e.length) {
11915
- if (!cn(e))
11916
- throw new _t.b(
11917
- "observable-unbind-wrong-properties: Properties must be strings.",
11918
- this
11919
- );
11920
- e.forEach((e) => {
11921
- const r = t.get(e);
11922
- if (!r) return;
11923
- let o, a, i, s;
11924
- r.to.forEach((e) => {
11925
- (o = e[0]),
11926
- (a = e[1]),
11927
- (i = n.get(o)),
11928
- (s = i[a]).delete(r),
11929
- s.size || delete i[a],
11930
- Object.keys(i).length ||
11931
- (n.delete(o), this.stopListening(o, "change"));
11932
- }),
11933
- t.delete(e);
11934
- });
11935
- } else
11936
- n.forEach((e, t) => {
11937
- this.stopListening(t, "change");
11938
- }),
11939
- n.clear(),
11940
- t.clear();
11941
- },
11942
- decorate(e) {
11943
- const t = this[e];
11944
- if (!t)
11945
- throw new _t.b(
11946
- "observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.",
11947
- this,
11948
- { object: this, methodName: e }
11949
- );
11950
- this.on(e, (e, n) => {
11951
- e.return = t.apply(this, n);
11952
- }),
11953
- (this[e] = function (...t) {
11954
- return this.fire(e, t);
11955
- });
11956
- },
11957
- };
11958
- Zt(rn, xt);
11959
- var on = rn;
11960
- function an(e) {
11961
- en in e ||
11962
- (Object.defineProperty(e, en, { value: new Map() }),
11963
- Object.defineProperty(e, tn, { value: new Map() }),
11964
- Object.defineProperty(e, nn, { value: new Map() }));
11965
- }
11966
- function sn(...e) {
11967
- const t = (function (...e) {
11968
- if (!e.length)
11969
- throw new _t.b(
11970
- "observable-bind-to-parse-error: Invalid argument syntax in `to()`.",
11971
- null
11972
- );
11973
- const t = { to: [] };
11974
- let n;
11975
- return (
11976
- "function" == typeof e[e.length - 1] &&
11977
- (t.callback = e.pop()),
11978
- e.forEach((e) => {
11979
- if ("string" == typeof e) n.properties.push(e);
11980
- else {
11981
- if ("object" != typeof e)
11982
- throw new _t.b(
11983
- "observable-bind-to-parse-error: Invalid argument syntax in `to()`.",
11984
- null
11985
- );
11986
- (n = { observable: e, properties: [] }), t.to.push(n);
11987
- }
11988
- }),
11989
- t
11990
- );
11991
- })(...e),
11992
- n = Array.from(this._bindings.keys()),
11993
- r = n.length;
11994
- if (!t.callback && t.to.length > 1)
11995
- throw new _t.b(
11996
- "observable-bind-to-no-callback: Binding multiple observables only possible with callback.",
11997
- this
11998
- );
11999
- if (r > 1 && t.callback)
12000
- throw new _t.b(
12001
- "observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.",
12002
- this
12003
- );
12004
- t.to.forEach((e) => {
12005
- if (e.properties.length && e.properties.length !== r)
12006
- throw new _t.b(
12007
- "observable-bind-to-properties-length: The number of properties must match.",
12008
- this
12009
- );
12010
- e.properties.length || (e.properties = this._bindProperties);
12011
- }),
12012
- (this._to = t.to),
12013
- t.callback && (this._bindings.get(n[0]).callback = t.callback),
12014
- (function (e, t) {
12015
- t.forEach((t) => {
12016
- const n = e[tn];
12017
- let r;
12018
- n.get(t.observable) ||
12019
- e.listenTo(t.observable, "change", (o, a) => {
12020
- (r = n.get(t.observable)[a]) &&
12021
- r.forEach((t) => {
12022
- un(e, t.property);
12023
- });
12024
- });
12025
- });
12026
- })(this._observable, this._to),
12027
- (function (e) {
12028
- let t;
12029
- e._bindings.forEach((n, r) => {
12030
- e._to.forEach((o) => {
12031
- (t =
12032
- o.properties[
12033
- n.callback ? 0 : e._bindProperties.indexOf(r)
12034
- ]),
12035
- n.to.push([o.observable, t]),
12036
- (function (e, t, n, r) {
12037
- const o = e[tn],
12038
- a = o.get(n),
12039
- i = a || {};
12040
- i[r] || (i[r] = new Set()),
12041
- i[r].add(t),
12042
- a || o.set(n, i);
12043
- })(e._observable, n, o.observable, t);
12044
- });
12045
- });
12046
- })(this),
12047
- this._bindProperties.forEach((e) => {
12048
- un(this._observable, e);
12049
- });
12050
- }
12051
- function ln(e, t, n) {
12052
- if (this._bindings.size > 1)
12053
- throw new _t.b(
12054
- "observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",
12055
- this
12056
- );
12057
- this.to(
12058
- ...(function (e, t) {
12059
- const n = e.map((e) => [e, t]);
12060
- return Array.prototype.concat.apply([], n);
12061
- })(e, t),
12062
- n
12063
- );
12064
- }
12065
- function cn(e) {
12066
- return e.every((e) => "string" == typeof e);
12067
- }
12068
- function un(e, t) {
12069
- const n = e[nn].get(t);
12070
- let r;
12071
- (r = n.callback
12072
- ? n.callback.apply(
12073
- e,
12074
- n.to.map((e) => e[0][e[1]])
12075
- )
12076
- : (r = n.to[0])[0][r[1]]),
12077
- e.hasOwnProperty(t) ? (e[t] = r) : e.set(t, r);
12078
- }
12079
- const dn = Symbol("document");
12080
- class hn extends Ut {
12081
- constructor(e, t, n) {
12082
- super(e, t, n),
12083
- this.set("isReadOnly", !1),
12084
- this.set("isFocused", !1);
12085
- }
12086
- is(e, t = null) {
12087
- const n = e && e.replace(/^view:/, "");
12088
- return t
12089
- ? ("editableElement" == n && t == this.name) || super.is(e, t)
12090
- : "editableElement" == n || super.is(e);
12091
- }
12092
- destroy() {
12093
- this.stopListening();
12094
- }
12095
- get document() {
12096
- return this.getCustomProperty(dn);
12097
- }
12098
- set _document(e) {
12099
- if (this.getCustomProperty(dn))
12100
- throw new _t.b(
12101
- "view-editableelement-document-already-set: View document is already set.",
12102
- this
12103
- );
12104
- this._setCustomProperty(dn, e),
12105
- this.bind("isReadOnly").to(e),
12106
- this.bind("isFocused").to(
12107
- e,
12108
- "isFocused",
12109
- (t) => t && e.selection.editableElement == this
12110
- ),
12111
- this.listenTo(e.selection, "change", () => {
12112
- this.isFocused =
12113
- e.isFocused && e.selection.editableElement == this;
12114
- });
12115
- }
12116
- }
12117
- Ct(hn, on);
12118
- const pn = Symbol("rootName");
12119
- class fn extends hn {
12120
- constructor(e) {
12121
- super(e), (this.rootName = "main");
12122
- }
12123
- is(e, t = null) {
12124
- const n = e.replace(/^view:/, "");
12125
- return t
12126
- ? ("rootElement" == n && t == this.name) || super.is(e, t)
12127
- : "rootElement" == n || super.is(e);
12128
- }
12129
- get rootName() {
12130
- return this.getCustomProperty(pn);
12131
- }
12132
- set rootName(e) {
12133
- this._setCustomProperty(pn, e);
12134
- }
12135
- set _name(e) {
12136
- this.name = e;
12137
- }
12138
- }
12139
- class mn {
12140
- constructor(e = {}) {
12141
- if (!e.boundaries && !e.startPosition)
12142
- throw new _t.b(
12143
- "view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",
12144
- null
12145
- );
12146
- if (
12147
- e.direction &&
12148
- "forward" != e.direction &&
12149
- "backward" != e.direction
12150
- )
12151
- throw new _t.b(
12152
- "view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",
12153
- e.startPosition,
12154
- { direction: e.direction }
12155
- );
12156
- (this.boundaries = e.boundaries || null),
12157
- e.startPosition
12158
- ? (this.position = gn._createAt(e.startPosition))
12159
- : (this.position = gn._createAt(
12160
- e.boundaries["backward" == e.direction ? "end" : "start"]
12161
- )),
12162
- (this.direction = e.direction || "forward"),
12163
- (this.singleCharacters = !!e.singleCharacters),
12164
- (this.shallow = !!e.shallow),
12165
- (this.ignoreElementEnd = !!e.ignoreElementEnd),
12166
- (this._boundaryStartParent = this.boundaries
12167
- ? this.boundaries.start.parent
12168
- : null),
12169
- (this._boundaryEndParent = this.boundaries
12170
- ? this.boundaries.end.parent
12171
- : null);
12172
- }
12173
- [Symbol.iterator]() {
12174
- return this;
12175
- }
12176
- skip(e) {
12177
- let t, n, r;
12178
- do {
12179
- (r = this.position), ({ done: t, value: n } = this.next());
12180
- } while (!t && e(n));
12181
- t || (this.position = r);
12182
- }
12183
- next() {
12184
- return "forward" == this.direction
12185
- ? this._next()
12186
- : this._previous();
12187
- }
12188
- _next() {
12189
- let e = this.position.clone();
12190
- const t = this.position,
12191
- n = e.parent;
12192
- if (null === n.parent && e.offset === n.childCount)
12193
- return { done: !0 };
12194
- if (
12195
- n === this._boundaryEndParent &&
12196
- e.offset == this.boundaries.end.offset
12197
- )
12198
- return { done: !0 };
12199
- let r;
12200
- if (n instanceof At) {
12201
- if (e.isAtEnd)
12202
- return (this.position = gn._createAfter(n)), this._next();
12203
- r = n.data[e.offset];
12204
- } else r = n.getChild(e.offset);
12205
- if (r instanceof Ht)
12206
- return (
12207
- this.shallow ? e.offset++ : (e = new gn(r, 0)),
12208
- (this.position = e),
12209
- this._formatReturnValue("elementStart", r, t, e, 1)
12210
- );
12211
- if (r instanceof At) {
12212
- if (this.singleCharacters)
12213
- return (e = new gn(r, 0)), (this.position = e), this._next();
12214
- {
12215
- let n,
12216
- o = r.data.length;
12217
- return (
12218
- r == this._boundaryEndParent
12219
- ? ((o = this.boundaries.end.offset),
12220
- (n = new It(r, 0, o)),
12221
- (e = gn._createAfter(n)))
12222
- : ((n = new It(r, 0, r.data.length)), e.offset++),
12223
- (this.position = e),
12224
- this._formatReturnValue("text", n, t, e, o)
12225
- );
12226
- }
12227
- }
12228
- if ("string" == typeof r) {
12229
- let r;
12230
- r = this.singleCharacters
12231
- ? 1
12232
- : (n === this._boundaryEndParent
12233
- ? this.boundaries.end.offset
12234
- : n.data.length) - e.offset;
12235
- const o = new It(n, e.offset, r);
12236
- return (
12237
- (e.offset += r),
12238
- (this.position = e),
12239
- this._formatReturnValue("text", o, t, e, r)
12240
- );
12241
- }
12242
- return (
12243
- (e = gn._createAfter(n)),
12244
- (this.position = e),
12245
- this.ignoreElementEnd
12246
- ? this._next()
12247
- : this._formatReturnValue("elementEnd", n, t, e)
12248
- );
12249
- }
12250
- _previous() {
12251
- let e = this.position.clone();
12252
- const t = this.position,
12253
- n = e.parent;
12254
- if (null === n.parent && 0 === e.offset) return { done: !0 };
12255
- if (
12256
- n == this._boundaryStartParent &&
12257
- e.offset == this.boundaries.start.offset
12258
- )
12259
- return { done: !0 };
12260
- let r;
12261
- if (n instanceof At) {
12262
- if (e.isAtStart)
12263
- return (
12264
- (this.position = gn._createBefore(n)), this._previous()
12265
- );
12266
- r = n.data[e.offset - 1];
12267
- } else r = n.getChild(e.offset - 1);
12268
- if (r instanceof Ht)
12269
- return this.shallow
12270
- ? (e.offset--,
12271
- (this.position = e),
12272
- this._formatReturnValue("elementStart", r, t, e, 1))
12273
- : ((e = new gn(r, r.childCount)),
12274
- (this.position = e),
12275
- this.ignoreElementEnd
12276
- ? this._previous()
12277
- : this._formatReturnValue("elementEnd", r, t, e));
12278
- if (r instanceof At) {
12279
- if (this.singleCharacters)
12280
- return (
12281
- (e = new gn(r, r.data.length)),
12282
- (this.position = e),
12283
- this._previous()
12284
- );
12285
- {
12286
- let n,
12287
- o = r.data.length;
12288
- if (r == this._boundaryStartParent) {
12289
- const t = this.boundaries.start.offset;
12290
- (o = (n = new It(r, t, r.data.length - t)).data.length),
12291
- (e = gn._createBefore(n));
12292
- } else (n = new It(r, 0, r.data.length)), e.offset--;
12293
- return (
12294
- (this.position = e),
12295
- this._formatReturnValue("text", n, t, e, o)
12296
- );
12297
- }
12298
- }
12299
- if ("string" == typeof r) {
12300
- let r;
12301
- if (this.singleCharacters) r = 1;
12302
- else {
12303
- const t =
12304
- n === this._boundaryStartParent
12305
- ? this.boundaries.start.offset
12306
- : 0;
12307
- r = e.offset - t;
12308
- }
12309
- e.offset -= r;
12310
- const o = new It(n, e.offset, r);
12311
- return (
12312
- (this.position = e),
12313
- this._formatReturnValue("text", o, t, e, r)
12314
- );
12315
- }
12316
- return (
12317
- (e = gn._createBefore(n)),
12318
- (this.position = e),
12319
- this._formatReturnValue("elementStart", n, t, e, 1)
12320
- );
12321
- }
12322
- _formatReturnValue(e, t, n, r, o) {
12323
- return (
12324
- t instanceof It &&
12325
- (t.offsetInText + t.data.length == t.textNode.data.length &&
12326
- ("forward" != this.direction ||
12327
- (this.boundaries &&
12328
- this.boundaries.end.isEqual(this.position))
12329
- ? (n = gn._createAfter(t.textNode))
12330
- : ((r = gn._createAfter(t.textNode)),
12331
- (this.position = r))),
12332
- 0 === t.offsetInText &&
12333
- ("backward" != this.direction ||
12334
- (this.boundaries &&
12335
- this.boundaries.start.isEqual(this.position))
12336
- ? (n = gn._createBefore(t.textNode))
12337
- : ((r = gn._createBefore(t.textNode)),
12338
- (this.position = r)))),
12339
- {
12340
- done: !1,
12341
- value: {
12342
- type: e,
12343
- item: t,
12344
- previousPosition: n,
12345
- nextPosition: r,
12346
- length: o,
12347
- },
12348
- }
12349
- );
12350
- }
12351
- }
12352
- class gn {
12353
- constructor(e, t) {
12354
- (this.parent = e), (this.offset = t);
12355
- }
12356
- get nodeAfter() {
12357
- return this.parent.is("text")
12358
- ? null
12359
- : this.parent.getChild(this.offset) || null;
12360
- }
12361
- get nodeBefore() {
12362
- return this.parent.is("text")
12363
- ? null
12364
- : this.parent.getChild(this.offset - 1) || null;
12365
- }
12366
- get isAtStart() {
12367
- return 0 === this.offset;
12368
- }
12369
- get isAtEnd() {
12370
- const e = this.parent.is("text")
12371
- ? this.parent.data.length
12372
- : this.parent.childCount;
12373
- return this.offset === e;
12374
- }
12375
- get root() {
12376
- return this.parent.root;
12377
- }
12378
- get editableElement() {
12379
- let e = this.parent;
12380
- for (; !(e instanceof hn); ) {
12381
- if (!e.parent) return null;
12382
- e = e.parent;
12383
- }
12384
- return e;
12385
- }
12386
- getShiftedBy(e) {
12387
- const t = gn._createAt(this),
12388
- n = t.offset + e;
12389
- return (t.offset = n < 0 ? 0 : n), t;
12390
- }
12391
- getLastMatchingPosition(e, t = {}) {
12392
- t.startPosition = this;
12393
- const n = new mn(t);
12394
- return n.skip(e), n.position;
12395
- }
12396
- getAncestors() {
12397
- return this.parent.is("documentFragment")
12398
- ? [this.parent]
12399
- : this.parent.getAncestors({ includeSelf: !0 });
12400
- }
12401
- getCommonAncestor(e) {
12402
- const t = this.getAncestors(),
12403
- n = e.getAncestors();
12404
- let r = 0;
12405
- for (; t[r] == n[r] && t[r]; ) r++;
12406
- return 0 === r ? null : t[r - 1];
12407
- }
12408
- is(e) {
12409
- return "position" == e || "view:position" == e;
12410
- }
12411
- isEqual(e) {
12412
- return this.parent == e.parent && this.offset == e.offset;
12413
- }
12414
- isBefore(e) {
12415
- return "before" == this.compareWith(e);
12416
- }
12417
- isAfter(e) {
12418
- return "after" == this.compareWith(e);
12419
- }
12420
- compareWith(e) {
12421
- if (this.root !== e.root) return "different";
12422
- if (this.isEqual(e)) return "same";
12423
- const t = this.parent.is("node") ? this.parent.getPath() : [],
12424
- n = e.parent.is("node") ? e.parent.getPath() : [];
12425
- t.push(this.offset), n.push(e.offset);
12426
- const r = Pt(t, n);
12427
- switch (r) {
12428
- case "prefix":
12429
- return "before";
12430
- case "extension":
12431
- return "after";
12432
- default:
12433
- return t[r] < n[r] ? "before" : "after";
12434
- }
12435
- }
12436
- getWalker(e = {}) {
12437
- return (e.startPosition = this), new mn(e);
12438
- }
12439
- clone() {
12440
- return new gn(this.parent, this.offset);
12441
- }
12442
- static _createAt(e, t) {
12443
- if (e instanceof gn) return new this(e.parent, e.offset);
12444
- {
12445
- const n = e;
12446
- if ("end" == t) t = n.is("text") ? n.data.length : n.childCount;
12447
- else {
12448
- if ("before" == t) return this._createBefore(n);
12449
- if ("after" == t) return this._createAfter(n);
12450
- if (0 !== t && !t)
12451
- throw new _t.b(
12452
- "view-createPositionAt-offset-required: View#createPositionAt() requires the offset when the first parameter is a view item.",
12453
- n
12454
- );
12455
- }
12456
- return new gn(n, t);
12457
- }
12458
- }
12459
- static _createAfter(e) {
12460
- if (e.is("textProxy"))
12461
- return new gn(e.textNode, e.offsetInText + e.data.length);
12462
- if (!e.parent)
12463
- throw new _t.b(
12464
- "view-position-after-root: You can not make position after root.",
12465
- e,
12466
- { root: e }
12467
- );
12468
- return new gn(e.parent, e.index + 1);
12469
- }
12470
- static _createBefore(e) {
12471
- if (e.is("textProxy")) return new gn(e.textNode, e.offsetInText);
12472
- if (!e.parent)
12473
- throw new _t.b(
12474
- "view-position-before-root: You can not make position before root.",
12475
- e,
12476
- { root: e }
12477
- );
12478
- return new gn(e.parent, e.index);
12479
- }
12480
- }
12481
- class _n {
12482
- constructor(e, t = null) {
12483
- (this.start = e.clone()), (this.end = t ? t.clone() : e.clone());
12484
- }
12485
- *[Symbol.iterator]() {
12486
- yield* new mn({ boundaries: this, ignoreElementEnd: !0 });
12487
- }
12488
- get isCollapsed() {
12489
- return this.start.isEqual(this.end);
12490
- }
12491
- get isFlat() {
12492
- return this.start.parent === this.end.parent;
12493
- }
12494
- get root() {
12495
- return this.start.root;
12496
- }
12497
- getEnlarged() {
12498
- let e = this.start.getLastMatchingPosition(vn, {
12499
- direction: "backward",
12500
- }),
12501
- t = this.end.getLastMatchingPosition(vn);
12502
- return (
12503
- e.parent.is("text") &&
12504
- e.isAtStart &&
12505
- (e = gn._createBefore(e.parent)),
12506
- t.parent.is("text") &&
12507
- t.isAtEnd &&
12508
- (t = gn._createAfter(t.parent)),
12509
- new _n(e, t)
12510
- );
12511
- }
12512
- getTrimmed() {
12513
- let e = this.start.getLastMatchingPosition(vn);
12514
- if (e.isAfter(this.end) || e.isEqual(this.end))
12515
- return new _n(e, e);
12516
- let t = this.end.getLastMatchingPosition(vn, {
12517
- direction: "backward",
12518
- });
12519
- const n = e.nodeAfter,
12520
- r = t.nodeBefore;
12521
- return (
12522
- n && n.is("text") && (e = new gn(n, 0)),
12523
- r && r.is("text") && (t = new gn(r, r.data.length)),
12524
- new _n(e, t)
12525
- );
12526
- }
12527
- isEqual(e) {
12528
- return (
12529
- this == e ||
12530
- (this.start.isEqual(e.start) && this.end.isEqual(e.end))
12531
- );
12532
- }
12533
- containsPosition(e) {
12534
- return e.isAfter(this.start) && e.isBefore(this.end);
12535
- }
12536
- containsRange(e, t = !1) {
12537
- e.isCollapsed && (t = !1);
12538
- const n =
12539
- this.containsPosition(e.start) ||
12540
- (t && this.start.isEqual(e.start)),
12541
- r =
12542
- this.containsPosition(e.end) ||
12543
- (t && this.end.isEqual(e.end));
12544
- return n && r;
12545
- }
12546
- getDifference(e) {
12547
- const t = [];
12548
- return (
12549
- this.isIntersecting(e)
12550
- ? (this.containsPosition(e.start) &&
12551
- t.push(new _n(this.start, e.start)),
12552
- this.containsPosition(e.end) &&
12553
- t.push(new _n(e.end, this.end)))
12554
- : t.push(this.clone()),
12555
- t
12556
- );
12557
- }
12558
- getIntersection(e) {
12559
- if (this.isIntersecting(e)) {
12560
- let t = this.start,
12561
- n = this.end;
12562
- return (
12563
- this.containsPosition(e.start) && (t = e.start),
12564
- this.containsPosition(e.end) && (n = e.end),
12565
- new _n(t, n)
12566
- );
12567
- }
12568
- return null;
12569
- }
12570
- getWalker(e = {}) {
12571
- return (e.boundaries = this), new mn(e);
12572
- }
12573
- getCommonAncestor() {
12574
- return this.start.getCommonAncestor(this.end);
12575
- }
12576
- clone() {
12577
- return new _n(this.start, this.end);
12578
- }
12579
- *getItems(e = {}) {
12580
- (e.boundaries = this), (e.ignoreElementEnd = !0);
12581
- const t = new mn(e);
12582
- for (const e of t) yield e.item;
12583
- }
12584
- *getPositions(e = {}) {
12585
- e.boundaries = this;
12586
- const t = new mn(e);
12587
- yield t.position;
12588
- for (const e of t) yield e.nextPosition;
12589
- }
12590
- is(e) {
12591
- return "range" == e || "view:range" == e;
12592
- }
12593
- isIntersecting(e) {
12594
- return this.start.isBefore(e.end) && this.end.isAfter(e.start);
12595
- }
12596
- static _createFromParentsAndOffsets(e, t, n, r) {
12597
- return new this(new gn(e, t), new gn(n, r));
12598
- }
12599
- static _createFromPositionAndShift(e, t) {
12600
- const n = e,
12601
- r = e.getShiftedBy(t);
12602
- return t > 0 ? new this(n, r) : new this(r, n);
12603
- }
12604
- static _createIn(e) {
12605
- return this._createFromParentsAndOffsets(e, 0, e, e.childCount);
12606
- }
12607
- static _createOn(e) {
12608
- const t = e.is("textProxy") ? e.offsetSize : 1;
12609
- return this._createFromPositionAndShift(gn._createBefore(e), t);
12610
- }
12611
- }
12612
- function vn(e) {
12613
- return !(!e.item.is("attributeElement") && !e.item.is("uiElement"));
12614
- }
12615
- function bn(e) {
12616
- let t = 0;
12617
- for (const n of e) t++;
12618
- return t;
12619
- }
12620
- class yn {
12621
- constructor(e = null, t, n) {
12622
- (this._ranges = []),
12623
- (this._lastRangeBackward = !1),
12624
- (this._isFake = !1),
12625
- (this._fakeSelectionLabel = ""),
12626
- this.setTo(e, t, n);
12627
- }
12628
- get isFake() {
12629
- return this._isFake;
12630
- }
12631
- get fakeSelectionLabel() {
12632
- return this._fakeSelectionLabel;
12633
- }
12634
- get anchor() {
12635
- if (!this._ranges.length) return null;
12636
- const e = this._ranges[this._ranges.length - 1];
12637
- return (this._lastRangeBackward ? e.end : e.start).clone();
12638
- }
12639
- get focus() {
12640
- if (!this._ranges.length) return null;
12641
- const e = this._ranges[this._ranges.length - 1];
12642
- return (this._lastRangeBackward ? e.start : e.end).clone();
12643
- }
12644
- get isCollapsed() {
12645
- return 1 === this.rangeCount && this._ranges[0].isCollapsed;
12646
- }
12647
- get rangeCount() {
12648
- return this._ranges.length;
12649
- }
12650
- get isBackward() {
12651
- return !this.isCollapsed && this._lastRangeBackward;
12652
- }
12653
- get editableElement() {
12654
- return this.anchor ? this.anchor.editableElement : null;
12655
- }
12656
- *getRanges() {
12657
- for (const e of this._ranges) yield e.clone();
12658
- }
12659
- getFirstRange() {
12660
- let e = null;
12661
- for (const t of this._ranges)
12662
- (e && !t.start.isBefore(e.start)) || (e = t);
12663
- return e ? e.clone() : null;
12664
- }
12665
- getLastRange() {
12666
- let e = null;
12667
- for (const t of this._ranges)
12668
- (e && !t.end.isAfter(e.end)) || (e = t);
12669
- return e ? e.clone() : null;
12670
- }
12671
- getFirstPosition() {
12672
- const e = this.getFirstRange();
12673
- return e ? e.start.clone() : null;
12674
- }
12675
- getLastPosition() {
12676
- const e = this.getLastRange();
12677
- return e ? e.end.clone() : null;
12678
- }
12679
- isEqual(e) {
12680
- if (this.isFake != e.isFake) return !1;
12681
- if (
12682
- this.isFake &&
12683
- this.fakeSelectionLabel != e.fakeSelectionLabel
12684
- )
12685
- return !1;
12686
- if (this.rangeCount != e.rangeCount) return !1;
12687
- if (0 === this.rangeCount) return !0;
12688
- if (
12689
- !this.anchor.isEqual(e.anchor) ||
12690
- !this.focus.isEqual(e.focus)
12691
- )
12692
- return !1;
12693
- for (const t of this._ranges) {
12694
- let n = !1;
12695
- for (const r of e._ranges)
12696
- if (t.isEqual(r)) {
12697
- n = !0;
12698
- break;
12699
- }
12700
- if (!n) return !1;
12701
- }
12702
- return !0;
12703
- }
12704
- isSimilar(e) {
12705
- if (this.isBackward != e.isBackward) return !1;
12706
- const t = bn(this.getRanges());
12707
- if (t != bn(e.getRanges())) return !1;
12708
- if (0 == t) return !0;
12709
- for (let t of this.getRanges()) {
12710
- t = t.getTrimmed();
12711
- let n = !1;
12712
- for (let r of e.getRanges())
12713
- if (
12714
- ((r = r.getTrimmed()),
12715
- t.start.isEqual(r.start) && t.end.isEqual(r.end))
12716
- ) {
12717
- n = !0;
12718
- break;
12719
- }
12720
- if (!n) return !1;
12721
- }
12722
- return !0;
12723
- }
12724
- getSelectedElement() {
12725
- if (1 !== this.rangeCount) return null;
12726
- const e = this.getFirstRange();
12727
- let t = e.start.nodeAfter,
12728
- n = e.end.nodeBefore;
12729
- return (
12730
- e.start.parent.is("text") &&
12731
- e.start.isAtEnd &&
12732
- e.start.parent.nextSibling &&
12733
- (t = e.start.parent.nextSibling),
12734
- e.end.parent.is("text") &&
12735
- e.end.isAtStart &&
12736
- e.end.parent.previousSibling &&
12737
- (n = e.end.parent.previousSibling),
12738
- t instanceof Ht && t == n ? t : null
12739
- );
12740
- }
12741
- setTo(e, t, n) {
12742
- if (null === e) this._setRanges([]), this._setFakeOptions(t);
12743
- else if (e instanceof yn || e instanceof wn)
12744
- this._setRanges(e.getRanges(), e.isBackward),
12745
- this._setFakeOptions({
12746
- fake: e.isFake,
12747
- label: e.fakeSelectionLabel,
12748
- });
12749
- else if (e instanceof _n)
12750
- this._setRanges([e], t && t.backward), this._setFakeOptions(t);
12751
- else if (e instanceof gn)
12752
- this._setRanges([new _n(e)]), this._setFakeOptions(t);
12753
- else if (e instanceof Nt) {
12754
- const r = !!n && !!n.backward;
12755
- let o;
12756
- if (void 0 === t)
12757
- throw new _t.b(
12758
- "view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",
12759
- this
12760
- );
12761
- (o =
12762
- "in" == t
12763
- ? _n._createIn(e)
12764
- : "on" == t
12765
- ? _n._createOn(e)
12766
- : new _n(gn._createAt(e, t))),
12767
- this._setRanges([o], r),
12768
- this._setFakeOptions(n);
12769
- } else {
12770
- if (!Yt(e))
12771
- throw new _t.b(
12772
- "view-selection-setTo-not-selectable: Cannot set selection to given place.",
12773
- this
12774
- );
12775
- this._setRanges(e, t && t.backward), this._setFakeOptions(t);
12776
- }
12777
- this.fire("change");
12778
- }
12779
- setFocus(e, t) {
12780
- if (null === this.anchor)
12781
- throw new _t.b(
12782
- "view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",
12783
- this
12784
- );
12785
- const n = gn._createAt(e, t);
12786
- if ("same" == n.compareWith(this.focus)) return;
12787
- const r = this.anchor;
12788
- this._ranges.pop(),
12789
- "before" == n.compareWith(r)
12790
- ? this._addRange(new _n(n, r), !0)
12791
- : this._addRange(new _n(r, n)),
12792
- this.fire("change");
12793
- }
12794
- is(e) {
12795
- return "selection" == e || "view:selection" == e;
12796
- }
12797
- _setRanges(e, t = !1) {
12798
- (e = Array.from(e)), (this._ranges = []);
12799
- for (const t of e) this._addRange(t);
12800
- this._lastRangeBackward = !!t;
12801
- }
12802
- _setFakeOptions(e = {}) {
12803
- (this._isFake = !!e.fake),
12804
- (this._fakeSelectionLabel = (e.fake && e.label) || "");
12805
- }
12806
- _addRange(e, t = !1) {
12807
- if (!(e instanceof _n))
12808
- throw new _t.b(
12809
- "view-selection-add-range-not-range: Selection range set to an object that is not an instance of view.Range",
12810
- this
12811
- );
12812
- this._pushRange(e), (this._lastRangeBackward = !!t);
12813
- }
12814
- _pushRange(e) {
12815
- for (const t of this._ranges)
12816
- if (e.isIntersecting(t))
12817
- throw new _t.b(
12818
- "view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",
12819
- this,
12820
- { addedRange: e, intersectingRange: t }
12821
- );
12822
- this._ranges.push(new _n(e.start, e.end));
12823
- }
12824
- }
12825
- Ct(yn, xt);
12826
- class wn {
12827
- constructor(e = null, t, n) {
12828
- (this._selection = new yn()),
12829
- this._selection.delegate("change").to(this),
12830
- this._selection.setTo(e, t, n);
12831
- }
12832
- get isFake() {
12833
- return this._selection.isFake;
12834
- }
12835
- get fakeSelectionLabel() {
12836
- return this._selection.fakeSelectionLabel;
12837
- }
12838
- get anchor() {
12839
- return this._selection.anchor;
12840
- }
12841
- get focus() {
12842
- return this._selection.focus;
12843
- }
12844
- get isCollapsed() {
12845
- return this._selection.isCollapsed;
12846
- }
12847
- get rangeCount() {
12848
- return this._selection.rangeCount;
12849
- }
12850
- get isBackward() {
12851
- return this._selection.isBackward;
12852
- }
12853
- get editableElement() {
12854
- return this._selection.editableElement;
12855
- }
12856
- get _ranges() {
12857
- return this._selection._ranges;
12858
- }
12859
- *getRanges() {
12860
- yield* this._selection.getRanges();
12861
- }
12862
- getFirstRange() {
12863
- return this._selection.getFirstRange();
12864
- }
12865
- getLastRange() {
12866
- return this._selection.getLastRange();
12867
- }
12868
- getFirstPosition() {
12869
- return this._selection.getFirstPosition();
12870
- }
12871
- getLastPosition() {
12872
- return this._selection.getLastPosition();
12873
- }
12874
- getSelectedElement() {
12875
- return this._selection.getSelectedElement();
12876
- }
12877
- isEqual(e) {
12878
- return this._selection.isEqual(e);
12879
- }
12880
- isSimilar(e) {
12881
- return this._selection.isSimilar(e);
12882
- }
12883
- is(e) {
12884
- return (
12885
- "selection" == e ||
12886
- "documentSelection" == e ||
12887
- "view:selection" == e ||
12888
- "view:documentSelection" == e
12889
- );
12890
- }
12891
- _setTo(e, t, n) {
12892
- this._selection.setTo(e, t, n);
12893
- }
12894
- _setFocus(e, t) {
12895
- this._selection.setFocus(e, t);
12896
- }
12897
- }
12898
- Ct(wn, xt);
12899
- class kn {
12900
- constructor(e = {}) {
12901
- (this._items = []),
12902
- (this._itemMap = new Map()),
12903
- (this._idProperty = e.idProperty || "id"),
12904
- (this._bindToExternalToInternalMap = new WeakMap()),
12905
- (this._bindToInternalToExternalMap = new WeakMap()),
12906
- (this._skippedIndexesFromExternal = []);
12907
- }
12908
- get length() {
12909
- return this._items.length;
12910
- }
12911
- get first() {
12912
- return this._items[0] || null;
12913
- }
12914
- get last() {
12915
- return this._items[this.length - 1] || null;
12916
- }
12917
- add(e, t) {
12918
- let n;
12919
- const r = this._idProperty;
12920
- if (r in e) {
12921
- if ("string" != typeof (n = e[r]))
12922
- throw new _t.b("collection-add-invalid-id", this);
12923
- if (this.get(n))
12924
- throw new _t.b("collection-add-item-already-exists", this);
12925
- } else e[r] = n = bt();
12926
- if (void 0 === t) t = this._items.length;
12927
- else if (t > this._items.length || t < 0)
12928
- throw new _t.b("collection-add-item-invalid-index", this);
12929
- return (
12930
- this._items.splice(t, 0, e),
12931
- this._itemMap.set(n, e),
12932
- this.fire("add", e, t),
12933
- this
12934
- );
12935
- }
12936
- get(e) {
12937
- let t;
12938
- if ("string" == typeof e) t = this._itemMap.get(e);
12939
- else {
12940
- if ("number" != typeof e)
12941
- throw new _t.b(
12942
- "collection-get-invalid-arg: Index or id must be given.",
12943
- this
12944
- );
12945
- t = this._items[e];
12946
- }
12947
- return t || null;
12948
- }
12949
- has(e) {
12950
- if ("string" == typeof e) return this._itemMap.has(e);
12951
- {
12952
- const t = e[this._idProperty];
12953
- return this._itemMap.has(t);
12954
- }
12955
- }
12956
- getIndex(e) {
12957
- let t;
12958
- return (
12959
- (t = "string" == typeof e ? this._itemMap.get(e) : e),
12960
- this._items.indexOf(t)
12961
- );
12962
- }
12963
- remove(e) {
12964
- let t,
12965
- n,
12966
- r,
12967
- o = !1;
12968
- const a = this._idProperty;
12969
- if (
12970
- ("string" == typeof e
12971
- ? ((n = e),
12972
- (o = !(r = this._itemMap.get(n))),
12973
- r && (t = this._items.indexOf(r)))
12974
- : "number" == typeof e
12975
- ? ((t = e), (o = !(r = this._items[t])), r && (n = r[a]))
12976
- : ((n = (r = e)[a]),
12977
- (o =
12978
- -1 == (t = this._items.indexOf(r)) ||
12979
- !this._itemMap.get(n))),
12980
- o)
12981
- )
12982
- throw new _t.b("collection-remove-404: Item not found.", this);
12983
- this._items.splice(t, 1), this._itemMap.delete(n);
12984
- const i = this._bindToInternalToExternalMap.get(r);
12985
- return (
12986
- this._bindToInternalToExternalMap.delete(r),
12987
- this._bindToExternalToInternalMap.delete(i),
12988
- this.fire("remove", r, t),
12989
- r
12990
- );
12991
- }
12992
- map(e, t) {
12993
- return this._items.map(e, t);
12994
- }
12995
- find(e, t) {
12996
- return this._items.find(e, t);
12997
- }
12998
- filter(e, t) {
12999
- return this._items.filter(e, t);
13000
- }
13001
- clear() {
13002
- for (
13003
- this._bindToCollection &&
13004
- (this.stopListening(this._bindToCollection),
13005
- (this._bindToCollection = null));
13006
- this.length;
13007
-
13008
- )
13009
- this.remove(0);
13010
- }
13011
- bindTo(e) {
13012
- if (this._bindToCollection)
13013
- throw new _t.b(
13014
- "collection-bind-to-rebind: The collection cannot be bound more than once.",
13015
- this
13016
- );
13017
- return (
13018
- (this._bindToCollection = e),
13019
- {
13020
- as: (e) => {
13021
- this._setUpBindToBinding((t) => new e(t));
13022
- },
13023
- using: (e) => {
13024
- "function" == typeof e
13025
- ? this._setUpBindToBinding((t) => e(t))
13026
- : this._setUpBindToBinding((t) => t[e]);
13027
- },
13028
- }
13029
- );
13030
- }
13031
- _setUpBindToBinding(e) {
13032
- const t = this._bindToCollection,
13033
- n = (n, r, o) => {
13034
- const a = t._bindToCollection == this,
13035
- i = t._bindToInternalToExternalMap.get(r);
13036
- if (a && i)
13037
- this._bindToExternalToInternalMap.set(r, i),
13038
- this._bindToInternalToExternalMap.set(i, r);
13039
- else {
13040
- const n = e(r);
13041
- if (!n)
13042
- return void this._skippedIndexesFromExternal.push(o);
13043
- let a = o;
13044
- for (const e of this._skippedIndexesFromExternal)
13045
- o > e && a--;
13046
- for (const e of t._skippedIndexesFromExternal)
13047
- a >= e && a++;
13048
- this._bindToExternalToInternalMap.set(r, n),
13049
- this._bindToInternalToExternalMap.set(n, r),
13050
- this.add(n, a);
13051
- for (
13052
- let e = 0;
13053
- e < t._skippedIndexesFromExternal.length;
13054
- e++
13055
- )
13056
- a <= t._skippedIndexesFromExternal[e] &&
13057
- t._skippedIndexesFromExternal[e]++;
13058
- }
13059
- };
13060
- for (const e of t) n(0, e, t.getIndex(e));
13061
- this.listenTo(t, "add", n),
13062
- this.listenTo(t, "remove", (e, t, n) => {
13063
- const r = this._bindToExternalToInternalMap.get(t);
13064
- r && this.remove(r),
13065
- (this._skippedIndexesFromExternal = this._skippedIndexesFromExternal.reduce(
13066
- (e, t) => (n < t && e.push(t - 1), n > t && e.push(t), e),
13067
- []
13068
- ));
13069
- });
13070
- }
13071
- [Symbol.iterator]() {
13072
- return this._items[Symbol.iterator]();
13073
- }
13074
- }
13075
- Ct(kn, xt);
13076
- class xn {
13077
- constructor() {
13078
- (this.selection = new wn()),
13079
- (this.roots = new kn({ idProperty: "rootName" })),
13080
- this.set("isReadOnly", !1),
13081
- this.set("isFocused", !1),
13082
- this.set("isComposing", !1),
13083
- (this._postFixers = new Set());
13084
- }
13085
- getRoot(e = "main") {
13086
- return this.roots.get(e);
13087
- }
13088
- registerPostFixer(e) {
13089
- this._postFixers.add(e);
13090
- }
13091
- destroy() {
13092
- this.roots.map((e) => e.destroy()), this.stopListening();
13093
- }
13094
- _callPostFixers(e) {
13095
- let t = !1;
13096
- do {
13097
- for (const n of this._postFixers) if ((t = n(e))) break;
13098
- } while (t);
13099
- }
13100
- }
13101
- Ct(xn, on);
13102
- class Mn extends Ht {
13103
- constructor(e, t, n) {
13104
- super(e, t, n),
13105
- (this.getFillerOffset = En),
13106
- (this._priority = 10),
13107
- (this._id = null),
13108
- (this._clonesGroup = null);
13109
- }
13110
- get priority() {
13111
- return this._priority;
13112
- }
13113
- get id() {
13114
- return this._id;
13115
- }
13116
- getElementsWithSameId() {
13117
- if (null === this.id)
13118
- throw new _t.b(
13119
- "attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.",
13120
- this
13121
- );
13122
- return new Set(this._clonesGroup);
13123
- }
13124
- is(e, t = null) {
13125
- const n = e && e.replace(/^view:/, "");
13126
- return t
13127
- ? ("attributeElement" == n && t == this.name) || super.is(e, t)
13128
- : "attributeElement" == n || super.is(e);
13129
- }
13130
- isSimilar(e) {
13131
- return null !== this.id || null !== e.id
13132
- ? this.id === e.id
13133
- : super.isSimilar(e) && this.priority == e.priority;
13134
- }
13135
- _clone(e) {
13136
- const t = super._clone(e);
13137
- return (t._priority = this._priority), (t._id = this._id), t;
13138
- }
13139
- }
13140
- function En() {
13141
- if (Tn(this)) return null;
13142
- let e = this.parent;
13143
- for (; e && e.is("attributeElement"); ) {
13144
- if (Tn(e) > 1) return null;
13145
- e = e.parent;
13146
- }
13147
- return !e || Tn(e) > 1 ? null : this.childCount;
13148
- }
13149
- function Tn(e) {
13150
- return Array.from(e.getChildren()).filter((e) => !e.is("uiElement"))
13151
- .length;
13152
- }
13153
- Mn.DEFAULT_PRIORITY = 10;
13154
- class Sn extends Ht {
13155
- constructor(e, t, n) {
13156
- super(e, t, n), (this.getFillerOffset = Dn);
13157
- }
13158
- is(e, t = null) {
13159
- const n = e.replace(/^view:/, "");
13160
- return t
13161
- ? ("emptyElement" == n && t == this.name) || super.is(e, t)
13162
- : "emptyElement" == n || super.is(e);
13163
- }
13164
- _insertChild(e, t) {
13165
- if (t && (t instanceof Nt || Array.from(t).length > 0))
13166
- throw new _t.b(
13167
- "view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.",
13168
- [this, t]
13169
- );
13170
- }
13171
- }
13172
- function Dn() {
13173
- return null;
13174
- }
13175
- const Ln = navigator.userAgent.toLowerCase();
13176
- var Cn = (function (e) {
13177
- return e.indexOf("macintosh") > -1;
13178
- })(Ln),
13179
- Pn = (function (e) {
13180
- return !!e.match(/edge\/(\d+.?\d*)/);
13181
- })(Ln),
13182
- On = (function (e) {
13183
- return !!e.match(/gecko\/\d+/);
13184
- })(Ln),
13185
- Nn = (function (e) {
13186
- return (
13187
- e.indexOf(" applewebkit/") > -1 && -1 === e.indexOf("chrome")
13188
- );
13189
- })(Ln),
13190
- An = (function (e) {
13191
- return e.indexOf("android") > -1;
13192
- })(Ln);
13193
- !(function () {
13194
- let e = !1;
13195
- try {
13196
- e = 0 === "ć".search(new RegExp("[\\p{L}]", "u"));
13197
- } catch (e) {}
13198
- })();
13199
- const In = { "⌘": "ctrl", "⇧": "shift", "⌥": "alt" },
13200
- Rn = { ctrl: "⌘", shift: "⇧", alt: "⌥" },
13201
- Yn = (function () {
13202
- const e = {
13203
- arrowleft: 37,
13204
- arrowup: 38,
13205
- arrowright: 39,
13206
- arrowdown: 40,
13207
- backspace: 8,
13208
- delete: 46,
13209
- enter: 13,
13210
- space: 32,
13211
- esc: 27,
13212
- tab: 9,
13213
- ctrl: 1114112,
13214
- cmd: 1114112,
13215
- shift: 2228224,
13216
- alt: 4456448,
13217
- };
13218
- for (let t = 65; t <= 90; t++)
13219
- e[String.fromCharCode(t).toLowerCase()] = t;
13220
- for (let t = 48; t <= 57; t++) e[t - 48] = t;
13221
- for (let t = 112; t <= 123; t++) e["f" + (t - 111)] = t;
13222
- return e;
13223
- })();
13224
- function jn(e) {
13225
- let t;
13226
- if ("string" == typeof e) {
13227
- if (!(t = Yn[e.toLowerCase()]))
13228
- throw new _t.b(
13229
- "keyboard-unknown-key: Unknown key name.",
13230
- null,
13231
- { key: e }
13232
- );
13233
- } else
13234
- t =
13235
- e.keyCode +
13236
- (e.altKey ? Yn.alt : 0) +
13237
- (e.ctrlKey ? Yn.ctrl : 0) +
13238
- (e.shiftKey ? Yn.shift : 0);
13239
- return t;
13240
- }
13241
- function Fn(e) {
13242
- return (
13243
- "string" == typeof e && (e = Hn(e)),
13244
- e
13245
- .map((e) => ("string" == typeof e ? jn(e) : e))
13246
- .reduce((e, t) => t + e, 0)
13247
- );
13248
- }
13249
- function Hn(e) {
13250
- return e.split(/\s*\+\s*/);
13251
- }
13252
- class zn extends Ht {
13253
- constructor(e, t, n) {
13254
- super(e, t, n), (this.getFillerOffset = Bn);
13255
- }
13256
- is(e, t = null) {
13257
- const n = e.replace(/^view:/, "");
13258
- return t
13259
- ? ("uiElement" == n && t == this.name) || super.is(e, t)
13260
- : "uiElement" == n || super.is(e);
13261
- }
13262
- _insertChild(e, t) {
13263
- if (t && (t instanceof Nt || Array.from(t).length > 0))
13264
- throw new _t.b(
13265
- "view-uielement-cannot-add: Cannot add child nodes to UIElement instance.",
13266
- this
13267
- );
13268
- }
13269
- render(e) {
13270
- return this.toDomElement(e);
13271
- }
13272
- toDomElement(e) {
13273
- const t = e.createElement(this.name);
13274
- for (const e of this.getAttributeKeys())
13275
- t.setAttribute(e, this.getAttribute(e));
13276
- return t;
13277
- }
13278
- }
13279
- function Bn() {
13280
- return null;
13281
- }
13282
- class Un {
13283
- constructor(e) {
13284
- (this._children = []), e && this._insertChild(0, e);
13285
- }
13286
- [Symbol.iterator]() {
13287
- return this._children[Symbol.iterator]();
13288
- }
13289
- get childCount() {
13290
- return this._children.length;
13291
- }
13292
- get isEmpty() {
13293
- return 0 === this.childCount;
13294
- }
13295
- get root() {
13296
- return this;
13297
- }
13298
- get parent() {
13299
- return null;
13300
- }
13301
- is(e) {
13302
- return "documentFragment" == e || "view:documentFragment" == e;
13303
- }
13304
- _appendChild(e) {
13305
- return this._insertChild(this.childCount, e);
13306
- }
13307
- getChild(e) {
13308
- return this._children[e];
13309
- }
13310
- getChildIndex(e) {
13311
- return this._children.indexOf(e);
13312
- }
13313
- getChildren() {
13314
- return this._children[Symbol.iterator]();
13315
- }
13316
- _insertChild(e, t) {
13317
- this._fireChange("children", this);
13318
- let n = 0;
13319
- const r = (function (e) {
13320
- return "string" == typeof e
13321
- ? [new At(e)]
13322
- : (Yt(e) || (e = [e]),
13323
- Array.from(e).map((e) =>
13324
- "string" == typeof e
13325
- ? new At(e)
13326
- : e instanceof It
13327
- ? new At(e.data)
13328
- : e
13329
- ));
13330
- })(t);
13331
- for (const t of r)
13332
- null !== t.parent && t._remove(),
13333
- (t.parent = this),
13334
- this._children.splice(e, 0, t),
13335
- e++,
13336
- n++;
13337
- return n;
13338
- }
13339
- _removeChildren(e, t = 1) {
13340
- this._fireChange("children", this);
13341
- for (let n = e; n < e + t; n++) this._children[n].parent = null;
13342
- return this._children.splice(e, t);
13343
- }
13344
- _fireChange(e, t) {
13345
- this.fire("change:" + e, t);
13346
- }
13347
- }
13348
- Ct(Un, xt);
13349
- class Vn {
13350
- constructor(e) {
13351
- (this.document = e), (this._cloneGroups = new Map());
13352
- }
13353
- setSelection(e, t, n) {
13354
- this.document.selection._setTo(e, t, n);
13355
- }
13356
- setSelectionFocus(e, t) {
13357
- this.document.selection._setFocus(e, t);
13358
- }
13359
- createText(e) {
13360
- return new At(e);
13361
- }
13362
- createAttributeElement(e, t, n = {}) {
13363
- const r = new Mn(e, t);
13364
- return (
13365
- n.priority && (r._priority = n.priority),
13366
- n.id && (r._id = n.id),
13367
- r
13368
- );
13369
- }
13370
- createContainerElement(e, t) {
13371
- return new Ut(e, t);
13372
- }
13373
- createEditableElement(e, t) {
13374
- const n = new hn(e, t);
13375
- return (n._document = this.document), n;
13376
- }
13377
- createEmptyElement(e, t) {
13378
- return new Sn(e, t);
13379
- }
13380
- createUIElement(e, t, n) {
13381
- const r = new zn(e, t);
13382
- return n && (r.render = n), r;
13383
- }
13384
- setAttribute(e, t, n) {
13385
- n._setAttribute(e, t);
13386
- }
13387
- removeAttribute(e, t) {
13388
- t._removeAttribute(e);
13389
- }
13390
- addClass(e, t) {
13391
- t._addClass(e);
13392
- }
13393
- removeClass(e, t) {
13394
- t._removeClass(e);
13395
- }
13396
- setStyle(e, t, n) {
13397
- y(e) && void 0 === n && (n = t), n._setStyle(e, t);
13398
- }
13399
- removeStyle(e, t) {
13400
- t._removeStyle(e);
13401
- }
13402
- setCustomProperty(e, t, n) {
13403
- n._setCustomProperty(e, t);
13404
- }
13405
- removeCustomProperty(e, t) {
13406
- return t._removeCustomProperty(e);
13407
- }
13408
- breakAttributes(e) {
13409
- return e instanceof gn
13410
- ? this._breakAttributes(e)
13411
- : this._breakAttributesRange(e);
13412
- }
13413
- breakContainer(e) {
13414
- const t = e.parent;
13415
- if (!t.is("containerElement"))
13416
- throw new _t.b(
13417
- "view-writer-break-non-container-element: Trying to break an element which is not a container element.",
13418
- this.document
13419
- );
13420
- if (!t.parent)
13421
- throw new _t.b(
13422
- "view-writer-break-root: Trying to break root element.",
13423
- this.document
13424
- );
13425
- if (e.isAtStart) return gn._createBefore(t);
13426
- if (!e.isAtEnd) {
13427
- const n = t._clone(!1);
13428
- this.insert(gn._createAfter(t), n);
13429
- const r = new _n(e, gn._createAt(t, "end")),
13430
- o = new gn(n, 0);
13431
- this.move(r, o);
13432
- }
13433
- return gn._createAfter(t);
13434
- }
13435
- mergeAttributes(e) {
13436
- const t = e.offset,
13437
- n = e.parent;
13438
- if (n.is("text")) return e;
13439
- if (n.is("attributeElement") && 0 === n.childCount) {
13440
- const e = n.parent,
13441
- t = n.index;
13442
- return (
13443
- n._remove(),
13444
- this._removeFromClonedElementsGroup(n),
13445
- this.mergeAttributes(new gn(e, t))
13446
- );
13447
- }
13448
- const r = n.getChild(t - 1),
13449
- o = n.getChild(t);
13450
- if (!r || !o) return e;
13451
- if (r.is("text") && o.is("text")) return Kn(r, o);
13452
- if (
13453
- r.is("attributeElement") &&
13454
- o.is("attributeElement") &&
13455
- r.isSimilar(o)
13456
- ) {
13457
- const e = r.childCount;
13458
- return (
13459
- r._appendChild(o.getChildren()),
13460
- o._remove(),
13461
- this._removeFromClonedElementsGroup(o),
13462
- this.mergeAttributes(new gn(r, e))
13463
- );
13464
- }
13465
- return e;
13466
- }
13467
- mergeContainers(e) {
13468
- const t = e.nodeBefore,
13469
- n = e.nodeAfter;
13470
- if (
13471
- !(
13472
- t &&
13473
- n &&
13474
- t.is("containerElement") &&
13475
- n.is("containerElement")
13476
- )
13477
- )
13478
- throw new _t.b(
13479
- "view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.",
13480
- this.document
13481
- );
13482
- const r = t.getChild(t.childCount - 1),
13483
- o =
13484
- r instanceof At
13485
- ? gn._createAt(r, "end")
13486
- : gn._createAt(t, "end");
13487
- return (
13488
- this.move(_n._createIn(n), gn._createAt(t, "end")),
13489
- this.remove(_n._createOn(n)),
13490
- o
13491
- );
13492
- }
13493
- insert(e, t) {
13494
- !(function e(t, n) {
13495
- for (const r of t) {
13496
- if (!Qn.some((e) => r instanceof e))
13497
- throw new _t.b("view-writer-insert-invalid-node", n);
13498
- r.is("text") || e(r.getChildren(), n);
13499
- }
13500
- })((t = Yt(t) ? [...t] : [t]), this.document);
13501
- const n = Wn(e);
13502
- if (!n)
13503
- throw new _t.b(
13504
- "view-writer-invalid-position-container",
13505
- this.document
13506
- );
13507
- const r = this._breakAttributes(e, !0),
13508
- o = n._insertChild(r.offset, t);
13509
- for (const e of t) this._addToClonedElementsGroup(e);
13510
- const a = r.getShiftedBy(o),
13511
- i = this.mergeAttributes(r);
13512
- if (0 === o) return new _n(i, i);
13513
- {
13514
- i.isEqual(r) || a.offset--;
13515
- const e = this.mergeAttributes(a);
13516
- return new _n(i, e);
13517
- }
13518
- }
13519
- remove(e) {
13520
- const t = e instanceof _n ? e : _n._createOn(e);
13521
- if (($n(t, this.document), t.isCollapsed)) return new Un();
13522
- const { start: n, end: r } = this._breakAttributesRange(t, !0),
13523
- o = n.parent,
13524
- a = r.offset - n.offset,
13525
- i = o._removeChildren(n.offset, a);
13526
- for (const e of i) this._removeFromClonedElementsGroup(e);
13527
- const s = this.mergeAttributes(n);
13528
- return (t.start = s), (t.end = s.clone()), new Un(i);
13529
- }
13530
- clear(e, t) {
13531
- $n(e, this.document);
13532
- const n = e.getWalker({
13533
- direction: "backward",
13534
- ignoreElementEnd: !0,
13535
- });
13536
- for (const r of n) {
13537
- const n = r.item;
13538
- let o;
13539
- if (n.is("element") && t.isSimilar(n)) o = _n._createOn(n);
13540
- else if (
13541
- !r.nextPosition.isAfter(e.start) &&
13542
- n.is("textProxy")
13543
- ) {
13544
- const e = n
13545
- .getAncestors()
13546
- .find((e) => e.is("element") && t.isSimilar(e));
13547
- e && (o = _n._createIn(e));
13548
- }
13549
- o &&
13550
- (o.end.isAfter(e.end) && (o.end = e.end),
13551
- o.start.isBefore(e.start) && (o.start = e.start),
13552
- this.remove(o));
13553
- }
13554
- }
13555
- move(e, t) {
13556
- let n;
13557
- if (t.isAfter(e.end)) {
13558
- const r = (t = this._breakAttributes(t, !0)).parent,
13559
- o = r.childCount;
13560
- (e = this._breakAttributesRange(e, !0)),
13561
- (n = this.remove(e)),
13562
- (t.offset += r.childCount - o);
13563
- } else n = this.remove(e);
13564
- return this.insert(t, n);
13565
- }
13566
- wrap(e, t) {
13567
- if (!(t instanceof Mn))
13568
- throw new _t.b(
13569
- "view-writer-wrap-invalid-attribute",
13570
- this.document
13571
- );
13572
- if (($n(e, this.document), e.isCollapsed)) {
13573
- let n = e.start;
13574
- n.parent.is("element") &&
13575
- !(function (e) {
13576
- return Array.from(e.getChildren()).some(
13577
- (e) => !e.is("uiElement")
13578
- );
13579
- })(n.parent) &&
13580
- (n = n.getLastMatchingPosition((e) =>
13581
- e.item.is("uiElement")
13582
- )),
13583
- (n = this._wrapPosition(n, t));
13584
- const r = this.document.selection;
13585
- return (
13586
- r.isCollapsed &&
13587
- r.getFirstPosition().isEqual(e.start) &&
13588
- this.setSelection(n),
13589
- new _n(n)
13590
- );
13591
- }
13592
- return this._wrapRange(e, t);
13593
- }
13594
- unwrap(e, t) {
13595
- if (!(t instanceof Mn))
13596
- throw new _t.b(
13597
- "view-writer-unwrap-invalid-attribute",
13598
- this.document
13599
- );
13600
- if (($n(e, this.document), e.isCollapsed)) return e;
13601
- const { start: n, end: r } = this._breakAttributesRange(e, !0),
13602
- o = n.parent,
13603
- a = this._unwrapChildren(o, n.offset, r.offset, t),
13604
- i = this.mergeAttributes(a.start);
13605
- i.isEqual(a.start) || a.end.offset--;
13606
- const s = this.mergeAttributes(a.end);
13607
- return new _n(i, s);
13608
- }
13609
- rename(e, t) {
13610
- const n = new Ut(e, t.getAttributes());
13611
- return (
13612
- this.insert(gn._createAfter(t), n),
13613
- this.move(_n._createIn(t), gn._createAt(n, 0)),
13614
- this.remove(_n._createOn(t)),
13615
- n
13616
- );
13617
- }
13618
- clearClonedElementsGroup(e) {
13619
- this._cloneGroups.delete(e);
13620
- }
13621
- createPositionAt(e, t) {
13622
- return gn._createAt(e, t);
13623
- }
13624
- createPositionAfter(e) {
13625
- return gn._createAfter(e);
13626
- }
13627
- createPositionBefore(e) {
13628
- return gn._createBefore(e);
13629
- }
13630
- createRange(e, t) {
13631
- return new _n(e, t);
13632
- }
13633
- createRangeOn(e) {
13634
- return _n._createOn(e);
13635
- }
13636
- createRangeIn(e) {
13637
- return _n._createIn(e);
13638
- }
13639
- createSelection(e, t, n) {
13640
- return new yn(e, t, n);
13641
- }
13642
- _wrapChildren(e, t, n, r) {
13643
- let o = t;
13644
- const a = [];
13645
- for (; o < n; ) {
13646
- const t = e.getChild(o),
13647
- n = t.is("text"),
13648
- i = t.is("attributeElement"),
13649
- s = t.is("emptyElement"),
13650
- l = t.is("uiElement");
13651
- if (i && this._wrapAttributeElement(r, t)) a.push(new gn(e, o));
13652
- else if (n || s || l || (i && qn(r, t))) {
13653
- const n = r._clone();
13654
- t._remove(),
13655
- n._appendChild(t),
13656
- e._insertChild(o, n),
13657
- this._addToClonedElementsGroup(n),
13658
- a.push(new gn(e, o));
13659
- } else i && this._wrapChildren(t, 0, t.childCount, r);
13660
- o++;
13661
- }
13662
- let i = 0;
13663
- for (const e of a)
13664
- (e.offset -= i),
13665
- e.offset != t &&
13666
- (this.mergeAttributes(e).isEqual(e) || (i++, n--));
13667
- return _n._createFromParentsAndOffsets(e, t, e, n);
13668
- }
13669
- _unwrapChildren(e, t, n, r) {
13670
- let o = t;
13671
- const a = [];
13672
- for (; o < n; ) {
13673
- const t = e.getChild(o);
13674
- if (t.is("attributeElement"))
13675
- if (t.isSimilar(r)) {
13676
- const r = t.getChildren(),
13677
- i = t.childCount;
13678
- t._remove(),
13679
- e._insertChild(o, r),
13680
- this._removeFromClonedElementsGroup(t),
13681
- a.push(new gn(e, o), new gn(e, o + i)),
13682
- (o += i),
13683
- (n += i - 1);
13684
- } else
13685
- this._unwrapAttributeElement(r, t)
13686
- ? (a.push(new gn(e, o), new gn(e, o + 1)), o++)
13687
- : (this._unwrapChildren(t, 0, t.childCount, r), o++);
13688
- else o++;
13689
- }
13690
- let i = 0;
13691
- for (const e of a)
13692
- (e.offset -= i),
13693
- e.offset != t &&
13694
- e.offset != n &&
13695
- (this.mergeAttributes(e).isEqual(e) || (i++, n--));
13696
- return _n._createFromParentsAndOffsets(e, t, e, n);
13697
- }
13698
- _wrapRange(e, t) {
13699
- const { start: n, end: r } = this._breakAttributesRange(e, !0),
13700
- o = n.parent,
13701
- a = this._wrapChildren(o, n.offset, r.offset, t),
13702
- i = this.mergeAttributes(a.start);
13703
- i.isEqual(a.start) || a.end.offset--;
13704
- const s = this.mergeAttributes(a.end);
13705
- return new _n(i, s);
13706
- }
13707
- _wrapPosition(e, t) {
13708
- if (t.isSimilar(e.parent)) return Gn(e.clone());
13709
- e.parent.is("text") && (e = Jn(e));
13710
- const n = this.createAttributeElement();
13711
- (n._priority = Number.POSITIVE_INFINITY),
13712
- (n.isSimilar = () => !1),
13713
- e.parent._insertChild(e.offset, n);
13714
- const r = new _n(e, e.getShiftedBy(1));
13715
- this.wrap(r, t);
13716
- const o = new gn(n.parent, n.index);
13717
- n._remove();
13718
- const a = o.nodeBefore,
13719
- i = o.nodeAfter;
13720
- return a instanceof At && i instanceof At ? Kn(a, i) : Gn(o);
13721
- }
13722
- _wrapAttributeElement(e, t) {
13723
- if (!Zn(e, t)) return !1;
13724
- if (e.name !== t.name || e.priority !== t.priority) return !1;
13725
- for (const n of e.getAttributeKeys())
13726
- if (
13727
- "class" !== n &&
13728
- "style" !== n &&
13729
- t.hasAttribute(n) &&
13730
- t.getAttribute(n) !== e.getAttribute(n)
13731
- )
13732
- return !1;
13733
- for (const n of e.getStyleNames())
13734
- if (t.hasStyle(n) && t.getStyle(n) !== e.getStyle(n)) return !1;
13735
- for (const n of e.getAttributeKeys())
13736
- "class" !== n &&
13737
- "style" !== n &&
13738
- (t.hasAttribute(n) ||
13739
- this.setAttribute(n, e.getAttribute(n), t));
13740
- for (const n of e.getStyleNames())
13741
- t.hasStyle(n) || this.setStyle(n, e.getStyle(n), t);
13742
- for (const n of e.getClassNames())
13743
- t.hasClass(n) || this.addClass(n, t);
13744
- return !0;
13745
- }
13746
- _unwrapAttributeElement(e, t) {
13747
- if (!Zn(e, t)) return !1;
13748
- if (e.name !== t.name || e.priority !== t.priority) return !1;
13749
- for (const n of e.getAttributeKeys())
13750
- if (
13751
- "class" !== n &&
13752
- "style" !== n &&
13753
- (!t.hasAttribute(n) ||
13754
- t.getAttribute(n) !== e.getAttribute(n))
13755
- )
13756
- return !1;
13757
- if (!t.hasClass(...e.getClassNames())) return !1;
13758
- for (const n of e.getStyleNames())
13759
- if (!t.hasStyle(n) || t.getStyle(n) !== e.getStyle(n))
13760
- return !1;
13761
- for (const n of e.getAttributeKeys())
13762
- "class" !== n && "style" !== n && this.removeAttribute(n, t);
13763
- return (
13764
- this.removeClass(Array.from(e.getClassNames()), t),
13765
- this.removeStyle(Array.from(e.getStyleNames()), t),
13766
- !0
13767
- );
13768
- }
13769
- _breakAttributesRange(e, t = !1) {
13770
- const n = e.start,
13771
- r = e.end;
13772
- if (($n(e, this.document), e.isCollapsed)) {
13773
- const n = this._breakAttributes(e.start, t);
13774
- return new _n(n, n);
13775
- }
13776
- const o = this._breakAttributes(r, t),
13777
- a = o.parent.childCount,
13778
- i = this._breakAttributes(n, t);
13779
- return (o.offset += o.parent.childCount - a), new _n(i, o);
13780
- }
13781
- _breakAttributes(e, t = !1) {
13782
- const n = e.offset,
13783
- r = e.parent;
13784
- if (e.parent.is("emptyElement"))
13785
- throw new _t.b(
13786
- "view-writer-cannot-break-empty-element",
13787
- this.document
13788
- );
13789
- if (e.parent.is("uiElement"))
13790
- throw new _t.b(
13791
- "view-writer-cannot-break-ui-element",
13792
- this.document
13793
- );
13794
- if (!t && r.is("text") && Xn(r.parent)) return e.clone();
13795
- if (Xn(r)) return e.clone();
13796
- if (r.is("text")) return this._breakAttributes(Jn(e), t);
13797
- if (n == r.childCount) {
13798
- const e = new gn(r.parent, r.index + 1);
13799
- return this._breakAttributes(e, t);
13800
- }
13801
- if (0 === n) {
13802
- const e = new gn(r.parent, r.index);
13803
- return this._breakAttributes(e, t);
13804
- }
13805
- {
13806
- const e = r.index + 1,
13807
- o = r._clone();
13808
- r.parent._insertChild(e, o), this._addToClonedElementsGroup(o);
13809
- const a = r.childCount - n,
13810
- i = r._removeChildren(n, a);
13811
- o._appendChild(i);
13812
- const s = new gn(r.parent, e);
13813
- return this._breakAttributes(s, t);
13814
- }
13815
- }
13816
- _addToClonedElementsGroup(e) {
13817
- if (!e.root.is("rootElement")) return;
13818
- if (e.is("element"))
13819
- for (const t of e.getChildren())
13820
- this._addToClonedElementsGroup(t);
13821
- const t = e.id;
13822
- if (!t) return;
13823
- let n = this._cloneGroups.get(t);
13824
- n || ((n = new Set()), this._cloneGroups.set(t, n)),
13825
- n.add(e),
13826
- (e._clonesGroup = n);
13827
- }
13828
- _removeFromClonedElementsGroup(e) {
13829
- if (e.is("element"))
13830
- for (const t of e.getChildren())
13831
- this._removeFromClonedElementsGroup(t);
13832
- const t = e.id;
13833
- if (!t) return;
13834
- const n = this._cloneGroups.get(t);
13835
- n && n.delete(e);
13836
- }
13837
- }
13838
- function Wn(e) {
13839
- let t = e.parent;
13840
- for (; !Xn(t); ) {
13841
- if (!t) return;
13842
- t = t.parent;
13843
- }
13844
- return t;
13845
- }
13846
- function qn(e, t) {
13847
- return (
13848
- e.priority < t.priority ||
13849
- (!(e.priority > t.priority) && e.getIdentity() < t.getIdentity())
13850
- );
13851
- }
13852
- function Gn(e) {
13853
- const t = e.nodeBefore;
13854
- if (t && t.is("text")) return new gn(t, t.data.length);
13855
- const n = e.nodeAfter;
13856
- return n && n.is("text") ? new gn(n, 0) : e;
13857
- }
13858
- function Jn(e) {
13859
- if (e.offset == e.parent.data.length)
13860
- return new gn(e.parent.parent, e.parent.index + 1);
13861
- if (0 === e.offset) return new gn(e.parent.parent, e.parent.index);
13862
- const t = e.parent.data.slice(e.offset);
13863
- return (
13864
- (e.parent._data = e.parent.data.slice(0, e.offset)),
13865
- e.parent.parent._insertChild(e.parent.index + 1, new At(t)),
13866
- new gn(e.parent.parent, e.parent.index + 1)
13867
- );
13868
- }
13869
- function Kn(e, t) {
13870
- const n = e.data.length;
13871
- return (e._data += t.data), t._remove(), new gn(e, n);
13872
- }
13873
- const Qn = [At, Mn, Ut, Sn, zn];
13874
- function Xn(e) {
13875
- return e && (e.is("containerElement") || e.is("documentFragment"));
13876
- }
13877
- function $n(e, t) {
13878
- const n = Wn(e.start),
13879
- r = Wn(e.end);
13880
- if (!n || !r || n !== r)
13881
- throw new _t.b("view-writer-invalid-range-container", t);
13882
- }
13883
- function Zn(e, t) {
13884
- return null === e.id && null === t.id;
13885
- }
13886
- function er(e) {
13887
- return "[object Text]" == Object.prototype.toString.call(e);
13888
- }
13889
- const tr = (e) => {
13890
- const t = e.createElement("br");
13891
- return (t.dataset.ckeFiller = !0), t;
13892
- },
13893
- nr = (e) => e.createTextNode(" ");
13894
- let rr = "";
13895
- for (let e = 0; e < 7; e++) rr += "​";
13896
- function or(e) {
13897
- return er(e) && e.data.substr(0, 7) === rr;
13898
- }
13899
- function ar(e) {
13900
- return 7 == e.data.length && or(e);
13901
- }
13902
- function ir(e) {
13903
- return or(e) ? e.data.slice(7) : e.data;
13904
- }
13905
- const sr = new WeakMap();
13906
- function lr(e, t) {
13907
- let n = sr.get(t);
13908
- return (
13909
- n || ((n = t(window.document)), sr.set(t, n)), e.isEqualNode(n)
13910
- );
13911
- }
13912
- function cr(e, t) {
13913
- if (t.keyCode == Yn.arrowleft) {
13914
- const e = t.domTarget.ownerDocument.defaultView.getSelection();
13915
- if (1 == e.rangeCount && e.getRangeAt(0).collapsed) {
13916
- const t = e.getRangeAt(0).startContainer,
13917
- n = e.getRangeAt(0).startOffset;
13918
- or(t) && n <= 7 && e.collapse(t, 0);
13919
- }
13920
- }
13921
- }
13922
- function ur(e, t, n, r = !1) {
13923
- (n =
13924
- n ||
13925
- function (e, t) {
13926
- return e === t;
13927
- }),
13928
- Array.isArray(e) || (e = Array.from(e)),
13929
- Array.isArray(t) || (t = Array.from(t));
13930
- const o = (function (e, t, n) {
13931
- const r = dr(e, t, n);
13932
- if (-1 === r)
13933
- return { firstIndex: -1, lastIndexOld: -1, lastIndexNew: -1 };
13934
- const o = dr(hr(e, r), hr(t, r), n);
13935
- return {
13936
- firstIndex: r,
13937
- lastIndexOld: e.length - o,
13938
- lastIndexNew: t.length - o,
13939
- };
13940
- })(e, t, n);
13941
- return r
13942
- ? (function (e, t) {
13943
- const { firstIndex: n, lastIndexOld: r, lastIndexNew: o } = e;
13944
- if (-1 === n) return Array(t).fill("equal");
13945
- let a = [];
13946
- return (
13947
- n > 0 && (a = a.concat(Array(n).fill("equal"))),
13948
- o - n > 0 && (a = a.concat(Array(o - n).fill("insert"))),
13949
- r - n > 0 && (a = a.concat(Array(r - n).fill("delete"))),
13950
- o < t && (a = a.concat(Array(t - o).fill("equal"))),
13951
- a
13952
- );
13953
- })(o, t.length)
13954
- : (function (e, t) {
13955
- const n = [],
13956
- { firstIndex: r, lastIndexOld: o, lastIndexNew: a } = t;
13957
- return (
13958
- a - r > 0 &&
13959
- n.push({
13960
- index: r,
13961
- type: "insert",
13962
- values: e.slice(r, a),
13963
- }),
13964
- o - r > 0 &&
13965
- n.push({
13966
- index: r + (a - r),
13967
- type: "delete",
13968
- howMany: o - r,
13969
- }),
13970
- n
13971
- );
13972
- })(t, o);
13973
- }
13974
- function dr(e, t, n) {
13975
- for (let r = 0; r < Math.max(e.length, t.length); r++)
13976
- if (void 0 === e[r] || void 0 === t[r] || !n(e[r], t[r]))
13977
- return r;
13978
- return -1;
13979
- }
13980
- function hr(e, t) {
13981
- return e.slice(t).reverse();
13982
- }
13983
- function pr(e, t, n) {
13984
- n =
13985
- n ||
13986
- function (e, t) {
13987
- return e === t;
13988
- };
13989
- const r = e.length,
13990
- o = t.length;
13991
- if (r > 200 || o > 200 || r + o > 300)
13992
- return pr.fastDiff(e, t, n, !0);
13993
- let a, i;
13994
- if (o < r) {
13995
- const n = e;
13996
- (e = t), (t = n), (a = "delete"), (i = "insert");
13997
- } else (a = "insert"), (i = "delete");
13998
- const s = e.length,
13999
- l = t.length,
14000
- c = l - s,
14001
- u = {},
14002
- d = {};
14003
- function h(r) {
14004
- const o = (void 0 !== d[r - 1] ? d[r - 1] : -1) + 1,
14005
- c = void 0 !== d[r + 1] ? d[r + 1] : -1,
14006
- h = o > c ? -1 : 1;
14007
- u[r + h] && (u[r] = u[r + h].slice(0)),
14008
- u[r] || (u[r] = []),
14009
- u[r].push(o > c ? a : i);
14010
- let p = Math.max(o, c),
14011
- f = p - r;
14012
- for (; f < s && p < l && n(e[f], t[p]); )
14013
- f++, p++, u[r].push("equal");
14014
- return p;
14015
- }
14016
- let p,
14017
- f = 0;
14018
- do {
14019
- for (p = -f; p < c; p++) d[p] = h(p);
14020
- for (p = c + f; p > c; p--) d[p] = h(p);
14021
- (d[c] = h(c)), f++;
14022
- } while (d[c] !== l);
14023
- return u[c].slice(1);
14024
- }
14025
- function fr(e, t, n) {
14026
- e.insertBefore(n, e.childNodes[t] || null);
14027
- }
14028
- function mr(e) {
14029
- const t = e.parentNode;
14030
- t && t.removeChild(e);
14031
- }
14032
- function gr(e) {
14033
- if (e) {
14034
- if (e.defaultView) return e instanceof e.defaultView.Document;
14035
- if (e.ownerDocument && e.ownerDocument.defaultView)
14036
- return e instanceof e.ownerDocument.defaultView.Node;
14037
- }
14038
- return !1;
14039
- }
14040
- pr.fastDiff = ur;
14041
- class _r {
14042
- constructor(e, t) {
14043
- (this.domDocuments = new Set()),
14044
- (this.domConverter = e),
14045
- (this.markedAttributes = new Set()),
14046
- (this.markedChildren = new Set()),
14047
- (this.markedTexts = new Set()),
14048
- (this.selection = t),
14049
- (this.isFocused = !1),
14050
- (this._inlineFiller = null),
14051
- (this._fakeSelectionContainer = null);
14052
- }
14053
- markToSync(e, t) {
14054
- if ("text" === e)
14055
- this.domConverter.mapViewToDom(t.parent) &&
14056
- this.markedTexts.add(t);
14057
- else {
14058
- if (!this.domConverter.mapViewToDom(t)) return;
14059
- if ("attributes" === e) this.markedAttributes.add(t);
14060
- else {
14061
- if ("children" !== e)
14062
- throw new _t.b(
14063
- "view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.",
14064
- this
14065
- );
14066
- this.markedChildren.add(t);
14067
- }
14068
- }
14069
- }
14070
- render() {
14071
- let e;
14072
- for (const e of this.markedChildren)
14073
- this._updateChildrenMappings(e);
14074
- this._inlineFiller &&
14075
- !this._isSelectionInInlineFiller() &&
14076
- this._removeInlineFiller(),
14077
- this._inlineFiller
14078
- ? (e = this._getInlineFillerPosition())
14079
- : this._needsInlineFillerAtSelection() &&
14080
- ((e = this.selection.getFirstPosition()),
14081
- this.markedChildren.add(e.parent));
14082
- for (const e of this.markedAttributes) this._updateAttrs(e);
14083
- for (const t of this.markedChildren)
14084
- this._updateChildren(t, { inlineFillerPosition: e });
14085
- for (const t of this.markedTexts)
14086
- !this.markedChildren.has(t.parent) &&
14087
- this.domConverter.mapViewToDom(t.parent) &&
14088
- this._updateText(t, { inlineFillerPosition: e });
14089
- if (e) {
14090
- const t = this.domConverter.viewPositionToDom(e),
14091
- n = t.parent.ownerDocument;
14092
- or(t.parent)
14093
- ? (this._inlineFiller = t.parent)
14094
- : (this._inlineFiller = vr(n, t.parent, t.offset));
14095
- } else this._inlineFiller = null;
14096
- this._updateSelection(),
14097
- this._updateFocus(),
14098
- this.markedTexts.clear(),
14099
- this.markedAttributes.clear(),
14100
- this.markedChildren.clear();
14101
- }
14102
- _updateChildrenMappings(e) {
14103
- const t = this.domConverter.mapViewToDom(e);
14104
- if (!t) return;
14105
- const n = this.domConverter.mapViewToDom(e).childNodes,
14106
- r = Array.from(
14107
- this.domConverter.viewChildrenToDom(e, t.ownerDocument, {
14108
- withChildren: !1,
14109
- })
14110
- ),
14111
- o = this._diffNodeLists(n, r),
14112
- a = this._findReplaceActions(o, n, r);
14113
- if (-1 !== a.indexOf("replace")) {
14114
- const t = { equal: 0, insert: 0, delete: 0 };
14115
- for (const o of a)
14116
- if ("replace" === o) {
14117
- const o = t.equal + t.insert,
14118
- a = t.equal + t.delete,
14119
- i = e.getChild(o);
14120
- i &&
14121
- !i.is("uiElement") &&
14122
- this._updateElementMappings(i, n[a]),
14123
- mr(r[o]),
14124
- t.equal++;
14125
- } else t[o]++;
14126
- }
14127
- }
14128
- _updateElementMappings(e, t) {
14129
- this.domConverter.unbindDomElement(t),
14130
- this.domConverter.bindElements(t, e),
14131
- this.markedChildren.add(e),
14132
- this.markedAttributes.add(e);
14133
- }
14134
- _getInlineFillerPosition() {
14135
- const e = this.selection.getFirstPosition();
14136
- return e.parent.is("text")
14137
- ? gn._createBefore(this.selection.getFirstPosition().parent)
14138
- : e;
14139
- }
14140
- _isSelectionInInlineFiller() {
14141
- if (1 != this.selection.rangeCount || !this.selection.isCollapsed)
14142
- return !1;
14143
- const e = this.selection.getFirstPosition(),
14144
- t = this.domConverter.viewPositionToDom(e);
14145
- return !!(t && er(t.parent) && or(t.parent));
14146
- }
14147
- _removeInlineFiller() {
14148
- const e = this._inlineFiller;
14149
- if (!or(e))
14150
- throw new _t.b(
14151
- "view-renderer-filler-was-lost: The inline filler node was lost.",
14152
- this
14153
- );
14154
- ar(e) ? e.parentNode.removeChild(e) : (e.data = e.data.substr(7)),
14155
- (this._inlineFiller = null);
14156
- }
14157
- _needsInlineFillerAtSelection() {
14158
- if (1 != this.selection.rangeCount || !this.selection.isCollapsed)
14159
- return !1;
14160
- const e = this.selection.getFirstPosition(),
14161
- t = e.parent,
14162
- n = e.offset;
14163
- if (!this.domConverter.mapViewToDom(t.root)) return !1;
14164
- if (!t.is("element")) return !1;
14165
- if (
14166
- !(function (e) {
14167
- if ("false" == e.getAttribute("contenteditable")) return !1;
14168
- const t = e.findAncestor((e) =>
14169
- e.hasAttribute("contenteditable")
14170
- );
14171
- return !t || "true" == t.getAttribute("contenteditable");
14172
- })(t)
14173
- )
14174
- return !1;
14175
- if (n === t.getFillerOffset()) return !1;
14176
- const r = e.nodeBefore,
14177
- o = e.nodeAfter;
14178
- return !(r instanceof At || o instanceof At);
14179
- }
14180
- _updateText(e, t) {
14181
- const n = this.domConverter.findCorrespondingDomText(e),
14182
- r = this.domConverter.viewToDom(e, n.ownerDocument),
14183
- o = n.data;
14184
- let a = r.data;
14185
- const i = t.inlineFillerPosition;
14186
- if (
14187
- (i &&
14188
- i.parent == e.parent &&
14189
- i.offset == e.index &&
14190
- (a = rr + a),
14191
- o != a)
14192
- ) {
14193
- const e = ur(o, a);
14194
- for (const t of e)
14195
- "insert" === t.type
14196
- ? n.insertData(t.index, t.values.join(""))
14197
- : n.deleteData(t.index, t.howMany);
14198
- }
14199
- }
14200
- _updateAttrs(e) {
14201
- const t = this.domConverter.mapViewToDom(e);
14202
- if (!t) return;
14203
- const n = Array.from(t.attributes).map((e) => e.name),
14204
- r = e.getAttributeKeys();
14205
- for (const n of r) t.setAttribute(n, e.getAttribute(n));
14206
- for (const r of n) e.hasAttribute(r) || t.removeAttribute(r);
14207
- }
14208
- _updateChildren(e, t) {
14209
- const n = this.domConverter.mapViewToDom(e);
14210
- if (!n) return;
14211
- const r = t.inlineFillerPosition,
14212
- o = this.domConverter.mapViewToDom(e).childNodes,
14213
- a = Array.from(
14214
- this.domConverter.viewChildrenToDom(e, n.ownerDocument, {
14215
- bind: !0,
14216
- inlineFillerPosition: r,
14217
- })
14218
- );
14219
- r && r.parent === e && vr(n.ownerDocument, a, r.offset);
14220
- const i = this._diffNodeLists(o, a);
14221
- let s = 0;
14222
- const l = new Set();
14223
- for (const e of i)
14224
- "insert" === e
14225
- ? (fr(n, s, a[s]), s++)
14226
- : "delete" === e
14227
- ? (l.add(o[s]), mr(o[s]))
14228
- : (this._markDescendantTextToSync(
14229
- this.domConverter.domToView(a[s])
14230
- ),
14231
- s++);
14232
- for (const e of l)
14233
- e.parentNode || this.domConverter.unbindDomElement(e);
14234
- }
14235
- _diffNodeLists(e, t) {
14236
- return pr(
14237
- (e = (function (e, t) {
14238
- const n = Array.from(e);
14239
- return 0 != n.length && t
14240
- ? (n[n.length - 1] == t && n.pop(), n)
14241
- : n;
14242
- })(e, this._fakeSelectionContainer)),
14243
- t,
14244
- function (e, t, n) {
14245
- return (
14246
- t === n ||
14247
- (er(t) && er(n)
14248
- ? t.data === n.data
14249
- : !(!lr(t, e) || !lr(n, e)))
14250
- );
14251
- }.bind(null, this.domConverter.blockFiller)
14252
- );
14253
- }
14254
- _findReplaceActions(e, t, n) {
14255
- if (-1 === e.indexOf("insert") || -1 === e.indexOf("delete"))
14256
- return e;
14257
- let r = [],
14258
- o = [],
14259
- a = [];
14260
- const i = { equal: 0, insert: 0, delete: 0 };
14261
- for (const s of e)
14262
- "insert" === s
14263
- ? a.push(n[i.equal + i.insert])
14264
- : "delete" === s
14265
- ? o.push(t[i.equal + i.delete])
14266
- : ((r = r.concat(
14267
- pr(o, a, br).map((e) => ("equal" === e ? "replace" : e))
14268
- )).push("equal"),
14269
- (o = []),
14270
- (a = [])),
14271
- i[s]++;
14272
- return r.concat(
14273
- pr(o, a, br).map((e) => ("equal" === e ? "replace" : e))
14274
- );
14275
- }
14276
- _markDescendantTextToSync(e) {
14277
- if (e)
14278
- if (e.is("text")) this.markedTexts.add(e);
14279
- else if (e.is("element"))
14280
- for (const t of e.getChildren())
14281
- this._markDescendantTextToSync(t);
14282
- }
14283
- _updateSelection() {
14284
- if (0 === this.selection.rangeCount)
14285
- return (
14286
- this._removeDomSelection(), void this._removeFakeSelection()
14287
- );
14288
- const e = this.domConverter.mapViewToDom(
14289
- this.selection.editableElement
14290
- );
14291
- this.isFocused &&
14292
- e &&
14293
- (this.selection.isFake
14294
- ? this._updateFakeSelection(e)
14295
- : (this._removeFakeSelection(), this._updateDomSelection(e)));
14296
- }
14297
- _updateFakeSelection(e) {
14298
- const t = e.ownerDocument;
14299
- let n = this._fakeSelectionContainer;
14300
- n ||
14301
- ((this._fakeSelectionContainer = n = t.createElement("div")),
14302
- Object.assign(n.style, {
14303
- position: "fixed",
14304
- top: 0,
14305
- left: "-9999px",
14306
- width: "42px",
14307
- }),
14308
- (n.textContent = " ")),
14309
- (n.parentElement && n.parentElement == e) || e.appendChild(n),
14310
- (n.textContent = this.selection.fakeSelectionLabel || " ");
14311
- const r = t.getSelection(),
14312
- o = t.createRange();
14313
- r.removeAllRanges(),
14314
- o.selectNodeContents(n),
14315
- r.addRange(o),
14316
- this.domConverter.bindFakeSelection(n, this.selection);
14317
- }
14318
- _updateDomSelection(e) {
14319
- const t = e.ownerDocument.defaultView.getSelection();
14320
- if (!this._domSelectionNeedsUpdate(t)) return;
14321
- const n = this.domConverter.viewPositionToDom(
14322
- this.selection.anchor
14323
- ),
14324
- r = this.domConverter.viewPositionToDom(this.selection.focus);
14325
- e.focus(),
14326
- t.collapse(n.parent, n.offset),
14327
- t.extend(r.parent, r.offset),
14328
- On &&
14329
- (function (e, t) {
14330
- const n = e.parent;
14331
- if (
14332
- n.nodeType != Node.ELEMENT_NODE ||
14333
- e.offset != n.childNodes.length - 1
14334
- )
14335
- return;
14336
- const r = n.childNodes[e.offset];
14337
- r && "BR" == r.tagName && t.addRange(t.getRangeAt(0));
14338
- })(r, t);
14339
- }
14340
- _domSelectionNeedsUpdate(e) {
14341
- if (!this.domConverter.isDomSelectionCorrect(e)) return !0;
14342
- const t = e && this.domConverter.domSelectionToView(e);
14343
- return !(
14344
- (t && this.selection.isEqual(t)) ||
14345
- (!this.selection.isCollapsed && this.selection.isSimilar(t))
14346
- );
14347
- }
14348
- _removeDomSelection() {
14349
- for (const e of this.domDocuments)
14350
- if (e.getSelection().rangeCount) {
14351
- const t = e.activeElement,
14352
- n = this.domConverter.mapDomToView(t);
14353
- t && n && e.getSelection().removeAllRanges();
14354
- }
14355
- }
14356
- _removeFakeSelection() {
14357
- const e = this._fakeSelectionContainer;
14358
- e && e.remove();
14359
- }
14360
- _updateFocus() {
14361
- if (this.isFocused) {
14362
- const e = this.selection.editableElement;
14363
- e && this.domConverter.focus(e);
14364
- }
14365
- }
14366
- }
14367
- function vr(e, t, n) {
14368
- const r = t instanceof Array ? t : t.childNodes,
14369
- o = r[n];
14370
- if (er(o)) return (o.data = rr + o.data), o;
14371
- {
14372
- const o = e.createTextNode(rr);
14373
- return Array.isArray(t) ? r.splice(n, 0, o) : fr(t, n, o), o;
14374
- }
14375
- }
14376
- function br(e, t) {
14377
- return (
14378
- gr(e) &&
14379
- gr(t) &&
14380
- !er(e) &&
14381
- !er(t) &&
14382
- e.tagName.toLowerCase() === t.tagName.toLowerCase()
14383
- );
14384
- }
14385
- Ct(_r, on);
14386
- var yr = { window: window, document: document };
14387
- function wr(e) {
14388
- let t = 0;
14389
- for (; e.previousSibling; ) (e = e.previousSibling), t++;
14390
- return t;
14391
- }
14392
- function kr(e) {
14393
- const t = [];
14394
- for (; e && e.nodeType != Node.DOCUMENT_NODE; )
14395
- t.unshift(e), (e = e.parentNode);
14396
- return t;
14397
- }
14398
- class xr {
14399
- constructor(e = {}) {
14400
- (this.blockFiller = e.blockFiller || tr),
14401
- (this.preElements = ["pre"]),
14402
- (this.blockElements = [
14403
- "p",
14404
- "div",
14405
- "h1",
14406
- "h2",
14407
- "h3",
14408
- "h4",
14409
- "h5",
14410
- "h6",
14411
- ]),
14412
- (this._domToViewMapping = new WeakMap()),
14413
- (this._viewToDomMapping = new WeakMap()),
14414
- (this._fakeSelectionMapping = new WeakMap());
14415
- }
14416
- bindFakeSelection(e, t) {
14417
- this._fakeSelectionMapping.set(e, new yn(t));
14418
- }
14419
- fakeSelectionToView(e) {
14420
- return this._fakeSelectionMapping.get(e);
14421
- }
14422
- bindElements(e, t) {
14423
- this._domToViewMapping.set(e, t),
14424
- this._viewToDomMapping.set(t, e);
14425
- }
14426
- unbindDomElement(e) {
14427
- const t = this._domToViewMapping.get(e);
14428
- if (t) {
14429
- this._domToViewMapping.delete(e),
14430
- this._viewToDomMapping.delete(t);
14431
- for (const t of Array.from(e.childNodes))
14432
- this.unbindDomElement(t);
14433
- }
14434
- }
14435
- bindDocumentFragments(e, t) {
14436
- this._domToViewMapping.set(e, t),
14437
- this._viewToDomMapping.set(t, e);
14438
- }
14439
- viewToDom(e, t, n = {}) {
14440
- if (e.is("text")) {
14441
- const n = this._processDataFromViewText(e);
14442
- return t.createTextNode(n);
14443
- }
14444
- {
14445
- if (this.mapViewToDom(e)) return this.mapViewToDom(e);
14446
- let r;
14447
- if (e.is("documentFragment"))
14448
- (r = t.createDocumentFragment()),
14449
- n.bind && this.bindDocumentFragments(r, e);
14450
- else {
14451
- if (e.is("uiElement"))
14452
- return (
14453
- (r = e.render(t)), n.bind && this.bindElements(r, e), r
14454
- );
14455
- (r = t.createElement(e.name)),
14456
- n.bind && this.bindElements(r, e);
14457
- for (const t of e.getAttributeKeys())
14458
- r.setAttribute(t, e.getAttribute(t));
14459
- }
14460
- if (n.withChildren || void 0 === n.withChildren)
14461
- for (const o of this.viewChildrenToDom(e, t, n))
14462
- r.appendChild(o);
14463
- return r;
14464
- }
14465
- }
14466
- *viewChildrenToDom(e, t, n = {}) {
14467
- const r = e.getFillerOffset && e.getFillerOffset();
14468
- let o = 0;
14469
- for (const a of e.getChildren())
14470
- r === o && (yield this.blockFiller(t)),
14471
- yield this.viewToDom(a, t, n),
14472
- o++;
14473
- r === o && (yield this.blockFiller(t));
14474
- }
14475
- viewRangeToDom(e) {
14476
- const t = this.viewPositionToDom(e.start),
14477
- n = this.viewPositionToDom(e.end),
14478
- r = document.createRange();
14479
- return (
14480
- r.setStart(t.parent, t.offset), r.setEnd(n.parent, n.offset), r
14481
- );
14482
- }
14483
- viewPositionToDom(e) {
14484
- const t = e.parent;
14485
- if (t.is("text")) {
14486
- const n = this.findCorrespondingDomText(t);
14487
- if (!n) return null;
14488
- let r = e.offset;
14489
- return or(n) && (r += 7), { parent: n, offset: r };
14490
- }
14491
- {
14492
- let n, r, o;
14493
- if (0 === e.offset) {
14494
- if (!(n = this.mapViewToDom(t))) return null;
14495
- o = n.childNodes[0];
14496
- } else {
14497
- const t = e.nodeBefore;
14498
- if (
14499
- !(r = t.is("text")
14500
- ? this.findCorrespondingDomText(t)
14501
- : this.mapViewToDom(e.nodeBefore))
14502
- )
14503
- return null;
14504
- (n = r.parentNode), (o = r.nextSibling);
14505
- }
14506
- return er(o) && or(o)
14507
- ? { parent: o, offset: 7 }
14508
- : { parent: n, offset: r ? wr(r) + 1 : 0 };
14509
- }
14510
- }
14511
- domToView(e, t = {}) {
14512
- if (lr(e, this.blockFiller)) return null;
14513
- const n = this.getParentUIElement(e, this._domToViewMapping);
14514
- if (n) return n;
14515
- if (er(e)) {
14516
- if (ar(e)) return null;
14517
- {
14518
- const t = this._processDataFromDomText(e);
14519
- return "" === t ? null : new At(t);
14520
- }
14521
- }
14522
- if (this.isComment(e)) return null;
14523
- {
14524
- if (this.mapDomToView(e)) return this.mapDomToView(e);
14525
- let n;
14526
- if (this.isDocumentFragment(e))
14527
- (n = new Un()), t.bind && this.bindDocumentFragments(e, n);
14528
- else {
14529
- const r = t.keepOriginalCase
14530
- ? e.tagName
14531
- : e.tagName.toLowerCase();
14532
- (n = new Ht(r)), t.bind && this.bindElements(e, n);
14533
- const o = e.attributes;
14534
- for (let e = o.length - 1; e >= 0; e--)
14535
- n._setAttribute(o[e].name, o[e].value);
14536
- }
14537
- if (t.withChildren || void 0 === t.withChildren)
14538
- for (const r of this.domChildrenToView(e, t))
14539
- n._appendChild(r);
14540
- return n;
14541
- }
14542
- }
14543
- *domChildrenToView(e, t = {}) {
14544
- for (let n = 0; n < e.childNodes.length; n++) {
14545
- const r = e.childNodes[n],
14546
- o = this.domToView(r, t);
14547
- null !== o && (yield o);
14548
- }
14549
- }
14550
- domSelectionToView(e) {
14551
- if (1 === e.rangeCount) {
14552
- let t = e.getRangeAt(0).startContainer;
14553
- er(t) && (t = t.parentNode);
14554
- const n = this.fakeSelectionToView(t);
14555
- if (n) return n;
14556
- }
14557
- const t = this.isDomSelectionBackward(e),
14558
- n = [];
14559
- for (let t = 0; t < e.rangeCount; t++) {
14560
- const r = e.getRangeAt(t),
14561
- o = this.domRangeToView(r);
14562
- o && n.push(o);
14563
- }
14564
- return new yn(n, { backward: t });
14565
- }
14566
- domRangeToView(e) {
14567
- const t = this.domPositionToView(e.startContainer, e.startOffset),
14568
- n = this.domPositionToView(e.endContainer, e.endOffset);
14569
- return t && n ? new _n(t, n) : null;
14570
- }
14571
- domPositionToView(e, t) {
14572
- if (lr(e, this.blockFiller))
14573
- return this.domPositionToView(e.parentNode, wr(e));
14574
- const n = this.mapDomToView(e);
14575
- if (n && n.is("uiElement")) return gn._createBefore(n);
14576
- if (er(e)) {
14577
- if (ar(e)) return this.domPositionToView(e.parentNode, wr(e));
14578
- const n = this.findCorrespondingViewText(e);
14579
- let r = t;
14580
- return n
14581
- ? (or(e) && (r = (r -= 7) < 0 ? 0 : r), new gn(n, r))
14582
- : null;
14583
- }
14584
- if (0 === t) {
14585
- const t = this.mapDomToView(e);
14586
- if (t) return new gn(t, 0);
14587
- } else {
14588
- const n = e.childNodes[t - 1],
14589
- r = er(n)
14590
- ? this.findCorrespondingViewText(n)
14591
- : this.mapDomToView(n);
14592
- if (r && r.parent) return new gn(r.parent, r.index + 1);
14593
- }
14594
- return null;
14595
- }
14596
- mapDomToView(e) {
14597
- return (
14598
- this.getParentUIElement(e) || this._domToViewMapping.get(e)
14599
- );
14600
- }
14601
- findCorrespondingViewText(e) {
14602
- if (ar(e)) return null;
14603
- const t = this.getParentUIElement(e);
14604
- if (t) return t;
14605
- const n = e.previousSibling;
14606
- if (n) {
14607
- if (!this.isElement(n)) return null;
14608
- const e = this.mapDomToView(n);
14609
- if (e)
14610
- return e.nextSibling instanceof At ? e.nextSibling : null;
14611
- } else {
14612
- const t = this.mapDomToView(e.parentNode);
14613
- if (t) {
14614
- const e = t.getChild(0);
14615
- return e instanceof At ? e : null;
14616
- }
14617
- }
14618
- return null;
14619
- }
14620
- mapViewToDom(e) {
14621
- return this._viewToDomMapping.get(e);
14622
- }
14623
- findCorrespondingDomText(e) {
14624
- const t = e.previousSibling;
14625
- return t && this.mapViewToDom(t)
14626
- ? this.mapViewToDom(t).nextSibling
14627
- : !t && e.parent && this.mapViewToDom(e.parent)
14628
- ? this.mapViewToDom(e.parent).childNodes[0]
14629
- : null;
14630
- }
14631
- focus(e) {
14632
- const t = this.mapViewToDom(e);
14633
- if (t && t.ownerDocument.activeElement !== t) {
14634
- const { scrollX: e, scrollY: n } = yr.window,
14635
- r = [];
14636
- Er(t, (e) => {
14637
- const { scrollLeft: t, scrollTop: n } = e;
14638
- r.push([t, n]);
14639
- }),
14640
- t.focus(),
14641
- Er(t, (e) => {
14642
- const [t, n] = r.shift();
14643
- (e.scrollLeft = t), (e.scrollTop = n);
14644
- }),
14645
- yr.window.scrollTo(e, n);
14646
- }
14647
- }
14648
- isElement(e) {
14649
- return e && e.nodeType == Node.ELEMENT_NODE;
14650
- }
14651
- isDocumentFragment(e) {
14652
- return e && e.nodeType == Node.DOCUMENT_FRAGMENT_NODE;
14653
- }
14654
- isComment(e) {
14655
- return e && e.nodeType == Node.COMMENT_NODE;
14656
- }
14657
- isDomSelectionBackward(e) {
14658
- if (e.isCollapsed) return !1;
14659
- const t = document.createRange();
14660
- t.setStart(e.anchorNode, e.anchorOffset),
14661
- t.setEnd(e.focusNode, e.focusOffset);
14662
- const n = t.collapsed;
14663
- return t.detach(), n;
14664
- }
14665
- getParentUIElement(e) {
14666
- const t = kr(e);
14667
- for (t.pop(); t.length; ) {
14668
- const e = t.pop(),
14669
- n = this._domToViewMapping.get(e);
14670
- if (n && n.is("uiElement")) return n;
14671
- }
14672
- return null;
14673
- }
14674
- isDomSelectionCorrect(e) {
14675
- return (
14676
- this._isDomSelectionPositionCorrect(
14677
- e.anchorNode,
14678
- e.anchorOffset
14679
- ) &&
14680
- this._isDomSelectionPositionCorrect(e.focusNode, e.focusOffset)
14681
- );
14682
- }
14683
- _isDomSelectionPositionCorrect(e, t) {
14684
- if (er(e) && or(e) && t < 7) return !1;
14685
- if (this.isElement(e) && or(e.childNodes[t])) return !1;
14686
- const n = this.mapDomToView(e);
14687
- return !n || !n.is("uiElement");
14688
- }
14689
- _processDataFromViewText(e) {
14690
- let t = e.data;
14691
- if (
14692
- e.getAncestors().some((e) => this.preElements.includes(e.name))
14693
- )
14694
- return t;
14695
- if (" " == t.charAt(0)) {
14696
- const n = this._getTouchingViewTextNode(e, !1);
14697
- ((!n || !this._nodeEndsWithSpace(n)) && n) ||
14698
- (t = " " + t.substr(1));
14699
- }
14700
- if (" " == t.charAt(t.length - 1)) {
14701
- const n = this._getTouchingViewTextNode(e, !0);
14702
- (" " != t.charAt(t.length - 2) &&
14703
- n &&
14704
- " " != n.data.charAt(0)) ||
14705
- (t = t.substr(0, t.length - 1) + " ");
14706
- }
14707
- return t.replace(/ {2}/g, "  ");
14708
- }
14709
- _nodeEndsWithSpace(e) {
14710
- if (
14711
- e.getAncestors().some((e) => this.preElements.includes(e.name))
14712
- )
14713
- return !1;
14714
- const t = this._processDataFromViewText(e);
14715
- return " " == t.charAt(t.length - 1);
14716
- }
14717
- _processDataFromDomText(e) {
14718
- let t = e.data;
14719
- if (Mr(e, this.preElements)) return ir(e);
14720
- t = t.replace(/[ \n\t\r]{1,}/g, " ");
14721
- const n = this._getTouchingInlineDomNode(e, !1),
14722
- r = this._getTouchingInlineDomNode(e, !0),
14723
- o = this._checkShouldLeftTrimDomText(n),
14724
- a = this._checkShouldRightTrimDomText(e, r);
14725
- return (
14726
- o && (t = t.replace(/^ /, "")),
14727
- a && (t = t.replace(/ $/, "")),
14728
- (t = (t = ir(new Text(t))).replace(/ \u00A0/g, " ")),
14729
- (/( |\u00A0)\u00A0$/.test(t) ||
14730
- !r ||
14731
- (r.data && " " == r.data.charAt(0))) &&
14732
- (t = t.replace(/\u00A0$/, " ")),
14733
- o && (t = t.replace(/^\u00A0/, " ")),
14734
- t
14735
- );
14736
- }
14737
- _checkShouldLeftTrimDomText(e) {
14738
- return (
14739
- !e ||
14740
- !!ft(e) ||
14741
- /[^\S\u00A0]/.test(e.data.charAt(e.data.length - 1))
14742
- );
14743
- }
14744
- _checkShouldRightTrimDomText(e, t) {
14745
- return !t && !or(e);
14746
- }
14747
- _getTouchingViewTextNode(e, t) {
14748
- const n = new mn({
14749
- startPosition: t ? gn._createAfter(e) : gn._createBefore(e),
14750
- direction: t ? "forward" : "backward",
14751
- });
14752
- for (const e of n) {
14753
- if (e.item.is("containerElement")) return null;
14754
- if (e.item.is("br")) return null;
14755
- if (e.item.is("textProxy")) return e.item;
14756
- }
14757
- return null;
14758
- }
14759
- _getTouchingInlineDomNode(e, t) {
14760
- if (!e.parentNode) return null;
14761
- const n = t ? "nextNode" : "previousNode",
14762
- r = e.ownerDocument,
14763
- o = kr(e)[0],
14764
- a = r.createTreeWalker(
14765
- o,
14766
- NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT,
14767
- {
14768
- acceptNode: (e) =>
14769
- er(e) || "BR" == e.tagName
14770
- ? NodeFilter.FILTER_ACCEPT
14771
- : NodeFilter.FILTER_SKIP,
14772
- }
14773
- );
14774
- a.currentNode = e;
14775
- const i = a[n]();
14776
- if (null !== i) {
14777
- const t = (function (e, t) {
14778
- const n = kr(e),
14779
- r = kr(t);
14780
- let o = 0;
14781
- for (; n[o] == r[o] && n[o]; ) o++;
14782
- return 0 === o ? null : n[o - 1];
14783
- })(e, i);
14784
- if (
14785
- t &&
14786
- !Mr(e, this.blockElements, t) &&
14787
- !Mr(i, this.blockElements, t)
14788
- )
14789
- return i;
14790
- }
14791
- return null;
14792
- }
14793
- }
14794
- function Mr(e, t, n) {
14795
- let r = kr(e);
14796
- return (
14797
- n && (r = r.slice(r.indexOf(n) + 1)),
14798
- r.some((e) => e.tagName && t.includes(e.tagName.toLowerCase()))
14799
- );
14800
- }
14801
- function Er(e, t) {
14802
- for (; e && e != yr.document; ) t(e), (e = e.parentNode);
14803
- }
14804
- function Tr(e) {
14805
- const t = Object.prototype.toString.apply(e);
14806
- return "[object Window]" == t || "[object global]" == t;
14807
- }
14808
- var Sr = Zt({}, xt, {
14809
- listenTo(e, ...t) {
14810
- if (gr(e) || Tr(e)) {
14811
- const n = this._getProxyEmitter(e) || new Dr(e);
14812
- n.attach(...t), (e = n);
14813
- }
14814
- xt.listenTo.call(this, e, ...t);
14815
- },
14816
- stopListening(e, t, n) {
14817
- if (gr(e) || Tr(e)) {
14818
- const t = this._getProxyEmitter(e);
14819
- if (!t) return;
14820
- e = t;
14821
- }
14822
- xt.stopListening.call(this, e, t, n),
14823
- e instanceof Dr && e.detach(t);
14824
- },
14825
- _getProxyEmitter(e) {
14826
- return (function (e, t) {
14827
- return e[wt] && e[wt][t] ? e[wt][t].emitter : null;
14828
- })(this, Lr(e));
14829
- },
14830
- });
14831
- class Dr {
14832
- constructor(e) {
14833
- Mt(this, Lr(e)), (this._domNode = e);
14834
- }
14835
- }
14836
- function Lr(e) {
14837
- return e["data-ck-expando"] || (e["data-ck-expando"] = bt());
14838
- }
14839
- Zt(Dr.prototype, xt, {
14840
- attach(e, t, n = {}) {
14841
- if (this._domListeners && this._domListeners[e]) return;
14842
- const r = this._createDomListener(e, !!n.useCapture);
14843
- this._domNode.addEventListener(e, r, !!n.useCapture),
14844
- this._domListeners || (this._domListeners = {}),
14845
- (this._domListeners[e] = r);
14846
- },
14847
- detach(e) {
14848
- let t;
14849
- !this._domListeners[e] ||
14850
- ((t = this._events[e]) && t.callbacks.length) ||
14851
- this._domListeners[e].removeListener();
14852
- },
14853
- _createDomListener(e, t) {
14854
- const n = (t) => {
14855
- this.fire(e, t);
14856
- };
14857
- return (
14858
- (n.removeListener = () => {
14859
- this._domNode.removeEventListener(e, n, t),
14860
- delete this._domListeners[e];
14861
- }),
14862
- n
14863
- );
14864
- },
14865
- });
14866
- class Cr {
14867
- constructor(e) {
14868
- (this.view = e),
14869
- (this.document = e.document),
14870
- (this.isEnabled = !1);
14871
- }
14872
- enable() {
14873
- this.isEnabled = !0;
14874
- }
14875
- disable() {
14876
- this.isEnabled = !1;
14877
- }
14878
- destroy() {
14879
- this.disable(), this.stopListening();
14880
- }
14881
- }
14882
- function Pr(e) {
14883
- var t = -1,
14884
- n = null == e ? 0 : e.length;
14885
- for (this.__data__ = new J(); ++t < n; ) this.add(e[t]);
14886
- }
14887
- Ct(Cr, Sr),
14888
- (Pr.prototype.add = Pr.prototype.push = function (e) {
14889
- return this.__data__.set(e, "__lodash_hash_undefined__"), this;
14890
- }),
14891
- (Pr.prototype.has = function (e) {
14892
- return this.__data__.has(e);
14893
- });
14894
- var Or = Pr,
14895
- Nr = function (e, t) {
14896
- for (var n = -1, r = null == e ? 0 : e.length; ++n < r; )
14897
- if (t(e[n], n, e)) return !0;
14898
- return !1;
14899
- },
14900
- Ar = function (e, t) {
14901
- return e.has(t);
14902
- },
14903
- Ir = function (e, t, n, r, o, a) {
14904
- var i = 1 & n,
14905
- s = e.length,
14906
- l = t.length;
14907
- if (s != l && !(i && l > s)) return !1;
14908
- var c = a.get(e);
14909
- if (c && a.get(t)) return c == t;
14910
- var u = -1,
14911
- d = !0,
14912
- h = 2 & n ? new Or() : void 0;
14913
- for (a.set(e, t), a.set(t, e); ++u < s; ) {
14914
- var p = e[u],
14915
- f = t[u];
14916
- if (r) var m = i ? r(f, p, u, t, e, a) : r(p, f, u, e, t, a);
14917
- if (void 0 !== m) {
14918
- if (m) continue;
14919
- d = !1;
14920
- break;
14921
- }
14922
- if (h) {
14923
- if (
14924
- !Nr(t, function (e, t) {
14925
- if (!Ar(h, t) && (p === e || o(p, e, n, r, a)))
14926
- return h.push(t);
14927
- })
14928
- ) {
14929
- d = !1;
14930
- break;
14931
- }
14932
- } else if (p !== f && !o(p, f, n, r, a)) {
14933
- d = !1;
14934
- break;
14935
- }
14936
- }
14937
- return a.delete(e), a.delete(t), d;
14938
- },
14939
- Rr = function (e) {
14940
- var t = -1,
14941
- n = Array(e.size);
14942
- return (
14943
- e.forEach(function (e, r) {
14944
- n[++t] = [r, e];
14945
- }),
14946
- n
14947
- );
14948
- },
14949
- Yr = function (e) {
14950
- var t = -1,
14951
- n = Array(e.size);
14952
- return (
14953
- e.forEach(function (e) {
14954
- n[++t] = e;
14955
- }),
14956
- n
14957
- );
14958
- },
14959
- jr = o ? o.prototype : void 0,
14960
- Fr = jr ? jr.valueOf : void 0,
14961
- Hr = Object.prototype.hasOwnProperty,
14962
- zr = "[object Arguments]",
14963
- Br = "[object Array]",
14964
- Ur = "[object Object]",
14965
- Vr = Object.prototype.hasOwnProperty,
14966
- Wr = function (e, t, n, r, o, a) {
14967
- var i = se(e),
14968
- s = se(t),
14969
- l = i ? Br : Je(e),
14970
- c = s ? Br : Je(t),
14971
- u = (l = l == zr ? Ur : l) == Ur,
14972
- d = (c = c == zr ? Ur : c) == Ur,
14973
- h = l == c;
14974
- if (h && Object(le.a)(e)) {
14975
- if (!Object(le.a)(t)) return !1;
14976
- (i = !0), (u = !1);
14977
- }
14978
- if (h && !u)
14979
- return (
14980
- a || (a = new Q()),
14981
- i || ge(e)
14982
- ? Ir(e, t, n, r, o, a)
14983
- : (function (e, t, n, r, o, a, i) {
14984
- switch (n) {
14985
- case "[object DataView]":
14986
- if (
14987
- e.byteLength != t.byteLength ||
14988
- e.byteOffset != t.byteOffset
14989
- )
14990
- return !1;
14991
- (e = e.buffer), (t = t.buffer);
14992
- case "[object ArrayBuffer]":
14993
- return !(
14994
- e.byteLength != t.byteLength ||
14995
- !a(new Qe(e), new Qe(t))
14996
- );
14997
- case "[object Boolean]":
14998
- case "[object Date]":
14999
- case "[object Number]":
15000
- return w(+e, +t);
15001
- case "[object Error]":
15002
- return e.name == t.name && e.message == t.message;
15003
- case "[object RegExp]":
15004
- case "[object String]":
15005
- return e == t + "";
15006
- case "[object Map]":
15007
- var s = Rr;
15008
- case "[object Set]":
15009
- var l = 1 & r;
15010
- if ((s || (s = Yr), e.size != t.size && !l))
15011
- return !1;
15012
- var c = i.get(e);
15013
- if (c) return c == t;
15014
- (r |= 2), i.set(e, t);
15015
- var u = Ir(s(e), s(t), r, o, a, i);
15016
- return i.delete(e), u;
15017
- case "[object Symbol]":
15018
- if (Fr) return Fr.call(e) == Fr.call(t);
15019
- }
15020
- return !1;
15021
- })(e, t, l, n, r, o, a)
15022
- );
15023
- if (!(1 & n)) {
15024
- var p = u && Vr.call(e, "__wrapped__"),
15025
- f = d && Vr.call(t, "__wrapped__");
15026
- if (p || f) {
15027
- var m = p ? e.value() : e,
15028
- g = f ? t.value() : t;
15029
- return a || (a = new Q()), o(m, g, n, r, a);
15030
- }
15031
- }
15032
- return (
15033
- !!h &&
15034
- (a || (a = new Q()),
15035
- (function (e, t, n, r, o, a) {
15036
- var i = 1 & n,
15037
- s = Re(e),
15038
- l = s.length;
15039
- if (l != Re(t).length && !i) return !1;
15040
- for (var c = l; c--; ) {
15041
- var u = s[c];
15042
- if (!(i ? u in t : Hr.call(t, u))) return !1;
15043
- }
15044
- var d = a.get(e);
15045
- if (d && a.get(t)) return d == t;
15046
- var h = !0;
15047
- a.set(e, t), a.set(t, e);
15048
- for (var p = i; ++c < l; ) {
15049
- var f = e[(u = s[c])],
15050
- m = t[u];
15051
- if (r)
15052
- var g = i ? r(m, f, u, t, e, a) : r(f, m, u, e, t, a);
15053
- if (!(void 0 === g ? f === m || o(f, m, n, r, a) : g)) {
15054
- h = !1;
15055
- break;
15056
- }
15057
- p || (p = "constructor" == u);
15058
- }
15059
- if (h && !p) {
15060
- var _ = e.constructor,
15061
- v = t.constructor;
15062
- _ != v &&
15063
- "constructor" in e &&
15064
- "constructor" in t &&
15065
- !(
15066
- "function" == typeof _ &&
15067
- _ instanceof _ &&
15068
- "function" == typeof v &&
15069
- v instanceof v
15070
- ) &&
15071
- (h = !1);
15072
- }
15073
- return a.delete(e), a.delete(t), h;
15074
- })(e, t, n, r, o, a))
15075
- );
15076
- },
15077
- qr = function e(t, n, r, o, a) {
15078
- return (
15079
- t === n ||
15080
- (null == t || null == n || (!f(t) && !f(n))
15081
- ? t != t && n != n
15082
- : Wr(t, n, r, o, e, a))
15083
- );
15084
- },
15085
- Gr = function (e, t, n) {
15086
- var r = (n = "function" == typeof n ? n : void 0)
15087
- ? n(e, t)
15088
- : void 0;
15089
- return void 0 === r ? qr(e, t, void 0, n) : !!r;
15090
- };
15091
- class Jr extends Cr {
15092
- constructor(e) {
15093
- super(e),
15094
- (this._config = {
15095
- childList: !0,
15096
- characterData: !0,
15097
- characterDataOldValue: !0,
15098
- subtree: !0,
15099
- }),
15100
- (this.domConverter = e.domConverter),
15101
- (this.renderer = e._renderer),
15102
- (this._domElements = []),
15103
- (this._mutationObserver = new window.MutationObserver(
15104
- this._onMutations.bind(this)
15105
- ));
15106
- }
15107
- flush() {
15108
- this._onMutations(this._mutationObserver.takeRecords());
15109
- }
15110
- observe(e) {
15111
- this._domElements.push(e),
15112
- this.isEnabled &&
15113
- this._mutationObserver.observe(e, this._config);
15114
- }
15115
- enable() {
15116
- super.enable();
15117
- for (const e of this._domElements)
15118
- this._mutationObserver.observe(e, this._config);
15119
- }
15120
- disable() {
15121
- super.disable(), this._mutationObserver.disconnect();
15122
- }
15123
- destroy() {
15124
- super.destroy(), this._mutationObserver.disconnect();
15125
- }
15126
- _onMutations(e) {
15127
- if (0 === e.length) return;
15128
- const t = this.domConverter,
15129
- n = new Map(),
15130
- r = new Set();
15131
- for (const n of e)
15132
- if ("childList" === n.type) {
15133
- const e = t.mapDomToView(n.target);
15134
- if (e && e.is("uiElement")) continue;
15135
- e && !this._isBogusBrMutation(n) && r.add(e);
15136
- }
15137
- for (const o of e) {
15138
- const e = t.mapDomToView(o.target);
15139
- if (!((e && e.is("uiElement")) || "characterData" !== o.type)) {
15140
- const e = t.findCorrespondingViewText(o.target);
15141
- e && !r.has(e.parent)
15142
- ? n.set(e, {
15143
- type: "text",
15144
- oldText: e.data,
15145
- newText: ir(o.target),
15146
- node: e,
15147
- })
15148
- : !e &&
15149
- or(o.target) &&
15150
- r.add(t.mapDomToView(o.target.parentNode));
15151
- }
15152
- }
15153
- const o = [];
15154
- for (const e of n.values())
15155
- this.renderer.markToSync("text", e.node), o.push(e);
15156
- for (const e of r) {
15157
- const n = t.mapViewToDom(e),
15158
- r = Array.from(e.getChildren()),
15159
- a = Array.from(t.domChildrenToView(n, { withChildren: !1 }));
15160
- Gr(r, a, s) ||
15161
- (this.renderer.markToSync("children", e),
15162
- o.push({
15163
- type: "children",
15164
- oldChildren: r,
15165
- newChildren: a,
15166
- node: e,
15167
- }));
15168
- }
15169
- const a = e[0].target.ownerDocument.getSelection();
15170
- let i = null;
15171
- if (a && a.anchorNode) {
15172
- const e = t.domPositionToView(a.anchorNode, a.anchorOffset),
15173
- n = t.domPositionToView(a.focusNode, a.focusOffset);
15174
- e && n && (i = new yn(e)).setFocus(n);
15175
- }
15176
- function s(e, t) {
15177
- if (!Array.isArray(e))
15178
- return (
15179
- e === t ||
15180
- (!(!e.is("text") || !t.is("text")) && e.data === t.data)
15181
- );
15182
- }
15183
- this.document.fire("mutations", o, i), this.view.forceRender();
15184
- }
15185
- _isBogusBrMutation(e) {
15186
- let t = null;
15187
- return (
15188
- null === e.nextSibling &&
15189
- 0 === e.removedNodes.length &&
15190
- 1 == e.addedNodes.length &&
15191
- (t = this.domConverter.domToView(e.addedNodes[0], {
15192
- withChildren: !1,
15193
- })),
15194
- t && t.is("element", "br")
15195
- );
15196
- }
15197
- }
15198
- class Kr {
15199
- constructor(e, t, n) {
15200
- (this.view = e),
15201
- (this.document = e.document),
15202
- (this.domEvent = t),
15203
- (this.domTarget = t.target),
15204
- Zt(this, n);
15205
- }
15206
- get target() {
15207
- return this.view.domConverter.mapDomToView(this.domTarget);
15208
- }
15209
- preventDefault() {
15210
- this.domEvent.preventDefault();
15211
- }
15212
- stopPropagation() {
15213
- this.domEvent.stopPropagation();
15214
- }
15215
- }
15216
- class Qr extends Cr {
15217
- constructor(e) {
15218
- super(e), (this.useCapture = !1);
15219
- }
15220
- observe(e) {
15221
- ("string" == typeof this.domEventType
15222
- ? [this.domEventType]
15223
- : this.domEventType
15224
- ).forEach((t) => {
15225
- this.listenTo(
15226
- e,
15227
- t,
15228
- (e, t) => {
15229
- this.isEnabled && this.onDomEvent(t);
15230
- },
15231
- { useCapture: this.useCapture }
15232
- );
15233
- });
15234
- }
15235
- fire(e, t, n) {
15236
- this.isEnabled && this.document.fire(e, new Kr(this.view, t, n));
15237
- }
15238
- }
15239
- class Xr extends Qr {
15240
- constructor(e) {
15241
- super(e), (this.domEventType = ["keydown", "keyup"]);
15242
- }
15243
- onDomEvent(e) {
15244
- this.fire(e.type, e, {
15245
- keyCode: e.keyCode,
15246
- altKey: e.altKey,
15247
- ctrlKey: e.ctrlKey || e.metaKey,
15248
- shiftKey: e.shiftKey,
15249
- get keystroke() {
15250
- return jn(this);
15251
- },
15252
- });
15253
- }
15254
- }
15255
- var $r = function () {
15256
- return r.a.Date.now();
15257
- },
15258
- Zr = function (e) {
15259
- return (
15260
- "symbol" == typeof e || (f(e) && "[object Symbol]" == d(e))
15261
- );
15262
- },
15263
- eo = /^\s+|\s+$/g,
15264
- to = /^[-+]0x[0-9a-f]+$/i,
15265
- no = /^0b[01]+$/i,
15266
- ro = /^0o[0-7]+$/i,
15267
- oo = parseInt,
15268
- ao = function (e) {
15269
- if ("number" == typeof e) return e;
15270
- if (Zr(e)) return NaN;
15271
- if (T(e)) {
15272
- var t = "function" == typeof e.valueOf ? e.valueOf() : e;
15273
- e = T(t) ? t + "" : t;
15274
- }
15275
- if ("string" != typeof e) return 0 === e ? e : +e;
15276
- e = e.replace(eo, "");
15277
- var n = no.test(e);
15278
- return n || ro.test(e)
15279
- ? oo(e.slice(2), n ? 2 : 8)
15280
- : to.test(e)
15281
- ? NaN
15282
- : +e;
15283
- },
15284
- io = Math.max,
15285
- so = Math.min,
15286
- lo = function (e, t, n) {
15287
- var r,
15288
- o,
15289
- a,
15290
- i,
15291
- s,
15292
- l,
15293
- c = 0,
15294
- u = !1,
15295
- d = !1,
15296
- h = !0;
15297
- if ("function" != typeof e)
15298
- throw new TypeError("Expected a function");
15299
- function p(t) {
15300
- var n = r,
15301
- a = o;
15302
- return (r = o = void 0), (c = t), (i = e.apply(a, n));
15303
- }
15304
- function f(e) {
15305
- var n = e - l;
15306
- return void 0 === l || n >= t || n < 0 || (d && e - c >= a);
15307
- }
15308
- function m() {
15309
- var e = $r();
15310
- if (f(e)) return g(e);
15311
- s = setTimeout(
15312
- m,
15313
- (function (e) {
15314
- var n = t - (e - l);
15315
- return d ? so(n, a - (e - c)) : n;
15316
- })(e)
15317
- );
15318
- }
15319
- function g(e) {
15320
- return (s = void 0), h && r ? p(e) : ((r = o = void 0), i);
15321
- }
15322
- function _() {
15323
- var e = $r(),
15324
- n = f(e);
15325
- if (((r = arguments), (o = this), (l = e), n)) {
15326
- if (void 0 === s)
15327
- return (function (e) {
15328
- return (c = e), (s = setTimeout(m, t)), u ? p(e) : i;
15329
- })(l);
15330
- if (d) return clearTimeout(s), (s = setTimeout(m, t)), p(l);
15331
- }
15332
- return void 0 === s && (s = setTimeout(m, t)), i;
15333
- }
15334
- return (
15335
- (t = ao(t) || 0),
15336
- T(n) &&
15337
- ((u = !!n.leading),
15338
- (a = (d = "maxWait" in n) ? io(ao(n.maxWait) || 0, t) : a),
15339
- (h = "trailing" in n ? !!n.trailing : h)),
15340
- (_.cancel = function () {
15341
- void 0 !== s && clearTimeout(s),
15342
- (c = 0),
15343
- (r = l = o = s = void 0);
15344
- }),
15345
- (_.flush = function () {
15346
- return void 0 === s ? i : g($r());
15347
- }),
15348
- _
15349
- );
15350
- };
15351
- class co extends Cr {
15352
- constructor(e) {
15353
- super(e),
15354
- (this._fireSelectionChangeDoneDebounced = lo(
15355
- (e) => this.document.fire("selectionChangeDone", e),
15356
- 200
15357
- ));
15358
- }
15359
- observe() {
15360
- const e = this.document;
15361
- e.on(
15362
- "keydown",
15363
- (t, n) => {
15364
- e.selection.isFake &&
15365
- (function (e) {
15366
- return (
15367
- e == Yn.arrowright ||
15368
- e == Yn.arrowleft ||
15369
- e == Yn.arrowup ||
15370
- e == Yn.arrowdown
15371
- );
15372
- })(n.keyCode) &&
15373
- this.isEnabled &&
15374
- (n.preventDefault(), this._handleSelectionMove(n.keyCode));
15375
- },
15376
- { priority: "lowest" }
15377
- );
15378
- }
15379
- destroy() {
15380
- super.destroy(), this._fireSelectionChangeDoneDebounced.cancel();
15381
- }
15382
- _handleSelectionMove(e) {
15383
- const t = this.document.selection,
15384
- n = new yn(t.getRanges(), { backward: t.isBackward, fake: !1 });
15385
- (e != Yn.arrowleft && e != Yn.arrowup) ||
15386
- n.setTo(n.getFirstPosition()),
15387
- (e != Yn.arrowright && e != Yn.arrowdown) ||
15388
- n.setTo(n.getLastPosition());
15389
- const r = {
15390
- oldSelection: t,
15391
- newSelection: n,
15392
- domSelection: null,
15393
- };
15394
- this.document.fire("selectionChange", r),
15395
- this._fireSelectionChangeDoneDebounced(r);
15396
- }
15397
- }
15398
- class uo extends Cr {
15399
- constructor(e) {
15400
- super(e),
15401
- (this.mutationObserver = e.getObserver(Jr)),
15402
- (this.selection = this.document.selection),
15403
- (this.domConverter = e.domConverter),
15404
- (this._documents = new WeakSet()),
15405
- (this._fireSelectionChangeDoneDebounced = lo(
15406
- (e) => this.document.fire("selectionChangeDone", e),
15407
- 200
15408
- )),
15409
- (this._clearInfiniteLoopInterval = setInterval(
15410
- () => this._clearInfiniteLoop(),
15411
- 1e3
15412
- )),
15413
- (this._loopbackCounter = 0);
15414
- }
15415
- observe(e) {
15416
- const t = e.ownerDocument;
15417
- this._documents.has(t) ||
15418
- (this.listenTo(t, "selectionchange", () => {
15419
- this._handleSelectionChange(t);
15420
- }),
15421
- this._documents.add(t));
15422
- }
15423
- destroy() {
15424
- super.destroy(),
15425
- clearInterval(this._clearInfiniteLoopInterval),
15426
- this._fireSelectionChangeDoneDebounced.cancel();
15427
- }
15428
- _handleSelectionChange(e) {
15429
- if (
15430
- !this.isEnabled ||
15431
- (!this.document.isFocused && !this.document.isReadOnly)
15432
- )
15433
- return;
15434
- this.mutationObserver.flush();
15435
- const t = e.defaultView.getSelection(),
15436
- n = this.domConverter.domSelectionToView(t);
15437
- if (
15438
- !(
15439
- (this.selection.isEqual(n) &&
15440
- this.domConverter.isDomSelectionCorrect(t)) ||
15441
- ++this._loopbackCounter > 60
15442
- )
15443
- )
15444
- if (this.selection.isSimilar(n)) this.view.forceRender();
15445
- else {
15446
- const e = {
15447
- oldSelection: this.selection,
15448
- newSelection: n,
15449
- domSelection: t,
15450
- };
15451
- this.document.fire("selectionChange", e),
15452
- this._fireSelectionChangeDoneDebounced(e);
15453
- }
15454
- }
15455
- _clearInfiniteLoop() {
15456
- this._loopbackCounter = 0;
15457
- }
15458
- }
15459
- class ho extends Qr {
15460
- constructor(e) {
15461
- super(e),
15462
- (this.domEventType = ["focus", "blur"]),
15463
- (this.useCapture = !0);
15464
- const t = this.document;
15465
- t.on("focus", () => {
15466
- (t.isFocused = !0),
15467
- (this._renderTimeoutId = setTimeout(
15468
- () => e.forceRender(),
15469
- 50
15470
- ));
15471
- }),
15472
- t.on("blur", (n, r) => {
15473
- const o = t.selection.editableElement;
15474
- (null !== o && o !== r.target) ||
15475
- ((t.isFocused = !1), e.forceRender());
15476
- });
15477
- }
15478
- onDomEvent(e) {
15479
- this.fire(e.type, e);
15480
- }
15481
- destroy() {
15482
- this._renderTimeoutId && clearTimeout(this._renderTimeoutId),
15483
- super.destroy();
15484
- }
15485
- }
15486
- class po extends Qr {
15487
- constructor(e) {
15488
- super(e),
15489
- (this.domEventType = [
15490
- "compositionstart",
15491
- "compositionupdate",
15492
- "compositionend",
15493
- ]);
15494
- const t = this.document;
15495
- t.on("compositionstart", () => {
15496
- t.isComposing = !0;
15497
- }),
15498
- t.on("compositionend", () => {
15499
- t.isComposing = !1;
15500
- });
15501
- }
15502
- onDomEvent(e) {
15503
- this.fire(e.type, e);
15504
- }
15505
- }
15506
- class fo extends Qr {
15507
- constructor(e) {
15508
- super(e), (this.domEventType = ["beforeinput"]);
15509
- }
15510
- onDomEvent(e) {
15511
- this.fire(e.type, e);
15512
- }
15513
- }
15514
- function mo(e) {
15515
- return "[object Range]" == Object.prototype.toString.apply(e);
15516
- }
15517
- function go(e) {
15518
- const t = e.ownerDocument.defaultView.getComputedStyle(e);
15519
- return {
15520
- top: parseInt(t.borderTopWidth, 10),
15521
- right: parseInt(t.borderRightWidth, 10),
15522
- bottom: parseInt(t.borderBottomWidth, 10),
15523
- left: parseInt(t.borderLeftWidth, 10),
15524
- };
15525
- }
15526
- const _o = ["top", "right", "bottom", "left", "width", "height"];
15527
- class vo {
15528
- constructor(e) {
15529
- const t = mo(e);
15530
- if (
15531
- (Object.defineProperty(this, "_source", {
15532
- value: e._source || e,
15533
- writable: !0,
15534
- enumerable: !1,
15535
- }),
15536
- ft(e) || t)
15537
- )
15538
- bo(
15539
- this,
15540
- t ? vo.getDomRangeRects(e)[0] : e.getBoundingClientRect()
15541
- );
15542
- else if (Tr(e)) {
15543
- const { innerWidth: t, innerHeight: n } = e;
15544
- bo(this, {
15545
- top: 0,
15546
- right: t,
15547
- bottom: n,
15548
- left: 0,
15549
- width: t,
15550
- height: n,
15551
- });
15552
- } else bo(this, e);
15553
- }
15554
- clone() {
15555
- return new vo(this);
15556
- }
15557
- moveTo(e, t) {
15558
- return (
15559
- (this.top = t),
15560
- (this.right = e + this.width),
15561
- (this.bottom = t + this.height),
15562
- (this.left = e),
15563
- this
15564
- );
15565
- }
15566
- moveBy(e, t) {
15567
- return (
15568
- (this.top += t),
15569
- (this.right += e),
15570
- (this.left += e),
15571
- (this.bottom += t),
15572
- this
15573
- );
15574
- }
15575
- getIntersection(e) {
15576
- const t = {
15577
- top: Math.max(this.top, e.top),
15578
- right: Math.min(this.right, e.right),
15579
- bottom: Math.min(this.bottom, e.bottom),
15580
- left: Math.max(this.left, e.left),
15581
- };
15582
- return (
15583
- (t.width = t.right - t.left),
15584
- (t.height = t.bottom - t.top),
15585
- t.width < 0 || t.height < 0 ? null : new vo(t)
15586
- );
15587
- }
15588
- getIntersectionArea(e) {
15589
- const t = this.getIntersection(e);
15590
- return t ? t.getArea() : 0;
15591
- }
15592
- getArea() {
15593
- return this.width * this.height;
15594
- }
15595
- getVisible() {
15596
- const e = this._source;
15597
- let t = this.clone();
15598
- if (!yo(e)) {
15599
- let n = e.parentNode || e.commonAncestorContainer;
15600
- for (; n && !yo(n); ) {
15601
- const e = new vo(n),
15602
- r = t.getIntersection(e);
15603
- if (!r) return null;
15604
- r.getArea() < t.getArea() && (t = r), (n = n.parentNode);
15605
- }
15606
- }
15607
- return t;
15608
- }
15609
- isEqual(e) {
15610
- for (const t of _o) if (this[t] !== e[t]) return !1;
15611
- return !0;
15612
- }
15613
- contains(e) {
15614
- const t = this.getIntersection(e);
15615
- return !(!t || !t.isEqual(e));
15616
- }
15617
- excludeScrollbarsAndBorders() {
15618
- const e = this._source;
15619
- let t, n;
15620
- if (Tr(e))
15621
- (t = e.innerWidth - e.document.documentElement.clientWidth),
15622
- (n = e.innerHeight - e.document.documentElement.clientHeight);
15623
- else {
15624
- const r = go(this._source);
15625
- (t = e.offsetWidth - e.clientWidth),
15626
- (n = e.offsetHeight - e.clientHeight),
15627
- this.moveBy(r.left, r.top);
15628
- }
15629
- return (
15630
- (this.width -= t),
15631
- (this.right -= t),
15632
- (this.height -= n),
15633
- (this.bottom -= n),
15634
- this
15635
- );
15636
- }
15637
- static getDomRangeRects(e) {
15638
- const t = [],
15639
- n = Array.from(e.getClientRects());
15640
- if (n.length) for (const e of n) t.push(new vo(e));
15641
- else {
15642
- let n = e.startContainer;
15643
- er(n) && (n = n.parentNode);
15644
- const r = new vo(n.getBoundingClientRect());
15645
- (r.right = r.left), (r.width = 0), t.push(r);
15646
- }
15647
- return t;
15648
- }
15649
- }
15650
- function bo(e, t) {
15651
- for (const n of _o) e[n] = t[n];
15652
- }
15653
- function yo(e) {
15654
- return !!ft(e) && e === e.ownerDocument.body;
15655
- }
15656
- function wo({ target: e, viewportOffset: t = 0 }) {
15657
- const n = Do(e);
15658
- let r = n,
15659
- o = null;
15660
- for (; r; ) {
15661
- let a;
15662
- xo((a = Lo(r == n ? e : o)), () => Co(e, r));
15663
- const i = Co(e, r);
15664
- if ((ko(r, i, t), r.parent != r)) {
15665
- if (((o = r.frameElement), (r = r.parent), !o)) return;
15666
- } else r = null;
15667
- }
15668
- }
15669
- function ko(e, t, n) {
15670
- const r = t.clone().moveBy(0, n),
15671
- o = t.clone().moveBy(0, -n),
15672
- a = new vo(e).excludeScrollbarsAndBorders();
15673
- if (![o, r].every((e) => a.contains(e))) {
15674
- let { scrollX: i, scrollY: s } = e;
15675
- Eo(o, a)
15676
- ? (s -= a.top - t.top + n)
15677
- : Mo(r, a) && (s += t.bottom - a.bottom + n),
15678
- To(t, a)
15679
- ? (i -= a.left - t.left + n)
15680
- : So(t, a) && (i += t.right - a.right + n),
15681
- e.scrollTo(i, s);
15682
- }
15683
- }
15684
- function xo(e, t) {
15685
- const n = Do(e);
15686
- let r, o;
15687
- for (; e != n.document.body; )
15688
- (o = t()),
15689
- (r = new vo(e).excludeScrollbarsAndBorders()).contains(o) ||
15690
- (Eo(o, r)
15691
- ? (e.scrollTop -= r.top - o.top)
15692
- : Mo(o, r) && (e.scrollTop += o.bottom - r.bottom),
15693
- To(o, r)
15694
- ? (e.scrollLeft -= r.left - o.left)
15695
- : So(o, r) && (e.scrollLeft += o.right - r.right)),
15696
- (e = e.parentNode);
15697
- }
15698
- function Mo(e, t) {
15699
- return e.bottom > t.bottom;
15700
- }
15701
- function Eo(e, t) {
15702
- return e.top < t.top;
15703
- }
15704
- function To(e, t) {
15705
- return e.left < t.left;
15706
- }
15707
- function So(e, t) {
15708
- return e.right > t.right;
15709
- }
15710
- function Do(e) {
15711
- return mo(e)
15712
- ? e.startContainer.ownerDocument.defaultView
15713
- : e.ownerDocument.defaultView;
15714
- }
15715
- function Lo(e) {
15716
- if (mo(e)) {
15717
- let t = e.commonAncestorContainer;
15718
- return er(t) && (t = t.parentNode), t;
15719
- }
15720
- return e.parentNode;
15721
- }
15722
- function Co(e, t) {
15723
- const n = Do(e),
15724
- r = new vo(e);
15725
- if (n === t) return r;
15726
- {
15727
- let e = n;
15728
- for (; e != t; ) {
15729
- const t = e.frameElement,
15730
- n = new vo(t).excludeScrollbarsAndBorders();
15731
- r.moveBy(n.left, n.top), (e = e.parent);
15732
- }
15733
- }
15734
- return r;
15735
- }
15736
- Object.assign(
15737
- {},
15738
- {
15739
- scrollViewportToShowTarget: wo,
15740
- scrollAncestorsToShowTarget: function (e) {
15741
- xo(Lo(e), () => new vo(e));
15742
- },
15743
- }
15744
- );
15745
- class Po {
15746
- constructor() {
15747
- (this.document = new xn()),
15748
- (this.domConverter = new xr()),
15749
- (this.domRoots = new Map()),
15750
- this.set("isRenderingInProgress", !1),
15751
- (this._renderer = new _r(
15752
- this.domConverter,
15753
- this.document.selection
15754
- )),
15755
- this._renderer.bind("isFocused").to(this.document),
15756
- (this._initialDomRootAttributes = new WeakMap()),
15757
- (this._observers = new Map()),
15758
- (this._ongoingChange = !1),
15759
- (this._postFixersInProgress = !1),
15760
- (this._renderingDisabled = !1),
15761
- (this._hasChangedSinceTheLastRendering = !1),
15762
- (this._writer = new Vn(this.document)),
15763
- this.addObserver(Jr),
15764
- this.addObserver(uo),
15765
- this.addObserver(ho),
15766
- this.addObserver(Xr),
15767
- this.addObserver(co),
15768
- this.addObserver(po),
15769
- An && this.addObserver(fo),
15770
- (function (e) {
15771
- e.document.on("keydown", cr);
15772
- })(this),
15773
- (function (e) {
15774
- e.document.on("keydown", (t, n) =>
15775
- (function (e, t, n) {
15776
- if (t.keyCode == Yn.arrowright) {
15777
- const e = t.domTarget.ownerDocument.defaultView.getSelection(),
15778
- r = 1 == e.rangeCount && e.getRangeAt(0).collapsed;
15779
- if (r || t.shiftKey) {
15780
- const t = e.focusNode,
15781
- o = e.focusOffset,
15782
- a = n.domPositionToView(t, o);
15783
- if (null === a) return;
15784
- let i = !1;
15785
- const s = a.getLastMatchingPosition(
15786
- (e) => (
15787
- e.item.is("uiElement") && (i = !0),
15788
- !(
15789
- !e.item.is("uiElement") &&
15790
- !e.item.is("attributeElement")
15791
- )
15792
- )
15793
- );
15794
- if (i) {
15795
- const t = n.viewPositionToDom(s);
15796
- r
15797
- ? e.collapse(t.parent, t.offset)
15798
- : e.extend(t.parent, t.offset);
15799
- }
15800
- }
15801
- }
15802
- })(0, n, e.domConverter)
15803
- );
15804
- })(this),
15805
- this.on("render", () => {
15806
- this._render(),
15807
- this.document.fire("layoutChanged"),
15808
- (this._hasChangedSinceTheLastRendering = !1);
15809
- }),
15810
- this.listenTo(this.document.selection, "change", () => {
15811
- this._hasChangedSinceTheLastRendering = !0;
15812
- });
15813
- }
15814
- attachDomRoot(e, t = "main") {
15815
- const n = this.document.getRoot(t);
15816
- n._name = e.tagName.toLowerCase();
15817
- const r = {};
15818
- for (const { name: t, value: o } of Array.from(e.attributes))
15819
- (r[t] = o),
15820
- "class" === t
15821
- ? this._writer.addClass(o.split(" "), n)
15822
- : this._writer.setAttribute(t, o, n);
15823
- this._initialDomRootAttributes.set(e, r);
15824
- const o = () => {
15825
- this._writer.setAttribute("contenteditable", !n.isReadOnly, n),
15826
- n.isReadOnly
15827
- ? this._writer.addClass("ck-read-only", n)
15828
- : this._writer.removeClass("ck-read-only", n);
15829
- };
15830
- o(),
15831
- this.domRoots.set(t, e),
15832
- this.domConverter.bindElements(e, n),
15833
- this._renderer.markToSync("children", n),
15834
- this._renderer.markToSync("attributes", n),
15835
- this._renderer.domDocuments.add(e.ownerDocument),
15836
- n.on("change:children", (e, t) =>
15837
- this._renderer.markToSync("children", t)
15838
- ),
15839
- n.on("change:attributes", (e, t) =>
15840
- this._renderer.markToSync("attributes", t)
15841
- ),
15842
- n.on("change:text", (e, t) =>
15843
- this._renderer.markToSync("text", t)
15844
- ),
15845
- n.on("change:isReadOnly", () => this.change(o)),
15846
- n.on("change", () => {
15847
- this._hasChangedSinceTheLastRendering = !0;
15848
- });
15849
- for (const n of this._observers.values()) n.observe(e, t);
15850
- }
15851
- detachDomRoot(e) {
15852
- const t = this.domRoots.get(e);
15853
- Array.from(t.attributes).forEach(({ name: e }) =>
15854
- t.removeAttribute(e)
15855
- );
15856
- const n = this._initialDomRootAttributes.get(t);
15857
- for (const e in n) t.setAttribute(e, n[e]);
15858
- this.domRoots.delete(e), this.domConverter.unbindDomElement(t);
15859
- }
15860
- getDomRoot(e = "main") {
15861
- return this.domRoots.get(e);
15862
- }
15863
- addObserver(e) {
15864
- let t = this._observers.get(e);
15865
- if (t) return t;
15866
- (t = new e(this)), this._observers.set(e, t);
15867
- for (const [e, n] of this.domRoots) t.observe(n, e);
15868
- return t.enable(), t;
15869
- }
15870
- getObserver(e) {
15871
- return this._observers.get(e);
15872
- }
15873
- disableObservers() {
15874
- for (const e of this._observers.values()) e.disable();
15875
- }
15876
- enableObservers() {
15877
- for (const e of this._observers.values()) e.enable();
15878
- }
15879
- scrollToTheSelection() {
15880
- const e = this.document.selection.getFirstRange();
15881
- e &&
15882
- wo({
15883
- target: this.domConverter.viewRangeToDom(e),
15884
- viewportOffset: 20,
15885
- });
15886
- }
15887
- focus() {
15888
- if (!this.document.isFocused) {
15889
- const e = this.document.selection.editableElement;
15890
- e && (this.domConverter.focus(e), this.forceRender());
15891
- }
15892
- }
15893
- change(e) {
15894
- if (this.isRenderingInProgress || this._postFixersInProgress)
15895
- throw new _t.b(
15896
- "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.",
15897
- this
15898
- );
15899
- if (this._ongoingChange) return e(this._writer);
15900
- this._ongoingChange = !0;
15901
- const t = e(this._writer);
15902
- return (
15903
- (this._ongoingChange = !1),
15904
- !this._renderingDisabled &&
15905
- this._hasChangedSinceTheLastRendering &&
15906
- ((this._postFixersInProgress = !0),
15907
- this.document._callPostFixers(this._writer),
15908
- (this._postFixersInProgress = !1),
15909
- this.fire("render")),
15910
- t
15911
- );
15912
- }
15913
- forceRender() {
15914
- (this._hasChangedSinceTheLastRendering = !0),
15915
- this.change(() => {});
15916
- }
15917
- destroy() {
15918
- for (const e of this._observers.values()) e.destroy();
15919
- this.document.destroy(), this.stopListening();
15920
- }
15921
- createPositionAt(e, t) {
15922
- return gn._createAt(e, t);
15923
- }
15924
- createPositionAfter(e) {
15925
- return gn._createAfter(e);
15926
- }
15927
- createPositionBefore(e) {
15928
- return gn._createBefore(e);
15929
- }
15930
- createRange(e, t) {
15931
- return new _n(e, t);
15932
- }
15933
- createRangeOn(e) {
15934
- return _n._createOn(e);
15935
- }
15936
- createRangeIn(e) {
15937
- return _n._createIn(e);
15938
- }
15939
- createSelection(e, t, n) {
15940
- return new yn(e, t, n);
15941
- }
15942
- _disableRendering(e) {
15943
- (this._renderingDisabled = e), 0 == e && this.change(() => {});
15944
- }
15945
- _render() {
15946
- (this.isRenderingInProgress = !0),
15947
- this.disableObservers(),
15948
- this._renderer.render(),
15949
- this.enableObservers(),
15950
- (this.isRenderingInProgress = !1);
15951
- }
15952
- }
15953
- function Oo(e) {
15954
- return y(e) ? Rt(e) : new Map(e);
15955
- }
15956
- Ct(Po, on);
15957
- class No {
15958
- constructor(e) {
15959
- (this.parent = null), (this._attrs = Oo(e));
15960
- }
15961
- get index() {
15962
- let e;
15963
- if (!this.parent) return null;
15964
- if (null === (e = this.parent.getChildIndex(this)))
15965
- throw new _t.b(
15966
- "model-node-not-found-in-parent: The node's parent does not contain this node.",
15967
- this
15968
- );
15969
- return e;
15970
- }
15971
- get startOffset() {
15972
- let e;
15973
- if (!this.parent) return null;
15974
- if (null === (e = this.parent.getChildStartOffset(this)))
15975
- throw new _t.b(
15976
- "model-node-not-found-in-parent: The node's parent does not contain this node.",
15977
- this
15978
- );
15979
- return e;
15980
- }
15981
- get offsetSize() {
15982
- return 1;
15983
- }
15984
- get endOffset() {
15985
- return this.parent ? this.startOffset + this.offsetSize : null;
15986
- }
15987
- get nextSibling() {
15988
- const e = this.index;
15989
- return (null !== e && this.parent.getChild(e + 1)) || null;
15990
- }
15991
- get previousSibling() {
15992
- const e = this.index;
15993
- return (null !== e && this.parent.getChild(e - 1)) || null;
15994
- }
15995
- get root() {
15996
- let e = this;
15997
- for (; e.parent; ) e = e.parent;
15998
- return e;
15999
- }
16000
- get document() {
16001
- return this.root == this ? null : this.root.document || null;
16002
- }
16003
- getPath() {
16004
- const e = [];
16005
- let t = this;
16006
- for (; t.parent; ) e.unshift(t.startOffset), (t = t.parent);
16007
- return e;
16008
- }
16009
- getAncestors(e = { includeSelf: !1, parentFirst: !1 }) {
16010
- const t = [];
16011
- let n = e.includeSelf ? this : this.parent;
16012
- for (; n; )
16013
- t[e.parentFirst ? "push" : "unshift"](n), (n = n.parent);
16014
- return t;
16015
- }
16016
- getCommonAncestor(e, t = {}) {
16017
- const n = this.getAncestors(t),
16018
- r = e.getAncestors(t);
16019
- let o = 0;
16020
- for (; n[o] == r[o] && n[o]; ) o++;
16021
- return 0 === o ? null : n[o - 1];
16022
- }
16023
- isBefore(e) {
16024
- if (this == e) return !1;
16025
- if (this.root !== e.root) return !1;
16026
- const t = this.getPath(),
16027
- n = e.getPath(),
16028
- r = Pt(t, n);
16029
- switch (r) {
16030
- case "prefix":
16031
- return !0;
16032
- case "extension":
16033
- return !1;
16034
- default:
16035
- return t[r] < n[r];
16036
- }
16037
- }
16038
- isAfter(e) {
16039
- return this != e && this.root === e.root && !this.isBefore(e);
16040
- }
16041
- hasAttribute(e) {
16042
- return this._attrs.has(e);
16043
- }
16044
- getAttribute(e) {
16045
- return this._attrs.get(e);
16046
- }
16047
- getAttributes() {
16048
- return this._attrs.entries();
16049
- }
16050
- getAttributeKeys() {
16051
- return this._attrs.keys();
16052
- }
16053
- toJSON() {
16054
- const e = {};
16055
- return (
16056
- this._attrs.size &&
16057
- (e.attributes = Array.from(this._attrs).reduce(
16058
- (e, t) => ((e[t[0]] = t[1]), e),
16059
- {}
16060
- )),
16061
- e
16062
- );
16063
- }
16064
- is(e) {
16065
- return "node" == e || "model:node" == e;
16066
- }
16067
- _clone() {
16068
- return new No(this._attrs);
16069
- }
16070
- _remove() {
16071
- this.parent._removeChildren(this.index);
16072
- }
16073
- _setAttribute(e, t) {
16074
- this._attrs.set(e, t);
16075
- }
16076
- _setAttributesTo(e) {
16077
- this._attrs = Oo(e);
16078
- }
16079
- _removeAttribute(e) {
16080
- return this._attrs.delete(e);
16081
- }
16082
- _clearAttributes() {
16083
- this._attrs.clear();
16084
- }
16085
- }
16086
- class Ao extends No {
16087
- constructor(e, t) {
16088
- super(t), (this._data = e || "");
16089
- }
16090
- get offsetSize() {
16091
- return this.data.length;
16092
- }
16093
- get data() {
16094
- return this._data;
16095
- }
16096
- is(e) {
16097
- return "text" == e || "model:text" == e || super.is(e);
16098
- }
16099
- toJSON() {
16100
- const e = super.toJSON();
16101
- return (e.data = this.data), e;
16102
- }
16103
- _clone() {
16104
- return new Ao(this.data, this.getAttributes());
16105
- }
16106
- static fromJSON(e) {
16107
- return new Ao(e.data, e.attributes);
16108
- }
16109
- }
16110
- class Io {
16111
- constructor(e, t, n) {
16112
- if (((this.textNode = e), t < 0 || t > e.offsetSize))
16113
- throw new _t.b(
16114
- "model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",
16115
- this
16116
- );
16117
- if (n < 0 || t + n > e.offsetSize)
16118
- throw new _t.b(
16119
- "model-textproxy-wrong-length: Given length value is incorrect.",
16120
- this
16121
- );
16122
- (this.data = e.data.substring(t, t + n)), (this.offsetInText = t);
16123
- }
16124
- get startOffset() {
16125
- return null !== this.textNode.startOffset
16126
- ? this.textNode.startOffset + this.offsetInText
16127
- : null;
16128
- }
16129
- get offsetSize() {
16130
- return this.data.length;
16131
- }
16132
- get endOffset() {
16133
- return null !== this.startOffset
16134
- ? this.startOffset + this.offsetSize
16135
- : null;
16136
- }
16137
- get isPartial() {
16138
- return this.offsetSize !== this.textNode.offsetSize;
16139
- }
16140
- get parent() {
16141
- return this.textNode.parent;
16142
- }
16143
- get root() {
16144
- return this.textNode.root;
16145
- }
16146
- get document() {
16147
- return this.textNode.document;
16148
- }
16149
- is(e) {
16150
- return "textProxy" == e || "model:textProxy" == e;
16151
- }
16152
- getPath() {
16153
- const e = this.textNode.getPath();
16154
- return e.length > 0 && (e[e.length - 1] += this.offsetInText), e;
16155
- }
16156
- getAncestors(e = { includeSelf: !1, parentFirst: !1 }) {
16157
- const t = [];
16158
- let n = e.includeSelf ? this : this.parent;
16159
- for (; n; )
16160
- t[e.parentFirst ? "push" : "unshift"](n), (n = n.parent);
16161
- return t;
16162
- }
16163
- hasAttribute(e) {
16164
- return this.textNode.hasAttribute(e);
16165
- }
16166
- getAttribute(e) {
16167
- return this.textNode.getAttribute(e);
16168
- }
16169
- getAttributes() {
16170
- return this.textNode.getAttributes();
16171
- }
16172
- getAttributeKeys() {
16173
- return this.textNode.getAttributeKeys();
16174
- }
16175
- }
16176
- class Ro {
16177
- constructor(e) {
16178
- (this._nodes = []), e && this._insertNodes(0, e);
16179
- }
16180
- [Symbol.iterator]() {
16181
- return this._nodes[Symbol.iterator]();
16182
- }
16183
- get length() {
16184
- return this._nodes.length;
16185
- }
16186
- get maxOffset() {
16187
- return this._nodes.reduce((e, t) => e + t.offsetSize, 0);
16188
- }
16189
- getNode(e) {
16190
- return this._nodes[e] || null;
16191
- }
16192
- getNodeIndex(e) {
16193
- const t = this._nodes.indexOf(e);
16194
- return -1 == t ? null : t;
16195
- }
16196
- getNodeStartOffset(e) {
16197
- const t = this.getNodeIndex(e);
16198
- return null === t
16199
- ? null
16200
- : this._nodes.slice(0, t).reduce((e, t) => e + t.offsetSize, 0);
16201
- }
16202
- indexToOffset(e) {
16203
- if (e == this._nodes.length) return this.maxOffset;
16204
- const t = this._nodes[e];
16205
- if (!t)
16206
- throw new _t.b(
16207
- "model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.",
16208
- this
16209
- );
16210
- return this.getNodeStartOffset(t);
16211
- }
16212
- offsetToIndex(e) {
16213
- let t = 0;
16214
- for (const n of this._nodes) {
16215
- if (e >= t && e < t + n.offsetSize) return this.getNodeIndex(n);
16216
- t += n.offsetSize;
16217
- }
16218
- if (t != e)
16219
- throw new _t.b(
16220
- "model-nodelist-offset-out-of-bounds: Given offset cannot be found in the node list.",
16221
- this,
16222
- { offset: e, nodeList: this }
16223
- );
16224
- return this.length;
16225
- }
16226
- _insertNodes(e, t) {
16227
- for (const e of t)
16228
- if (!(e instanceof No))
16229
- throw new _t.b(
16230
- "model-nodelist-insertNodes-not-node: Trying to insert an object which is not a Node instance.",
16231
- this
16232
- );
16233
- this._nodes.splice(e, 0, ...t);
16234
- }
16235
- _removeNodes(e, t = 1) {
16236
- return this._nodes.splice(e, t);
16237
- }
16238
- toJSON() {
16239
- return this._nodes.map((e) => e.toJSON());
16240
- }
16241
- }
16242
- class Yo extends No {
16243
- constructor(e, t, n) {
16244
- super(t),
16245
- (this.name = e),
16246
- (this._children = new Ro()),
16247
- n && this._insertChild(0, n);
16248
- }
16249
- get childCount() {
16250
- return this._children.length;
16251
- }
16252
- get maxOffset() {
16253
- return this._children.maxOffset;
16254
- }
16255
- get isEmpty() {
16256
- return 0 === this.childCount;
16257
- }
16258
- is(e, t = null) {
16259
- const n = e.replace(/^model:/, "");
16260
- return t
16261
- ? "element" == n && t == this.name
16262
- : "element" == n || n == this.name || super.is(e);
16263
- }
16264
- getChild(e) {
16265
- return this._children.getNode(e);
16266
- }
16267
- getChildren() {
16268
- return this._children[Symbol.iterator]();
16269
- }
16270
- getChildIndex(e) {
16271
- return this._children.getNodeIndex(e);
16272
- }
16273
- getChildStartOffset(e) {
16274
- return this._children.getNodeStartOffset(e);
16275
- }
16276
- offsetToIndex(e) {
16277
- return this._children.offsetToIndex(e);
16278
- }
16279
- getNodeByPath(e) {
16280
- let t = this;
16281
- for (const n of e) t = t.getChild(t.offsetToIndex(n));
16282
- return t;
16283
- }
16284
- toJSON() {
16285
- const e = super.toJSON();
16286
- if (((e.name = this.name), this._children.length > 0)) {
16287
- e.children = [];
16288
- for (const t of this._children) e.children.push(t.toJSON());
16289
- }
16290
- return e;
16291
- }
16292
- _clone(e = !1) {
16293
- const t = e
16294
- ? Array.from(this._children).map((e) => e._clone(!0))
16295
- : null;
16296
- return new Yo(this.name, this.getAttributes(), t);
16297
- }
16298
- _appendChild(e) {
16299
- this._insertChild(this.childCount, e);
16300
- }
16301
- _insertChild(e, t) {
16302
- const n = (function (e) {
16303
- return "string" == typeof e
16304
- ? [new Ao(e)]
16305
- : (Yt(e) || (e = [e]),
16306
- Array.from(e).map((e) =>
16307
- "string" == typeof e
16308
- ? new Ao(e)
16309
- : e instanceof Io
16310
- ? new Ao(e.data, e.getAttributes())
16311
- : e
16312
- ));
16313
- })(t);
16314
- for (const e of n)
16315
- null !== e.parent && e._remove(), (e.parent = this);
16316
- this._children._insertNodes(e, n);
16317
- }
16318
- _removeChildren(e, t = 1) {
16319
- const n = this._children._removeNodes(e, t);
16320
- for (const e of n) e.parent = null;
16321
- return n;
16322
- }
16323
- static fromJSON(e) {
16324
- let t = null;
16325
- if (e.children) {
16326
- t = [];
16327
- for (const n of e.children)
16328
- n.name ? t.push(Yo.fromJSON(n)) : t.push(Ao.fromJSON(n));
16329
- }
16330
- return new Yo(e.name, e.attributes, t);
16331
- }
16332
- }
16333
- class jo {
16334
- constructor(e = {}) {
16335
- if (!e.boundaries && !e.startPosition)
16336
- throw new _t.b(
16337
- "model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",
16338
- null
16339
- );
16340
- const t = e.direction || "forward";
16341
- if ("forward" != t && "backward" != t)
16342
- throw new _t.b(
16343
- "model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",
16344
- e,
16345
- { direction: t }
16346
- );
16347
- (this.direction = t),
16348
- (this.boundaries = e.boundaries || null),
16349
- e.startPosition
16350
- ? (this.position = e.startPosition.clone())
16351
- : (this.position = Ho._createAt(
16352
- this.boundaries[
16353
- "backward" == this.direction ? "end" : "start"
16354
- ]
16355
- )),
16356
- (this.position.stickiness = "toNone"),
16357
- (this.singleCharacters = !!e.singleCharacters),
16358
- (this.shallow = !!e.shallow),
16359
- (this.ignoreElementEnd = !!e.ignoreElementEnd),
16360
- (this._boundaryStartParent = this.boundaries
16361
- ? this.boundaries.start.parent
16362
- : null),
16363
- (this._boundaryEndParent = this.boundaries
16364
- ? this.boundaries.end.parent
16365
- : null),
16366
- (this._visitedParent = this.position.parent);
16367
- }
16368
- [Symbol.iterator]() {
16369
- return this;
16370
- }
16371
- skip(e) {
16372
- let t, n, r, o;
16373
- do {
16374
- (r = this.position),
16375
- (o = this._visitedParent),
16376
- ({ done: t, value: n } = this.next());
16377
- } while (!t && e(n));
16378
- t || ((this.position = r), (this._visitedParent = o));
16379
- }
16380
- next() {
16381
- return "forward" == this.direction
16382
- ? this._next()
16383
- : this._previous();
16384
- }
16385
- _next() {
16386
- const e = this.position,
16387
- t = this.position.clone(),
16388
- n = this._visitedParent;
16389
- if (null === n.parent && t.offset === n.maxOffset)
16390
- return { done: !0 };
16391
- if (
16392
- n === this._boundaryEndParent &&
16393
- t.offset == this.boundaries.end.offset
16394
- )
16395
- return { done: !0 };
16396
- const r = t.textNode ? t.textNode : t.nodeAfter;
16397
- if (r instanceof Yo)
16398
- return (
16399
- this.shallow
16400
- ? t.offset++
16401
- : (t.path.push(0), (this._visitedParent = r)),
16402
- (this.position = t),
16403
- Fo("elementStart", r, e, t, 1)
16404
- );
16405
- if (r instanceof Ao) {
16406
- let o;
16407
- if (this.singleCharacters) o = 1;
16408
- else {
16409
- let e = r.endOffset;
16410
- this._boundaryEndParent == n &&
16411
- this.boundaries.end.offset < e &&
16412
- (e = this.boundaries.end.offset),
16413
- (o = e - t.offset);
16414
- }
16415
- const a = t.offset - r.startOffset,
16416
- i = new Io(r, a, o);
16417
- return (
16418
- (t.offset += o), (this.position = t), Fo("text", i, e, t, o)
16419
- );
16420
- }
16421
- return (
16422
- t.path.pop(),
16423
- t.offset++,
16424
- (this.position = t),
16425
- (this._visitedParent = n.parent),
16426
- this.ignoreElementEnd ? this._next() : Fo("elementEnd", n, e, t)
16427
- );
16428
- }
16429
- _previous() {
16430
- const e = this.position,
16431
- t = this.position.clone(),
16432
- n = this._visitedParent;
16433
- if (null === n.parent && 0 === t.offset) return { done: !0 };
16434
- if (
16435
- n == this._boundaryStartParent &&
16436
- t.offset == this.boundaries.start.offset
16437
- )
16438
- return { done: !0 };
16439
- const r = t.textNode ? t.textNode : t.nodeBefore;
16440
- if (r instanceof Yo)
16441
- return (
16442
- t.offset--,
16443
- this.shallow
16444
- ? ((this.position = t), Fo("elementStart", r, e, t, 1))
16445
- : (t.path.push(r.maxOffset),
16446
- (this.position = t),
16447
- (this._visitedParent = r),
16448
- this.ignoreElementEnd
16449
- ? this._previous()
16450
- : Fo("elementEnd", r, e, t))
16451
- );
16452
- if (r instanceof Ao) {
16453
- let o;
16454
- if (this.singleCharacters) o = 1;
16455
- else {
16456
- let e = r.startOffset;
16457
- this._boundaryStartParent == n &&
16458
- this.boundaries.start.offset > e &&
16459
- (e = this.boundaries.start.offset),
16460
- (o = t.offset - e);
16461
- }
16462
- const a = t.offset - r.startOffset,
16463
- i = new Io(r, a - o, o);
16464
- return (
16465
- (t.offset -= o), (this.position = t), Fo("text", i, e, t, o)
16466
- );
16467
- }
16468
- return (
16469
- t.path.pop(),
16470
- (this.position = t),
16471
- (this._visitedParent = n.parent),
16472
- Fo("elementStart", n, e, t, 1)
16473
- );
16474
- }
16475
- }
16476
- function Fo(e, t, n, r, o) {
16477
- return {
16478
- done: !1,
16479
- value: {
16480
- type: e,
16481
- item: t,
16482
- previousPosition: n,
16483
- nextPosition: r,
16484
- length: o,
16485
- },
16486
- };
16487
- }
16488
- class Ho {
16489
- constructor(e, t, n = "toNone") {
16490
- if (!e.is("element") && !e.is("documentFragment"))
16491
- throw new _t.b(
16492
- "model-position-root-invalid: Position root invalid.",
16493
- e
16494
- );
16495
- if (!(t instanceof Array) || 0 === t.length)
16496
- throw new _t.b(
16497
- "model-position-path-incorrect-format: Position path must be an array with at least one item.",
16498
- e,
16499
- { path: t }
16500
- );
16501
- (t = e.getPath().concat(t)),
16502
- (e = e.root),
16503
- (this.root = e),
16504
- (this.path = t),
16505
- (this.stickiness = n);
16506
- }
16507
- get offset() {
16508
- return (function (e) {
16509
- var t = null == e ? 0 : e.length;
16510
- return t ? e[t - 1] : void 0;
16511
- })(this.path);
16512
- }
16513
- set offset(e) {
16514
- this.path[this.path.length - 1] = e;
16515
- }
16516
- get parent() {
16517
- let e = this.root;
16518
- for (let t = 0; t < this.path.length - 1; t++)
16519
- if (!(e = e.getChild(e.offsetToIndex(this.path[t]))))
16520
- throw new _t.b(
16521
- "model-position-path-incorrect: The position's path is incorrect.",
16522
- this,
16523
- { position: this }
16524
- );
16525
- if (e.is("text"))
16526
- throw new _t.b(
16527
- "model-position-path-incorrect: The position's path is incorrect.",
16528
- this,
16529
- { position: this }
16530
- );
16531
- return e;
16532
- }
16533
- get index() {
16534
- return this.parent.offsetToIndex(this.offset);
16535
- }
16536
- get textNode() {
16537
- const e = this.parent.getChild(this.index);
16538
- return e instanceof Ao && e.startOffset < this.offset ? e : null;
16539
- }
16540
- get nodeAfter() {
16541
- return null === this.textNode
16542
- ? this.parent.getChild(this.index)
16543
- : null;
16544
- }
16545
- get nodeBefore() {
16546
- return null === this.textNode
16547
- ? this.parent.getChild(this.index - 1)
16548
- : null;
16549
- }
16550
- get isAtStart() {
16551
- return 0 === this.offset;
16552
- }
16553
- get isAtEnd() {
16554
- return this.offset == this.parent.maxOffset;
16555
- }
16556
- compareWith(e) {
16557
- if (this.root != e.root) return "different";
16558
- const t = Pt(this.path, e.path);
16559
- switch (t) {
16560
- case "same":
16561
- return "same";
16562
- case "prefix":
16563
- return "before";
16564
- case "extension":
16565
- return "after";
16566
- default:
16567
- return this.path[t] < e.path[t] ? "before" : "after";
16568
- }
16569
- }
16570
- getLastMatchingPosition(e, t = {}) {
16571
- t.startPosition = this;
16572
- const n = new jo(t);
16573
- return n.skip(e), n.position;
16574
- }
16575
- getParentPath() {
16576
- return this.path.slice(0, -1);
16577
- }
16578
- getAncestors() {
16579
- return this.parent.is("documentFragment")
16580
- ? [this.parent]
16581
- : this.parent.getAncestors({ includeSelf: !0 });
16582
- }
16583
- getCommonPath(e) {
16584
- if (this.root != e.root) return [];
16585
- const t = Pt(this.path, e.path),
16586
- n =
16587
- "string" == typeof t
16588
- ? Math.min(this.path.length, e.path.length)
16589
- : t;
16590
- return this.path.slice(0, n);
16591
- }
16592
- getCommonAncestor(e) {
16593
- const t = this.getAncestors(),
16594
- n = e.getAncestors();
16595
- let r = 0;
16596
- for (; t[r] == n[r] && t[r]; ) r++;
16597
- return 0 === r ? null : t[r - 1];
16598
- }
16599
- getShiftedBy(e) {
16600
- const t = this.clone(),
16601
- n = t.offset + e;
16602
- return (t.offset = n < 0 ? 0 : n), t;
16603
- }
16604
- isAfter(e) {
16605
- return "after" == this.compareWith(e);
16606
- }
16607
- isBefore(e) {
16608
- return "before" == this.compareWith(e);
16609
- }
16610
- isEqual(e) {
16611
- return "same" == this.compareWith(e);
16612
- }
16613
- isTouching(e) {
16614
- let t = null,
16615
- n = null;
16616
- switch (this.compareWith(e)) {
16617
- case "same":
16618
- return !0;
16619
- case "before":
16620
- (t = Ho._createAt(this)), (n = Ho._createAt(e));
16621
- break;
16622
- case "after":
16623
- (t = Ho._createAt(e)), (n = Ho._createAt(this));
16624
- break;
16625
- default:
16626
- return !1;
16627
- }
16628
- let r = t.parent;
16629
- for (; t.path.length + n.path.length; ) {
16630
- if (t.isEqual(n)) return !0;
16631
- if (t.path.length > n.path.length) {
16632
- if (t.offset !== r.maxOffset) return !1;
16633
- (t.path = t.path.slice(0, -1)), (r = r.parent), t.offset++;
16634
- } else {
16635
- if (0 !== n.offset) return !1;
16636
- n.path = n.path.slice(0, -1);
16637
- }
16638
- }
16639
- }
16640
- is(e) {
16641
- return "position" == e || "model:position" == e;
16642
- }
16643
- hasSameParentAs(e) {
16644
- return (
16645
- this.root === e.root &&
16646
- "same" == Pt(this.getParentPath(), e.getParentPath())
16647
- );
16648
- }
16649
- getTransformedByOperation(e) {
16650
- let t;
16651
- switch (e.type) {
16652
- case "insert":
16653
- t = this._getTransformedByInsertOperation(e);
16654
- break;
16655
- case "move":
16656
- case "remove":
16657
- case "reinsert":
16658
- t = this._getTransformedByMoveOperation(e);
16659
- break;
16660
- case "split":
16661
- t = this._getTransformedBySplitOperation(e);
16662
- break;
16663
- case "merge":
16664
- t = this._getTransformedByMergeOperation(e);
16665
- break;
16666
- default:
16667
- t = Ho._createAt(this);
16668
- }
16669
- return t;
16670
- }
16671
- _getTransformedByInsertOperation(e) {
16672
- return this._getTransformedByInsertion(e.position, e.howMany);
16673
- }
16674
- _getTransformedByMoveOperation(e) {
16675
- return this._getTransformedByMove(
16676
- e.sourcePosition,
16677
- e.targetPosition,
16678
- e.howMany
16679
- );
16680
- }
16681
- _getTransformedBySplitOperation(e) {
16682
- const t = e.movedRange;
16683
- return t.containsPosition(this) ||
16684
- (t.start.isEqual(this) && "toNext" == this.stickiness)
16685
- ? this._getCombined(e.splitPosition, e.moveTargetPosition)
16686
- : e.graveyardPosition
16687
- ? this._getTransformedByMove(
16688
- e.graveyardPosition,
16689
- e.insertionPosition,
16690
- 1
16691
- )
16692
- : this._getTransformedByInsertion(e.insertionPosition, 1);
16693
- }
16694
- _getTransformedByMergeOperation(e) {
16695
- const t = e.movedRange;
16696
- let n;
16697
- return (
16698
- t.containsPosition(this) || t.start.isEqual(this)
16699
- ? ((n = this._getCombined(
16700
- e.sourcePosition,
16701
- e.targetPosition
16702
- )),
16703
- e.sourcePosition.isBefore(e.targetPosition) &&
16704
- (n = n._getTransformedByDeletion(e.deletionPosition, 1)))
16705
- : (n = this.isEqual(e.deletionPosition)
16706
- ? Ho._createAt(e.deletionPosition)
16707
- : this._getTransformedByMove(
16708
- e.deletionPosition,
16709
- e.graveyardPosition,
16710
- 1
16711
- )),
16712
- n
16713
- );
16714
- }
16715
- _getTransformedByDeletion(e, t) {
16716
- const n = Ho._createAt(this);
16717
- if (this.root != e.root) return n;
16718
- if ("same" == Pt(e.getParentPath(), this.getParentPath())) {
16719
- if (e.offset < this.offset) {
16720
- if (e.offset + t > this.offset) return null;
16721
- n.offset -= t;
16722
- }
16723
- } else if (
16724
- "prefix" == Pt(e.getParentPath(), this.getParentPath())
16725
- ) {
16726
- const r = e.path.length - 1;
16727
- if (e.offset <= this.path[r]) {
16728
- if (e.offset + t > this.path[r]) return null;
16729
- n.path[r] -= t;
16730
- }
16731
- }
16732
- return n;
16733
- }
16734
- _getTransformedByInsertion(e, t) {
16735
- const n = Ho._createAt(this);
16736
- if (this.root != e.root) return n;
16737
- if ("same" == Pt(e.getParentPath(), this.getParentPath()))
16738
- (e.offset < this.offset ||
16739
- (e.offset == this.offset &&
16740
- "toPrevious" != this.stickiness)) &&
16741
- (n.offset += t);
16742
- else if (
16743
- "prefix" == Pt(e.getParentPath(), this.getParentPath())
16744
- ) {
16745
- const r = e.path.length - 1;
16746
- e.offset <= this.path[r] && (n.path[r] += t);
16747
- }
16748
- return n;
16749
- }
16750
- _getTransformedByMove(e, t, n) {
16751
- if (((t = t._getTransformedByDeletion(e, n)), e.isEqual(t)))
16752
- return Ho._createAt(this);
16753
- const r = this._getTransformedByDeletion(e, n);
16754
- return null === r ||
16755
- (e.isEqual(this) && "toNext" == this.stickiness) ||
16756
- (e.getShiftedBy(n).isEqual(this) &&
16757
- "toPrevious" == this.stickiness)
16758
- ? this._getCombined(e, t)
16759
- : r._getTransformedByInsertion(t, n);
16760
- }
16761
- _getCombined(e, t) {
16762
- const n = e.path.length - 1,
16763
- r = Ho._createAt(t);
16764
- return (
16765
- (r.stickiness = this.stickiness),
16766
- (r.offset = r.offset + this.path[n] - e.offset),
16767
- (r.path = r.path.concat(this.path.slice(n + 1))),
16768
- r
16769
- );
16770
- }
16771
- toJSON() {
16772
- return {
16773
- root: this.root.toJSON(),
16774
- path: Array.from(this.path),
16775
- stickiness: this.stickiness,
16776
- };
16777
- }
16778
- clone() {
16779
- return new this.constructor(
16780
- this.root,
16781
- this.path,
16782
- this.stickiness
16783
- );
16784
- }
16785
- static _createAt(e, t, n = "toNone") {
16786
- if (e instanceof Ho) return new Ho(e.root, e.path, e.stickiness);
16787
- {
16788
- const r = e;
16789
- if ("end" == t) t = r.maxOffset;
16790
- else {
16791
- if ("before" == t) return this._createBefore(r, n);
16792
- if ("after" == t) return this._createAfter(r, n);
16793
- if (0 !== t && !t)
16794
- throw new _t.b(
16795
- "model-createPositionAt-offset-required: Model#createPositionAt() requires the offset when the first parameter is a model item.",
16796
- [this, e]
16797
- );
16798
- }
16799
- if (!r.is("element") && !r.is("documentFragment"))
16800
- throw new _t.b(
16801
- "model-position-parent-incorrect: Position parent have to be a element or document fragment.",
16802
- [this, e]
16803
- );
16804
- const o = r.getPath();
16805
- return o.push(t), new this(r.root, o, n);
16806
- }
16807
- }
16808
- static _createAfter(e, t) {
16809
- if (!e.parent)
16810
- throw new _t.b(
16811
- "model-position-after-root: You cannot make a position after root.",
16812
- [this, e],
16813
- { root: e }
16814
- );
16815
- return this._createAt(e.parent, e.endOffset, t);
16816
- }
16817
- static _createBefore(e, t) {
16818
- if (!e.parent)
16819
- throw new _t.b(
16820
- "model-position-before-root: You cannot make a position before root.",
16821
- e,
16822
- { root: e }
16823
- );
16824
- return this._createAt(e.parent, e.startOffset, t);
16825
- }
16826
- static fromJSON(e, t) {
16827
- if ("$graveyard" === e.root) {
16828
- const n = new Ho(t.graveyard, e.path);
16829
- return (n.stickiness = e.stickiness), n;
16830
- }
16831
- if (!t.getRoot(e.root))
16832
- throw new _t.b(
16833
- "model-position-fromjson-no-root: Cannot create position for document. Root with specified name does not exist.",
16834
- t,
16835
- { rootName: e.root }
16836
- );
16837
- return new Ho(t.getRoot(e.root), e.path, e.stickiness);
16838
- }
16839
- }
16840
- class zo {
16841
- constructor(e, t = null) {
16842
- (this.start = Ho._createAt(e)),
16843
- (this.end = t ? Ho._createAt(t) : Ho._createAt(e)),
16844
- (this.start.stickiness = this.isCollapsed
16845
- ? "toNone"
16846
- : "toNext"),
16847
- (this.end.stickiness = this.isCollapsed
16848
- ? "toNone"
16849
- : "toPrevious");
16850
- }
16851
- *[Symbol.iterator]() {
16852
- yield* new jo({ boundaries: this, ignoreElementEnd: !0 });
16853
- }
16854
- get isCollapsed() {
16855
- return this.start.isEqual(this.end);
16856
- }
16857
- get isFlat() {
16858
- return (
16859
- "same" ==
16860
- Pt(this.start.getParentPath(), this.end.getParentPath())
16861
- );
16862
- }
16863
- get root() {
16864
- return this.start.root;
16865
- }
16866
- containsPosition(e) {
16867
- return e.isAfter(this.start) && e.isBefore(this.end);
16868
- }
16869
- containsRange(e, t = !1) {
16870
- e.isCollapsed && (t = !1);
16871
- const n =
16872
- this.containsPosition(e.start) ||
16873
- (t && this.start.isEqual(e.start)),
16874
- r =
16875
- this.containsPosition(e.end) ||
16876
- (t && this.end.isEqual(e.end));
16877
- return n && r;
16878
- }
16879
- containsItem(e) {
16880
- const t = Ho._createBefore(e);
16881
- return this.containsPosition(t) || this.start.isEqual(t);
16882
- }
16883
- is(e) {
16884
- return "range" == e || "model:range" == e;
16885
- }
16886
- isEqual(e) {
16887
- return this.start.isEqual(e.start) && this.end.isEqual(e.end);
16888
- }
16889
- isIntersecting(e) {
16890
- return this.start.isBefore(e.end) && this.end.isAfter(e.start);
16891
- }
16892
- getDifference(e) {
16893
- const t = [];
16894
- return (
16895
- this.isIntersecting(e)
16896
- ? (this.containsPosition(e.start) &&
16897
- t.push(new zo(this.start, e.start)),
16898
- this.containsPosition(e.end) &&
16899
- t.push(new zo(e.end, this.end)))
16900
- : t.push(new zo(this.start, this.end)),
16901
- t
16902
- );
16903
- }
16904
- getIntersection(e) {
16905
- if (this.isIntersecting(e)) {
16906
- let t = this.start,
16907
- n = this.end;
16908
- return (
16909
- this.containsPosition(e.start) && (t = e.start),
16910
- this.containsPosition(e.end) && (n = e.end),
16911
- new zo(t, n)
16912
- );
16913
- }
16914
- return null;
16915
- }
16916
- getMinimalFlatRanges() {
16917
- const e = [],
16918
- t = this.start.getCommonPath(this.end).length,
16919
- n = Ho._createAt(this.start);
16920
- let r = n.parent;
16921
- for (; n.path.length > t + 1; ) {
16922
- const t = r.maxOffset - n.offset;
16923
- 0 !== t && e.push(new zo(n, n.getShiftedBy(t))),
16924
- (n.path = n.path.slice(0, -1)),
16925
- n.offset++,
16926
- (r = r.parent);
16927
- }
16928
- for (; n.path.length <= this.end.path.length; ) {
16929
- const t = this.end.path[n.path.length - 1],
16930
- r = t - n.offset;
16931
- 0 !== r && e.push(new zo(n, n.getShiftedBy(r))),
16932
- (n.offset = t),
16933
- n.path.push(0);
16934
- }
16935
- return e;
16936
- }
16937
- getWalker(e = {}) {
16938
- return (e.boundaries = this), new jo(e);
16939
- }
16940
- *getItems(e = {}) {
16941
- (e.boundaries = this), (e.ignoreElementEnd = !0);
16942
- const t = new jo(e);
16943
- for (const e of t) yield e.item;
16944
- }
16945
- *getPositions(e = {}) {
16946
- e.boundaries = this;
16947
- const t = new jo(e);
16948
- yield t.position;
16949
- for (const e of t) yield e.nextPosition;
16950
- }
16951
- getTransformedByOperation(e) {
16952
- switch (e.type) {
16953
- case "insert":
16954
- return this._getTransformedByInsertOperation(e);
16955
- case "move":
16956
- case "remove":
16957
- case "reinsert":
16958
- return this._getTransformedByMoveOperation(e);
16959
- case "split":
16960
- return [this._getTransformedBySplitOperation(e)];
16961
- case "merge":
16962
- return [this._getTransformedByMergeOperation(e)];
16963
- }
16964
- return [new zo(this.start, this.end)];
16965
- }
16966
- getTransformedByOperations(e) {
16967
- const t = [new zo(this.start, this.end)];
16968
- for (const n of e)
16969
- for (let e = 0; e < t.length; e++) {
16970
- const r = t[e].getTransformedByOperation(n);
16971
- t.splice(e, 1, ...r), (e += r.length - 1);
16972
- }
16973
- for (let e = 0; e < t.length; e++) {
16974
- const n = t[e];
16975
- for (let r = e + 1; r < t.length; r++) {
16976
- const e = t[r];
16977
- (n.containsRange(e) || e.containsRange(n) || n.isEqual(e)) &&
16978
- t.splice(r, 1);
16979
- }
16980
- }
16981
- return t;
16982
- }
16983
- getCommonAncestor() {
16984
- return this.start.getCommonAncestor(this.end);
16985
- }
16986
- toJSON() {
16987
- return { start: this.start.toJSON(), end: this.end.toJSON() };
16988
- }
16989
- clone() {
16990
- return new this.constructor(this.start, this.end);
16991
- }
16992
- _getTransformedByInsertOperation(e, t = !1) {
16993
- return this._getTransformedByInsertion(e.position, e.howMany, t);
16994
- }
16995
- _getTransformedByMoveOperation(e, t = !1) {
16996
- const n = e.sourcePosition,
16997
- r = e.howMany,
16998
- o = e.targetPosition;
16999
- return this._getTransformedByMove(n, o, r, t);
17000
- }
17001
- _getTransformedBySplitOperation(e) {
17002
- const t = this.start._getTransformedBySplitOperation(e);
17003
- let n = this.end._getTransformedBySplitOperation(e);
17004
- return (
17005
- this.end.isEqual(e.insertionPosition) &&
17006
- (n = this.end.getShiftedBy(1)),
17007
- t.root != n.root && (n = this.end.getShiftedBy(-1)),
17008
- new zo(t, n)
17009
- );
17010
- }
17011
- _getTransformedByMergeOperation(e) {
17012
- if (
17013
- this.start.isEqual(e.targetPosition) &&
17014
- this.end.isEqual(e.deletionPosition)
17015
- )
17016
- return new zo(this.start);
17017
- let t = this.start._getTransformedByMergeOperation(e),
17018
- n = this.end._getTransformedByMergeOperation(e);
17019
- return (
17020
- t.root != n.root && (n = this.end.getShiftedBy(-1)),
17021
- t.isAfter(n)
17022
- ? (e.sourcePosition.isBefore(e.targetPosition)
17023
- ? ((t = Ho._createAt(n)).offset = 0)
17024
- : (e.deletionPosition.isEqual(t) ||
17025
- (n = e.deletionPosition),
17026
- (t = e.targetPosition)),
17027
- new zo(t, n))
17028
- : new zo(t, n)
17029
- );
17030
- }
17031
- _getTransformedByInsertion(e, t, n = !1) {
17032
- if (n && this.containsPosition(e))
17033
- return [
17034
- new zo(this.start, e),
17035
- new zo(
17036
- e.getShiftedBy(t),
17037
- this.end._getTransformedByInsertion(e, t)
17038
- ),
17039
- ];
17040
- {
17041
- const n = new zo(this.start, this.end);
17042
- return (
17043
- (n.start = n.start._getTransformedByInsertion(e, t)),
17044
- (n.end = n.end._getTransformedByInsertion(e, t)),
17045
- [n]
17046
- );
17047
- }
17048
- }
17049
- _getTransformedByMove(e, t, n, r = !1) {
17050
- if (this.isCollapsed) {
17051
- const r = this.start._getTransformedByMove(e, t, n);
17052
- return [new zo(r)];
17053
- }
17054
- const o = zo._createFromPositionAndShift(e, n),
17055
- a = t._getTransformedByDeletion(e, n);
17056
- if (
17057
- this.containsPosition(t) &&
17058
- !r &&
17059
- (o.containsPosition(this.start) || o.containsPosition(this.end))
17060
- ) {
17061
- const r = this.start._getTransformedByMove(e, t, n),
17062
- o = this.end._getTransformedByMove(e, t, n);
17063
- return [new zo(r, o)];
17064
- }
17065
- let i;
17066
- const s = this.getDifference(o);
17067
- let l = null;
17068
- const c = this.getIntersection(o);
17069
- if (
17070
- (1 == s.length
17071
- ? (l = new zo(
17072
- s[0].start._getTransformedByDeletion(e, n),
17073
- s[0].end._getTransformedByDeletion(e, n)
17074
- ))
17075
- : 2 == s.length &&
17076
- (l = new zo(
17077
- this.start,
17078
- this.end._getTransformedByDeletion(e, n)
17079
- )),
17080
- (i = l
17081
- ? l._getTransformedByInsertion(a, n, null !== c || r)
17082
- : []),
17083
- c)
17084
- ) {
17085
- const e = new zo(
17086
- c.start._getCombined(o.start, a),
17087
- c.end._getCombined(o.start, a)
17088
- );
17089
- 2 == i.length ? i.splice(1, 0, e) : i.push(e);
17090
- }
17091
- return i;
17092
- }
17093
- _getTransformedByDeletion(e, t) {
17094
- let n = this.start._getTransformedByDeletion(e, t),
17095
- r = this.end._getTransformedByDeletion(e, t);
17096
- return null == n && null == r
17097
- ? null
17098
- : (null == n && (n = e), null == r && (r = e), new zo(n, r));
17099
- }
17100
- static _createFromPositionAndShift(e, t) {
17101
- const n = e,
17102
- r = e.getShiftedBy(t);
17103
- return t > 0 ? new this(n, r) : new this(r, n);
17104
- }
17105
- static _createIn(e) {
17106
- return new this(Ho._createAt(e, 0), Ho._createAt(e, e.maxOffset));
17107
- }
17108
- static _createOn(e) {
17109
- return this._createFromPositionAndShift(
17110
- Ho._createBefore(e),
17111
- e.offsetSize
17112
- );
17113
- }
17114
- static _createFromRanges(e) {
17115
- if (0 === e.length)
17116
- throw new _t.b(
17117
- "range-create-from-ranges-empty-array: At least one range has to be passed.",
17118
- null
17119
- );
17120
- if (1 == e.length) return e[0].clone();
17121
- const t = e[0];
17122
- e.sort((e, t) => (e.start.isAfter(t.start) ? 1 : -1));
17123
- const n = e.indexOf(t),
17124
- r = new this(t.start, t.end);
17125
- if (n > 0)
17126
- for (let t = n - 1; e[t].end.isEqual(r.start); t++)
17127
- r.start = Ho._createAt(e[t].start);
17128
- for (
17129
- let t = n + 1;
17130
- t < e.length && e[t].start.isEqual(r.end);
17131
- t++
17132
- )
17133
- r.end = Ho._createAt(e[t].end);
17134
- return r;
17135
- }
17136
- static fromJSON(e, t) {
17137
- return new this(Ho.fromJSON(e.start, t), Ho.fromJSON(e.end, t));
17138
- }
17139
- }
17140
- class Bo {
17141
- constructor() {
17142
- (this._modelToViewMapping = new WeakMap()),
17143
- (this._viewToModelMapping = new WeakMap()),
17144
- (this._viewToModelLengthCallbacks = new Map()),
17145
- (this._markerNameToElements = new Map()),
17146
- (this._elementToMarkerNames = new Map()),
17147
- (this._unboundMarkerNames = new Set()),
17148
- this.on(
17149
- "modelToViewPosition",
17150
- (e, t) => {
17151
- if (t.viewPosition) return;
17152
- const n = this._modelToViewMapping.get(
17153
- t.modelPosition.parent
17154
- );
17155
- t.viewPosition = this._findPositionIn(
17156
- n,
17157
- t.modelPosition.offset
17158
- );
17159
- },
17160
- { priority: "low" }
17161
- ),
17162
- this.on(
17163
- "viewToModelPosition",
17164
- (e, t) => {
17165
- if (t.modelPosition) return;
17166
- const n = this.findMappedViewAncestor(t.viewPosition),
17167
- r = this._viewToModelMapping.get(n),
17168
- o = this._toModelOffset(
17169
- t.viewPosition.parent,
17170
- t.viewPosition.offset,
17171
- n
17172
- );
17173
- t.modelPosition = Ho._createAt(r, o);
17174
- },
17175
- { priority: "low" }
17176
- );
17177
- }
17178
- bindElements(e, t) {
17179
- this._modelToViewMapping.set(e, t),
17180
- this._viewToModelMapping.set(t, e);
17181
- }
17182
- unbindViewElement(e) {
17183
- const t = this.toModelElement(e);
17184
- if (
17185
- (this._viewToModelMapping.delete(e),
17186
- this._elementToMarkerNames.has(e))
17187
- )
17188
- for (const t of this._elementToMarkerNames.get(e))
17189
- this._unboundMarkerNames.add(t);
17190
- this._modelToViewMapping.get(t) == e &&
17191
- this._modelToViewMapping.delete(t);
17192
- }
17193
- unbindModelElement(e) {
17194
- const t = this.toViewElement(e);
17195
- this._modelToViewMapping.delete(e),
17196
- this._viewToModelMapping.get(t) == e &&
17197
- this._viewToModelMapping.delete(t);
17198
- }
17199
- bindElementToMarker(e, t) {
17200
- const n = this._markerNameToElements.get(t) || new Set();
17201
- n.add(e);
17202
- const r = this._elementToMarkerNames.get(e) || new Set();
17203
- r.add(t),
17204
- this._markerNameToElements.set(t, n),
17205
- this._elementToMarkerNames.set(e, r);
17206
- }
17207
- unbindElementFromMarkerName(e, t) {
17208
- const n = this._markerNameToElements.get(t);
17209
- n &&
17210
- (n.delete(e),
17211
- 0 == n.size && this._markerNameToElements.delete(t));
17212
- const r = this._elementToMarkerNames.get(e);
17213
- r &&
17214
- (r.delete(t),
17215
- 0 == r.size && this._elementToMarkerNames.delete(e));
17216
- }
17217
- flushUnboundMarkerNames() {
17218
- const e = Array.from(this._unboundMarkerNames);
17219
- return this._unboundMarkerNames.clear(), e;
17220
- }
17221
- clearBindings() {
17222
- (this._modelToViewMapping = new WeakMap()),
17223
- (this._viewToModelMapping = new WeakMap()),
17224
- (this._markerNameToElements = new Map()),
17225
- (this._elementToMarkerNames = new Map()),
17226
- (this._unboundMarkerNames = new Set());
17227
- }
17228
- toModelElement(e) {
17229
- return this._viewToModelMapping.get(e);
17230
- }
17231
- toViewElement(e) {
17232
- return this._modelToViewMapping.get(e);
17233
- }
17234
- toModelRange(e) {
17235
- return new zo(
17236
- this.toModelPosition(e.start),
17237
- this.toModelPosition(e.end)
17238
- );
17239
- }
17240
- toViewRange(e) {
17241
- return new _n(
17242
- this.toViewPosition(e.start),
17243
- this.toViewPosition(e.end)
17244
- );
17245
- }
17246
- toModelPosition(e) {
17247
- const t = { viewPosition: e, mapper: this };
17248
- return this.fire("viewToModelPosition", t), t.modelPosition;
17249
- }
17250
- toViewPosition(e, t = { isPhantom: !1 }) {
17251
- const n = {
17252
- modelPosition: e,
17253
- mapper: this,
17254
- isPhantom: t.isPhantom,
17255
- };
17256
- return this.fire("modelToViewPosition", n), n.viewPosition;
17257
- }
17258
- markerNameToElements(e) {
17259
- const t = this._markerNameToElements.get(e);
17260
- if (!t) return null;
17261
- const n = new Set();
17262
- for (const e of t)
17263
- if (e.is("attributeElement"))
17264
- for (const t of e.getElementsWithSameId()) n.add(t);
17265
- else n.add(e);
17266
- return n;
17267
- }
17268
- registerViewToModelLength(e, t) {
17269
- this._viewToModelLengthCallbacks.set(e, t);
17270
- }
17271
- findMappedViewAncestor(e) {
17272
- let t = e.parent;
17273
- for (; !this._viewToModelMapping.has(t); ) t = t.parent;
17274
- return t;
17275
- }
17276
- _toModelOffset(e, t, n) {
17277
- if (n != e)
17278
- return (
17279
- this._toModelOffset(e.parent, e.index, n) +
17280
- this._toModelOffset(e, t, e)
17281
- );
17282
- if (e.is("text")) return t;
17283
- let r = 0;
17284
- for (let n = 0; n < t; n++)
17285
- r += this.getModelLength(e.getChild(n));
17286
- return r;
17287
- }
17288
- getModelLength(e) {
17289
- if (this._viewToModelLengthCallbacks.get(e.name))
17290
- return this._viewToModelLengthCallbacks.get(e.name)(e);
17291
- if (this._viewToModelMapping.has(e)) return 1;
17292
- if (e.is("text")) return e.data.length;
17293
- if (e.is("uiElement")) return 0;
17294
- {
17295
- let t = 0;
17296
- for (const n of e.getChildren()) t += this.getModelLength(n);
17297
- return t;
17298
- }
17299
- }
17300
- _findPositionIn(e, t) {
17301
- let n,
17302
- r = 0,
17303
- o = 0,
17304
- a = 0;
17305
- if (e.is("text")) return new gn(e, t);
17306
- for (; o < t; )
17307
- (n = e.getChild(a)), (o += r = this.getModelLength(n)), a++;
17308
- return o == t
17309
- ? this._moveViewPositionToTextNode(new gn(e, a))
17310
- : this._findPositionIn(n, t - (o - r));
17311
- }
17312
- _moveViewPositionToTextNode(e) {
17313
- const t = e.nodeBefore,
17314
- n = e.nodeAfter;
17315
- return t instanceof At
17316
- ? new gn(t, t.data.length)
17317
- : n instanceof At
17318
- ? new gn(n, 0)
17319
- : e;
17320
- }
17321
- }
17322
- Ct(Bo, xt);
17323
- class Uo {
17324
- constructor() {
17325
- (this._consumable = new Map()),
17326
- (this._textProxyRegistry = new Map());
17327
- }
17328
- add(e, t) {
17329
- (t = Vo(t)),
17330
- e instanceof Io && (e = this._getSymbolForTextProxy(e)),
17331
- this._consumable.has(e) || this._consumable.set(e, new Map()),
17332
- this._consumable.get(e).set(t, !0);
17333
- }
17334
- consume(e, t) {
17335
- return (
17336
- (t = Vo(t)),
17337
- e instanceof Io && (e = this._getSymbolForTextProxy(e)),
17338
- !!this.test(e, t) && (this._consumable.get(e).set(t, !1), !0)
17339
- );
17340
- }
17341
- test(e, t) {
17342
- (t = Vo(t)),
17343
- e instanceof Io && (e = this._getSymbolForTextProxy(e));
17344
- const n = this._consumable.get(e);
17345
- if (void 0 === n) return null;
17346
- const r = n.get(t);
17347
- return void 0 === r ? null : r;
17348
- }
17349
- revert(e, t) {
17350
- (t = Vo(t)),
17351
- e instanceof Io && (e = this._getSymbolForTextProxy(e));
17352
- const n = this.test(e, t);
17353
- return !1 === n
17354
- ? (this._consumable.get(e).set(t, !0), !0)
17355
- : !0 !== n && null;
17356
- }
17357
- _getSymbolForTextProxy(e) {
17358
- let t = null;
17359
- const n = this._textProxyRegistry.get(e.startOffset);
17360
- if (n) {
17361
- const r = n.get(e.endOffset);
17362
- r && (t = r.get(e.parent));
17363
- }
17364
- return (
17365
- t ||
17366
- (t = this._addSymbolForTextProxy(
17367
- e.startOffset,
17368
- e.endOffset,
17369
- e.parent
17370
- )),
17371
- t
17372
- );
17373
- }
17374
- _addSymbolForTextProxy(e, t, n) {
17375
- const r = Symbol("textProxySymbol");
17376
- let o, a;
17377
- return (
17378
- (o = this._textProxyRegistry.get(e)) ||
17379
- ((o = new Map()), this._textProxyRegistry.set(e, o)),
17380
- (a = o.get(t)) || ((a = new Map()), o.set(t, a)),
17381
- a.set(n, r),
17382
- r
17383
- );
17384
- }
17385
- }
17386
- function Vo(e) {
17387
- const t = e.split(":");
17388
- return t.length > 1 ? t[0] + ":" + t[1] : t[0];
17389
- }
17390
- class Wo {
17391
- constructor(e) {
17392
- this.conversionApi = Zt({ dispatcher: this }, e);
17393
- }
17394
- convertChanges(e, t, n) {
17395
- for (const t of e.getMarkersToRemove())
17396
- this.convertMarkerRemove(t.name, t.range, n);
17397
- for (const t of e.getChanges())
17398
- "insert" == t.type
17399
- ? this.convertInsert(
17400
- zo._createFromPositionAndShift(t.position, t.length),
17401
- n
17402
- )
17403
- : "remove" == t.type
17404
- ? this.convertRemove(t.position, t.length, t.name, n)
17405
- : this.convertAttribute(
17406
- t.range,
17407
- t.attributeKey,
17408
- t.attributeOldValue,
17409
- t.attributeNewValue,
17410
- n
17411
- );
17412
- for (const e of this.conversionApi.mapper.flushUnboundMarkerNames()) {
17413
- const r = t.get(e).getRange();
17414
- this.convertMarkerRemove(e, r, n),
17415
- this.convertMarkerAdd(e, r, n);
17416
- }
17417
- for (const t of e.getMarkersToAdd())
17418
- this.convertMarkerAdd(t.name, t.range, n);
17419
- }
17420
- convertInsert(e, t) {
17421
- (this.conversionApi.writer = t),
17422
- (this.conversionApi.consumable = this._createInsertConsumable(
17423
- e
17424
- ));
17425
- for (const t of e) {
17426
- const e = t.item,
17427
- n = {
17428
- item: e,
17429
- range: zo._createFromPositionAndShift(
17430
- t.previousPosition,
17431
- t.length
17432
- ),
17433
- };
17434
- this._testAndFire("insert", n);
17435
- for (const t of e.getAttributeKeys())
17436
- (n.attributeKey = t),
17437
- (n.attributeOldValue = null),
17438
- (n.attributeNewValue = e.getAttribute(t)),
17439
- this._testAndFire("attribute:" + t, n);
17440
- }
17441
- this._clearConversionApi();
17442
- }
17443
- convertRemove(e, t, n, r) {
17444
- (this.conversionApi.writer = r),
17445
- this.fire(
17446
- "remove:" + n,
17447
- { position: e, length: t },
17448
- this.conversionApi
17449
- ),
17450
- this._clearConversionApi();
17451
- }
17452
- convertAttribute(e, t, n, r, o) {
17453
- (this.conversionApi.writer = o),
17454
- (this.conversionApi.consumable = this._createConsumableForRange(
17455
- e,
17456
- "attribute:" + t
17457
- ));
17458
- for (const o of e) {
17459
- const e = {
17460
- item: o.item,
17461
- range: zo._createFromPositionAndShift(
17462
- o.previousPosition,
17463
- o.length
17464
- ),
17465
- attributeKey: t,
17466
- attributeOldValue: n,
17467
- attributeNewValue: r,
17468
- };
17469
- this._testAndFire("attribute:" + t, e);
17470
- }
17471
- this._clearConversionApi();
17472
- }
17473
- convertSelection(e, t, n) {
17474
- const r = Array.from(
17475
- t.getMarkersAtPosition(e.getFirstPosition())
17476
- );
17477
- if (
17478
- ((this.conversionApi.writer = n),
17479
- (this.conversionApi.consumable = this._createSelectionConsumable(
17480
- e,
17481
- r
17482
- )),
17483
- this.fire("selection", { selection: e }, this.conversionApi),
17484
- e.isCollapsed)
17485
- ) {
17486
- for (const t of r) {
17487
- const n = t.getRange();
17488
- if (!qo(e.getFirstPosition(), t, this.conversionApi.mapper))
17489
- continue;
17490
- const r = { item: e, markerName: t.name, markerRange: n };
17491
- this.conversionApi.consumable.test(
17492
- e,
17493
- "addMarker:" + t.name
17494
- ) && this.fire("addMarker:" + t.name, r, this.conversionApi);
17495
- }
17496
- for (const t of e.getAttributeKeys()) {
17497
- const n = {
17498
- item: e,
17499
- range: e.getFirstRange(),
17500
- attributeKey: t,
17501
- attributeOldValue: null,
17502
- attributeNewValue: e.getAttribute(t),
17503
- };
17504
- this.conversionApi.consumable.test(
17505
- e,
17506
- "attribute:" + n.attributeKey
17507
- ) &&
17508
- this.fire(
17509
- "attribute:" + n.attributeKey + ":$text",
17510
- n,
17511
- this.conversionApi
17512
- );
17513
- }
17514
- this._clearConversionApi();
17515
- }
17516
- }
17517
- convertMarkerAdd(e, t, n) {
17518
- if (!t.root.document || "$graveyard" == t.root.rootName) return;
17519
- this.conversionApi.writer = n;
17520
- const r = "addMarker:" + e,
17521
- o = new Uo();
17522
- if (
17523
- (o.add(t, r),
17524
- (this.conversionApi.consumable = o),
17525
- this.fire(
17526
- r,
17527
- { markerName: e, markerRange: t },
17528
- this.conversionApi
17529
- ),
17530
- o.test(t, r))
17531
- ) {
17532
- this.conversionApi.consumable = this._createConsumableForRange(
17533
- t,
17534
- r
17535
- );
17536
- for (const n of t.getItems()) {
17537
- if (!this.conversionApi.consumable.test(n, r)) continue;
17538
- const o = {
17539
- item: n,
17540
- range: zo._createOn(n),
17541
- markerName: e,
17542
- markerRange: t,
17543
- };
17544
- this.fire(r, o, this.conversionApi);
17545
- }
17546
- this._clearConversionApi();
17547
- }
17548
- }
17549
- convertMarkerRemove(e, t, n) {
17550
- t.root.document &&
17551
- "$graveyard" != t.root.rootName &&
17552
- ((this.conversionApi.writer = n),
17553
- this.fire(
17554
- "removeMarker:" + e,
17555
- { markerName: e, markerRange: t },
17556
- this.conversionApi
17557
- ),
17558
- this._clearConversionApi());
17559
- }
17560
- _createInsertConsumable(e) {
17561
- const t = new Uo();
17562
- for (const n of e) {
17563
- const e = n.item;
17564
- t.add(e, "insert");
17565
- for (const n of e.getAttributeKeys())
17566
- t.add(e, "attribute:" + n);
17567
- }
17568
- return t;
17569
- }
17570
- _createConsumableForRange(e, t) {
17571
- const n = new Uo();
17572
- for (const r of e.getItems()) n.add(r, t);
17573
- return n;
17574
- }
17575
- _createSelectionConsumable(e, t) {
17576
- const n = new Uo();
17577
- n.add(e, "selection");
17578
- for (const r of t) n.add(e, "addMarker:" + r.name);
17579
- for (const t of e.getAttributeKeys()) n.add(e, "attribute:" + t);
17580
- return n;
17581
- }
17582
- _testAndFire(e, t) {
17583
- if (!this.conversionApi.consumable.test(t.item, e)) return;
17584
- const n = t.item.name || "$text";
17585
- this.fire(e + ":" + n, t, this.conversionApi);
17586
- }
17587
- _clearConversionApi() {
17588
- delete this.conversionApi.writer,
17589
- delete this.conversionApi.consumable;
17590
- }
17591
- }
17592
- function qo(e, t, n) {
17593
- const r = t.getRange(),
17594
- o = Array.from(e.getAncestors());
17595
- return (
17596
- o.shift(),
17597
- o.reverse(),
17598
- !o.some((e) => {
17599
- if (r.containsItem(e))
17600
- return !!n.toViewElement(e).getCustomProperty("addHighlight");
17601
- })
17602
- );
17603
- }
17604
- Ct(Wo, xt);
17605
- class Go {
17606
- constructor(e, t, n) {
17607
- (this._lastRangeBackward = !1),
17608
- (this._ranges = []),
17609
- (this._attrs = new Map()),
17610
- e && this.setTo(e, t, n);
17611
- }
17612
- get anchor() {
17613
- if (this._ranges.length > 0) {
17614
- const e = this._ranges[this._ranges.length - 1];
17615
- return this._lastRangeBackward ? e.end : e.start;
17616
- }
17617
- return null;
17618
- }
17619
- get focus() {
17620
- if (this._ranges.length > 0) {
17621
- const e = this._ranges[this._ranges.length - 1];
17622
- return this._lastRangeBackward ? e.start : e.end;
17623
- }
17624
- return null;
17625
- }
17626
- get isCollapsed() {
17627
- return 1 === this._ranges.length && this._ranges[0].isCollapsed;
17628
- }
17629
- get rangeCount() {
17630
- return this._ranges.length;
17631
- }
17632
- get isBackward() {
17633
- return !this.isCollapsed && this._lastRangeBackward;
17634
- }
17635
- isEqual(e) {
17636
- if (this.rangeCount != e.rangeCount) return !1;
17637
- if (0 === this.rangeCount) return !0;
17638
- if (
17639
- !this.anchor.isEqual(e.anchor) ||
17640
- !this.focus.isEqual(e.focus)
17641
- )
17642
- return !1;
17643
- for (const t of this._ranges) {
17644
- let n = !1;
17645
- for (const r of e._ranges)
17646
- if (t.isEqual(r)) {
17647
- n = !0;
17648
- break;
17649
- }
17650
- if (!n) return !1;
17651
- }
17652
- return !0;
17653
- }
17654
- *getRanges() {
17655
- for (const e of this._ranges) yield new zo(e.start, e.end);
17656
- }
17657
- getFirstRange() {
17658
- let e = null;
17659
- for (const t of this._ranges)
17660
- (e && !t.start.isBefore(e.start)) || (e = t);
17661
- return e ? new zo(e.start, e.end) : null;
17662
- }
17663
- getLastRange() {
17664
- let e = null;
17665
- for (const t of this._ranges)
17666
- (e && !t.end.isAfter(e.end)) || (e = t);
17667
- return e ? new zo(e.start, e.end) : null;
17668
- }
17669
- getFirstPosition() {
17670
- const e = this.getFirstRange();
17671
- return e ? e.start.clone() : null;
17672
- }
17673
- getLastPosition() {
17674
- const e = this.getLastRange();
17675
- return e ? e.end.clone() : null;
17676
- }
17677
- setTo(e, t, n) {
17678
- if (null === e) this._setRanges([]);
17679
- else if (e instanceof Go)
17680
- this._setRanges(e.getRanges(), e.isBackward);
17681
- else if (e && "function" == typeof e.getRanges)
17682
- this._setRanges(e.getRanges(), e.isBackward);
17683
- else if (e instanceof zo)
17684
- this._setRanges([e], !!t && !!t.backward);
17685
- else if (e instanceof Ho) this._setRanges([new zo(e)]);
17686
- else if (e instanceof No) {
17687
- const r = !!n && !!n.backward;
17688
- let o;
17689
- if ("in" == t) o = zo._createIn(e);
17690
- else if ("on" == t) o = zo._createOn(e);
17691
- else {
17692
- if (void 0 === t)
17693
- throw new _t.b(
17694
- "model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",
17695
- [this, e]
17696
- );
17697
- o = new zo(Ho._createAt(e, t));
17698
- }
17699
- this._setRanges([o], r);
17700
- } else {
17701
- if (!Yt(e))
17702
- throw new _t.b(
17703
- "model-selection-setTo-not-selectable: Cannot set the selection to the given place.",
17704
- [this, e]
17705
- );
17706
- this._setRanges(e, t && !!t.backward);
17707
- }
17708
- }
17709
- _setRanges(e, t = !1) {
17710
- const n = (e = Array.from(e)).some((t) => {
17711
- if (!(t instanceof zo))
17712
- throw new _t.b(
17713
- "model-selection-set-ranges-not-range: Selection range set to an object that is not an instance of model.Range.",
17714
- [this, e]
17715
- );
17716
- return this._ranges.every((e) => !e.isEqual(t));
17717
- });
17718
- if (e.length !== this._ranges.length || n) {
17719
- this._removeAllRanges();
17720
- for (const t of e) this._pushRange(t);
17721
- (this._lastRangeBackward = !!t),
17722
- this.fire("change:range", { directChange: !0 });
17723
- }
17724
- }
17725
- setFocus(e, t) {
17726
- if (null === this.anchor)
17727
- throw new _t.b(
17728
- "model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",
17729
- [this, e]
17730
- );
17731
- const n = Ho._createAt(e, t);
17732
- if ("same" == n.compareWith(this.focus)) return;
17733
- const r = this.anchor;
17734
- this._ranges.length && this._popRange(),
17735
- "before" == n.compareWith(r)
17736
- ? (this._pushRange(new zo(n, r)),
17737
- (this._lastRangeBackward = !0))
17738
- : (this._pushRange(new zo(r, n)),
17739
- (this._lastRangeBackward = !1)),
17740
- this.fire("change:range", { directChange: !0 });
17741
- }
17742
- getAttribute(e) {
17743
- return this._attrs.get(e);
17744
- }
17745
- getAttributes() {
17746
- return this._attrs.entries();
17747
- }
17748
- getAttributeKeys() {
17749
- return this._attrs.keys();
17750
- }
17751
- hasAttribute(e) {
17752
- return this._attrs.has(e);
17753
- }
17754
- removeAttribute(e) {
17755
- this.hasAttribute(e) &&
17756
- (this._attrs.delete(e),
17757
- this.fire("change:attribute", {
17758
- attributeKeys: [e],
17759
- directChange: !0,
17760
- }));
17761
- }
17762
- setAttribute(e, t) {
17763
- this.getAttribute(e) !== t &&
17764
- (this._attrs.set(e, t),
17765
- this.fire("change:attribute", {
17766
- attributeKeys: [e],
17767
- directChange: !0,
17768
- }));
17769
- }
17770
- getSelectedElement() {
17771
- if (1 !== this.rangeCount) return null;
17772
- const e = this.getFirstRange(),
17773
- t = e.start.nodeAfter,
17774
- n = e.end.nodeBefore;
17775
- return t instanceof Yo && t == n ? t : null;
17776
- }
17777
- is(e) {
17778
- return "selection" == e || "model:selection" == e;
17779
- }
17780
- *getSelectedBlocks() {
17781
- const e = new WeakSet();
17782
- for (const t of this.getRanges()) {
17783
- const n = Ko(t.start, e);
17784
- n && (yield n);
17785
- for (const n of t.getWalker())
17786
- "elementEnd" == n.type && Jo(n.item, e) && (yield n.item);
17787
- const r = Ko(t.end, e);
17788
- r && !t.end.isTouching(Ho._createAt(r, 0)) && (yield r);
17789
- }
17790
- }
17791
- *getTopMostBlocks() {
17792
- const e = Array.from(this.getSelectedBlocks());
17793
- for (const t of e) {
17794
- const n = Qo(t);
17795
- (n && e.includes(n)) || (yield t);
17796
- }
17797
- }
17798
- containsEntireContent(e = this.anchor.root) {
17799
- const t = Ho._createAt(e, 0),
17800
- n = Ho._createAt(e, "end");
17801
- return (
17802
- t.isTouching(this.getFirstPosition()) &&
17803
- n.isTouching(this.getLastPosition())
17804
- );
17805
- }
17806
- _pushRange(e) {
17807
- this._checkRange(e), this._ranges.push(new zo(e.start, e.end));
17808
- }
17809
- _checkRange(e) {
17810
- for (let t = 0; t < this._ranges.length; t++)
17811
- if (e.isIntersecting(this._ranges[t]))
17812
- throw new _t.b(
17813
- "model-selection-range-intersects: Trying to add a range that intersects with another range in the selection.",
17814
- [this, e],
17815
- { addedRange: e, intersectingRange: this._ranges[t] }
17816
- );
17817
- }
17818
- _removeAllRanges() {
17819
- for (; this._ranges.length > 0; ) this._popRange();
17820
- }
17821
- _popRange() {
17822
- this._ranges.pop();
17823
- }
17824
- }
17825
- function Jo(e, t) {
17826
- return (
17827
- !t.has(e) &&
17828
- (t.add(e), e.document.model.schema.isBlock(e) && e.parent)
17829
- );
17830
- }
17831
- function Ko(e, t) {
17832
- const n = e.parent.document.model.schema,
17833
- r = e.parent.getAncestors({ parentFirst: !0, includeSelf: !0 });
17834
- let o = !1;
17835
- const a = r.find((e) => !o && !(o = n.isLimit(e)) && Jo(e, t));
17836
- return r.forEach((e) => t.add(e)), a;
17837
- }
17838
- function Qo(e) {
17839
- const t = e.document.model.schema;
17840
- let n = e.parent;
17841
- for (; n; ) {
17842
- if (t.isBlock(n)) return n;
17843
- n = n.parent;
17844
- }
17845
- }
17846
- Ct(Go, xt);
17847
- class Xo extends zo {
17848
- constructor(e, t) {
17849
- super(e, t),
17850
- function () {
17851
- this.listenTo(
17852
- this.root.document.model,
17853
- "applyOperation",
17854
- (e, t) => {
17855
- const n = t[0];
17856
- n.isDocumentOperation &&
17857
- function (e) {
17858
- const t = this.getTransformedByOperation(e),
17859
- n = zo._createFromRanges(t),
17860
- r = !n.isEqual(this),
17861
- o = (function (e, t) {
17862
- switch (t.type) {
17863
- case "insert":
17864
- return e.containsPosition(t.position);
17865
- case "move":
17866
- case "remove":
17867
- case "reinsert":
17868
- case "merge":
17869
- return (
17870
- e.containsPosition(t.sourcePosition) ||
17871
- e.start.isEqual(t.sourcePosition) ||
17872
- e.containsPosition(t.targetPosition)
17873
- );
17874
- case "split":
17875
- return (
17876
- e.containsPosition(t.splitPosition) ||
17877
- e.containsPosition(t.insertionPosition)
17878
- );
17879
- }
17880
- return !1;
17881
- })(this, e);
17882
- let a = null;
17883
- if (r) {
17884
- "$graveyard" == n.root.rootName &&
17885
- (a =
17886
- "remove" == e.type
17887
- ? e.sourcePosition
17888
- : e.deletionPosition);
17889
- const t = this.toRange();
17890
- (this.start = n.start),
17891
- (this.end = n.end),
17892
- this.fire("change:range", t, {
17893
- deletionPosition: a,
17894
- });
17895
- } else
17896
- o &&
17897
- this.fire("change:content", this.toRange(), {
17898
- deletionPosition: a,
17899
- });
17900
- }.call(this, n);
17901
- },
17902
- { priority: "low" }
17903
- );
17904
- }.call(this);
17905
- }
17906
- detach() {
17907
- this.stopListening();
17908
- }
17909
- is(e) {
17910
- return "liveRange" == e || "model:liveRange" == e || super.is(e);
17911
- }
17912
- toRange() {
17913
- return new zo(this.start, this.end);
17914
- }
17915
- static fromRange(e) {
17916
- return new Xo(e.start, e.end);
17917
- }
17918
- }
17919
- Ct(Xo, xt);
17920
- const $o = "selection:";
17921
- class Zo {
17922
- constructor(e) {
17923
- (this._selection = new ea(e)),
17924
- this._selection.delegate("change:range").to(this),
17925
- this._selection.delegate("change:attribute").to(this);
17926
- }
17927
- get isCollapsed() {
17928
- return this._selection.isCollapsed;
17929
- }
17930
- get anchor() {
17931
- return this._selection.anchor;
17932
- }
17933
- get focus() {
17934
- return this._selection.focus;
17935
- }
17936
- get rangeCount() {
17937
- return this._selection.rangeCount;
17938
- }
17939
- get hasOwnRange() {
17940
- return this._selection.hasOwnRange;
17941
- }
17942
- get isBackward() {
17943
- return this._selection.isBackward;
17944
- }
17945
- get isGravityOverridden() {
17946
- return this._selection.isGravityOverridden;
17947
- }
17948
- get markers() {
17949
- return this._selection.markers;
17950
- }
17951
- get _ranges() {
17952
- return this._selection._ranges;
17953
- }
17954
- getRanges() {
17955
- return this._selection.getRanges();
17956
- }
17957
- getFirstPosition() {
17958
- return this._selection.getFirstPosition();
17959
- }
17960
- getLastPosition() {
17961
- return this._selection.getLastPosition();
17962
- }
17963
- getFirstRange() {
17964
- return this._selection.getFirstRange();
17965
- }
17966
- getLastRange() {
17967
- return this._selection.getLastRange();
17968
- }
17969
- getSelectedBlocks() {
17970
- return this._selection.getSelectedBlocks();
17971
- }
17972
- getTopMostBlocks() {
17973
- return this._selection.getTopMostBlocks();
17974
- }
17975
- getSelectedElement() {
17976
- return this._selection.getSelectedElement();
17977
- }
17978
- containsEntireContent(e) {
17979
- return this._selection.containsEntireContent(e);
17980
- }
17981
- destroy() {
17982
- this._selection.destroy();
17983
- }
17984
- getAttributeKeys() {
17985
- return this._selection.getAttributeKeys();
17986
- }
17987
- getAttributes() {
17988
- return this._selection.getAttributes();
17989
- }
17990
- getAttribute(e) {
17991
- return this._selection.getAttribute(e);
17992
- }
17993
- hasAttribute(e) {
17994
- return this._selection.hasAttribute(e);
17995
- }
17996
- refresh() {
17997
- this._selection._updateMarkers(),
17998
- this._selection._updateAttributes(!1);
17999
- }
18000
- is(e) {
18001
- return (
18002
- "selection" == e ||
18003
- "model:selection" == e ||
18004
- "documentSelection" == e ||
18005
- "model:documentSelection" == e
18006
- );
18007
- }
18008
- _setFocus(e, t) {
18009
- this._selection.setFocus(e, t);
18010
- }
18011
- _setTo(e, t, n) {
18012
- this._selection.setTo(e, t, n);
18013
- }
18014
- _setAttribute(e, t) {
18015
- this._selection.setAttribute(e, t);
18016
- }
18017
- _removeAttribute(e) {
18018
- this._selection.removeAttribute(e);
18019
- }
18020
- _getStoredAttributes() {
18021
- return this._selection._getStoredAttributes();
18022
- }
18023
- _overrideGravity() {
18024
- return this._selection.overrideGravity();
18025
- }
18026
- _restoreGravity(e) {
18027
- this._selection.restoreGravity(e);
18028
- }
18029
- static _getStoreAttributeKey(e) {
18030
- return $o + e;
18031
- }
18032
- static _isStoreAttributeKey(e) {
18033
- return e.startsWith($o);
18034
- }
18035
- }
18036
- Ct(Zo, xt);
18037
- class ea extends Go {
18038
- constructor(e) {
18039
- super(),
18040
- (this.markers = new kn({ idProperty: "name" })),
18041
- (this._model = e.model),
18042
- (this._document = e),
18043
- (this._attributePriority = new Map()),
18044
- (this._fixGraveyardRangesData = []),
18045
- (this._hasChangedRange = !1),
18046
- (this._overriddenGravityRegister = new Set()),
18047
- this.listenTo(
18048
- this._model,
18049
- "applyOperation",
18050
- (e, t) => {
18051
- const n = t[0];
18052
- if (
18053
- n.isDocumentOperation &&
18054
- "marker" != n.type &&
18055
- "rename" != n.type &&
18056
- "noop" != n.type
18057
- ) {
18058
- for (; this._fixGraveyardRangesData.length; ) {
18059
- const {
18060
- liveRange: e,
18061
- sourcePosition: t,
18062
- } = this._fixGraveyardRangesData.shift();
18063
- this._fixGraveyardSelection(e, t);
18064
- }
18065
- this._hasChangedRange &&
18066
- ((this._hasChangedRange = !1),
18067
- this.fire("change:range", { directChange: !1 }));
18068
- }
18069
- },
18070
- { priority: "lowest" }
18071
- ),
18072
- this.on("change:range", () => {
18073
- for (const e of this.getRanges())
18074
- if (!this._document._validateSelectionRange(e))
18075
- throw new _t.b(
18076
- "document-selection-wrong-position: Range from document selection starts or ends at incorrect position.",
18077
- this,
18078
- { range: e }
18079
- );
18080
- }),
18081
- this.listenTo(this._model.markers, "update", () =>
18082
- this._updateMarkers()
18083
- ),
18084
- this.listenTo(this._document, "change", (e, t) => {
18085
- !(function (e, t) {
18086
- const n = e.document.differ;
18087
- for (const r of n.getChanges()) {
18088
- if ("insert" != r.type) continue;
18089
- const n = r.position.parent;
18090
- r.length === n.maxOffset &&
18091
- e.enqueueChange(t, (e) => {
18092
- const t = Array.from(
18093
- n.getAttributeKeys()
18094
- ).filter((e) => e.startsWith($o));
18095
- for (const r of t) e.removeAttribute(r, n);
18096
- });
18097
- }
18098
- })(this._model, t);
18099
- });
18100
- }
18101
- get isCollapsed() {
18102
- return 0 === this._ranges.length
18103
- ? this._document._getDefaultRange().isCollapsed
18104
- : super.isCollapsed;
18105
- }
18106
- get anchor() {
18107
- return super.anchor || this._document._getDefaultRange().start;
18108
- }
18109
- get focus() {
18110
- return super.focus || this._document._getDefaultRange().end;
18111
- }
18112
- get rangeCount() {
18113
- return this._ranges.length ? this._ranges.length : 1;
18114
- }
18115
- get hasOwnRange() {
18116
- return this._ranges.length > 0;
18117
- }
18118
- get isGravityOverridden() {
18119
- return !!this._overriddenGravityRegister.size;
18120
- }
18121
- destroy() {
18122
- for (let e = 0; e < this._ranges.length; e++)
18123
- this._ranges[e].detach();
18124
- this.stopListening();
18125
- }
18126
- *getRanges() {
18127
- this._ranges.length
18128
- ? yield* super.getRanges()
18129
- : yield this._document._getDefaultRange();
18130
- }
18131
- getFirstRange() {
18132
- return super.getFirstRange() || this._document._getDefaultRange();
18133
- }
18134
- getLastRange() {
18135
- return super.getLastRange() || this._document._getDefaultRange();
18136
- }
18137
- setTo(e, t, n) {
18138
- super.setTo(e, t, n), this._updateAttributes(!0);
18139
- }
18140
- setFocus(e, t) {
18141
- super.setFocus(e, t), this._updateAttributes(!0);
18142
- }
18143
- setAttribute(e, t) {
18144
- if (this._setAttribute(e, t)) {
18145
- const t = [e];
18146
- this.fire("change:attribute", {
18147
- attributeKeys: t,
18148
- directChange: !0,
18149
- });
18150
- }
18151
- }
18152
- removeAttribute(e) {
18153
- if (this._removeAttribute(e)) {
18154
- const t = [e];
18155
- this.fire("change:attribute", {
18156
- attributeKeys: t,
18157
- directChange: !0,
18158
- });
18159
- }
18160
- }
18161
- overrideGravity() {
18162
- const e = bt();
18163
- return (
18164
- this._overriddenGravityRegister.add(e),
18165
- 1 === this._overriddenGravityRegister.size &&
18166
- this._updateAttributes(!0),
18167
- e
18168
- );
18169
- }
18170
- restoreGravity(e) {
18171
- if (!this._overriddenGravityRegister.has(e))
18172
- throw new _t.b(
18173
- "document-selection-gravity-wrong-restore: Attempting to restore the selection gravity for an unknown UID.",
18174
- this,
18175
- { uid: e }
18176
- );
18177
- this._overriddenGravityRegister.delete(e),
18178
- this.isGravityOverridden || this._updateAttributes(!0);
18179
- }
18180
- _popRange() {
18181
- this._ranges.pop().detach();
18182
- }
18183
- _pushRange(e) {
18184
- const t = this._prepareRange(e);
18185
- t && this._ranges.push(t);
18186
- }
18187
- _prepareRange(e) {
18188
- if ((this._checkRange(e), e.root == this._document.graveyard))
18189
- return;
18190
- const t = Xo.fromRange(e);
18191
- return (
18192
- t.on("change:range", (e, n, r) => {
18193
- (this._hasChangedRange = !0),
18194
- t.root == this._document.graveyard &&
18195
- this._fixGraveyardRangesData.push({
18196
- liveRange: t,
18197
- sourcePosition: r.deletionPosition,
18198
- });
18199
- }),
18200
- t
18201
- );
18202
- }
18203
- _updateMarkers() {
18204
- const e = [];
18205
- for (const t of this._model.markers) {
18206
- const n = t.getRange();
18207
- for (const r of this.getRanges())
18208
- n.containsRange(r, !r.isCollapsed) && e.push(t);
18209
- }
18210
- for (const t of e) this.markers.has(t) || this.markers.add(t);
18211
- for (const t of Array.from(this.markers))
18212
- e.includes(t) || this.markers.remove(t);
18213
- }
18214
- _updateAttributes(e) {
18215
- const t = Oo(this._getSurroundingAttributes()),
18216
- n = Oo(this.getAttributes());
18217
- if (e)
18218
- (this._attributePriority = new Map()),
18219
- (this._attrs = new Map());
18220
- else
18221
- for (const [e, t] of this._attributePriority)
18222
- "low" == t &&
18223
- (this._attrs.delete(e), this._attributePriority.delete(e));
18224
- this._setAttributesTo(t);
18225
- const r = [];
18226
- for (const [e, t] of this.getAttributes())
18227
- (n.has(e) && n.get(e) === t) || r.push(e);
18228
- for (const [e] of n) this.hasAttribute(e) || r.push(e);
18229
- r.length > 0 &&
18230
- this.fire("change:attribute", {
18231
- attributeKeys: r,
18232
- directChange: !1,
18233
- });
18234
- }
18235
- _setAttribute(e, t, n = !0) {
18236
- const r = n ? "normal" : "low";
18237
- return (
18238
- ("low" != r || "normal" != this._attributePriority.get(e)) &&
18239
- super.getAttribute(e) !== t &&
18240
- (this._attrs.set(e, t), this._attributePriority.set(e, r), !0)
18241
- );
18242
- }
18243
- _removeAttribute(e, t = !0) {
18244
- const n = t ? "normal" : "low";
18245
- return !(
18246
- ("low" == n && "normal" == this._attributePriority.get(e)) ||
18247
- (this._attributePriority.set(e, n),
18248
- !super.hasAttribute(e) || (this._attrs.delete(e), 0))
18249
- );
18250
- }
18251
- _setAttributesTo(e) {
18252
- const t = new Set();
18253
- for (const [t, n] of this.getAttributes())
18254
- e.get(t) !== n && this._removeAttribute(t, !1);
18255
- for (const [n, r] of e) this._setAttribute(n, r, !1) && t.add(n);
18256
- return t;
18257
- }
18258
- *_getStoredAttributes() {
18259
- const e = this.getFirstPosition().parent;
18260
- if (this.isCollapsed && e.isEmpty)
18261
- for (const t of e.getAttributeKeys())
18262
- t.startsWith($o) &&
18263
- (yield [t.substr($o.length), e.getAttribute(t)]);
18264
- }
18265
- _getSurroundingAttributes() {
18266
- const e = this.getFirstPosition(),
18267
- t = this._model.schema;
18268
- let n = null;
18269
- if (this.isCollapsed) {
18270
- const t = e.textNode ? e.textNode : e.nodeBefore,
18271
- r = e.textNode ? e.textNode : e.nodeAfter;
18272
- if (
18273
- (this.isGravityOverridden || (n = ta(t)),
18274
- n || (n = ta(r)),
18275
- !this.isGravityOverridden && !n)
18276
- ) {
18277
- let e = t;
18278
- for (; e && !n; ) n = ta((e = e.previousSibling));
18279
- }
18280
- if (!n) {
18281
- let e = r;
18282
- for (; e && !n; ) n = ta((e = e.nextSibling));
18283
- }
18284
- n || (n = this._getStoredAttributes());
18285
- } else {
18286
- const e = this.getFirstRange();
18287
- for (const r of e) {
18288
- if (r.item.is("element") && t.isObject(r.item)) break;
18289
- if ("text" == r.type) {
18290
- n = r.item.getAttributes();
18291
- break;
18292
- }
18293
- }
18294
- }
18295
- return n;
18296
- }
18297
- _fixGraveyardSelection(e, t) {
18298
- const n = t.clone(),
18299
- r = this._model.schema.getNearestSelectionRange(n),
18300
- o = this._ranges.indexOf(e);
18301
- if ((this._ranges.splice(o, 1), e.detach(), r)) {
18302
- const e = this._prepareRange(r);
18303
- this._ranges.splice(o, 0, e);
18304
- }
18305
- }
18306
- }
18307
- function ta(e) {
18308
- return e instanceof Io || e instanceof Ao
18309
- ? e.getAttributes()
18310
- : null;
18311
- }
18312
- class na {
18313
- constructor(e) {
18314
- this._dispatchers = e;
18315
- }
18316
- add(e) {
18317
- for (const t of this._dispatchers) e(t);
18318
- return this;
18319
- }
18320
- }
18321
- var ra = function (e) {
18322
- return ht(e, 5);
18323
- };
18324
- class oa extends na {
18325
- elementToElement(e) {
18326
- return this.add(
18327
- (function (e) {
18328
- return (
18329
- ((e = ra(e)).view = ia(e.view, "container")),
18330
- (t) => {
18331
- t.on(
18332
- "insert:" + e.model,
18333
- (function (e) {
18334
- return (t, n, r) => {
18335
- const o = e(n.item, r.writer);
18336
- if (!o) return;
18337
- if (!r.consumable.consume(n.item, "insert")) return;
18338
- const a = r.mapper.toViewPosition(n.range.start);
18339
- r.mapper.bindElements(n.item, o),
18340
- r.writer.insert(a, o);
18341
- };
18342
- })(e.view),
18343
- { priority: e.converterPriority || "normal" }
18344
- );
18345
- }
18346
- );
18347
- })(e)
18348
- );
18349
- }
18350
- attributeToElement(e) {
18351
- return this.add(
18352
- (function (e) {
18353
- let t =
18354
- "attribute:" +
18355
- ((e = ra(e)).model.key ? e.model.key : e.model);
18356
- if (
18357
- (e.model.name && (t += ":" + e.model.name), e.model.values)
18358
- )
18359
- for (const t of e.model.values)
18360
- e.view[t] = ia(e.view[t], "attribute");
18361
- else e.view = ia(e.view, "attribute");
18362
- const n = sa(e);
18363
- return (r) => {
18364
- r.on(
18365
- t,
18366
- (function (e) {
18367
- return (t, n, r) => {
18368
- const o = e(n.attributeOldValue, r.writer),
18369
- a = e(n.attributeNewValue, r.writer);
18370
- if (!o && !a) return;
18371
- if (!r.consumable.consume(n.item, t.name)) return;
18372
- const i = r.writer,
18373
- s = i.document.selection;
18374
- if (n.item instanceof Go || n.item instanceof Zo)
18375
- i.wrap(s.getFirstRange(), a);
18376
- else {
18377
- let e = r.mapper.toViewRange(n.range);
18378
- null !== n.attributeOldValue &&
18379
- o &&
18380
- (e = i.unwrap(e, o)),
18381
- null !== n.attributeNewValue && a && i.wrap(e, a);
18382
- }
18383
- };
18384
- })(n),
18385
- { priority: e.converterPriority || "normal" }
18386
- );
18387
- };
18388
- })(e)
18389
- );
18390
- }
18391
- attributeToAttribute(e) {
18392
- return this.add(
18393
- (function (e) {
18394
- let t =
18395
- "attribute:" +
18396
- ((e = ra(e)).model.key ? e.model.key : e.model);
18397
- if (
18398
- (e.model.name && (t += ":" + e.model.name), e.model.values)
18399
- )
18400
- for (const t of e.model.values) e.view[t] = la(e.view[t]);
18401
- else e.view = la(e.view);
18402
- const n = sa(e);
18403
- return (r) => {
18404
- r.on(
18405
- t,
18406
- (function (e) {
18407
- return (t, n, r) => {
18408
- const o = e(n.attributeOldValue, n),
18409
- a = e(n.attributeNewValue, n);
18410
- if (!o && !a) return;
18411
- if (!r.consumable.consume(n.item, t.name)) return;
18412
- const i = r.mapper.toViewElement(n.item),
18413
- s = r.writer;
18414
- if (!i)
18415
- throw new _t.b(
18416
- "conversion-attribute-to-attribute-on-text: Trying to convert text node's attribute with attribute-to-attribute converter.",
18417
- [n, r]
18418
- );
18419
- if (null !== n.attributeOldValue && o)
18420
- if ("class" == o.key) {
18421
- const e = Array.isArray(o.value)
18422
- ? o.value
18423
- : [o.value];
18424
- for (const t of e) s.removeClass(t, i);
18425
- } else if ("style" == o.key) {
18426
- const e = Object.keys(o.value);
18427
- for (const t of e) s.removeStyle(t, i);
18428
- } else s.removeAttribute(o.key, i);
18429
- if (null !== n.attributeNewValue && a)
18430
- if ("class" == a.key) {
18431
- const e = Array.isArray(a.value)
18432
- ? a.value
18433
- : [a.value];
18434
- for (const t of e) s.addClass(t, i);
18435
- } else if ("style" == a.key) {
18436
- const e = Object.keys(a.value);
18437
- for (const t of e) s.setStyle(t, a.value[t], i);
18438
- } else s.setAttribute(a.key, a.value, i);
18439
- };
18440
- })(n),
18441
- { priority: e.converterPriority || "normal" }
18442
- );
18443
- };
18444
- })(e)
18445
- );
18446
- }
18447
- markerToElement(e) {
18448
- return this.add(
18449
- (function (e) {
18450
- return (
18451
- ((e = ra(e)).view = ia(e.view, "ui")),
18452
- (t) => {
18453
- t.on(
18454
- "addMarker:" + e.model,
18455
- (function (e) {
18456
- return (t, n, r) => {
18457
- n.isOpening = !0;
18458
- const o = e(n, r.writer);
18459
- n.isOpening = !1;
18460
- const a = e(n, r.writer);
18461
- if (!o || !a) return;
18462
- const i = n.markerRange;
18463
- if (
18464
- i.isCollapsed &&
18465
- !r.consumable.consume(i, t.name)
18466
- )
18467
- return;
18468
- for (const e of i)
18469
- if (!r.consumable.consume(e.item, t.name)) return;
18470
- const s = r.mapper,
18471
- l = r.writer;
18472
- l.insert(s.toViewPosition(i.start), o),
18473
- r.mapper.bindElementToMarker(o, n.markerName),
18474
- i.isCollapsed ||
18475
- (l.insert(s.toViewPosition(i.end), a),
18476
- r.mapper.bindElementToMarker(a, n.markerName)),
18477
- t.stop();
18478
- };
18479
- })(e.view),
18480
- { priority: e.converterPriority || "normal" }
18481
- ),
18482
- t.on(
18483
- "removeMarker:" + e.model,
18484
- (e.view,
18485
- (e, t, n) => {
18486
- const r = n.mapper.markerNameToElements(
18487
- t.markerName
18488
- );
18489
- if (r) {
18490
- for (const e of r)
18491
- n.mapper.unbindElementFromMarkerName(
18492
- e,
18493
- t.markerName
18494
- ),
18495
- n.writer.clear(n.writer.createRangeOn(e), e);
18496
- n.writer.clearClonedElementsGroup(t.markerName),
18497
- e.stop();
18498
- }
18499
- }),
18500
- { priority: e.converterPriority || "normal" }
18501
- );
18502
- }
18503
- );
18504
- })(e)
18505
- );
18506
- }
18507
- markerToHighlight(e) {
18508
- return this.add(
18509
- (function (e) {
18510
- return (t) => {
18511
- t.on(
18512
- "addMarker:" + e.model,
18513
- (function (e) {
18514
- return (t, n, r) => {
18515
- if (!n.item) return;
18516
- if (
18517
- !(
18518
- n.item instanceof Go ||
18519
- n.item instanceof Zo ||
18520
- n.item.is("textProxy")
18521
- )
18522
- )
18523
- return;
18524
- const o = ca(e, n, r);
18525
- if (!o) return;
18526
- if (!r.consumable.consume(n.item, t.name)) return;
18527
- const a = aa(o),
18528
- i = r.writer,
18529
- s = i.document.selection;
18530
- if (n.item instanceof Go || n.item instanceof Zo)
18531
- i.wrap(s.getFirstRange(), a, s);
18532
- else {
18533
- const e = r.mapper.toViewRange(n.range),
18534
- t = i.wrap(e, a);
18535
- for (const e of t.getItems())
18536
- if (e.is("attributeElement") && e.isSimilar(a)) {
18537
- r.mapper.bindElementToMarker(e, n.markerName);
18538
- break;
18539
- }
18540
- }
18541
- };
18542
- })(e.view),
18543
- { priority: e.converterPriority || "normal" }
18544
- ),
18545
- t.on(
18546
- "addMarker:" + e.model,
18547
- (function (e) {
18548
- return (t, n, r) => {
18549
- if (!n.item) return;
18550
- if (!(n.item instanceof Yo)) return;
18551
- const o = ca(e, n, r);
18552
- if (!o) return;
18553
- if (!r.consumable.test(n.item, t.name)) return;
18554
- const a = r.mapper.toViewElement(n.item);
18555
- if (a && a.getCustomProperty("addHighlight")) {
18556
- r.consumable.consume(n.item, t.name);
18557
- for (const e of zo._createIn(n.item))
18558
- r.consumable.consume(e.item, t.name);
18559
- a.getCustomProperty("addHighlight")(
18560
- a,
18561
- o,
18562
- r.writer
18563
- ),
18564
- r.mapper.bindElementToMarker(a, n.markerName);
18565
- }
18566
- };
18567
- })(e.view),
18568
- { priority: e.converterPriority || "normal" }
18569
- ),
18570
- t.on(
18571
- "removeMarker:" + e.model,
18572
- (function (e) {
18573
- return (t, n, r) => {
18574
- if (n.markerRange.isCollapsed) return;
18575
- const o = ca(e, n, r);
18576
- if (!o) return;
18577
- const a = aa(o),
18578
- i = r.mapper.markerNameToElements(n.markerName);
18579
- if (i) {
18580
- for (const e of i)
18581
- r.mapper.unbindElementFromMarkerName(
18582
- e,
18583
- n.markerName
18584
- ),
18585
- e.is("attributeElement")
18586
- ? r.writer.unwrap(
18587
- r.writer.createRangeOn(e),
18588
- a
18589
- )
18590
- : e.getCustomProperty("removeHighlight")(
18591
- e,
18592
- o.id,
18593
- r.writer
18594
- );
18595
- r.writer.clearClonedElementsGroup(n.markerName),
18596
- t.stop();
18597
- }
18598
- };
18599
- })(e.view),
18600
- { priority: e.converterPriority || "normal" }
18601
- );
18602
- };
18603
- })(e)
18604
- );
18605
- }
18606
- }
18607
- function aa(e) {
18608
- const t = new Mn("span", e.attributes);
18609
- return (
18610
- e.classes && t._addClass(e.classes),
18611
- e.priority && (t._priority = e.priority),
18612
- (t._id = e.id),
18613
- t
18614
- );
18615
- }
18616
- function ia(e, t) {
18617
- return "function" == typeof e
18618
- ? e
18619
- : (n, r) =>
18620
- (function (e, t, n) {
18621
- let r;
18622
- "string" == typeof e && (e = { name: e });
18623
- const o = Object.assign({}, e.attributes);
18624
- if ("container" == n)
18625
- r = t.createContainerElement(e.name, o);
18626
- else if ("attribute" == n) {
18627
- const n = { priority: e.priority || Mn.DEFAULT_PRIORITY };
18628
- r = t.createAttributeElement(e.name, o, n);
18629
- } else r = t.createUIElement(e.name, o);
18630
- if (e.styles) {
18631
- const n = Object.keys(e.styles);
18632
- for (const o of n) t.setStyle(o, e.styles[o], r);
18633
- }
18634
- if (e.classes) {
18635
- const n = e.classes;
18636
- if ("string" == typeof n) t.addClass(n, r);
18637
- else for (const e of n) t.addClass(e, r);
18638
- }
18639
- return r;
18640
- })(e, r, t);
18641
- }
18642
- function sa(e) {
18643
- return e.model.values
18644
- ? (t, n) => {
18645
- const r = e.view[t];
18646
- return r ? r(t, n) : null;
18647
- }
18648
- : e.view;
18649
- }
18650
- function la(e) {
18651
- return "string" == typeof e
18652
- ? (t) => ({ key: e, value: t })
18653
- : "object" == typeof e
18654
- ? e.value
18655
- ? () => e
18656
- : (t) => ({ key: e.key, value: t })
18657
- : e;
18658
- }
18659
- function ca(e, t, n) {
18660
- const r = "function" == typeof e ? e(t, n) : e;
18661
- return r
18662
- ? (r.priority || (r.priority = 10),
18663
- r.id || (r.id = t.markerName),
18664
- r)
18665
- : null;
18666
- }
18667
- class ua extends na {
18668
- elementToElement(e) {
18669
- return this.add(da(e));
18670
- }
18671
- elementToAttribute(e) {
18672
- return this.add(
18673
- (function (e) {
18674
- pa((e = ra(e)));
18675
- const t = fa(e, !1),
18676
- n = ha(e),
18677
- r = n ? "element:" + n : "element";
18678
- return (n) => {
18679
- n.on(r, t, { priority: e.converterPriority || "low" });
18680
- };
18681
- })(e)
18682
- );
18683
- }
18684
- attributeToAttribute(e) {
18685
- return this.add(
18686
- (function (e) {
18687
- let t = null;
18688
- ("string" == typeof (e = ra(e)).view || e.view.key) &&
18689
- (t = (function (e) {
18690
- "string" == typeof e.view && (e.view = { key: e.view });
18691
- const t = e.view.key;
18692
- let n;
18693
- return (
18694
- (n =
18695
- "class" == t || "style" == t
18696
- ? {
18697
- ["class" == t ? "classes" : "styles"]: e.view
18698
- .value,
18699
- }
18700
- : {
18701
- attributes: {
18702
- [t]:
18703
- void 0 === e.view.value
18704
- ? /[\s\S]*/
18705
- : e.view.value,
18706
- },
18707
- }),
18708
- e.view.name && (n.name = e.view.name),
18709
- (e.view = n),
18710
- t
18711
- );
18712
- })(e)),
18713
- pa(e, t);
18714
- const n = fa(e, !0);
18715
- return (t) => {
18716
- t.on("element", n, {
18717
- priority: e.converterPriority || "low",
18718
- });
18719
- };
18720
- })(e)
18721
- );
18722
- }
18723
- elementToMarker(e) {
18724
- return this.add(
18725
- (function (e) {
18726
- return (
18727
- (function (e) {
18728
- const t = e.model;
18729
- e.model = (e, n) => {
18730
- const r = "string" == typeof t ? t : t(e);
18731
- return n.createElement("$marker", { "data-name": r });
18732
- };
18733
- })((e = ra(e))),
18734
- da(e)
18735
- );
18736
- })(e)
18737
- );
18738
- }
18739
- }
18740
- function da(e) {
18741
- const t = (function (e) {
18742
- const t = e.view ? new jt(e.view) : null;
18743
- return (n, r, o) => {
18744
- let a = {};
18745
- if (t) {
18746
- const e = t.match(r.viewItem);
18747
- if (!e) return;
18748
- a = e.match;
18749
- }
18750
- a.name = !0;
18751
- const i = (function (e, t, n) {
18752
- return e instanceof Function ? e(t, n) : n.createElement(e);
18753
- })(e.model, r.viewItem, o.writer);
18754
- if (!i) return;
18755
- if (!o.consumable.test(r.viewItem, a)) return;
18756
- const s = o.splitToAllowedParent(i, r.modelCursor);
18757
- if (!s) return;
18758
- o.writer.insert(i, s.position),
18759
- o.convertChildren(
18760
- r.viewItem,
18761
- o.writer.createPositionAt(i, 0)
18762
- ),
18763
- o.consumable.consume(r.viewItem, a);
18764
- const l = o.getSplitParts(i);
18765
- (r.modelRange = new zo(
18766
- o.writer.createPositionBefore(i),
18767
- o.writer.createPositionAfter(l[l.length - 1])
18768
- )),
18769
- s.cursorParent
18770
- ? (r.modelCursor = o.writer.createPositionAt(
18771
- s.cursorParent,
18772
- 0
18773
- ))
18774
- : (r.modelCursor = r.modelRange.end);
18775
- };
18776
- })((e = ra(e))),
18777
- n = ha(e),
18778
- r = n ? "element:" + n : "element";
18779
- return (n) => {
18780
- n.on(r, t, { priority: e.converterPriority || "normal" });
18781
- };
18782
- }
18783
- function ha(e) {
18784
- return "string" == typeof e.view
18785
- ? e.view
18786
- : "object" == typeof e.view && "string" == typeof e.view.name
18787
- ? e.view.name
18788
- : null;
18789
- }
18790
- function pa(e, t = null) {
18791
- const n = null === t || ((e) => e.getAttribute(t)),
18792
- r = "object" != typeof e.model ? e.model : e.model.key,
18793
- o =
18794
- "object" != typeof e.model || void 0 === e.model.value
18795
- ? n
18796
- : e.model.value;
18797
- e.model = { key: r, value: o };
18798
- }
18799
- function fa(e, t) {
18800
- const n = new jt(e.view);
18801
- return (r, o, a) => {
18802
- const i = n.match(o.viewItem);
18803
- if (!i) return;
18804
- const s = e.model.key,
18805
- l =
18806
- "function" == typeof e.model.value
18807
- ? e.model.value(o.viewItem)
18808
- : e.model.value;
18809
- null !== l &&
18810
- ((function (e) {
18811
- return !(
18812
- ("object" == typeof e.view && !ha(e)) ||
18813
- e.view.classes ||
18814
- e.view.attributes ||
18815
- e.view.styles
18816
- );
18817
- })(e)
18818
- ? (i.match.name = !0)
18819
- : delete i.match.name,
18820
- a.consumable.test(o.viewItem, i.match) &&
18821
- (o.modelRange ||
18822
- (o = Object.assign(
18823
- o,
18824
- a.convertChildren(o.viewItem, o.modelCursor)
18825
- )),
18826
- (function (e, t, n, r) {
18827
- let o = !1;
18828
- for (const a of Array.from(e.getItems({ shallow: n })))
18829
- r.schema.checkAttribute(a, t.key) &&
18830
- (r.writer.setAttribute(t.key, t.value, a), (o = !0));
18831
- return o;
18832
- })(o.modelRange, { key: s, value: l }, t, a) &&
18833
- a.consumable.consume(o.viewItem, i.match)));
18834
- };
18835
- }
18836
- class ma {
18837
- constructor(e) {
18838
- (this.model = e),
18839
- (this.view = new Po()),
18840
- (this.mapper = new Bo()),
18841
- (this.downcastDispatcher = new Wo({ mapper: this.mapper }));
18842
- const t = this.model.document,
18843
- n = t.selection,
18844
- r = this.model.markers;
18845
- this.listenTo(
18846
- this.model,
18847
- "_beforeChanges",
18848
- () => {
18849
- this.view._disableRendering(!0);
18850
- },
18851
- { priority: "highest" }
18852
- ),
18853
- this.listenTo(
18854
- this.model,
18855
- "_afterChanges",
18856
- () => {
18857
- this.view._disableRendering(!1);
18858
- },
18859
- { priority: "lowest" }
18860
- ),
18861
- this.listenTo(
18862
- t,
18863
- "change",
18864
- () => {
18865
- this.view.change((e) => {
18866
- this.downcastDispatcher.convertChanges(t.differ, r, e),
18867
- this.downcastDispatcher.convertSelection(n, r, e);
18868
- });
18869
- },
18870
- { priority: "low" }
18871
- ),
18872
- this.listenTo(
18873
- this.view.document,
18874
- "selectionChange",
18875
- (function (e, t) {
18876
- return (n, r) => {
18877
- const o = r.newSelection,
18878
- a = new Go(),
18879
- i = [];
18880
- for (const e of o.getRanges()) i.push(t.toModelRange(e));
18881
- a.setTo(i, { backward: o.isBackward }),
18882
- a.isEqual(e.document.selection) ||
18883
- e.change((e) => {
18884
- e.setSelection(a);
18885
- });
18886
- };
18887
- })(this.model, this.mapper)
18888
- ),
18889
- this.downcastDispatcher.on(
18890
- "insert:$text",
18891
- (e, t, n) => {
18892
- if (!n.consumable.consume(t.item, "insert")) return;
18893
- const r = n.writer,
18894
- o = n.mapper.toViewPosition(t.range.start),
18895
- a = r.createText(t.item.data);
18896
- r.insert(o, a);
18897
- },
18898
- { priority: "lowest" }
18899
- ),
18900
- this.downcastDispatcher.on(
18901
- "remove",
18902
- (e, t, n) => {
18903
- const r = n.mapper.toViewPosition(t.position),
18904
- o = t.position.getShiftedBy(t.length),
18905
- a = n.mapper.toViewPosition(o, { isPhantom: !0 }),
18906
- i = n.writer.createRange(r, a),
18907
- s = n.writer.remove(i.getTrimmed());
18908
- for (const e of n.writer.createRangeIn(s).getItems())
18909
- n.mapper.unbindViewElement(e);
18910
- },
18911
- { priority: "low" }
18912
- ),
18913
- this.downcastDispatcher.on(
18914
- "selection",
18915
- (e, t, n) => {
18916
- const r = n.writer,
18917
- o = r.document.selection;
18918
- for (const e of o.getRanges())
18919
- e.isCollapsed &&
18920
- e.end.parent.document &&
18921
- n.writer.mergeAttributes(e.start);
18922
- r.setSelection(null);
18923
- },
18924
- { priority: "low" }
18925
- ),
18926
- this.downcastDispatcher.on(
18927
- "selection",
18928
- (e, t, n) => {
18929
- const r = t.selection;
18930
- if (r.isCollapsed) return;
18931
- if (!n.consumable.consume(r, "selection")) return;
18932
- const o = [];
18933
- for (const e of r.getRanges()) {
18934
- const t = n.mapper.toViewRange(e);
18935
- o.push(t);
18936
- }
18937
- n.writer.setSelection(o, { backward: r.isBackward });
18938
- },
18939
- { priority: "low" }
18940
- ),
18941
- this.downcastDispatcher.on(
18942
- "selection",
18943
- (e, t, n) => {
18944
- const r = t.selection;
18945
- if (!r.isCollapsed) return;
18946
- if (!n.consumable.consume(r, "selection")) return;
18947
- const o = n.writer,
18948
- a = r.getFirstPosition(),
18949
- i = n.mapper.toViewPosition(a),
18950
- s = o.breakAttributes(i);
18951
- o.setSelection(s);
18952
- },
18953
- { priority: "low" }
18954
- ),
18955
- this.view.document.roots
18956
- .bindTo(this.model.document.roots)
18957
- .using((e) => {
18958
- if ("$graveyard" == e.rootName) return null;
18959
- const t = new fn(e.name);
18960
- return (
18961
- (t.rootName = e.rootName),
18962
- (t._document = this.view.document),
18963
- this.mapper.bindElements(e, t),
18964
- t
18965
- );
18966
- });
18967
- }
18968
- destroy() {
18969
- this.view.destroy(), this.stopListening();
18970
- }
18971
- }
18972
- Ct(ma, on);
18973
- class ga {
18974
- constructor(e, t = []) {
18975
- (this._editor = e),
18976
- (this._availablePlugins = new Map()),
18977
- (this._plugins = new Map());
18978
- for (const e of t)
18979
- this._availablePlugins.set(e, e),
18980
- e.pluginName && this._availablePlugins.set(e.pluginName, e);
18981
- }
18982
- *[Symbol.iterator]() {
18983
- for (const e of this._plugins)
18984
- "function" == typeof e[0] && (yield e);
18985
- }
18986
- get(e) {
18987
- const t = this._plugins.get(e);
18988
- if (!t) {
18989
- const t =
18990
- "plugincollection-plugin-not-loaded: The requested plugin is not loaded.";
18991
- let n = e;
18992
- throw (
18993
- ("function" == typeof e && (n = e.pluginName || e.name),
18994
- new _t.b(t, this._editor, { plugin: n }))
18995
- );
18996
- }
18997
- return t;
18998
- }
18999
- has(e) {
19000
- return this._plugins.has(e);
19001
- }
19002
- init(e, t = []) {
19003
- const n = this,
19004
- r = this._editor,
19005
- o = new Set(),
19006
- a = [],
19007
- i = d(e),
19008
- s = d(t),
19009
- l = (function (e) {
19010
- const t = [];
19011
- for (const n of e) u(n) || t.push(n);
19012
- return t.length ? t : null;
19013
- })(e);
19014
- if (l) {
19015
- const e =
19016
- "plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";
19017
- return (
19018
- console.error(Object(_t.a)(e), { plugins: l }),
19019
- Promise.reject(new _t.b(e, this._editor, { plugins: l }))
19020
- );
19021
- }
19022
- return Promise.all(
19023
- i.map(function e(i) {
19024
- if (!s.includes(i) && !n._plugins.has(i) && !o.has(i))
19025
- return (function (i) {
19026
- return new Promise((s) => {
19027
- o.add(i),
19028
- i.requires &&
19029
- i.requires.forEach((n) => {
19030
- const o = u(n);
19031
- if (t.includes(o))
19032
- throw new _t.b(
19033
- "plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.",
19034
- r,
19035
- { plugin: o, requiredBy: i }
19036
- );
19037
- e(o);
19038
- });
19039
- const l = new i(r);
19040
- n._add(i, l), a.push(l), s();
19041
- });
19042
- })(i).catch((e) => {
19043
- throw (
19044
- (console.error(
19045
- Object(_t.a)(
19046
- "plugincollection-load: It was not possible to load the plugin."
19047
- ),
19048
- { plugin: i }
19049
- ),
19050
- e)
19051
- );
19052
- });
19053
- })
19054
- )
19055
- .then(() => c(a, "init"))
19056
- .then(() => c(a, "afterInit"))
19057
- .then(() => a);
19058
- function c(e, t) {
19059
- return e.reduce(
19060
- (e, n) => (n[t] ? e.then(n[t].bind(n)) : e),
19061
- Promise.resolve()
19062
- );
19063
- }
19064
- function u(e) {
19065
- return "function" == typeof e ? e : n._availablePlugins.get(e);
19066
- }
19067
- function d(e) {
19068
- return e.map((e) => u(e)).filter((e) => !!e);
19069
- }
19070
- }
19071
- destroy() {
19072
- const e = Array.from(this)
19073
- .map(([, e]) => e)
19074
- .filter((e) => "function" == typeof e.destroy)
19075
- .map((e) => e.destroy());
19076
- return Promise.all(e);
19077
- }
19078
- _add(e, t) {
19079
- this._plugins.set(e, t);
19080
- const n = e.pluginName;
19081
- if (n) {
19082
- if (this._plugins.has(n))
19083
- throw new _t.b(
19084
- "plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.",
19085
- null,
19086
- {
19087
- pluginName: n,
19088
- plugin1: this._plugins.get(n).constructor,
19089
- plugin2: e,
19090
- }
19091
- );
19092
- this._plugins.set(n, t);
19093
- }
19094
- }
19095
- }
19096
- Ct(ga, xt);
19097
- class _a {
19098
- constructor() {
19099
- this._commands = new Map();
19100
- }
19101
- add(e, t) {
19102
- this._commands.set(e, t);
19103
- }
19104
- get(e) {
19105
- return this._commands.get(e);
19106
- }
19107
- execute(e, ...t) {
19108
- const n = this.get(e);
19109
- if (!n)
19110
- throw new _t.b(
19111
- "commandcollection-command-not-found: Command does not exist.",
19112
- this,
19113
- { commandName: e }
19114
- );
19115
- n.execute(...t);
19116
- }
19117
- *names() {
19118
- yield* this._commands.keys();
19119
- }
19120
- *commands() {
19121
- yield* this._commands.values();
19122
- }
19123
- [Symbol.iterator]() {
19124
- return this._commands[Symbol.iterator]();
19125
- }
19126
- destroy() {
19127
- for (const e of this.commands()) e.destroy();
19128
- }
19129
- }
19130
- window.CKEDITOR_TRANSLATIONS || (window.CKEDITOR_TRANSLATIONS = {});
19131
- const va = ["ar", "fa", "he", "ku", "ug"];
19132
- class ba {
19133
- constructor(e = {}) {
19134
- (this.uiLanguage = e.uiLanguage || "en"),
19135
- (this.contentLanguage = e.contentLanguage || this.uiLanguage),
19136
- (this.uiLanguageDirection = ya(this.uiLanguage)),
19137
- (this.contentLanguageDirection = ya(this.contentLanguage)),
19138
- (this.t = (...e) => this._t(...e));
19139
- }
19140
- get language() {
19141
- return (
19142
- console.warn(
19143
- "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."
19144
- ),
19145
- this.uiLanguage
19146
- );
19147
- }
19148
- _t(e, t) {
19149
- let n = (function (e, t) {
19150
- const n = Object.keys(window.CKEDITOR_TRANSLATIONS).length;
19151
- return (
19152
- 1 === n && (e = Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),
19153
- 0 !== n &&
19154
- (function (e, t) {
19155
- return (
19156
- e in window.CKEDITOR_TRANSLATIONS &&
19157
- t in window.CKEDITOR_TRANSLATIONS[e]
19158
- );
19159
- })(e, t)
19160
- ? window.CKEDITOR_TRANSLATIONS[e][t].replace(
19161
- / \[context: [^\]]+\]$/,
19162
- ""
19163
- )
19164
- : t.replace(/ \[context: [^\]]+\]$/, "")
19165
- );
19166
- })(this.uiLanguage, e);
19167
- return (
19168
- t &&
19169
- (n = n.replace(/%(\d+)/g, (e, n) =>
19170
- n < t.length ? t[n] : e
19171
- )),
19172
- n
19173
- );
19174
- }
19175
- }
19176
- function ya(e) {
19177
- return va.includes(e) ? "rtl" : "ltr";
19178
- }
19179
- class wa {
19180
- constructor() {
19181
- this._consumables = new Map();
19182
- }
19183
- add(e, t) {
19184
- let n;
19185
- e.is("text") || e.is("documentFragment")
19186
- ? this._consumables.set(e, !0)
19187
- : (this._consumables.has(e)
19188
- ? (n = this._consumables.get(e))
19189
- : ((n = new ka()), this._consumables.set(e, n)),
19190
- n.add(t));
19191
- }
19192
- test(e, t) {
19193
- const n = this._consumables.get(e);
19194
- return void 0 === n
19195
- ? null
19196
- : e.is("text") || e.is("documentFragment")
19197
- ? n
19198
- : n.test(t);
19199
- }
19200
- consume(e, t) {
19201
- return (
19202
- !!this.test(e, t) &&
19203
- (e.is("text") || e.is("documentFragment")
19204
- ? this._consumables.set(e, !1)
19205
- : this._consumables.get(e).consume(t),
19206
- !0)
19207
- );
19208
- }
19209
- revert(e, t) {
19210
- const n = this._consumables.get(e);
19211
- void 0 !== n &&
19212
- (e.is("text") || e.is("documentFragment")
19213
- ? this._consumables.set(e, !0)
19214
- : n.revert(t));
19215
- }
19216
- static consumablesFromElement(e) {
19217
- const t = { name: !0, attributes: [], classes: [], styles: [] },
19218
- n = e.getAttributeKeys();
19219
- for (const e of n)
19220
- "style" != e && "class" != e && t.attributes.push(e);
19221
- const r = e.getClassNames();
19222
- for (const e of r) t.classes.push(e);
19223
- const o = e.getStyleNames();
19224
- for (const e of o) t.styles.push(e);
19225
- return t;
19226
- }
19227
- static createFrom(e, t) {
19228
- if ((t || (t = new wa()), e.is("text"))) return t.add(e), t;
19229
- e.is("element") && t.add(e, wa.consumablesFromElement(e)),
19230
- e.is("documentFragment") && t.add(e);
19231
- for (const n of e.getChildren()) t = wa.createFrom(n, t);
19232
- return t;
19233
- }
19234
- }
19235
- class ka {
19236
- constructor() {
19237
- (this._canConsumeName = null),
19238
- (this._consumables = {
19239
- attributes: new Map(),
19240
- styles: new Map(),
19241
- classes: new Map(),
19242
- });
19243
- }
19244
- add(e) {
19245
- e.name && (this._canConsumeName = !0);
19246
- for (const t in this._consumables) t in e && this._add(t, e[t]);
19247
- }
19248
- test(e) {
19249
- if (e.name && !this._canConsumeName) return this._canConsumeName;
19250
- for (const t in this._consumables)
19251
- if (t in e) {
19252
- const n = this._test(t, e[t]);
19253
- if (!0 !== n) return n;
19254
- }
19255
- return !0;
19256
- }
19257
- consume(e) {
19258
- e.name && (this._canConsumeName = !1);
19259
- for (const t in this._consumables)
19260
- t in e && this._consume(t, e[t]);
19261
- }
19262
- revert(e) {
19263
- e.name && (this._canConsumeName = !0);
19264
- for (const t in this._consumables)
19265
- t in e && this._revert(t, e[t]);
19266
- }
19267
- _add(e, t) {
19268
- const n = se(t) ? t : [t],
19269
- r = this._consumables[e];
19270
- for (const t of n) {
19271
- if ("attributes" === e && ("class" === t || "style" === t))
19272
- throw new _t.b(
19273
- "viewconsumable-invalid-attribute: Classes and styles should be handled separately.",
19274
- this
19275
- );
19276
- r.set(t, !0);
19277
- }
19278
- }
19279
- _test(e, t) {
19280
- const n = se(t) ? t : [t],
19281
- r = this._consumables[e];
19282
- for (const t of n)
19283
- if ("attributes" !== e || ("class" !== t && "style" !== t)) {
19284
- const e = r.get(t);
19285
- if (void 0 === e) return null;
19286
- if (!e) return !1;
19287
- } else {
19288
- const e = "class" == t ? "classes" : "styles",
19289
- n = this._test(e, [...this._consumables[e].keys()]);
19290
- if (!0 !== n) return n;
19291
- }
19292
- return !0;
19293
- }
19294
- _consume(e, t) {
19295
- const n = se(t) ? t : [t],
19296
- r = this._consumables[e];
19297
- for (const t of n)
19298
- if ("attributes" !== e || ("class" !== t && "style" !== t))
19299
- r.set(t, !1);
19300
- else {
19301
- const e = "class" == t ? "classes" : "styles";
19302
- this._consume(e, [...this._consumables[e].keys()]);
19303
- }
19304
- }
19305
- _revert(e, t) {
19306
- const n = se(t) ? t : [t],
19307
- r = this._consumables[e];
19308
- for (const t of n)
19309
- if ("attributes" !== e || ("class" !== t && "style" !== t))
19310
- !1 === r.get(t) && r.set(t, !0);
19311
- else {
19312
- const e = "class" == t ? "classes" : "styles";
19313
- this._revert(e, [...this._consumables[e].keys()]);
19314
- }
19315
- }
19316
- }
19317
- class xa {
19318
- constructor() {
19319
- (this._sourceDefinitions = {}),
19320
- (this._attributeProperties = {}),
19321
- this.decorate("checkChild"),
19322
- this.decorate("checkAttribute"),
19323
- this.on(
19324
- "checkAttribute",
19325
- (e, t) => {
19326
- t[0] = new Ma(t[0]);
19327
- },
19328
- { priority: "highest" }
19329
- ),
19330
- this.on(
19331
- "checkChild",
19332
- (e, t) => {
19333
- (t[0] = new Ma(t[0])), (t[1] = this.getDefinition(t[1]));
19334
- },
19335
- { priority: "highest" }
19336
- );
19337
- }
19338
- register(e, t) {
19339
- if (this._sourceDefinitions[e])
19340
- throw new _t.b(
19341
- "schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.",
19342
- this,
19343
- { itemName: e }
19344
- );
19345
- (this._sourceDefinitions[e] = [Object.assign({}, t)]),
19346
- this._clearCache();
19347
- }
19348
- extend(e, t) {
19349
- if (!this._sourceDefinitions[e])
19350
- throw new _t.b(
19351
- "schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.",
19352
- this,
19353
- { itemName: e }
19354
- );
19355
- this._sourceDefinitions[e].push(Object.assign({}, t)),
19356
- this._clearCache();
19357
- }
19358
- getDefinitions() {
19359
- return (
19360
- this._compiledDefinitions || this._compile(),
19361
- this._compiledDefinitions
19362
- );
19363
- }
19364
- getDefinition(e) {
19365
- let t;
19366
- return (
19367
- (t =
19368
- "string" == typeof e
19369
- ? e
19370
- : e.is && (e.is("text") || e.is("textProxy"))
19371
- ? "$text"
19372
- : e.name),
19373
- this.getDefinitions()[t]
19374
- );
19375
- }
19376
- isRegistered(e) {
19377
- return !!this.getDefinition(e);
19378
- }
19379
- isBlock(e) {
19380
- const t = this.getDefinition(e);
19381
- return !(!t || !t.isBlock);
19382
- }
19383
- isLimit(e) {
19384
- const t = this.getDefinition(e);
19385
- return !(!t || (!t.isLimit && !t.isObject));
19386
- }
19387
- isObject(e) {
19388
- const t = this.getDefinition(e);
19389
- return !(!t || !t.isObject);
19390
- }
19391
- isInline(e) {
19392
- const t = this.getDefinition(e);
19393
- return !(!t || !t.isInline);
19394
- }
19395
- checkChild(e, t) {
19396
- return !!t && this._checkContextMatch(t, e);
19397
- }
19398
- checkAttribute(e, t) {
19399
- const n = this.getDefinition(e.last);
19400
- return !!n && n.allowAttributes.includes(t);
19401
- }
19402
- checkMerge(e, t = null) {
19403
- if (e instanceof Ho) {
19404
- const t = e.nodeBefore,
19405
- n = e.nodeAfter;
19406
- if (!(t instanceof Yo))
19407
- throw new _t.b(
19408
- "schema-check-merge-no-element-before: The node before the merge position must be an element.",
19409
- this
19410
- );
19411
- if (!(n instanceof Yo))
19412
- throw new _t.b(
19413
- "schema-check-merge-no-element-after: The node after the merge position must be an element.",
19414
- this
19415
- );
19416
- return this.checkMerge(t, n);
19417
- }
19418
- for (const n of t.getChildren())
19419
- if (!this.checkChild(e, n)) return !1;
19420
- return !0;
19421
- }
19422
- addChildCheck(e) {
19423
- this.on(
19424
- "checkChild",
19425
- (t, [n, r]) => {
19426
- if (!r) return;
19427
- const o = e(n, r);
19428
- "boolean" == typeof o && (t.stop(), (t.return = o));
19429
- },
19430
- { priority: "high" }
19431
- );
19432
- }
19433
- addAttributeCheck(e) {
19434
- this.on(
19435
- "checkAttribute",
19436
- (t, [n, r]) => {
19437
- const o = e(n, r);
19438
- "boolean" == typeof o && (t.stop(), (t.return = o));
19439
- },
19440
- { priority: "high" }
19441
- );
19442
- }
19443
- setAttributeProperties(e, t) {
19444
- this._attributeProperties[e] = Object.assign(
19445
- this.getAttributeProperties(e),
19446
- t
19447
- );
19448
- }
19449
- getAttributeProperties(e) {
19450
- return this._attributeProperties[e] || {};
19451
- }
19452
- getLimitElement(e) {
19453
- let t;
19454
- for (
19455
- t =
19456
- e instanceof Ho
19457
- ? e.parent
19458
- : (e instanceof zo
19459
- ? [e]
19460
- : Array.from(e.getRanges())
19461
- ).reduce((e, t) => {
19462
- const n = t.getCommonAncestor();
19463
- return e
19464
- ? e.getCommonAncestor(n, { includeSelf: !0 })
19465
- : n;
19466
- }, null);
19467
- !this.isLimit(t) && t.parent;
19468
-
19469
- )
19470
- t = t.parent;
19471
- return t;
19472
- }
19473
- checkAttributeInSelection(e, t) {
19474
- if (e.isCollapsed) {
19475
- const n = [
19476
- ...e.getFirstPosition().getAncestors(),
19477
- new Ao("", e.getAttributes()),
19478
- ];
19479
- return this.checkAttribute(n, t);
19480
- }
19481
- {
19482
- const n = e.getRanges();
19483
- for (const e of n)
19484
- for (const n of e)
19485
- if (this.checkAttribute(n.item, t)) return !0;
19486
- }
19487
- return !1;
19488
- }
19489
- *getValidRanges(e, t) {
19490
- e = (function* (e) {
19491
- for (const t of e) yield* t.getMinimalFlatRanges();
19492
- })(e);
19493
- for (const n of e) yield* this._getValidRangesForRange(n, t);
19494
- }
19495
- getNearestSelectionRange(e, t = "both") {
19496
- if (this.checkChild(e, "$text")) return new zo(e);
19497
- let n, r;
19498
- ("both" != t && "backward" != t) ||
19499
- (n = new jo({ startPosition: e, direction: "backward" })),
19500
- ("both" != t && "forward" != t) ||
19501
- (r = new jo({ startPosition: e }));
19502
- for (const e of (function* (e, t) {
19503
- let n = !1;
19504
- for (; !n; ) {
19505
- if (((n = !0), e)) {
19506
- const t = e.next();
19507
- t.done || ((n = !1), yield { walker: e, value: t.value });
19508
- }
19509
- if (t) {
19510
- const e = t.next();
19511
- e.done || ((n = !1), yield { walker: t, value: e.value });
19512
- }
19513
- }
19514
- })(n, r)) {
19515
- const t = e.walker == n ? "elementEnd" : "elementStart",
19516
- r = e.value;
19517
- if (r.type == t && this.isObject(r.item))
19518
- return zo._createOn(r.item);
19519
- if (this.checkChild(r.nextPosition, "$text"))
19520
- return new zo(r.nextPosition);
19521
- }
19522
- return null;
19523
- }
19524
- findAllowedParent(e, t) {
19525
- let n = e.parent;
19526
- for (; n; ) {
19527
- if (this.checkChild(n, t)) return n;
19528
- if (this.isLimit(n)) return null;
19529
- n = n.parent;
19530
- }
19531
- return null;
19532
- }
19533
- removeDisallowedAttributes(e, t) {
19534
- for (const n of e) {
19535
- for (const e of n.getAttributeKeys())
19536
- this.checkAttribute(n, e) || t.removeAttribute(e, n);
19537
- n.is("element") &&
19538
- this.removeDisallowedAttributes(n.getChildren(), t);
19539
- }
19540
- }
19541
- createContext(e) {
19542
- return new Ma(e);
19543
- }
19544
- _clearCache() {
19545
- this._compiledDefinitions = null;
19546
- }
19547
- _compile() {
19548
- const e = {},
19549
- t = this._sourceDefinitions,
19550
- n = Object.keys(t);
19551
- for (const r of n) e[r] = Ea(t[r], r);
19552
- for (const t of n) Ta(e, t);
19553
- for (const t of n) Sa(e, t);
19554
- for (const t of n) Da(e, t), La(e, t);
19555
- for (const t of n) Ca(e, t), Pa(e, t);
19556
- this._compiledDefinitions = e;
19557
- }
19558
- _checkContextMatch(e, t, n = t.length - 1) {
19559
- const r = t.getItem(n);
19560
- if (e.allowIn.includes(r.name)) {
19561
- if (0 == n) return !0;
19562
- {
19563
- const e = this.getDefinition(r);
19564
- return this._checkContextMatch(e, t, n - 1);
19565
- }
19566
- }
19567
- return !1;
19568
- }
19569
- *_getValidRangesForRange(e, t) {
19570
- let n = e.start,
19571
- r = e.start;
19572
- for (const o of e.getItems({ shallow: !0 }))
19573
- o.is("element") &&
19574
- (yield* this._getValidRangesForRange(zo._createIn(o), t)),
19575
- this.checkAttribute(o, t) ||
19576
- (n.isEqual(r) || (yield new zo(n, r)),
19577
- (n = Ho._createAfter(o))),
19578
- (r = Ho._createAfter(o));
19579
- n.isEqual(r) || (yield new zo(n, r));
19580
- }
19581
- }
19582
- Ct(xa, on);
19583
- class Ma {
19584
- constructor(e) {
19585
- if (e instanceof Ma) return e;
19586
- "string" == typeof e
19587
- ? (e = [e])
19588
- : Array.isArray(e) || (e = e.getAncestors({ includeSelf: !0 })),
19589
- e[0] &&
19590
- "string" != typeof e[0] &&
19591
- e[0].is("documentFragment") &&
19592
- e.shift(),
19593
- (this._items = e.map(Aa));
19594
- }
19595
- get length() {
19596
- return this._items.length;
19597
- }
19598
- get last() {
19599
- return this._items[this._items.length - 1];
19600
- }
19601
- [Symbol.iterator]() {
19602
- return this._items[Symbol.iterator]();
19603
- }
19604
- push(e) {
19605
- const t = new Ma([e]);
19606
- return (t._items = [...this._items, ...t._items]), t;
19607
- }
19608
- getItem(e) {
19609
- return this._items[e];
19610
- }
19611
- *getNames() {
19612
- yield* this._items.map((e) => e.name);
19613
- }
19614
- endsWith(e) {
19615
- return Array.from(this.getNames()).join(" ").endsWith(e);
19616
- }
19617
- }
19618
- function Ea(e, t) {
19619
- const n = {
19620
- name: t,
19621
- allowIn: [],
19622
- allowContentOf: [],
19623
- allowWhere: [],
19624
- allowAttributes: [],
19625
- allowAttributesOf: [],
19626
- inheritTypesFrom: [],
19627
- };
19628
- return (
19629
- (function (e, t) {
19630
- for (const n of e) {
19631
- const e = Object.keys(n).filter((e) => e.startsWith("is"));
19632
- for (const r of e) t[r] = n[r];
19633
- }
19634
- })(e, n),
19635
- Oa(e, n, "allowIn"),
19636
- Oa(e, n, "allowContentOf"),
19637
- Oa(e, n, "allowWhere"),
19638
- Oa(e, n, "allowAttributes"),
19639
- Oa(e, n, "allowAttributesOf"),
19640
- Oa(e, n, "inheritTypesFrom"),
19641
- (function (e, t) {
19642
- for (const n of e) {
19643
- const e = n.inheritAllFrom;
19644
- e &&
19645
- (t.allowContentOf.push(e),
19646
- t.allowWhere.push(e),
19647
- t.allowAttributesOf.push(e),
19648
- t.inheritTypesFrom.push(e));
19649
- }
19650
- })(e, n),
19651
- n
19652
- );
19653
- }
19654
- function Ta(e, t) {
19655
- for (const n of e[t].allowContentOf)
19656
- e[n] &&
19657
- Na(e, n).forEach((e) => {
19658
- e.allowIn.push(t);
19659
- });
19660
- delete e[t].allowContentOf;
19661
- }
19662
- function Sa(e, t) {
19663
- for (const n of e[t].allowWhere) {
19664
- const r = e[n];
19665
- if (r) {
19666
- const n = r.allowIn;
19667
- e[t].allowIn.push(...n);
19668
- }
19669
- }
19670
- delete e[t].allowWhere;
19671
- }
19672
- function Da(e, t) {
19673
- for (const n of e[t].allowAttributesOf) {
19674
- const r = e[n];
19675
- if (r) {
19676
- const n = r.allowAttributes;
19677
- e[t].allowAttributes.push(...n);
19678
- }
19679
- }
19680
- delete e[t].allowAttributesOf;
19681
- }
19682
- function La(e, t) {
19683
- const n = e[t];
19684
- for (const t of n.inheritTypesFrom) {
19685
- const r = e[t];
19686
- if (r) {
19687
- const e = Object.keys(r).filter((e) => e.startsWith("is"));
19688
- for (const t of e) t in n || (n[t] = r[t]);
19689
- }
19690
- }
19691
- delete n.inheritTypesFrom;
19692
- }
19693
- function Ca(e, t) {
19694
- const n = e[t],
19695
- r = n.allowIn.filter((t) => e[t]);
19696
- n.allowIn = Array.from(new Set(r));
19697
- }
19698
- function Pa(e, t) {
19699
- const n = e[t];
19700
- n.allowAttributes = Array.from(new Set(n.allowAttributes));
19701
- }
19702
- function Oa(e, t, n) {
19703
- for (const r of e)
19704
- "string" == typeof r[n]
19705
- ? t[n].push(r[n])
19706
- : Array.isArray(r[n]) && t[n].push(...r[n]);
19707
- }
19708
- function Na(e, t) {
19709
- const n = e[t];
19710
- return (function (e) {
19711
- return Object.keys(e).map((t) => e[t]);
19712
- })(e).filter((e) => e.allowIn.includes(n.name));
19713
- }
19714
- function Aa(e) {
19715
- return "string" == typeof e
19716
- ? { name: e, *getAttributeKeys() {}, getAttribute() {} }
19717
- : {
19718
- name: e.is("element") ? e.name : "$text",
19719
- *getAttributeKeys() {
19720
- yield* e.getAttributeKeys();
19721
- },
19722
- getAttribute: (t) => e.getAttribute(t),
19723
- };
19724
- }
19725
- class Ia {
19726
- constructor(e = {}) {
19727
- (this._splitParts = new Map()),
19728
- (this._modelCursor = null),
19729
- (this.conversionApi = Object.assign({}, e)),
19730
- (this.conversionApi.convertItem = this._convertItem.bind(this)),
19731
- (this.conversionApi.convertChildren = this._convertChildren.bind(
19732
- this
19733
- )),
19734
- (this.conversionApi.splitToAllowedParent = this._splitToAllowedParent.bind(
19735
- this
19736
- )),
19737
- (this.conversionApi.getSplitParts = this._getSplitParts.bind(
19738
- this
19739
- ));
19740
- }
19741
- convert(e, t, n = ["$root"]) {
19742
- this.fire("viewCleanup", e),
19743
- (this._modelCursor = (function (e, t) {
19744
- let n;
19745
- for (const r of new Ma(e)) {
19746
- const e = {};
19747
- for (const t of r.getAttributeKeys())
19748
- e[t] = r.getAttribute(t);
19749
- const o = t.createElement(r.name, e);
19750
- n && t.append(o, n), (n = Ho._createAt(o, 0));
19751
- }
19752
- return n;
19753
- })(n, t)),
19754
- (this.conversionApi.writer = t),
19755
- (this.conversionApi.consumable = wa.createFrom(e)),
19756
- (this.conversionApi.store = {});
19757
- const { modelRange: r } = this._convertItem(e, this._modelCursor),
19758
- o = t.createDocumentFragment();
19759
- if (r) {
19760
- this._removeEmptyElements();
19761
- for (const e of Array.from(
19762
- this._modelCursor.parent.getChildren()
19763
- ))
19764
- t.append(e, o);
19765
- o.markers = (function (e, t) {
19766
- const n = new Set(),
19767
- r = new Map(),
19768
- o = zo._createIn(e).getItems();
19769
- for (const e of o) "$marker" == e.name && n.add(e);
19770
- for (const e of n) {
19771
- const n = e.getAttribute("data-name"),
19772
- o = t.createPositionBefore(e);
19773
- r.has(n)
19774
- ? (r.get(n).end = o.clone())
19775
- : r.set(n, new zo(o.clone())),
19776
- t.remove(e);
19777
- }
19778
- return r;
19779
- })(o, t);
19780
- }
19781
- return (
19782
- (this._modelCursor = null),
19783
- this._splitParts.clear(),
19784
- (this.conversionApi.writer = null),
19785
- (this.conversionApi.store = null),
19786
- o
19787
- );
19788
- }
19789
- _convertItem(e, t) {
19790
- const n = Object.assign({
19791
- viewItem: e,
19792
- modelCursor: t,
19793
- modelRange: null,
19794
- });
19795
- if (
19796
- (e.is("element")
19797
- ? this.fire("element:" + e.name, n, this.conversionApi)
19798
- : e.is("text")
19799
- ? this.fire("text", n, this.conversionApi)
19800
- : this.fire("documentFragment", n, this.conversionApi),
19801
- n.modelRange && !(n.modelRange instanceof zo))
19802
- )
19803
- throw new _t.b(
19804
- "view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.",
19805
- this
19806
- );
19807
- return { modelRange: n.modelRange, modelCursor: n.modelCursor };
19808
- }
19809
- _convertChildren(e, t) {
19810
- const n = new zo(t);
19811
- let r = t;
19812
- for (const t of Array.from(e.getChildren())) {
19813
- const e = this._convertItem(t, r);
19814
- e.modelRange instanceof zo &&
19815
- ((n.end = e.modelRange.end), (r = e.modelCursor));
19816
- }
19817
- return { modelRange: n, modelCursor: r };
19818
- }
19819
- _splitToAllowedParent(e, t) {
19820
- const n = this.conversionApi.schema.findAllowedParent(t, e);
19821
- if (!n) return null;
19822
- if (n === t.parent) return { position: t };
19823
- if (this._modelCursor.parent.getAncestors().includes(n))
19824
- return null;
19825
- const r = this.conversionApi.writer.split(t, n),
19826
- o = [];
19827
- for (const e of r.range.getWalker())
19828
- if ("elementEnd" == e.type) o.push(e.item);
19829
- else {
19830
- const t = o.pop(),
19831
- n = e.item;
19832
- this._registerSplitPair(t, n);
19833
- }
19834
- return { position: r.position, cursorParent: r.range.end.parent };
19835
- }
19836
- _registerSplitPair(e, t) {
19837
- this._splitParts.has(e) || this._splitParts.set(e, [e]);
19838
- const n = this._splitParts.get(e);
19839
- this._splitParts.set(t, n), n.push(t);
19840
- }
19841
- _getSplitParts(e) {
19842
- return this._splitParts.has(e) ? this._splitParts.get(e) : [e];
19843
- }
19844
- _removeEmptyElements() {
19845
- let e = !1;
19846
- for (const t of this._splitParts.keys())
19847
- t.isEmpty &&
19848
- (this.conversionApi.writer.remove(t),
19849
- this._splitParts.delete(t),
19850
- (e = !0));
19851
- e && this._removeEmptyElements();
19852
- }
19853
- }
19854
- Ct(Ia, xt);
19855
- class Ra {
19856
- constructor(e, t) {
19857
- (this.model = e),
19858
- (this.processor = t),
19859
- (this.mapper = new Bo()),
19860
- (this.downcastDispatcher = new Wo({ mapper: this.mapper })),
19861
- this.downcastDispatcher.on(
19862
- "insert:$text",
19863
- (e, t, n) => {
19864
- if (!n.consumable.consume(t.item, "insert")) return;
19865
- const r = n.writer,
19866
- o = n.mapper.toViewPosition(t.range.start),
19867
- a = r.createText(t.item.data);
19868
- r.insert(o, a);
19869
- },
19870
- { priority: "lowest" }
19871
- ),
19872
- (this.upcastDispatcher = new Ia({ schema: e.schema })),
19873
- this.upcastDispatcher.on(
19874
- "text",
19875
- (e, t, n) => {
19876
- if (
19877
- n.schema.checkChild(t.modelCursor, "$text") &&
19878
- n.consumable.consume(t.viewItem)
19879
- ) {
19880
- const e = n.writer.createText(t.viewItem.data);
19881
- n.writer.insert(e, t.modelCursor),
19882
- (t.modelRange = zo._createFromPositionAndShift(
19883
- t.modelCursor,
19884
- e.offsetSize
19885
- )),
19886
- (t.modelCursor = t.modelRange.end);
19887
- }
19888
- },
19889
- { priority: "lowest" }
19890
- ),
19891
- this.upcastDispatcher.on(
19892
- "element",
19893
- (e, t, n) => {
19894
- if (
19895
- !t.modelRange &&
19896
- n.consumable.consume(t.viewItem, { name: !0 })
19897
- ) {
19898
- const {
19899
- modelRange: e,
19900
- modelCursor: r,
19901
- } = n.convertChildren(t.viewItem, t.modelCursor);
19902
- (t.modelRange = e), (t.modelCursor = r);
19903
- }
19904
- },
19905
- { priority: "lowest" }
19906
- ),
19907
- this.upcastDispatcher.on(
19908
- "documentFragment",
19909
- (e, t, n) => {
19910
- if (
19911
- !t.modelRange &&
19912
- n.consumable.consume(t.viewItem, { name: !0 })
19913
- ) {
19914
- const {
19915
- modelRange: e,
19916
- modelCursor: r,
19917
- } = n.convertChildren(t.viewItem, t.modelCursor);
19918
- (t.modelRange = e), (t.modelCursor = r);
19919
- }
19920
- },
19921
- { priority: "lowest" }
19922
- ),
19923
- this.decorate("init"),
19924
- this.on(
19925
- "init",
19926
- () => {
19927
- this.fire("ready");
19928
- },
19929
- { priority: "lowest" }
19930
- );
19931
- }
19932
- get(e) {
19933
- const { rootName: t = "main", trim: n = "empty" } = e || {};
19934
- if (!this._checkIfRootsExists([t]))
19935
- throw new _t.b(
19936
- "datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.",
19937
- this
19938
- );
19939
- const r = this.model.document.getRoot(t);
19940
- return "empty" !== n ||
19941
- this.model.hasContent(r, { ignoreWhitespaces: !0 })
19942
- ? this.stringify(r)
19943
- : "";
19944
- }
19945
- stringify(e) {
19946
- const t = this.toView(e);
19947
- return this.processor.toData(t);
19948
- }
19949
- toView(e) {
19950
- this.mapper.clearBindings();
19951
- const t = zo._createIn(e),
19952
- n = new Un(),
19953
- r = new Vn(new xn());
19954
- if (
19955
- (this.mapper.bindElements(e, n),
19956
- this.downcastDispatcher.convertInsert(t, r),
19957
- !e.is("documentFragment"))
19958
- ) {
19959
- const t = (function (e) {
19960
- const t = [],
19961
- n = e.root.document;
19962
- if (!n) return [];
19963
- const r = zo._createIn(e);
19964
- for (const e of n.model.markers) {
19965
- const n = r.getIntersection(e.getRange());
19966
- n && t.push([e.name, n]);
19967
- }
19968
- return t;
19969
- })(e);
19970
- for (const [e, n] of t)
19971
- this.downcastDispatcher.convertMarkerAdd(e, n, r);
19972
- }
19973
- return n;
19974
- }
19975
- init(e) {
19976
- if (this.model.document.version)
19977
- throw new _t.b(
19978
- "datacontroller-init-document-not-empty: Trying to set initial data to not empty document.",
19979
- this
19980
- );
19981
- let t = {};
19982
- if (
19983
- ("string" == typeof e ? (t.main = e) : (t = e),
19984
- !this._checkIfRootsExists(Object.keys(t)))
19985
- )
19986
- throw new _t.b(
19987
- "datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.",
19988
- this
19989
- );
19990
- return (
19991
- this.model.enqueueChange("transparent", (e) => {
19992
- for (const n of Object.keys(t)) {
19993
- const r = this.model.document.getRoot(n);
19994
- e.insert(this.parse(t[n], r), r, 0);
19995
- }
19996
- }),
19997
- Promise.resolve()
19998
- );
19999
- }
20000
- set(e) {
20001
- let t = {};
20002
- if (
20003
- ("string" == typeof e ? (t.main = e) : (t = e),
20004
- !this._checkIfRootsExists(Object.keys(t)))
20005
- )
20006
- throw new _t.b(
20007
- "datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.",
20008
- this
20009
- );
20010
- this.model.enqueueChange("transparent", (e) => {
20011
- e.setSelection(null),
20012
- e.removeSelectionAttribute(
20013
- this.model.document.selection.getAttributeKeys()
20014
- );
20015
- for (const n of Object.keys(t)) {
20016
- const r = this.model.document.getRoot(n);
20017
- e.remove(e.createRangeIn(r)),
20018
- e.insert(this.parse(t[n], r), r, 0);
20019
- }
20020
- });
20021
- }
20022
- parse(e, t = "$root") {
20023
- const n = this.processor.toView(e);
20024
- return this.toModel(n, t);
20025
- }
20026
- toModel(e, t = "$root") {
20027
- return this.model.change((n) =>
20028
- this.upcastDispatcher.convert(e, n, t)
20029
- );
20030
- }
20031
- destroy() {
20032
- this.stopListening();
20033
- }
20034
- _checkIfRootsExists(e) {
20035
- for (const t of e)
20036
- if (!this.model.document.getRootNames().includes(t)) return !1;
20037
- return !0;
20038
- }
20039
- }
20040
- Ct(Ra, on);
20041
- class Ya {
20042
- constructor(e, t) {
20043
- (this._helpers = new Map()),
20044
- (this._downcast = Array.isArray(e) ? e : [e]),
20045
- this._createConversionHelpers({
20046
- name: "downcast",
20047
- dispatchers: this._downcast,
20048
- isDowncast: !0,
20049
- }),
20050
- (this._upcast = Array.isArray(t) ? t : [t]),
20051
- this._createConversionHelpers({
20052
- name: "upcast",
20053
- dispatchers: this._upcast,
20054
- isDowncast: !1,
20055
- });
20056
- }
20057
- addAlias(e, t) {
20058
- const n = this._downcast.includes(t);
20059
- if (!this._upcast.includes(t) && !n)
20060
- throw new _t.b(
20061
- "conversion-add-alias-dispatcher-not-registered: Trying to register and alias for a dispatcher that nas not been registered.",
20062
- this
20063
- );
20064
- this._createConversionHelpers({
20065
- name: e,
20066
- dispatchers: [t],
20067
- isDowncast: n,
20068
- });
20069
- }
20070
- for(e) {
20071
- if (!this._helpers.has(e))
20072
- throw new _t.b(
20073
- "conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.",
20074
- this
20075
- );
20076
- return this._helpers.get(e);
20077
- }
20078
- elementToElement(e) {
20079
- this.for("downcast").elementToElement(e);
20080
- for (const { model: t, view: n } of ja(e))
20081
- this.for("upcast").elementToElement({
20082
- model: t,
20083
- view: n,
20084
- converterPriority: e.converterPriority,
20085
- });
20086
- }
20087
- attributeToElement(e) {
20088
- this.for("downcast").attributeToElement(e);
20089
- for (const { model: t, view: n } of ja(e))
20090
- this.for("upcast").elementToAttribute({
20091
- view: n,
20092
- model: t,
20093
- converterPriority: e.converterPriority,
20094
- });
20095
- }
20096
- attributeToAttribute(e) {
20097
- this.for("downcast").attributeToAttribute(e);
20098
- for (const { model: t, view: n } of ja(e))
20099
- this.for("upcast").attributeToAttribute({ view: n, model: t });
20100
- }
20101
- _createConversionHelpers({
20102
- name: e,
20103
- dispatchers: t,
20104
- isDowncast: n,
20105
- }) {
20106
- if (this._helpers.has(e))
20107
- throw new _t.b(
20108
- "conversion-group-exists: Trying to register a group name that has already been registered.",
20109
- this
20110
- );
20111
- const r = n ? new oa(t) : new ua(t);
20112
- this._helpers.set(e, r);
20113
- }
20114
- }
20115
- function* ja(e) {
20116
- if (e.model.values)
20117
- for (const t of e.model.values)
20118
- yield* Fa(
20119
- { key: e.model.key, value: t },
20120
- e.view[t],
20121
- e.upcastAlso ? e.upcastAlso[t] : void 0
20122
- );
20123
- else yield* Fa(e.model, e.view, e.upcastAlso);
20124
- }
20125
- function* Fa(e, t, n) {
20126
- if ((yield { model: e, view: t }, n)) {
20127
- n = Array.isArray(n) ? n : [n];
20128
- for (const t of n) yield { model: e, view: t };
20129
- }
20130
- }
20131
- class Ha {
20132
- constructor(e = "default") {
20133
- (this.operations = []), (this.type = e);
20134
- }
20135
- get baseVersion() {
20136
- for (const e of this.operations)
20137
- if (null !== e.baseVersion) return e.baseVersion;
20138
- return null;
20139
- }
20140
- addOperation(e) {
20141
- return (e.batch = this), this.operations.push(e), e;
20142
- }
20143
- }
20144
- class za {
20145
- constructor(e) {
20146
- (this.baseVersion = e),
20147
- (this.isDocumentOperation = null !== this.baseVersion),
20148
- (this.batch = null);
20149
- }
20150
- _validate() {}
20151
- toJSON() {
20152
- const e = Object.assign({}, this);
20153
- return (
20154
- (e.__className = this.constructor.className),
20155
- delete e.batch,
20156
- delete e.isDocumentOperation,
20157
- e
20158
- );
20159
- }
20160
- static get className() {
20161
- return "Operation";
20162
- }
20163
- static fromJSON(e) {
20164
- return new this(e.baseVersion);
20165
- }
20166
- }
20167
- class Ba {
20168
- constructor(e) {
20169
- (this.markers = new Map()),
20170
- (this._children = new Ro()),
20171
- e && this._insertChild(0, e);
20172
- }
20173
- [Symbol.iterator]() {
20174
- return this.getChildren();
20175
- }
20176
- get childCount() {
20177
- return this._children.length;
20178
- }
20179
- get maxOffset() {
20180
- return this._children.maxOffset;
20181
- }
20182
- get isEmpty() {
20183
- return 0 === this.childCount;
20184
- }
20185
- get root() {
20186
- return this;
20187
- }
20188
- get parent() {
20189
- return null;
20190
- }
20191
- is(e) {
20192
- return "documentFragment" == e || "model:documentFragment" == e;
20193
- }
20194
- getChild(e) {
20195
- return this._children.getNode(e);
20196
- }
20197
- getChildren() {
20198
- return this._children[Symbol.iterator]();
20199
- }
20200
- getChildIndex(e) {
20201
- return this._children.getNodeIndex(e);
20202
- }
20203
- getChildStartOffset(e) {
20204
- return this._children.getNodeStartOffset(e);
20205
- }
20206
- getPath() {
20207
- return [];
20208
- }
20209
- getNodeByPath(e) {
20210
- let t = this;
20211
- for (const n of e) t = t.getChild(t.offsetToIndex(n));
20212
- return t;
20213
- }
20214
- offsetToIndex(e) {
20215
- return this._children.offsetToIndex(e);
20216
- }
20217
- toJSON() {
20218
- const e = [];
20219
- for (const t of this._children) e.push(t.toJSON());
20220
- return e;
20221
- }
20222
- static fromJSON(e) {
20223
- const t = [];
20224
- for (const n of e)
20225
- n.name ? t.push(Yo.fromJSON(n)) : t.push(Ao.fromJSON(n));
20226
- return new Ba(t);
20227
- }
20228
- _appendChild(e) {
20229
- this._insertChild(this.childCount, e);
20230
- }
20231
- _insertChild(e, t) {
20232
- const n = (function (e) {
20233
- return "string" == typeof e
20234
- ? [new Ao(e)]
20235
- : (Yt(e) || (e = [e]),
20236
- Array.from(e).map((e) =>
20237
- "string" == typeof e
20238
- ? new Ao(e)
20239
- : e instanceof Io
20240
- ? new Ao(e.data, e.getAttributes())
20241
- : e
20242
- ));
20243
- })(t);
20244
- for (const e of n)
20245
- null !== e.parent && e._remove(), (e.parent = this);
20246
- this._children._insertNodes(e, n);
20247
- }
20248
- _removeChildren(e, t = 1) {
20249
- const n = this._children._removeNodes(e, t);
20250
- for (const e of n) e.parent = null;
20251
- return n;
20252
- }
20253
- }
20254
- function Ua(e, t) {
20255
- const n = (t = qa(t)).reduce((e, t) => e + t.offsetSize, 0),
20256
- r = e.parent;
20257
- Ja(e);
20258
- const o = e.index;
20259
- return (
20260
- r._insertChild(o, t),
20261
- Ga(r, o + t.length),
20262
- Ga(r, o),
20263
- new zo(e, e.getShiftedBy(n))
20264
- );
20265
- }
20266
- function Va(e) {
20267
- if (!e.isFlat)
20268
- throw new _t.b(
20269
- "operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.",
20270
- this
20271
- );
20272
- const t = e.start.parent;
20273
- Ja(e.start), Ja(e.end);
20274
- const n = t._removeChildren(
20275
- e.start.index,
20276
- e.end.index - e.start.index
20277
- );
20278
- return Ga(t, e.start.index), n;
20279
- }
20280
- function Wa(e, t) {
20281
- if (!e.isFlat)
20282
- throw new _t.b(
20283
- "operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.",
20284
- this
20285
- );
20286
- const n = Va(e);
20287
- return Ua(
20288
- (t = t._getTransformedByDeletion(
20289
- e.start,
20290
- e.end.offset - e.start.offset
20291
- )),
20292
- n
20293
- );
20294
- }
20295
- function qa(e) {
20296
- const t = [];
20297
- e instanceof Array || (e = [e]);
20298
- for (let n = 0; n < e.length; n++)
20299
- if ("string" == typeof e[n]) t.push(new Ao(e[n]));
20300
- else if (e[n] instanceof Io)
20301
- t.push(new Ao(e[n].data, e[n].getAttributes()));
20302
- else if (e[n] instanceof Ba || e[n] instanceof Ro)
20303
- for (const r of e[n]) t.push(r);
20304
- else e[n] instanceof No && t.push(e[n]);
20305
- for (let e = 1; e < t.length; e++) {
20306
- const n = t[e],
20307
- r = t[e - 1];
20308
- n instanceof Ao &&
20309
- r instanceof Ao &&
20310
- Ka(n, r) &&
20311
- (t.splice(e - 1, 2, new Ao(r.data + n.data, r.getAttributes())),
20312
- e--);
20313
- }
20314
- return t;
20315
- }
20316
- function Ga(e, t) {
20317
- const n = e.getChild(t - 1),
20318
- r = e.getChild(t);
20319
- if (n && r && n.is("text") && r.is("text") && Ka(n, r)) {
20320
- const o = new Ao(n.data + r.data, n.getAttributes());
20321
- e._removeChildren(t - 1, 2), e._insertChild(t - 1, o);
20322
- }
20323
- }
20324
- function Ja(e) {
20325
- const t = e.textNode,
20326
- n = e.parent;
20327
- if (t) {
20328
- const r = e.offset - t.startOffset,
20329
- o = t.index;
20330
- n._removeChildren(o, 1);
20331
- const a = new Ao(t.data.substr(0, r), t.getAttributes()),
20332
- i = new Ao(t.data.substr(r), t.getAttributes());
20333
- n._insertChild(o, [a, i]);
20334
- }
20335
- }
20336
- function Ka(e, t) {
20337
- const n = e.getAttributes(),
20338
- r = t.getAttributes();
20339
- for (const e of n) {
20340
- if (e[1] !== t.getAttribute(e[0])) return !1;
20341
- r.next();
20342
- }
20343
- return r.next().done;
20344
- }
20345
- var Qa = function (e, t) {
20346
- return qr(e, t);
20347
- };
20348
- class Xa extends za {
20349
- constructor(e, t, n, r, o) {
20350
- super(o),
20351
- (this.range = e.clone()),
20352
- (this.key = t),
20353
- (this.oldValue = void 0 === n ? null : n),
20354
- (this.newValue = void 0 === r ? null : r);
20355
- }
20356
- get type() {
20357
- return null === this.oldValue
20358
- ? "addAttribute"
20359
- : null === this.newValue
20360
- ? "removeAttribute"
20361
- : "changeAttribute";
20362
- }
20363
- clone() {
20364
- return new Xa(
20365
- this.range,
20366
- this.key,
20367
- this.oldValue,
20368
- this.newValue,
20369
- this.baseVersion
20370
- );
20371
- }
20372
- getReversed() {
20373
- return new Xa(
20374
- this.range,
20375
- this.key,
20376
- this.newValue,
20377
- this.oldValue,
20378
- this.baseVersion + 1
20379
- );
20380
- }
20381
- toJSON() {
20382
- const e = super.toJSON();
20383
- return (e.range = this.range.toJSON()), e;
20384
- }
20385
- _validate() {
20386
- if (!this.range.isFlat)
20387
- throw new _t.b(
20388
- "attribute-operation-range-not-flat: The range to change is not flat.",
20389
- this
20390
- );
20391
- for (const e of this.range.getItems({ shallow: !0 })) {
20392
- if (
20393
- null !== this.oldValue &&
20394
- !Qa(e.getAttribute(this.key), this.oldValue)
20395
- )
20396
- throw new _t.b(
20397
- "attribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.",
20398
- this,
20399
- { item: e, key: this.key, value: this.oldValue }
20400
- );
20401
- if (
20402
- null === this.oldValue &&
20403
- null !== this.newValue &&
20404
- e.hasAttribute(this.key)
20405
- )
20406
- throw new _t.b(
20407
- "attribute-operation-attribute-exists: The attribute with given key already exists.",
20408
- this,
20409
- { node: e, key: this.key }
20410
- );
20411
- }
20412
- }
20413
- _execute() {
20414
- Qa(this.oldValue, this.newValue) ||
20415
- (function (e, t, n) {
20416
- Ja(e.start), Ja(e.end);
20417
- for (const r of e.getItems({ shallow: !0 })) {
20418
- const e = r.is("textProxy") ? r.textNode : r;
20419
- null !== n ? e._setAttribute(t, n) : e._removeAttribute(t),
20420
- Ga(e.parent, e.index);
20421
- }
20422
- Ga(e.end.parent, e.end.index);
20423
- })(this.range, this.key, this.newValue);
20424
- }
20425
- static get className() {
20426
- return "AttributeOperation";
20427
- }
20428
- static fromJSON(e, t) {
20429
- return new Xa(
20430
- zo.fromJSON(e.range, t),
20431
- e.key,
20432
- e.oldValue,
20433
- e.newValue,
20434
- e.baseVersion
20435
- );
20436
- }
20437
- }
20438
- class $a extends za {
20439
- constructor(e, t) {
20440
- super(null),
20441
- (this.sourcePosition = e.clone()),
20442
- (this.howMany = t);
20443
- }
20444
- get type() {
20445
- return "detach";
20446
- }
20447
- toJSON() {
20448
- const e = super.toJSON();
20449
- return (e.sourcePosition = this.sourcePosition.toJSON()), e;
20450
- }
20451
- _validate() {
20452
- if (this.sourcePosition.root.document)
20453
- throw new _t.b(
20454
- "detach-operation-on-document-node: Cannot detach document node.",
20455
- this
20456
- );
20457
- }
20458
- _execute() {
20459
- Va(
20460
- zo._createFromPositionAndShift(
20461
- this.sourcePosition,
20462
- this.howMany
20463
- )
20464
- );
20465
- }
20466
- static get className() {
20467
- return "DetachOperation";
20468
- }
20469
- }
20470
- class Za extends za {
20471
- constructor(e, t, n, r) {
20472
- super(r),
20473
- (this.sourcePosition = e.clone()),
20474
- (this.sourcePosition.stickiness = "toNext"),
20475
- (this.howMany = t),
20476
- (this.targetPosition = n.clone()),
20477
- (this.targetPosition.stickiness = "toNone");
20478
- }
20479
- get type() {
20480
- return "$graveyard" == this.targetPosition.root.rootName
20481
- ? "remove"
20482
- : "$graveyard" == this.sourcePosition.root.rootName
20483
- ? "reinsert"
20484
- : "move";
20485
- }
20486
- clone() {
20487
- return new this.constructor(
20488
- this.sourcePosition,
20489
- this.howMany,
20490
- this.targetPosition,
20491
- this.baseVersion
20492
- );
20493
- }
20494
- getMovedRangeStart() {
20495
- return this.targetPosition._getTransformedByDeletion(
20496
- this.sourcePosition,
20497
- this.howMany
20498
- );
20499
- }
20500
- getReversed() {
20501
- const e = this.sourcePosition._getTransformedByInsertion(
20502
- this.targetPosition,
20503
- this.howMany
20504
- );
20505
- return new this.constructor(
20506
- this.getMovedRangeStart(),
20507
- this.howMany,
20508
- e,
20509
- this.baseVersion + 1
20510
- );
20511
- }
20512
- _validate() {
20513
- const e = this.sourcePosition.parent,
20514
- t = this.targetPosition.parent,
20515
- n = this.sourcePosition.offset,
20516
- r = this.targetPosition.offset;
20517
- if (n + this.howMany > e.maxOffset)
20518
- throw new _t.b(
20519
- "move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.",
20520
- this
20521
- );
20522
- if (e === t && n < r && r < n + this.howMany)
20523
- throw new _t.b(
20524
- "move-operation-range-into-itself: Trying to move a range of nodes to the inside of that range.",
20525
- this
20526
- );
20527
- if (
20528
- this.sourcePosition.root == this.targetPosition.root &&
20529
- "prefix" ==
20530
- Pt(
20531
- this.sourcePosition.getParentPath(),
20532
- this.targetPosition.getParentPath()
20533
- )
20534
- ) {
20535
- const e = this.sourcePosition.path.length - 1;
20536
- if (
20537
- this.targetPosition.path[e] >= n &&
20538
- this.targetPosition.path[e] < n + this.howMany
20539
- )
20540
- throw new _t.b(
20541
- "move-operation-node-into-itself: Trying to move a range of nodes into one of nodes from that range.",
20542
- this
20543
- );
20544
- }
20545
- }
20546
- _execute() {
20547
- Wa(
20548
- zo._createFromPositionAndShift(
20549
- this.sourcePosition,
20550
- this.howMany
20551
- ),
20552
- this.targetPosition
20553
- );
20554
- }
20555
- toJSON() {
20556
- const e = super.toJSON();
20557
- return (
20558
- (e.sourcePosition = this.sourcePosition.toJSON()),
20559
- (e.targetPosition = this.targetPosition.toJSON()),
20560
- e
20561
- );
20562
- }
20563
- static get className() {
20564
- return "MoveOperation";
20565
- }
20566
- static fromJSON(e, t) {
20567
- const n = Ho.fromJSON(e.sourcePosition, t),
20568
- r = Ho.fromJSON(e.targetPosition, t);
20569
- return new this(n, e.howMany, r, e.baseVersion);
20570
- }
20571
- }
20572
- class ei extends za {
20573
- constructor(e, t, n) {
20574
- super(n),
20575
- (this.position = e.clone()),
20576
- (this.position.stickiness = "toNone"),
20577
- (this.nodes = new Ro(qa(t))),
20578
- (this.shouldReceiveAttributes = !1);
20579
- }
20580
- get type() {
20581
- return "insert";
20582
- }
20583
- get howMany() {
20584
- return this.nodes.maxOffset;
20585
- }
20586
- clone() {
20587
- const e = new Ro([...this.nodes].map((e) => e._clone(!0))),
20588
- t = new ei(this.position, e, this.baseVersion);
20589
- return (
20590
- (t.shouldReceiveAttributes = this.shouldReceiveAttributes), t
20591
- );
20592
- }
20593
- getReversed() {
20594
- const e = this.position.root.document.graveyard,
20595
- t = new Ho(e, [0]);
20596
- return new Za(
20597
- this.position,
20598
- this.nodes.maxOffset,
20599
- t,
20600
- this.baseVersion + 1
20601
- );
20602
- }
20603
- _validate() {
20604
- const e = this.position.parent;
20605
- if (!e || e.maxOffset < this.position.offset)
20606
- throw new _t.b(
20607
- "insert-operation-position-invalid: Insertion position is invalid.",
20608
- this
20609
- );
20610
- }
20611
- _execute() {
20612
- const e = this.nodes;
20613
- (this.nodes = new Ro([...e].map((e) => e._clone(!0)))),
20614
- Ua(this.position, e);
20615
- }
20616
- toJSON() {
20617
- const e = super.toJSON();
20618
- return (
20619
- (e.position = this.position.toJSON()),
20620
- (e.nodes = this.nodes.toJSON()),
20621
- e
20622
- );
20623
- }
20624
- static get className() {
20625
- return "InsertOperation";
20626
- }
20627
- static fromJSON(e, t) {
20628
- const n = [];
20629
- for (const t of e.nodes)
20630
- t.name ? n.push(Yo.fromJSON(t)) : n.push(Ao.fromJSON(t));
20631
- const r = new ei(Ho.fromJSON(e.position, t), n, e.baseVersion);
20632
- return (r.shouldReceiveAttributes = e.shouldReceiveAttributes), r;
20633
- }
20634
- }
20635
- class ti extends za {
20636
- constructor(e, t, n, r, o, a) {
20637
- super(a),
20638
- (this.name = e),
20639
- (this.oldRange = t ? t.clone() : null),
20640
- (this.newRange = n ? n.clone() : null),
20641
- (this.affectsData = o),
20642
- (this._markers = r);
20643
- }
20644
- get type() {
20645
- return "marker";
20646
- }
20647
- clone() {
20648
- return new ti(
20649
- this.name,
20650
- this.oldRange,
20651
- this.newRange,
20652
- this._markers,
20653
- this.affectsData,
20654
- this.baseVersion
20655
- );
20656
- }
20657
- getReversed() {
20658
- return new ti(
20659
- this.name,
20660
- this.newRange,
20661
- this.oldRange,
20662
- this._markers,
20663
- this.affectsData,
20664
- this.baseVersion + 1
20665
- );
20666
- }
20667
- _execute() {
20668
- const e = this.newRange ? "_set" : "_remove";
20669
- this._markers[e](this.name, this.newRange, !0, this.affectsData);
20670
- }
20671
- toJSON() {
20672
- const e = super.toJSON();
20673
- return (
20674
- this.oldRange && (e.oldRange = this.oldRange.toJSON()),
20675
- this.newRange && (e.newRange = this.newRange.toJSON()),
20676
- delete e._markers,
20677
- e
20678
- );
20679
- }
20680
- static get className() {
20681
- return "MarkerOperation";
20682
- }
20683
- static fromJSON(e, t) {
20684
- return new ti(
20685
- e.name,
20686
- e.oldRange ? zo.fromJSON(e.oldRange, t) : null,
20687
- e.newRange ? zo.fromJSON(e.newRange, t) : null,
20688
- t.model.markers,
20689
- e.affectsData,
20690
- e.baseVersion
20691
- );
20692
- }
20693
- }
20694
- class ni extends za {
20695
- constructor(e, t, n, r) {
20696
- super(r),
20697
- (this.position = e),
20698
- (this.position.stickiness = "toNext"),
20699
- (this.oldName = t),
20700
- (this.newName = n);
20701
- }
20702
- get type() {
20703
- return "rename";
20704
- }
20705
- clone() {
20706
- return new ni(
20707
- this.position.clone(),
20708
- this.oldName,
20709
- this.newName,
20710
- this.baseVersion
20711
- );
20712
- }
20713
- getReversed() {
20714
- return new ni(
20715
- this.position.clone(),
20716
- this.newName,
20717
- this.oldName,
20718
- this.baseVersion + 1
20719
- );
20720
- }
20721
- _validate() {
20722
- const e = this.position.nodeAfter;
20723
- if (!(e instanceof Yo))
20724
- throw new _t.b(
20725
- "rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.",
20726
- this
20727
- );
20728
- if (e.name !== this.oldName)
20729
- throw new _t.b(
20730
- "rename-operation-wrong-name: Element to change has different name than operation's old name.",
20731
- this
20732
- );
20733
- }
20734
- _execute() {
20735
- this.position.nodeAfter.name = this.newName;
20736
- }
20737
- toJSON() {
20738
- const e = super.toJSON();
20739
- return (e.position = this.position.toJSON()), e;
20740
- }
20741
- static get className() {
20742
- return "RenameOperation";
20743
- }
20744
- static fromJSON(e, t) {
20745
- return new ni(
20746
- Ho.fromJSON(e.position, t),
20747
- e.oldName,
20748
- e.newName,
20749
- e.baseVersion
20750
- );
20751
- }
20752
- }
20753
- class ri extends za {
20754
- constructor(e, t, n, r, o) {
20755
- super(o),
20756
- (this.root = e),
20757
- (this.key = t),
20758
- (this.oldValue = n),
20759
- (this.newValue = r);
20760
- }
20761
- get type() {
20762
- return null === this.oldValue
20763
- ? "addRootAttribute"
20764
- : null === this.newValue
20765
- ? "removeRootAttribute"
20766
- : "changeRootAttribute";
20767
- }
20768
- clone() {
20769
- return new ri(
20770
- this.root,
20771
- this.key,
20772
- this.oldValue,
20773
- this.newValue,
20774
- this.baseVersion
20775
- );
20776
- }
20777
- getReversed() {
20778
- return new ri(
20779
- this.root,
20780
- this.key,
20781
- this.newValue,
20782
- this.oldValue,
20783
- this.baseVersion + 1
20784
- );
20785
- }
20786
- _validate() {
20787
- if (
20788
- this.root != this.root.root ||
20789
- this.root.is("documentFragment")
20790
- )
20791
- throw new _t.b(
20792
- "rootattribute-operation-not-a-root: The element to change is not a root element.",
20793
- this,
20794
- { root: this.root, key: this.key }
20795
- );
20796
- if (
20797
- null !== this.oldValue &&
20798
- this.root.getAttribute(this.key) !== this.oldValue
20799
- )
20800
- throw new _t.b(
20801
- "rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.",
20802
- this,
20803
- { root: this.root, key: this.key }
20804
- );
20805
- if (
20806
- null === this.oldValue &&
20807
- null !== this.newValue &&
20808
- this.root.hasAttribute(this.key)
20809
- )
20810
- throw new _t.b(
20811
- "rootattribute-operation-attribute-exists: The attribute with given key already exists.",
20812
- this,
20813
- { root: this.root, key: this.key }
20814
- );
20815
- }
20816
- _execute() {
20817
- null !== this.newValue
20818
- ? this.root._setAttribute(this.key, this.newValue)
20819
- : this.root._removeAttribute(this.key);
20820
- }
20821
- toJSON() {
20822
- const e = super.toJSON();
20823
- return (e.root = this.root.toJSON()), e;
20824
- }
20825
- static get className() {
20826
- return "RootAttributeOperation";
20827
- }
20828
- static fromJSON(e, t) {
20829
- if (!t.getRoot(e.root))
20830
- throw new _t.b(
20831
- "rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.",
20832
- this,
20833
- { rootName: e.root }
20834
- );
20835
- return new ri(
20836
- t.getRoot(e.root),
20837
- e.key,
20838
- e.oldValue,
20839
- e.newValue,
20840
- e.baseVersion
20841
- );
20842
- }
20843
- }
20844
- class oi extends za {
20845
- constructor(e, t, n, r, o) {
20846
- super(o),
20847
- (this.sourcePosition = e.clone()),
20848
- (this.sourcePosition.stickiness = "toPrevious"),
20849
- (this.howMany = t),
20850
- (this.targetPosition = n.clone()),
20851
- (this.targetPosition.stickiness = "toNext"),
20852
- (this.graveyardPosition = r.clone());
20853
- }
20854
- get type() {
20855
- return "merge";
20856
- }
20857
- get deletionPosition() {
20858
- return new Ho(
20859
- this.sourcePosition.root,
20860
- this.sourcePosition.path.slice(0, -1)
20861
- );
20862
- }
20863
- get movedRange() {
20864
- const e = this.sourcePosition.getShiftedBy(
20865
- Number.POSITIVE_INFINITY
20866
- );
20867
- return new zo(this.sourcePosition, e);
20868
- }
20869
- clone() {
20870
- return new this.constructor(
20871
- this.sourcePosition,
20872
- this.howMany,
20873
- this.targetPosition,
20874
- this.graveyardPosition,
20875
- this.baseVersion
20876
- );
20877
- }
20878
- getReversed() {
20879
- const e = this.targetPosition._getTransformedByMergeOperation(
20880
- this
20881
- ),
20882
- t = this.sourcePosition.path.slice(0, -1),
20883
- n = new Ho(
20884
- this.sourcePosition.root,
20885
- t
20886
- )._getTransformedByMergeOperation(this),
20887
- r = new ai(
20888
- e,
20889
- this.howMany,
20890
- this.graveyardPosition,
20891
- this.baseVersion + 1
20892
- );
20893
- return (r.insertionPosition = n), r;
20894
- }
20895
- _validate() {
20896
- const e = this.sourcePosition.parent,
20897
- t = this.targetPosition.parent;
20898
- if (!e.parent)
20899
- throw new _t.b(
20900
- "merge-operation-source-position-invalid: Merge source position is invalid.",
20901
- this
20902
- );
20903
- if (!t.parent)
20904
- throw new _t.b(
20905
- "merge-operation-target-position-invalid: Merge target position is invalid.",
20906
- this
20907
- );
20908
- if (this.howMany != e.maxOffset)
20909
- throw new _t.b(
20910
- "merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.",
20911
- this
20912
- );
20913
- }
20914
- _execute() {
20915
- const e = this.sourcePosition.parent;
20916
- Wa(zo._createIn(e), this.targetPosition),
20917
- Wa(zo._createOn(e), this.graveyardPosition);
20918
- }
20919
- toJSON() {
20920
- const e = super.toJSON();
20921
- return (
20922
- (e.sourcePosition = e.sourcePosition.toJSON()),
20923
- (e.targetPosition = e.targetPosition.toJSON()),
20924
- (e.graveyardPosition = e.graveyardPosition.toJSON()),
20925
- e
20926
- );
20927
- }
20928
- static get className() {
20929
- return "MergeOperation";
20930
- }
20931
- static fromJSON(e, t) {
20932
- const n = Ho.fromJSON(e.sourcePosition, t),
20933
- r = Ho.fromJSON(e.targetPosition, t),
20934
- o = Ho.fromJSON(e.graveyardPosition, t);
20935
- return new this(n, e.howMany, r, o, e.baseVersion);
20936
- }
20937
- }
20938
- class ai extends za {
20939
- constructor(e, t, n, r) {
20940
- super(r),
20941
- (this.splitPosition = e.clone()),
20942
- (this.splitPosition.stickiness = "toNext"),
20943
- (this.howMany = t),
20944
- (this.insertionPosition = ai.getInsertionPosition(e)),
20945
- (this.insertionPosition.stickiness = "toNone"),
20946
- (this.graveyardPosition = n ? n.clone() : null),
20947
- this.graveyardPosition &&
20948
- (this.graveyardPosition.stickiness = "toNext");
20949
- }
20950
- get type() {
20951
- return "split";
20952
- }
20953
- get moveTargetPosition() {
20954
- const e = this.insertionPosition.path.slice();
20955
- return e.push(0), new Ho(this.insertionPosition.root, e);
20956
- }
20957
- get movedRange() {
20958
- const e = this.splitPosition.getShiftedBy(
20959
- Number.POSITIVE_INFINITY
20960
- );
20961
- return new zo(this.splitPosition, e);
20962
- }
20963
- clone() {
20964
- const e = new this.constructor(
20965
- this.splitPosition,
20966
- this.howMany,
20967
- this.graveyardPosition,
20968
- this.baseVersion
20969
- );
20970
- return (e.insertionPosition = this.insertionPosition), e;
20971
- }
20972
- getReversed() {
20973
- const e = this.splitPosition.root.document.graveyard,
20974
- t = new Ho(e, [0]);
20975
- return new oi(
20976
- this.moveTargetPosition,
20977
- this.howMany,
20978
- this.splitPosition,
20979
- t,
20980
- this.baseVersion + 1
20981
- );
20982
- }
20983
- _validate() {
20984
- const e = this.splitPosition.parent,
20985
- t = this.splitPosition.offset;
20986
- if (!e || e.maxOffset < t)
20987
- throw new _t.b(
20988
- "split-operation-position-invalid: Split position is invalid.",
20989
- this
20990
- );
20991
- if (!e.parent)
20992
- throw new _t.b(
20993
- "split-operation-split-in-root: Cannot split root element.",
20994
- this
20995
- );
20996
- if (this.howMany != e.maxOffset - this.splitPosition.offset)
20997
- throw new _t.b(
20998
- "split-operation-how-many-invalid: Split operation specifies wrong number of nodes to move.",
20999
- this
21000
- );
21001
- if (this.graveyardPosition && !this.graveyardPosition.nodeAfter)
21002
- throw new _t.b(
21003
- "split-operation-graveyard-position-invalid: Graveyard position invalid.",
21004
- this
21005
- );
21006
- }
21007
- _execute() {
21008
- const e = this.splitPosition.parent;
21009
- if (this.graveyardPosition)
21010
- Wa(
21011
- zo._createFromPositionAndShift(this.graveyardPosition, 1),
21012
- this.insertionPosition
21013
- );
21014
- else {
21015
- const t = e._clone();
21016
- Ua(this.insertionPosition, t);
21017
- }
21018
- Wa(
21019
- new zo(
21020
- Ho._createAt(e, this.splitPosition.offset),
21021
- Ho._createAt(e, e.maxOffset)
21022
- ),
21023
- this.moveTargetPosition
21024
- );
21025
- }
21026
- toJSON() {
21027
- const e = super.toJSON();
21028
- return (
21029
- (e.splitPosition = this.splitPosition.toJSON()),
21030
- (e.insertionPosition = this.insertionPosition.toJSON()),
21031
- this.graveyardPosition &&
21032
- (e.graveyardPosition = this.graveyardPosition.toJSON()),
21033
- e
21034
- );
21035
- }
21036
- static get className() {
21037
- return "SplitOperation";
21038
- }
21039
- static getInsertionPosition(e) {
21040
- const t = e.path.slice(0, -1);
21041
- return t[t.length - 1]++, new Ho(e.root, t);
21042
- }
21043
- static fromJSON(e, t) {
21044
- const n = Ho.fromJSON(e.splitPosition, t),
21045
- r = Ho.fromJSON(e.insertionPosition, t),
21046
- o = e.graveyardPosition
21047
- ? Ho.fromJSON(e.graveyardPosition, t)
21048
- : null,
21049
- a = new this(n, e.howMany, o, e.baseVersion);
21050
- return (a.insertionPosition = r), a;
21051
- }
21052
- }
21053
- class ii extends Yo {
21054
- constructor(e, t, n = "main") {
21055
- super(t), (this._doc = e), (this.rootName = n);
21056
- }
21057
- get document() {
21058
- return this._doc;
21059
- }
21060
- is(e, t) {
21061
- const n = e.replace("model:", "");
21062
- return t
21063
- ? ("rootElement" == n && t == this.name) || super.is(e, t)
21064
- : "rootElement" == n || super.is(e);
21065
- }
21066
- toJSON() {
21067
- return this.rootName;
21068
- }
21069
- }
21070
- class si {
21071
- constructor(e, t) {
21072
- (this.model = e), (this.batch = t);
21073
- }
21074
- createText(e, t) {
21075
- return new Ao(e, t);
21076
- }
21077
- createElement(e, t) {
21078
- return new Yo(e, t);
21079
- }
21080
- createDocumentFragment() {
21081
- return new Ba();
21082
- }
21083
- insert(e, t, n = 0) {
21084
- if (
21085
- (this._assertWriterUsedCorrectly(),
21086
- e instanceof Ao && "" == e.data)
21087
- )
21088
- return;
21089
- const r = Ho._createAt(t, n);
21090
- if (e.parent) {
21091
- if (hi(e.root, r.root))
21092
- return void this.move(zo._createOn(e), r);
21093
- if (e.root.document)
21094
- throw new _t.b(
21095
- "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.",
21096
- this
21097
- );
21098
- this.remove(e);
21099
- }
21100
- const o = r.root.document ? r.root.document.version : null,
21101
- a = new ei(r, e, o);
21102
- if (
21103
- (e instanceof Ao && (a.shouldReceiveAttributes = !0),
21104
- this.batch.addOperation(a),
21105
- this.model.applyOperation(a),
21106
- e instanceof Ba)
21107
- )
21108
- for (const [t, n] of e.markers) {
21109
- const e = Ho._createAt(n.root, 0),
21110
- o = {
21111
- range: new zo(
21112
- n.start._getCombined(e, r),
21113
- n.end._getCombined(e, r)
21114
- ),
21115
- usingOperation: !0,
21116
- affectsData: !0,
21117
- };
21118
- this.model.markers.has(t)
21119
- ? this.updateMarker(t, o)
21120
- : this.addMarker(t, o);
21121
- }
21122
- }
21123
- insertText(e, t, n, r) {
21124
- t instanceof Ba || t instanceof Yo || t instanceof Ho
21125
- ? this.insert(this.createText(e), t, n)
21126
- : this.insert(this.createText(e, t), n, r);
21127
- }
21128
- insertElement(e, t, n, r) {
21129
- t instanceof Ba || t instanceof Yo || t instanceof Ho
21130
- ? this.insert(this.createElement(e), t, n)
21131
- : this.insert(this.createElement(e, t), n, r);
21132
- }
21133
- append(e, t) {
21134
- this.insert(e, t, "end");
21135
- }
21136
- appendText(e, t, n) {
21137
- t instanceof Ba || t instanceof Yo
21138
- ? this.insert(this.createText(e), t, "end")
21139
- : this.insert(this.createText(e, t), n, "end");
21140
- }
21141
- appendElement(e, t, n) {
21142
- t instanceof Ba || t instanceof Yo
21143
- ? this.insert(this.createElement(e), t, "end")
21144
- : this.insert(this.createElement(e, t), n, "end");
21145
- }
21146
- setAttribute(e, t, n) {
21147
- if ((this._assertWriterUsedCorrectly(), n instanceof zo)) {
21148
- const r = n.getMinimalFlatRanges();
21149
- for (const n of r) li(this, e, t, n);
21150
- } else ci(this, e, t, n);
21151
- }
21152
- setAttributes(e, t) {
21153
- for (const [n, r] of Oo(e)) this.setAttribute(n, r, t);
21154
- }
21155
- removeAttribute(e, t) {
21156
- if ((this._assertWriterUsedCorrectly(), t instanceof zo)) {
21157
- const n = t.getMinimalFlatRanges();
21158
- for (const t of n) li(this, e, null, t);
21159
- } else ci(this, e, null, t);
21160
- }
21161
- clearAttributes(e) {
21162
- this._assertWriterUsedCorrectly();
21163
- const t = (e) => {
21164
- for (const t of e.getAttributeKeys())
21165
- this.removeAttribute(t, e);
21166
- };
21167
- if (e instanceof zo) for (const n of e.getItems()) t(n);
21168
- else t(e);
21169
- }
21170
- move(e, t, n) {
21171
- if ((this._assertWriterUsedCorrectly(), !(e instanceof zo)))
21172
- throw new _t.b(
21173
- "writer-move-invalid-range: Invalid range to move.",
21174
- this
21175
- );
21176
- if (!e.isFlat)
21177
- throw new _t.b(
21178
- "writer-move-range-not-flat: Range to move is not flat.",
21179
- this
21180
- );
21181
- const r = Ho._createAt(t, n);
21182
- if (r.isEqual(e.start)) return;
21183
- if (
21184
- (this._addOperationForAffectedMarkers("move", e),
21185
- !hi(e.root, r.root))
21186
- )
21187
- throw new _t.b(
21188
- "writer-move-different-document: Range is going to be moved between different documents.",
21189
- this
21190
- );
21191
- const o = e.root.document ? e.root.document.version : null,
21192
- a = new Za(e.start, e.end.offset - e.start.offset, r, o);
21193
- this.batch.addOperation(a), this.model.applyOperation(a);
21194
- }
21195
- remove(e) {
21196
- this._assertWriterUsedCorrectly();
21197
- const t = (e instanceof zo ? e : zo._createOn(e))
21198
- .getMinimalFlatRanges()
21199
- .reverse();
21200
- for (const e of t)
21201
- this._addOperationForAffectedMarkers("move", e),
21202
- di(
21203
- e.start,
21204
- e.end.offset - e.start.offset,
21205
- this.batch,
21206
- this.model
21207
- );
21208
- }
21209
- merge(e) {
21210
- this._assertWriterUsedCorrectly();
21211
- const t = e.nodeBefore,
21212
- n = e.nodeAfter;
21213
- if (
21214
- (this._addOperationForAffectedMarkers("merge", e),
21215
- !(t instanceof Yo))
21216
- )
21217
- throw new _t.b(
21218
- "writer-merge-no-element-before: Node before merge position must be an element.",
21219
- this
21220
- );
21221
- if (!(n instanceof Yo))
21222
- throw new _t.b(
21223
- "writer-merge-no-element-after: Node after merge position must be an element.",
21224
- this
21225
- );
21226
- e.root.document ? this._merge(e) : this._mergeDetached(e);
21227
- }
21228
- createPositionFromPath(e, t, n) {
21229
- return this.model.createPositionFromPath(e, t, n);
21230
- }
21231
- createPositionAt(e, t) {
21232
- return this.model.createPositionAt(e, t);
21233
- }
21234
- createPositionAfter(e) {
21235
- return this.model.createPositionAfter(e);
21236
- }
21237
- createPositionBefore(e) {
21238
- return this.model.createPositionBefore(e);
21239
- }
21240
- createRange(e, t) {
21241
- return this.model.createRange(e, t);
21242
- }
21243
- createRangeIn(e) {
21244
- return this.model.createRangeIn(e);
21245
- }
21246
- createRangeOn(e) {
21247
- return this.model.createRangeOn(e);
21248
- }
21249
- createSelection(e, t, n) {
21250
- return this.model.createSelection(e, t, n);
21251
- }
21252
- _mergeDetached(e) {
21253
- const t = e.nodeBefore,
21254
- n = e.nodeAfter;
21255
- this.move(zo._createIn(n), Ho._createAt(t, "end")),
21256
- this.remove(n);
21257
- }
21258
- _merge(e) {
21259
- const t = Ho._createAt(e.nodeBefore, "end"),
21260
- n = Ho._createAt(e.nodeAfter, 0),
21261
- r = e.root.document.graveyard,
21262
- o = new Ho(r, [0]),
21263
- a = e.root.document.version,
21264
- i = new oi(n, e.nodeAfter.maxOffset, t, o, a);
21265
- this.batch.addOperation(i), this.model.applyOperation(i);
21266
- }
21267
- rename(e, t) {
21268
- if ((this._assertWriterUsedCorrectly(), !(e instanceof Yo)))
21269
- throw new _t.b(
21270
- "writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.",
21271
- this
21272
- );
21273
- const n = e.root.document ? e.root.document.version : null,
21274
- r = new ni(Ho._createBefore(e), e.name, t, n);
21275
- this.batch.addOperation(r), this.model.applyOperation(r);
21276
- }
21277
- split(e, t) {
21278
- this._assertWriterUsedCorrectly();
21279
- let n,
21280
- r,
21281
- o = e.parent;
21282
- if (!o.parent)
21283
- throw new _t.b(
21284
- "writer-split-element-no-parent: Element with no parent can not be split.",
21285
- this
21286
- );
21287
- if (
21288
- (t || (t = o.parent),
21289
- !e.parent.getAncestors({ includeSelf: !0 }).includes(t))
21290
- )
21291
- throw new _t.b(
21292
- "writer-split-invalid-limit-element: Limit element is not a position ancestor.",
21293
- this
21294
- );
21295
- do {
21296
- const t = o.root.document ? o.root.document.version : null,
21297
- a = o.maxOffset - e.offset,
21298
- i = new ai(e, a, null, t);
21299
- this.batch.addOperation(i),
21300
- this.model.applyOperation(i),
21301
- n || r || ((n = o), (r = e.parent.nextSibling)),
21302
- (o = (e = this.createPositionAfter(e.parent)).parent);
21303
- } while (o !== t);
21304
- return {
21305
- position: e,
21306
- range: new zo(Ho._createAt(n, "end"), Ho._createAt(r, 0)),
21307
- };
21308
- }
21309
- wrap(e, t) {
21310
- if ((this._assertWriterUsedCorrectly(), !e.isFlat))
21311
- throw new _t.b(
21312
- "writer-wrap-range-not-flat: Range to wrap is not flat.",
21313
- this
21314
- );
21315
- const n = t instanceof Yo ? t : new Yo(t);
21316
- if (n.childCount > 0)
21317
- throw new _t.b(
21318
- "writer-wrap-element-not-empty: Element to wrap with is not empty.",
21319
- this
21320
- );
21321
- if (null !== n.parent)
21322
- throw new _t.b(
21323
- "writer-wrap-element-attached: Element to wrap with is already attached to tree model.",
21324
- this
21325
- );
21326
- this.insert(n, e.start);
21327
- const r = new zo(e.start.getShiftedBy(1), e.end.getShiftedBy(1));
21328
- this.move(r, Ho._createAt(n, 0));
21329
- }
21330
- unwrap(e) {
21331
- if ((this._assertWriterUsedCorrectly(), null === e.parent))
21332
- throw new _t.b(
21333
- "writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.",
21334
- this
21335
- );
21336
- this.move(zo._createIn(e), this.createPositionAfter(e)),
21337
- this.remove(e);
21338
- }
21339
- addMarker(e, t) {
21340
- if (
21341
- (this._assertWriterUsedCorrectly(),
21342
- !t || "boolean" != typeof t.usingOperation)
21343
- )
21344
- throw new _t.b(
21345
- "writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.",
21346
- this
21347
- );
21348
- const n = t.usingOperation,
21349
- r = t.range,
21350
- o = void 0 !== t.affectsData && t.affectsData;
21351
- if (this.model.markers.has(e))
21352
- throw new _t.b(
21353
- "writer-addMarker-marker-exists: Marker with provided name already exists.",
21354
- this
21355
- );
21356
- if (!r)
21357
- throw new _t.b(
21358
- "writer-addMarker-no-range: Range parameter is required when adding a new marker.",
21359
- this
21360
- );
21361
- return n
21362
- ? (ui(this, e, null, r, o), this.model.markers.get(e))
21363
- : this.model.markers._set(e, r, n, o);
21364
- }
21365
- updateMarker(e, t) {
21366
- this._assertWriterUsedCorrectly();
21367
- const n = "string" == typeof e ? e : e.name,
21368
- r = this.model.markers.get(n);
21369
- if (!r)
21370
- throw new _t.b(
21371
- "writer-updateMarker-marker-not-exists: Marker with provided name does not exists.",
21372
- this
21373
- );
21374
- if (!t) return void this.model.markers._refresh(r);
21375
- const o = "boolean" == typeof t.usingOperation,
21376
- a = "boolean" == typeof t.affectsData,
21377
- i = a ? t.affectsData : r.affectsData;
21378
- if (!o && !t.range && !a)
21379
- throw new _t.b(
21380
- "writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.",
21381
- this
21382
- );
21383
- const s = r.getRange(),
21384
- l = t.range ? t.range : s;
21385
- o && t.usingOperation !== r.managedUsingOperations
21386
- ? t.usingOperation
21387
- ? ui(this, n, null, l, i)
21388
- : (ui(this, n, s, null, i),
21389
- this.model.markers._set(n, l, void 0, i))
21390
- : r.managedUsingOperations
21391
- ? ui(this, n, s, l, i)
21392
- : this.model.markers._set(n, l, void 0, i);
21393
- }
21394
- removeMarker(e) {
21395
- this._assertWriterUsedCorrectly();
21396
- const t = "string" == typeof e ? e : e.name;
21397
- if (!this.model.markers.has(t))
21398
- throw new _t.b(
21399
- "writer-removeMarker-no-marker: Trying to remove marker which does not exist.",
21400
- this
21401
- );
21402
- const n = this.model.markers.get(t);
21403
- n.managedUsingOperations
21404
- ? ui(this, t, n.getRange(), null, n.affectsData)
21405
- : this.model.markers._remove(t);
21406
- }
21407
- setSelection(e, t, n) {
21408
- this._assertWriterUsedCorrectly(),
21409
- this.model.document.selection._setTo(e, t, n);
21410
- }
21411
- setSelectionFocus(e, t) {
21412
- this._assertWriterUsedCorrectly(),
21413
- this.model.document.selection._setFocus(e, t);
21414
- }
21415
- setSelectionAttribute(e, t) {
21416
- if ((this._assertWriterUsedCorrectly(), "string" == typeof e))
21417
- this._setSelectionAttribute(e, t);
21418
- else
21419
- for (const [t, n] of Oo(e)) this._setSelectionAttribute(t, n);
21420
- }
21421
- removeSelectionAttribute(e) {
21422
- if ((this._assertWriterUsedCorrectly(), "string" == typeof e))
21423
- this._removeSelectionAttribute(e);
21424
- else for (const t of e) this._removeSelectionAttribute(t);
21425
- }
21426
- overrideSelectionGravity() {
21427
- return this.model.document.selection._overrideGravity();
21428
- }
21429
- restoreSelectionGravity(e) {
21430
- this.model.document.selection._restoreGravity(e);
21431
- }
21432
- _setSelectionAttribute(e, t) {
21433
- const n = this.model.document.selection;
21434
- if (n.isCollapsed && n.anchor.parent.isEmpty) {
21435
- const r = Zo._getStoreAttributeKey(e);
21436
- this.setAttribute(r, t, n.anchor.parent);
21437
- }
21438
- n._setAttribute(e, t);
21439
- }
21440
- _removeSelectionAttribute(e) {
21441
- const t = this.model.document.selection;
21442
- if (t.isCollapsed && t.anchor.parent.isEmpty) {
21443
- const n = Zo._getStoreAttributeKey(e);
21444
- this.removeAttribute(n, t.anchor.parent);
21445
- }
21446
- t._removeAttribute(e);
21447
- }
21448
- _assertWriterUsedCorrectly() {
21449
- if (this.model._currentWriter !== this)
21450
- throw new _t.b(
21451
- "writer-incorrect-use: Trying to use a writer outside the change() block.",
21452
- this
21453
- );
21454
- }
21455
- _addOperationForAffectedMarkers(e, t) {
21456
- for (const n of this.model.markers) {
21457
- if (!n.managedUsingOperations) continue;
21458
- const r = n.getRange();
21459
- let o = !1;
21460
- if ("move" == e)
21461
- o =
21462
- t.containsPosition(r.start) ||
21463
- t.start.isEqual(r.start) ||
21464
- t.containsPosition(r.end) ||
21465
- t.end.isEqual(r.end);
21466
- else {
21467
- const e = t.nodeBefore,
21468
- n = t.nodeAfter,
21469
- a = r.start.parent == e && r.start.isAtEnd,
21470
- i = r.end.parent == n && 0 == r.end.offset,
21471
- s = r.end.nodeAfter == n,
21472
- l = r.start.nodeAfter == n;
21473
- o = a || i || s || l;
21474
- }
21475
- o && this.updateMarker(n.name, { range: r });
21476
- }
21477
- }
21478
- }
21479
- function li(e, t, n, r) {
21480
- const o = e.model,
21481
- a = o.document;
21482
- let i,
21483
- s,
21484
- l,
21485
- c = r.start;
21486
- for (const e of r.getWalker({ shallow: !0 }))
21487
- (l = e.item.getAttribute(t)),
21488
- i && s != l && (s != n && u(), (c = i)),
21489
- (i = e.nextPosition),
21490
- (s = l);
21491
- function u() {
21492
- const r = new zo(c, i),
21493
- l = r.root.document ? a.version : null,
21494
- u = new Xa(r, t, s, n, l);
21495
- e.batch.addOperation(u), o.applyOperation(u);
21496
- }
21497
- i instanceof Ho && i != c && s != n && u();
21498
- }
21499
- function ci(e, t, n, r) {
21500
- const o = e.model,
21501
- a = o.document,
21502
- i = r.getAttribute(t);
21503
- let s, l;
21504
- if (i != n) {
21505
- if (r.root === r) {
21506
- const e = r.document ? a.version : null;
21507
- l = new ri(r, t, i, n, e);
21508
- } else {
21509
- const o = (s = new zo(
21510
- Ho._createBefore(r),
21511
- e.createPositionAfter(r)
21512
- )).root.document
21513
- ? a.version
21514
- : null;
21515
- l = new Xa(s, t, i, n, o);
21516
- }
21517
- e.batch.addOperation(l), o.applyOperation(l);
21518
- }
21519
- }
21520
- function ui(e, t, n, r, o) {
21521
- const a = e.model,
21522
- i = a.document,
21523
- s = new ti(t, n, r, a.markers, o, i.version);
21524
- e.batch.addOperation(s), a.applyOperation(s);
21525
- }
21526
- function di(e, t, n, r) {
21527
- let o;
21528
- if (e.root.document) {
21529
- const n = r.document,
21530
- a = new Ho(n.graveyard, [0]);
21531
- o = new Za(e, t, a, n.version);
21532
- } else o = new $a(e, t);
21533
- n.addOperation(o), r.applyOperation(o);
21534
- }
21535
- function hi(e, t) {
21536
- return e === t || (e instanceof ii && t instanceof ii);
21537
- }
21538
- class pi {
21539
- constructor(e) {
21540
- (this._markerCollection = e),
21541
- (this._changesInElement = new Map()),
21542
- (this._elementSnapshots = new Map()),
21543
- (this._changedMarkers = new Map()),
21544
- (this._changeCount = 0),
21545
- (this._cachedChanges = null),
21546
- (this._cachedChangesWithGraveyard = null);
21547
- }
21548
- get isEmpty() {
21549
- return (
21550
- 0 == this._changesInElement.size &&
21551
- 0 == this._changedMarkers.size
21552
- );
21553
- }
21554
- refreshItem(e) {
21555
- if (this._isInInsertedElement(e.parent)) return;
21556
- this._markRemove(e.parent, e.startOffset, e.offsetSize),
21557
- this._markInsert(e.parent, e.startOffset, e.offsetSize);
21558
- const t = zo._createOn(e);
21559
- for (const e of this._markerCollection.getMarkersIntersectingRange(
21560
- t
21561
- )) {
21562
- const t = e.getRange();
21563
- this.bufferMarkerChange(e.name, t, t, e.affectsData);
21564
- }
21565
- this._cachedChanges = null;
21566
- }
21567
- bufferOperation(e) {
21568
- switch (e.type) {
21569
- case "insert":
21570
- if (this._isInInsertedElement(e.position.parent)) return;
21571
- this._markInsert(
21572
- e.position.parent,
21573
- e.position.offset,
21574
- e.nodes.maxOffset
21575
- );
21576
- break;
21577
- case "addAttribute":
21578
- case "removeAttribute":
21579
- case "changeAttribute":
21580
- for (const t of e.range.getItems({ shallow: !0 }))
21581
- this._isInInsertedElement(t.parent) ||
21582
- this._markAttribute(t);
21583
- break;
21584
- case "remove":
21585
- case "move":
21586
- case "reinsert": {
21587
- if (
21588
- e.sourcePosition.isEqual(e.targetPosition) ||
21589
- e.sourcePosition
21590
- .getShiftedBy(e.howMany)
21591
- .isEqual(e.targetPosition)
21592
- )
21593
- return;
21594
- const t = this._isInInsertedElement(e.sourcePosition.parent),
21595
- n = this._isInInsertedElement(e.targetPosition.parent);
21596
- t ||
21597
- this._markRemove(
21598
- e.sourcePosition.parent,
21599
- e.sourcePosition.offset,
21600
- e.howMany
21601
- ),
21602
- n ||
21603
- this._markInsert(
21604
- e.targetPosition.parent,
21605
- e.getMovedRangeStart().offset,
21606
- e.howMany
21607
- );
21608
- break;
21609
- }
21610
- case "rename": {
21611
- if (this._isInInsertedElement(e.position.parent)) return;
21612
- this._markRemove(e.position.parent, e.position.offset, 1),
21613
- this._markInsert(e.position.parent, e.position.offset, 1);
21614
- const t = zo._createFromPositionAndShift(e.position, 1);
21615
- for (const e of this._markerCollection.getMarkersIntersectingRange(
21616
- t
21617
- )) {
21618
- const t = e.getRange();
21619
- this.bufferMarkerChange(e.name, t, t, e.affectsData);
21620
- }
21621
- break;
21622
- }
21623
- case "split": {
21624
- const t = e.splitPosition.parent;
21625
- this._isInInsertedElement(t) ||
21626
- this._markRemove(t, e.splitPosition.offset, e.howMany),
21627
- this._isInInsertedElement(e.insertionPosition.parent) ||
21628
- this._markInsert(
21629
- e.insertionPosition.parent,
21630
- e.insertionPosition.offset,
21631
- 1
21632
- ),
21633
- e.graveyardPosition &&
21634
- this._markRemove(
21635
- e.graveyardPosition.parent,
21636
- e.graveyardPosition.offset,
21637
- 1
21638
- );
21639
- break;
21640
- }
21641
- case "merge": {
21642
- const t = e.sourcePosition.parent;
21643
- this._isInInsertedElement(t.parent) ||
21644
- this._markRemove(t.parent, t.startOffset, 1);
21645
- const n = e.graveyardPosition.parent;
21646
- this._markInsert(n, e.graveyardPosition.offset, 1);
21647
- const r = e.targetPosition.parent;
21648
- this._isInInsertedElement(r) ||
21649
- this._markInsert(r, e.targetPosition.offset, t.maxOffset);
21650
- break;
21651
- }
21652
- }
21653
- this._cachedChanges = null;
21654
- }
21655
- bufferMarkerChange(e, t, n, r) {
21656
- const o = this._changedMarkers.get(e);
21657
- o
21658
- ? ((o.newRange = n),
21659
- (o.affectsData = r),
21660
- null == o.oldRange &&
21661
- null == o.newRange &&
21662
- this._changedMarkers.delete(e))
21663
- : this._changedMarkers.set(e, {
21664
- oldRange: t,
21665
- newRange: n,
21666
- affectsData: r,
21667
- });
21668
- }
21669
- getMarkersToRemove() {
21670
- const e = [];
21671
- for (const [t, n] of this._changedMarkers)
21672
- null != n.oldRange && e.push({ name: t, range: n.oldRange });
21673
- return e;
21674
- }
21675
- getMarkersToAdd() {
21676
- const e = [];
21677
- for (const [t, n] of this._changedMarkers)
21678
- null != n.newRange && e.push({ name: t, range: n.newRange });
21679
- return e;
21680
- }
21681
- getChangedMarkers() {
21682
- return Array.from(this._changedMarkers).map((e) => ({
21683
- name: e[0],
21684
- data: { oldRange: e[1].oldRange, newRange: e[1].newRange },
21685
- }));
21686
- }
21687
- hasDataChanges() {
21688
- for (const [, e] of this._changedMarkers)
21689
- if (e.affectsData) return !0;
21690
- return this._changesInElement.size > 0;
21691
- }
21692
- getChanges(e = { includeChangesInGraveyard: !1 }) {
21693
- if (this._cachedChanges)
21694
- return e.includeChangesInGraveyard
21695
- ? this._cachedChangesWithGraveyard.slice()
21696
- : this._cachedChanges.slice();
21697
- const t = [];
21698
- for (const e of this._changesInElement.keys()) {
21699
- const n = this._changesInElement
21700
- .get(e)
21701
- .sort((e, t) =>
21702
- e.offset === t.offset
21703
- ? e.type != t.type
21704
- ? "remove" == e.type
21705
- ? -1
21706
- : 1
21707
- : 0
21708
- : e.offset < t.offset
21709
- ? -1
21710
- : 1
21711
- ),
21712
- r = this._elementSnapshots.get(e),
21713
- o = fi(e.getChildren()),
21714
- a = mi(r.length, n);
21715
- let i = 0,
21716
- s = 0;
21717
- for (const n of a)
21718
- if ("i" === n)
21719
- t.push(this._getInsertDiff(e, i, o[i].name)), i++;
21720
- else if ("r" === n)
21721
- t.push(this._getRemoveDiff(e, i, r[s].name)), s++;
21722
- else if ("a" === n) {
21723
- const n = o[i].attributes,
21724
- a = r[s].attributes;
21725
- let l;
21726
- if ("$text" == o[i].name)
21727
- l = new zo(Ho._createAt(e, i), Ho._createAt(e, i + 1));
21728
- else {
21729
- const t = e.offsetToIndex(i);
21730
- l = new zo(
21731
- Ho._createAt(e, i),
21732
- Ho._createAt(e.getChild(t), 0)
21733
- );
21734
- }
21735
- t.push(...this._getAttributesDiff(l, a, n)), i++, s++;
21736
- } else i++, s++;
21737
- }
21738
- t.sort((e, t) =>
21739
- e.position.root != t.position.root
21740
- ? e.position.root.rootName < t.position.root.rootName
21741
- ? -1
21742
- : 1
21743
- : e.position.isEqual(t.position)
21744
- ? e.changeCount - t.changeCount
21745
- : e.position.isBefore(t.position)
21746
- ? -1
21747
- : 1
21748
- );
21749
- for (let e = 1; e < t.length; e++) {
21750
- const n = t[e - 1],
21751
- r = t[e],
21752
- o =
21753
- "remove" == n.type &&
21754
- "remove" == r.type &&
21755
- "$text" == n.name &&
21756
- "$text" == r.name &&
21757
- n.position.isEqual(r.position),
21758
- a =
21759
- "insert" == n.type &&
21760
- "insert" == r.type &&
21761
- "$text" == n.name &&
21762
- "$text" == r.name &&
21763
- n.position.parent == r.position.parent &&
21764
- n.position.offset + n.length == r.position.offset,
21765
- i =
21766
- "attribute" == n.type &&
21767
- "attribute" == r.type &&
21768
- n.position.parent == r.position.parent &&
21769
- n.range.isFlat &&
21770
- r.range.isFlat &&
21771
- n.position.offset + n.length == r.position.offset &&
21772
- n.attributeKey == r.attributeKey &&
21773
- n.attributeOldValue == r.attributeOldValue &&
21774
- n.attributeNewValue == r.attributeNewValue;
21775
- (o || a || i) &&
21776
- (t[e - 1].length++,
21777
- i &&
21778
- (t[e - 1].range.end = t[e - 1].range.end.getShiftedBy(1)),
21779
- t.splice(e, 1),
21780
- e--);
21781
- }
21782
- for (const e of t)
21783
- delete e.changeCount,
21784
- "attribute" == e.type && (delete e.position, delete e.length);
21785
- return (
21786
- (this._changeCount = 0),
21787
- (this._cachedChangesWithGraveyard = t.slice()),
21788
- (this._cachedChanges = t.slice().filter(gi)),
21789
- e.includeChangesInGraveyard
21790
- ? this._cachedChangesWithGraveyard
21791
- : this._cachedChanges
21792
- );
21793
- }
21794
- reset() {
21795
- this._changesInElement.clear(),
21796
- this._elementSnapshots.clear(),
21797
- this._changedMarkers.clear(),
21798
- (this._cachedChanges = null);
21799
- }
21800
- _markInsert(e, t, n) {
21801
- const r = {
21802
- type: "insert",
21803
- offset: t,
21804
- howMany: n,
21805
- count: this._changeCount++,
21806
- };
21807
- this._markChange(e, r);
21808
- }
21809
- _markRemove(e, t, n) {
21810
- const r = {
21811
- type: "remove",
21812
- offset: t,
21813
- howMany: n,
21814
- count: this._changeCount++,
21815
- };
21816
- this._markChange(e, r), this._removeAllNestedChanges(e, t, n);
21817
- }
21818
- _markAttribute(e) {
21819
- const t = {
21820
- type: "attribute",
21821
- offset: e.startOffset,
21822
- howMany: e.offsetSize,
21823
- count: this._changeCount++,
21824
- };
21825
- this._markChange(e.parent, t);
21826
- }
21827
- _markChange(e, t) {
21828
- this._makeSnapshot(e);
21829
- const n = this._getChangesForElement(e);
21830
- this._handleChange(t, n), n.push(t);
21831
- for (let e = 0; e < n.length; e++)
21832
- n[e].howMany < 1 && (n.splice(e, 1), e--);
21833
- }
21834
- _getChangesForElement(e) {
21835
- let t;
21836
- return (
21837
- this._changesInElement.has(e)
21838
- ? (t = this._changesInElement.get(e))
21839
- : ((t = []), this._changesInElement.set(e, t)),
21840
- t
21841
- );
21842
- }
21843
- _makeSnapshot(e) {
21844
- this._elementSnapshots.has(e) ||
21845
- this._elementSnapshots.set(e, fi(e.getChildren()));
21846
- }
21847
- _handleChange(e, t) {
21848
- e.nodesToHandle = e.howMany;
21849
- for (const n of t) {
21850
- const r = e.offset + e.howMany,
21851
- o = n.offset + n.howMany;
21852
- if (
21853
- "insert" == e.type &&
21854
- ("insert" == n.type &&
21855
- (e.offset <= n.offset
21856
- ? (n.offset += e.howMany)
21857
- : e.offset < o &&
21858
- ((n.howMany += e.nodesToHandle),
21859
- (e.nodesToHandle = 0))),
21860
- "remove" == n.type &&
21861
- e.offset < n.offset &&
21862
- (n.offset += e.howMany),
21863
- "attribute" == n.type)
21864
- )
21865
- if (e.offset <= n.offset) n.offset += e.howMany;
21866
- else if (e.offset < o) {
21867
- const o = n.howMany;
21868
- (n.howMany = e.offset - n.offset),
21869
- t.unshift({
21870
- type: "attribute",
21871
- offset: r,
21872
- howMany: o - n.howMany,
21873
- count: this._changeCount++,
21874
- });
21875
- }
21876
- if ("remove" == e.type) {
21877
- if ("insert" == n.type)
21878
- if (r <= n.offset) n.offset -= e.howMany;
21879
- else if (r <= o)
21880
- if (e.offset < n.offset) {
21881
- const t = r - n.offset;
21882
- (n.offset = e.offset),
21883
- (n.howMany -= t),
21884
- (e.nodesToHandle -= t);
21885
- } else
21886
- (n.howMany -= e.nodesToHandle), (e.nodesToHandle = 0);
21887
- else if (e.offset <= n.offset)
21888
- (e.nodesToHandle -= n.howMany), (n.howMany = 0);
21889
- else if (e.offset < o) {
21890
- const t = o - e.offset;
21891
- (n.howMany -= t), (e.nodesToHandle -= t);
21892
- }
21893
- if (
21894
- ("remove" == n.type &&
21895
- (r <= n.offset
21896
- ? (n.offset -= e.howMany)
21897
- : e.offset < n.offset &&
21898
- ((e.nodesToHandle += n.howMany), (n.howMany = 0))),
21899
- "attribute" == n.type)
21900
- )
21901
- if (r <= n.offset) n.offset -= e.howMany;
21902
- else if (e.offset < n.offset) {
21903
- const t = r - n.offset;
21904
- (n.offset = e.offset), (n.howMany -= t);
21905
- } else if (e.offset < o)
21906
- if (r <= o) {
21907
- const r = n.howMany;
21908
- n.howMany = e.offset - n.offset;
21909
- const o = r - n.howMany - e.nodesToHandle;
21910
- t.unshift({
21911
- type: "attribute",
21912
- offset: e.offset,
21913
- howMany: o,
21914
- count: this._changeCount++,
21915
- });
21916
- } else n.howMany -= o - e.offset;
21917
- }
21918
- if ("attribute" == e.type) {
21919
- if ("insert" == n.type)
21920
- if (e.offset < n.offset && r > n.offset) {
21921
- if (r > o) {
21922
- const e = {
21923
- type: "attribute",
21924
- offset: o,
21925
- howMany: r - o,
21926
- count: this._changeCount++,
21927
- };
21928
- this._handleChange(e, t), t.push(e);
21929
- }
21930
- (e.nodesToHandle = n.offset - e.offset),
21931
- (e.howMany = e.nodesToHandle);
21932
- } else
21933
- e.offset >= n.offset &&
21934
- e.offset < o &&
21935
- (r > o
21936
- ? ((e.nodesToHandle = r - o), (e.offset =
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=453)}([function(e,t,n){"use strict";e.exports=n(257)},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},e.exports.default=e.exports,e.exports.__esModule=!0},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 B(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function z(e){var t,n,r={};for(n in e)s(e,n)&&(t=B(n))&&(r[t]=e[n]);return r}var V={};function U(e,t){V[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"),U("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"),U("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"),U("week",5),U("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"),U("day",11),U("weekday",11),U("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 Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ue=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"),U("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:Be,weekdaysMin:Ve,weekdaysShort:ze,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(291)("./"+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||ze.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=z(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=z(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*)?)?$/,Bt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zt(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=Bt.exec(e))?(n="-"===d[1]?-1:1,c={y:Vt(d[2],n),M:Vt(d[3],n),w:Vt(d[4],n),d:Vt(d[5],n),h:Vt(d[6],n),m:Vt(d[7],n),s:Vt(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=Ut(a,i):((l=Ut(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 Vt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ut(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,zt(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))}zt.fn=Pt.prototype,zt.invalid=function(){return zt(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"),U("weekYear",1),U("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"),U("quarter",7),fe("Q",$),be("Q",(function(e,t){t[1]=3*(G(e)-1)})),R("D",["DD",2],"Do","date"),H("date","D"),U("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"),U("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"),U("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"),U("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"),U("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=B(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=B(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())?zt({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())?zt({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=B(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=B(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=B(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=B(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:V[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=z(e));for(n=0;n<r.length;n++)this[r[n].unit](e[r[n].unit])}else if(D(this[e=B(e)]))return this[e](t);return this},_n.startOf=function(e){var t,n;if(void 0===(e=B(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,zt(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=Ue),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=zt(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"),Bn=jn("minutes"),zn=jn("hours"),Vn=jn("days"),Un=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=B(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 zt(this)},$n.get=function(e){return e=B(e),this.isValid()?this[e+"s"]():NaN},$n.milliseconds=Fn,$n.seconds=Hn,$n.minutes=Bn,$n.hours=zn,$n.days=Vn,$n.weeks=function(){return q(this.days()/7)},$n.months=Un,$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=zt(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=zt,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=B,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(63)(e))},function(e,t,n){e.exports=n(262)},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)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},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},e.exports.default=e.exports,e.exports.__esModule=!0},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)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(263)},function(e,t,n){"use strict";t.__esModule=!0;var r=l(n(280));t.ToastContainer=r.default;var o=n(92);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(290));t.toast=i.default;var s=l(n(93));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")},e.exports.default=e.exports,e.exports.__esModule=!0},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},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(84);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)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(261).default,o=n(7);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(85),o=n(264),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(8),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(8),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(281)()},function(e,t,n){"use strict";function r(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}n.d(t,"a",(function(){return r}))},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(445)),o=a(n(446));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(243),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(444);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(364),o=n(369);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},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(8),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(8),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,n){var r=n(84);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},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,n){"use strict";var r=n(231),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(46),o=n(365),a=n(366),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(258)},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,B,z,V,U,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,B=B&&Object.prototype.hasOwnProperty.call(B,"default")?B.default:B,z=z&&Object.prototype.hasOwnProperty.call(z,"default")?z.default:z,V=V&&Object.prototype.hasOwnProperty.call(V,"default")?V.default:V,U=U&&Object.prototype.hasOwnProperty.call(U,"default")?U.default:U,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=Ue(n)||Ve(),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=Ue(n);return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!r&&Ve()&&Ue(Ve())&&(r=Ue(Ve())),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&&Ue(t)||Ve()&&Ue(Ve());return E(e,n?{locale:n}:null)}function Oe(e,t){return Le(e,"ddd",t)}function Ne(e){return z(e)}function Ae(e,t){var n=Ue(t||Ve());return V(e,{locale:n})}function Ie(e){return U(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 Be(e,t){return e&&t?Q(e,t):!e&&!t}function ze(e,t,n){var r,o=z(t),a=G(n);try{r=re(e,{start:o,end:a})}catch(e){r=!1}return r}function Ve(){return("undefined"!=typeof window?window:e).__localeId__}function Ue(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&&B(n,o)>0||r&&r.every((function(e){return B(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&&B(o,n)>0||r&&r.every((function(e){return B(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)&&ze(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)||Be(a,s))?ze(n,a,s):!(!o||!i||!te(a,i)&&!Be(a,i))&&ze(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(z(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)||(Be(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=ze(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||Be(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=Ve,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(42),n(296),n(74),n(455),n(75),n(76),n(40),n(77),n(41),n(78),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(457),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(80),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(28),n(17),n(323),n(53),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(5),n(454),n(336),n(337),n(456))}).call(this,n(43))},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(8),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(8),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) 2018 Jed Watson.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  Licensed under the MIT License (MIT), see
22
  http://jedwatson.github.io/classnames