From 954ef3d036d7416aaba1d1168762db2678c6dff9 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 27 Oct 2026 20:22:37 -0500 Subject: [PATCH] Initial checkin --- Admin.php | 117 + Upload.php | 58 + inc/Administrator.php | 64 + inc/BonW.png | Bin 0 -> 1354 bytes inc/Config.inc.php | 271 + inc/Editor_Event.php | 244 + inc/Editor_Header.php | 161 + inc/Editor_Place.php | 161 + inc/Editor_ProgChair.php | 161 + inc/FileHelpers.php | 110 + inc/HelperFunctions.php | 714 + inc/SiteLogo.png | Bin 0 -> 28996 bytes inc/UploadPreview.js | 33 + inc/WonB.png | Bin 0 -> 1358 bytes inc/ckeditor5/LICENSE.md | 21 + inc/ckeditor5/README.md | 9 + inc/ckeditor5/ckeditor-manifest.json | 10888 +++++++++ inc/ckeditor5/ckeditor.js | 29123 +++++++++++++++++++++++ inc/ckeditor5/ckeditor.js.map | 1 + inc/ckeditor5/index.html | 122 + inc/ckeditor5/sample/css/sample.css | 356 + inc/ckeditor5/sample/img/bg.png | Bin 0 -> 6777 bytes inc/ckeditor5/sample/img/github.svg | 4 + inc/ckeditor5/sample/img/logo.svg | 10 + inc/ckeditor5/sample/img/umbrellas.jpg | Bin 0 -> 51250 bytes inc/ckeditor5/translations/af.js | 1 + inc/ckeditor5/translations/ar.js | 1 + inc/ckeditor5/translations/ast.js | 1 + inc/ckeditor5/translations/az.js | 1 + inc/ckeditor5/translations/bg.js | 1 + inc/ckeditor5/translations/ca.js | 1 + inc/ckeditor5/translations/cs.js | 1 + inc/ckeditor5/translations/da.js | 1 + inc/ckeditor5/translations/de-ch.js | 1 + inc/ckeditor5/translations/de.js | 1 + inc/ckeditor5/translations/el.js | 1 + inc/ckeditor5/translations/en-au.js | 1 + inc/ckeditor5/translations/en-gb.js | 1 + inc/ckeditor5/translations/eo.js | 1 + inc/ckeditor5/translations/es.js | 1 + inc/ckeditor5/translations/et.js | 1 + inc/ckeditor5/translations/eu.js | 1 + inc/ckeditor5/translations/fa.js | 1 + inc/ckeditor5/translations/fi.js | 1 + inc/ckeditor5/translations/fr.js | 1 + inc/ckeditor5/translations/gl.js | 1 + inc/ckeditor5/translations/gu.js | 1 + inc/ckeditor5/translations/he.js | 1 + inc/ckeditor5/translations/hi.js | 1 + inc/ckeditor5/translations/hr.js | 1 + inc/ckeditor5/translations/hu.js | 1 + inc/ckeditor5/translations/id.js | 1 + inc/ckeditor5/translations/it.js | 1 + inc/ckeditor5/translations/ja.js | 1 + inc/ckeditor5/translations/km.js | 1 + inc/ckeditor5/translations/kn.js | 1 + inc/ckeditor5/translations/ko.js | 1 + inc/ckeditor5/translations/ku.js | 1 + inc/ckeditor5/translations/lt.js | 1 + inc/ckeditor5/translations/lv.js | 1 + inc/ckeditor5/translations/ms.js | 1 + inc/ckeditor5/translations/nb.js | 1 + inc/ckeditor5/translations/ne.js | 1 + inc/ckeditor5/translations/nl.js | 1 + inc/ckeditor5/translations/no.js | 1 + inc/ckeditor5/translations/oc.js | 1 + inc/ckeditor5/translations/pl.js | 1 + inc/ckeditor5/translations/pt-br.js | 1 + inc/ckeditor5/translations/pt.js | 1 + inc/ckeditor5/translations/ro.js | 1 + inc/ckeditor5/translations/ru.js | 1 + inc/ckeditor5/translations/si.js | 1 + inc/ckeditor5/translations/sk.js | 1 + inc/ckeditor5/translations/sl.js | 1 + inc/ckeditor5/translations/sq.js | 1 + inc/ckeditor5/translations/sr-latn.js | 1 + inc/ckeditor5/translations/sr.js | 1 + inc/ckeditor5/translations/sv.js | 1 + inc/ckeditor5/translations/th.js | 1 + inc/ckeditor5/translations/tk.js | 1 + inc/ckeditor5/translations/tr.js | 1 + inc/ckeditor5/translations/tt.js | 1 + inc/ckeditor5/translations/ug.js | 1 + inc/ckeditor5/translations/uk.js | 1 + inc/ckeditor5/translations/vi.js | 1 + inc/ckeditor5/translations/zh-cn.js | 1 + inc/ckeditor5/translations/zh.js | 1 + inc/ckeditor5/vendor.js | 115 + inc/ckeditor5/vendor.js.map | 1 + inc/theme-dark.css | 255 + inc/theme-lite.css | 245 + inc/theme.js | 77 + index.php | 52 + makenpp.txt | 16 + wts.ses | 25 + 95 files changed, 43476 insertions(+) create mode 100644 Admin.php create mode 100644 Upload.php create mode 100644 inc/Administrator.php create mode 100644 inc/BonW.png create mode 100644 inc/Config.inc.php create mode 100644 inc/Editor_Event.php create mode 100644 inc/Editor_Header.php create mode 100644 inc/Editor_Place.php create mode 100644 inc/Editor_ProgChair.php create mode 100644 inc/FileHelpers.php create mode 100644 inc/HelperFunctions.php create mode 100644 inc/SiteLogo.png create mode 100644 inc/UploadPreview.js create mode 100644 inc/WonB.png create mode 100644 inc/ckeditor5/LICENSE.md create mode 100644 inc/ckeditor5/README.md create mode 100644 inc/ckeditor5/ckeditor-manifest.json create mode 100644 inc/ckeditor5/ckeditor.js create mode 100644 inc/ckeditor5/ckeditor.js.map create mode 100644 inc/ckeditor5/index.html create mode 100644 inc/ckeditor5/sample/css/sample.css create mode 100644 inc/ckeditor5/sample/img/bg.png create mode 100644 inc/ckeditor5/sample/img/github.svg create mode 100644 inc/ckeditor5/sample/img/logo.svg create mode 100644 inc/ckeditor5/sample/img/umbrellas.jpg create mode 100644 inc/ckeditor5/translations/af.js create mode 100644 inc/ckeditor5/translations/ar.js create mode 100644 inc/ckeditor5/translations/ast.js create mode 100644 inc/ckeditor5/translations/az.js create mode 100644 inc/ckeditor5/translations/bg.js create mode 100644 inc/ckeditor5/translations/ca.js create mode 100644 inc/ckeditor5/translations/cs.js create mode 100644 inc/ckeditor5/translations/da.js create mode 100644 inc/ckeditor5/translations/de-ch.js create mode 100644 inc/ckeditor5/translations/de.js create mode 100644 inc/ckeditor5/translations/el.js create mode 100644 inc/ckeditor5/translations/en-au.js create mode 100644 inc/ckeditor5/translations/en-gb.js create mode 100644 inc/ckeditor5/translations/eo.js create mode 100644 inc/ckeditor5/translations/es.js create mode 100644 inc/ckeditor5/translations/et.js create mode 100644 inc/ckeditor5/translations/eu.js create mode 100644 inc/ckeditor5/translations/fa.js create mode 100644 inc/ckeditor5/translations/fi.js create mode 100644 inc/ckeditor5/translations/fr.js create mode 100644 inc/ckeditor5/translations/gl.js create mode 100644 inc/ckeditor5/translations/gu.js create mode 100644 inc/ckeditor5/translations/he.js create mode 100644 inc/ckeditor5/translations/hi.js create mode 100644 inc/ckeditor5/translations/hr.js create mode 100644 inc/ckeditor5/translations/hu.js create mode 100644 inc/ckeditor5/translations/id.js create mode 100644 inc/ckeditor5/translations/it.js create mode 100644 inc/ckeditor5/translations/ja.js create mode 100644 inc/ckeditor5/translations/km.js create mode 100644 inc/ckeditor5/translations/kn.js create mode 100644 inc/ckeditor5/translations/ko.js create mode 100644 inc/ckeditor5/translations/ku.js create mode 100644 inc/ckeditor5/translations/lt.js create mode 100644 inc/ckeditor5/translations/lv.js create mode 100644 inc/ckeditor5/translations/ms.js create mode 100644 inc/ckeditor5/translations/nb.js create mode 100644 inc/ckeditor5/translations/ne.js create mode 100644 inc/ckeditor5/translations/nl.js create mode 100644 inc/ckeditor5/translations/no.js create mode 100644 inc/ckeditor5/translations/oc.js create mode 100644 inc/ckeditor5/translations/pl.js create mode 100644 inc/ckeditor5/translations/pt-br.js create mode 100644 inc/ckeditor5/translations/pt.js create mode 100644 inc/ckeditor5/translations/ro.js create mode 100644 inc/ckeditor5/translations/ru.js create mode 100644 inc/ckeditor5/translations/si.js create mode 100644 inc/ckeditor5/translations/sk.js create mode 100644 inc/ckeditor5/translations/sl.js create mode 100644 inc/ckeditor5/translations/sq.js create mode 100644 inc/ckeditor5/translations/sr-latn.js create mode 100644 inc/ckeditor5/translations/sr.js create mode 100644 inc/ckeditor5/translations/sv.js create mode 100644 inc/ckeditor5/translations/th.js create mode 100644 inc/ckeditor5/translations/tk.js create mode 100644 inc/ckeditor5/translations/tr.js create mode 100644 inc/ckeditor5/translations/tt.js create mode 100644 inc/ckeditor5/translations/ug.js create mode 100644 inc/ckeditor5/translations/uk.js create mode 100644 inc/ckeditor5/translations/vi.js create mode 100644 inc/ckeditor5/translations/zh-cn.js create mode 100644 inc/ckeditor5/translations/zh.js create mode 100644 inc/ckeditor5/vendor.js create mode 100644 inc/ckeditor5/vendor.js.map create mode 100644 inc/theme-dark.css create mode 100644 inc/theme-lite.css create mode 100644 inc/theme.js create mode 100644 index.php create mode 100644 makenpp.txt create mode 100644 wts.ses diff --git a/Admin.php b/Admin.php new file mode 100644 index 0000000..7c0a4fb --- /dev/null +++ b/Admin.php @@ -0,0 +1,117 @@ + +// Places=X +// X Action=HeaderSubmit +// Admin +// Create Event +// Edit Event +// +// Common +// Page Header Content +// New Member Information +// Membership Dues Information + +//

Edit Page Header

+//
+// something here to access the page header. +//
+//

Edit New Member Information

+//
+// something here to edit the new member information +//
+//

Edit Membership Dues Information

+// + +$formSubmission = false; +$FormData = array(); + +$CleanRequestData = array(); +$CleanFiles = array(); +foreach ($_REQUEST as $key => $value) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$key => $value"); + $CleanRequestData[$key] = $value; +} +if (isset($_FILES)) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, ""); + $CleanFiles = $_FILES; +} + +if (isset($CleanRequestData['ErrorNotice'])) { + ShowTransientPage($CleanRequestData['ErrorNotice'], $CleanRequestData['ErrorCode']); + exit; +} + +$Action = (isset($CleanRequestData['Action'])) ? $CleanRequestData['Action'] : ""; +TraceProgram(__FILE__, __FUNCTION__, __LINE__, "\nClean RQST: " . print_r($CleanRequestData, true)); +TraceProgram(__FILE__, __FUNCTION__, __LINE__, "\nClean FILE: " . print_r($CleanFiles, true)); + +switch ($Action) { + case 'DeleteEventItem': + case 'EventNew': + case 'EventEdit': + ShowEventForm(); + break; + case 'PlaceEdit': + case 'PlaceSubmit': + ShowPlaceForm(); + break; + case 'ProgChairEdit': + ShowProgChairForm(); + break; + case 'HeaderEdit': + case 'HeaderSubmit': + ShowHeaderform(); + break; + default: + ShowEventSelector(); + break; +} +TraceProgram(__FILE__, __FUNCTION__, __LINE__, "end", TR_EXIT); +exit; + +################################################################# + +function ShowTransientPage($errNotice, $errCode) { +?> + + + +Error Notification + + + +

Error Notification

+Apologies, but an error occurred.

+
Error: %s, ErrorCode: %d.", basename($errNotice, '.php'), $errCode); ?> +


+You will be forwarded to the Admin page in a few seconds, or +Click here.", $_SERVER['PHP_SELF']); ?> + + + \ No newline at end of file diff --git a/Upload.php b/Upload.php new file mode 100644 index 0000000..c21170a --- /dev/null +++ b/Upload.php @@ -0,0 +1,58 @@ + 0, 'error' => ['message' => $msg]]); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "fail: $msg", TR_EXIT); + exit; +} + +// Check if file is uploaded +if (!isset($_FILES['upload']) || $_FILES['upload']['error'] !== UPLOAD_ERR_OK) { + UploadFail('No file uploaded (error code ' . ($_FILES['upload']['error'] ?? 'none') . ')'); +} + +$file = $_FILES['upload']; +$allowedTypes = ['image/jpeg', 'image/jfif', 'image/png', 'image/gif']; + +// Validate file type +if (!in_array($file['type'], $allowedTypes)) { + UploadFail('Invalid file type'); +} + +$filename = basename($file['name']); +$targetPath = __DIR__ . '/inc/Uploads/' . $filename; +TraceProgram(__FILE__, __FUNCTION__, __LINE__, "target: $targetPath"); + +if (!is_uploaded_file($file['tmp_name']) || !@copy($file['tmp_name'], $targetPath)) { + $err = error_get_last(); + UploadFail('Failed to save uploaded file: ' . ($err['message'] ?? 'unknown error')); +} +@unlink($file['tmp_name']); + +TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$filename"); +echo json_encode([ + 'uploaded' => 1, + 'fileName' => $filename, + 'url' => 'inc/Uploads/' . rawurlencode($filename) +]); +TraceProgram(__FILE__, __FUNCTION__, __LINE__, "end", TR_EXIT); + +?> diff --git a/inc/Administrator.php b/inc/Administrator.php new file mode 100644 index 0000000..85a16a7 --- /dev/null +++ b/inc/Administrator.php @@ -0,0 +1,64 @@ + +
+

Event Manager

+ + +

Meeting Places

+ + +

Edit Prog Chair

+ + +

Edit Page Header

+ + +

Edit New Member Information

+
+ something here to edit the new member information +
+

Edit Membership Dues Information

+
+ something here to edit the membership dues information +
+
+
+

todo

+ +

todone

+ + diff --git a/inc/BonW.png b/inc/BonW.png new file mode 100644 index 0000000000000000000000000000000000000000..ee8605c6f3c2e80cce962f77945cf726100ffb55 GIT binary patch literal 1354 zcmV-Q1-1H#P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T4*3Qet?~gjf4oXkXR54gdpZ&VV>vVUiZ~k zue)FO)%tOBJzsKkpT5=gRh{}yokl;2U-;u<$jr<5#ZYfQhD!d-!{Lnqf1RD3a^?Al z@KLXT0{Hm&D7ZIX-G^q!i7Ed6{z^zlh|GO`edQfE+uPg2Z?>yyBp1BBy-`I)1@-jw zP;PFn%-x66>69z{W@KbgQ&W@7nOyZk6doQ+o0Dr9+T8SzvD`{tEhd3Lm zuCAt|qa(`C&!@DsG`hIBpwZD$YHn_(mzNh>US6ih$49EGtCOGy2M5Imh=J47Q;La+ zkpSE^pbL(lJF#@g0O;uGKpiL|B0@+&dU<&%*%cNR($LV5WLHvBLMJCDa^K(IPhDMI z)Z5!jjg5_B6BHCA!NtbLN+8An-Yq*&RaHf(*Vfh+U0+{QR8$l#EG*FZ`8nO(+|b)o$x7f}3#_fJjppa)#mCjvm0Up#oSmIXGDuV&Ff21il&ICp$_ll&x6|6%8ck16 zQ($1A)D|m|n3yO_3#V8OI8IJZrtR%*_@lnQJ{lh%r?9XvT@MI6B_+klzd@{jRzQu$ z!Q{A_1_$D@dTuv91GY0~jxD6s9D%_`wbRAu4$V%x2Q(iaz{&QKxrv-_WskZ8W*Wg~ zft>Gt+kL+9>3ot-UP5P{+MnVA_$hy$?B9L^9qBE{BOT3Vv9u`yBc;o+g!K;f`^dU~RV zhX&h*S~upi6k?!!)SF5YG?ZYH|1djKG@8b%wtVJo3}DzV9K1knbaID70!4iL}bYH?(R;4 '.jpg', + 'image/jfif' => '.jpg', + 'image/png' => '.png', + 'image/gif' => '.gif', + 'application/pdf' => '.pdf', +]; + +$Artifacts = "./Artifacts"; // no trailing slashes +$UploadPath = "./inc/Uploads"; +$EventsPath = "./Artifacts/Events"; +$PlacesPath = "./Artifacts/Places"; +$HeadersPath = "./Artifacts/Headers"; +$ProgChairPath = "./Artifacts/ProgChair"; + +$WritableFolders = array( + $Artifacts,$UploadPath, $EventsPath, $PlacesPath, $HeadersPath, +); +foreach ($WritableFolders as $folder) { + if (!is_dir($folder)) { + mkdir($folder, 0777, true); + } +} + +$CK_EditorFieldIDs = array(); // holds the ids of the html edit fields +// bg: 1 = draw a separator before this item +// Attr: +$EventFormFields = [ + 'ProgramDate' => ['Label' => 'Program Date', 'FieldType' => 'date', 'RW' => 'R', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'ProgramTitle' => ['Label' => 'Program Title', 'FieldType' => 'text', 'RW' => 'W', 'bg' => '1', 'Attr' => '', 'Placeholder' => 'What is this program about?', 'Default' => ''], + 'ProgramDetails' => ['Label' => 'Program Details', 'FieldType' => 'html', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'ProgramPix' => ['Label' => 'Program Pictures', 'FieldType' => 'pix', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'ProgramTime' => ['Label' => 'Program Time', 'FieldType' => 'time', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => '19:00'], + 'ProgramChair' => ['Label' => 'Program Chair', 'FieldType' => 'chair', 'RW' => 'W', 'bg' => '0', 'Addr' => '', 'Placeholder' => 'Chairman', 'Default' => ''], + 'SpeakerName' => ['Label' => 'Speaker Name', 'FieldType' => 'text', 'RW' => 'W', 'bg' => '1', 'Attr' => '', 'Placeholder' => 'Joe Speaker', 'Default' => ''], + 'SpeakerBio' => ['Label' => 'Speaker Bio', 'FieldType' => 'html', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => 'Tell us about the speaker', 'Default' => ''], + 'SpeakerPix' => ['Label' => 'Speaker Picture', 'FieldType' => 'pix' , 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'SocialFlag' => ['Label' => 'Social', 'FieldType' => 'bool', 'RW' => 'W', 'bg' => '1', 'Attr' => '', 'Placeholder' => '', 'Default' => '1'], + 'SocialTime' => ['Label' => 'Social Time', 'FieldType' => 'time', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => '17:30'], + 'DinnerFlag' => ['Label' => 'Dinner', 'FieldType' => 'bool', 'RW' => 'W', 'bg' => '1', 'Attr' => '', 'Placeholder' => '', 'Default' => '1'], + 'DinnerTime' => ['Label' => 'Dinner Time', 'FieldType' => 'time', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => '18:00'], + 'DinnerPlace' => ['Label' => 'Dinner Place', 'FieldType' => 'place', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'DinnerMenu' => ['Label' => 'Dinner Menu', 'FieldType' => 'html', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'TourFlag' => ['Label' => 'Tour', 'FieldType' => 'bool', 'RW' => 'W', 'bg' => '1', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'TourTime' => ['Label' => 'Tour Time', 'FieldType' => 'time', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'TourLocationName' => ['Label' => 'Tour Location', 'FieldType' => 'text', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'TourAddress' => ['Label' => 'Tour Address', 'FieldType' => 'html', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'TourContact' => ['Label' => 'Tour Contact', 'FieldType' => 'html', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'SpecialNotes' => ['Label' => 'Special Notes', 'FieldType' => 'html', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], +]; + +$PlaceFormFields = [ + 'PlaceName' => ['Label' => 'Place Name', 'FieldType' => 'text', 'RW' => 'R', 'bg' => '1', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'PlaceAddress' => ['Label' => 'Place Address', 'FieldType' => 'html', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'PlacePix' => ['Label' => 'Place Picture', 'FieldType' => 'pix' , 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], +]; + +$HeaderFormFields = [ + 'HeaderText' => ['Label' => 'Header Text', 'FieldType' => 'text', 'RW' => 'R', 'bg' => '1', 'Attr' => '', 'Placeholder' => '', 'Default' => 'Waterloo Tech Soc.'], + 'SubHeaderText' => ['Label' => 'Sub-Header Text', 'FieldType' => 'html', 'RW' => 'W', 'bg' => '1', 'Attr' => '', 'Placeholder' => '', 'Default' => '112 Years'], + 'PlacePix' => ['Label' => 'Place Picture', 'FieldType' => 'pix' , 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], +]; + +$ProgChairFormFields = [ + 'ProgramChair' => ['Label' => 'Program Chair', 'FieldType' => 'text', 'RW' => 'R', 'bg' => '1', 'Attr' => '', 'Placeholder' => 'President', 'Default' => ''], + 'ProgChairNotes' => ['Label' => 'Chair Notes', 'FieldType' => 'html', 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], + 'ProgChairPix' => ['Label' => 'Chair Picture', 'FieldType' => 'pix' , 'RW' => 'W', 'bg' => '0', 'Attr' => '', 'Placeholder' => '', 'Default' => ''], +]; + +/////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////// +// System Configuration settings start here +/////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////// + +// When there is a particularly difficult problem to unravel, typically causing server +// timeouts or web page crash-garbage, enable the tracelog. +// +// Note that this may slow performance quite a bit but will leave you the breadcrumbs you +// may need to solve the problem. +// +// When run on IIS, the following command shell item is helpful if you have tail.exe +// tail -f \\server\c$\Writable\Folder\tracelog.log +// or on linux +// tail -f /path/to/tracefile/filename.ext +// +define("TRACELOG", true); +define("TRACEPATH", __DIR__ . "/TraceLog"); // "/var/spool/php/"); /var/services/tmp +define("TRACEFILE", "trace.log"); + + + +// SECURITY SECURITY SECURITY SECURITY SECURITY SECURITY SECURITY SECURITY +// This should be set to false. +// For a brand new install, it may be set to true long enough to create your actual entry +// in the database, and configure yourself as the super user. Once you have done so, you +// should set this back to false. +// +#define("ROOTUSERENABLED", false); // false=Secure, true=Enable the following +#define("ROOTEMAIL", "root"); // please don't use root:root +#define("ROOTPASS", "root"); // and do not leave this enabled! + + +// +// Who to contact when things go wrong. This shows up on the login page. +// +define("CONTACT", "David@Smart-Family.net"); +define("CONTACTNAME", "David Smart"); + + +// Access the database +// +// it seems that if the computer has support for IPV6, then "localhost" may not work +// and you may want to substitute "127.0.0.1" instead. +#define("DB_SERVER", "localhost"); // Where is mySQL server from this web server +// Typical mySQL servers run on port 3306, but if you have more than one, or if you've +// changed it from the default, then 3307 is usually the next setting. +#define("DB_PORTNUM", "3307"); // Port number (typically 3306, sometimes 3307) +// This is the name of the db, and must be unique compared to any other db on your +// mysql server. +#define("DB_DBNAME", "PartsDB"); // And the name of the database to access +// This is the 'username' when the scripts access the database, not to be confused +// with the system administrator, or the expert (admin) user of the db. +#define("DB_APPNAME", "PartsDB"); // What is the username to access the db +// Similarly the script needs a password, which should be quite complex, and unlike +// any other password you may have. +#define("DB_PASSWORD", "DTM52qg0r%#WesfS7d"); // PartsDB + +// Default domain for username entry, if any. +// You can probably leave this blank if you do not have a domain name. +// +#define("DEFAULT_DOMAIN", "Smart-Family.net"); + +// Session Name Prefix +// +// This is a text string that is unique for this implementation of the db +// application on a system. This is required because a single user that logs +// on to another instance of this tool on the same system may have differing +// access and reference information. +// This text is not seen by any user and would typically be the same as +// the "SiteFolder" (below) only without any extraneous characters (like slashes) +// and with a single trailing underscore (that is for the admin debugging things). +#$SessionName = "PartsDB"; + +// Create a catchy Application name to put in the header and title of web pages +$AppName = "Event Manager"; + + +// Path to the site, which is case sensitive. +// Linux based servers are case-sensitive, so this must match +// the actual installation folder. For Windows Users, Google Map +// detects "http://domain/Path/To/Site" as a different +// site than "http://domain/path/TO/SiTe". +// For Windows systems, they all access the site correctly, but we'll redirect +// the user to the correct case-sensitive mapping so the Google Map Key +// will work properly. +#$SiteFolder = "/db/"; + +// SiteLogo +// If there is a graphic representing this site, it should be placed in the SiteFolder +// and the name of it identified here. Standard graphic file types are allowed. +// +#$SiteLogo = array("logo.png", "logoSmall.png"); + + +// If guest mode is enabled, anyone may wander further into the system (read-only) +// and with limited access. +// +// FOR SECURITY, THIS OPTION SHOULD NOT BE ENABLED ON AN INTERNET FACING SERVER. +#define("GUEST_MODE_ENABLED", false); // True | False + + +// What's the biggest artifact we're willing to accept? +// pdf, image, zip file, whatever... +// +#define("MAXFILESIZE", 100000000); + +// Allowed image types to upload. This is a bit weak in that it may +// only be inspecting them by their suffix, but that's better than not +// [Hint: Order them by most popular type first for modest speed boost] +// Use lower-case letters. +#$UploadImageExts = array("png", "jfif", "jpg", "jpeg", "bmp"); + +// Other filetypes that don't automatically render (like png's do). +// Other allowed filetypes that don't automatically render (like png's do). +// Each of the following should have a png icon named as in: inc/image/icon-pdf.png +#$UploadOtherExts = array("pdf","csv","xls","xlsx","stp","fcstd","lbr","zip","7z" ); + + +// Target Path for uploads of various artifacts during normal usage (e.g. datasheet) +// or via the import operation of a compatible spreadsheet. +// This is relative to the calling page, which is probably up one +// folder from here. It can also be absolute, with respect to the file system. +// +// INCLUDE Trailing / +// +// REQUIRES: Server Write Access +$ImportPath = "./Events/"; + + +// Formatted Description Field +// +// If you have ckEditor version 5 installed, the Description field will +// support formatted editing. +// If it cannot find this file, or if the setting is blank, it will be +// plain text. +// +$ckEditor_FQFN = "/inc/ckeditor5/ckeditor.js"; + + +// The following enable the use of cookies for a "Remember Me" period of time. +// If the value is zero, then this feature is disabled. +// If the value is non-zero, this is the number of days to remember this user. +// +// The theory is that you close the browser (before the timeout shown below). +// Then if you come back before the remember me expiration, you're in! +#define("REMEMBER_ME_DAYS", 7); + +// But, if you forget and leave a tab open, or the whole browser, and just walk +// away for this long, it will actively log you out... +#define("USER_TIMEOUT_SEC", 3600); + +// Table Colorization +#$BoldBackColor = "#66CCFF"; // Header and other "bold" background +#$Alt1BackColor = "#DDEEFF"; // Pale, which alternates with Alt2 +#$Alt2BackColor = "#BBDDFF"; // Pale, but a little darker# + +// If PhpSpreadsheet is installed, set this. +#define("SPREADSHEET_ENABLE", true); + +// Don't mess with this. +//require_once("inc/Config.php"); + +/// @endcond + +?> \ No newline at end of file diff --git a/inc/Editor_Event.php b/inc/Editor_Event.php new file mode 100644 index 0000000..eeed9ec --- /dev/null +++ b/inc/Editor_Event.php @@ -0,0 +1,244 @@ + +
+
+ + + + + + + + + + + + + + + + + + +
New EventPick Place + Pick Chair +
Edit Event +
   
+
+
+DeleteEventItem is not yet supported
\n"; + } + if ($Action == 'EventEdit') { + // Form Submission check FILES and then EventFormFields + TraceProgram(__FILE__, __FUNCTION__, __LINE__, ""); + $success = ReadTableData($EventPath, $EventFormFields, $evData); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "ReadTableData: $success"); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($evData, true)); + foreach ($CleanFiles as $fileKey => $fileInfo) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileKey, true)); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileInfo, true)); + if (in_array($fileInfo['type'], array_keys($allowedTypes))) { + $basename = basename($fileInfo['name']); + $filename = $fileKey . $allowedTypes[$fileInfo['type']]; + if ($EventFormFields[$fileKey]['FieldType'] == 'pix') { + $targetFile = $EventPath . '/' . $filename; + $un = $EventPath . '/' . $fileKey . ".*"; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "unlink $un"); + deleteFilesWithWildcard($EventPath, $fileKey . ".*"); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "target $targetFile"); + if (!is_uploaded_file($fileInfo['tmp_name']) || !@copy($fileInfo['tmp_name'], $targetFile)) { + $err = error_get_last(); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $err); + } else { + $FormData[$fileKey] = $filename; + $formSubmission = true; + } + @unlink($fileInfo['tmp_name']); + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$basename not legitimate for a pix upload"); + } + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Nothing to upload"); + } + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($CleanRequestData, true)); + foreach ($CleanRequestData as $key => $value) { + //TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Request[$key] = '$value'"); + if (isset($EventFormFields[$key])) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Request[$key] = '$value'"); + $FormData[$key] = $value; + $formSubmission = true; + } + } + } + if ($formSubmission && $ProgramDate != '') { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, ""); + SaveTableData($EventPath, $EventFormFields, $FormData); + MoveFiles($UploadPath, $EventPath); + } + $success = ReadTableData($EventPath, $EventFormFields, $FormData); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "ReadTableData: " . ($success) ? 'success' : 'fail'); + EmitHTMLStart("Event Editor"); + EmitBodyStart(); + EmitPageHeader("Event Editor"); +?> +
+ + +
+ + + diff --git a/inc/Editor_Header.php b/inc/Editor_Header.php new file mode 100644 index 0000000..6ba70c7 --- /dev/null +++ b/inc/Editor_Header.php @@ -0,0 +1,161 @@ + 'NewHeaderForm', // must be unique + 'ActionValue' => 'HeaderEdit', + 'Field1Label' => 'New Header', + 'Input1Name' => 'HeaderText', + 'Field2Label' => 'Edit Header', + 'Select1Name' => 'ExistingHeader', + 'DocPath' => $HeadersPath, + 'FormFields' => $HeaderFormFields, + 'dbKey' => 'HeaderText', + ]; + EmitAdminFormType2($args); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); +} + + +// X Action=HeaderEdit +// X HeaderText= +// # SubHeaderText= +// +function ShowHeaderForm() { + global $HeadersPath, $HeaderFormFields; + global $ckEditor_FQFN, $allowedTypes, $UploadPath; + global $CleanRequestData, $CleanFiles; + + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_ENTRY); + $actDelete = 'DeleteHeaderItem'; + $FormData = array(); + $Action = $CleanRequestData['Action'] ?? ''; + $HeaderName = ''; + // Form Submission could be new Header or edit existing + $formSubmission = false; + + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($CleanRequestData, true)); + if (isset($CleanRequestData['HeaderText']) && $CleanRequestData['HeaderText'] != "") { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $CleanRequestData['HeaderText']); + $HeaderName = $ProgramFolder = $CleanRequestData['HeaderText']; + } else { + $ProgramFolder = $CleanRequestData['ExistingHeader'] ?? ''; + } + $HeaderPath = $HeadersPath .'/'. MakeValidFolderName($ProgramFolder); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "HeaderPath: '$HeaderPath'"); + if (!is_dir($HeaderPath)) { + if (mkdir($HeaderPath, 0777, true)) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "mkdir '$HeaderPath'"); + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Failed to mkdir '$HeaderPath'"); + } + } + + if ($Action == $actDelete) { + $item = $CleanRequestData['Item'] ?? ''; + $success = ReadTableData($HeaderPath, $HeaderFormFields, $evData); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $success); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($evData, true)); + $fqfn = $evData[$item]; + $targetFile = $HeaderPath . '/' . $fqfn; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "unlink '$targetFile'"); + unlink($targetFile); + echo "ok"; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); + exit(); + } + if (($Action == 'HeaderEdit') && ($HeaderName != '')) { + // Form Submission could be new header or edit existing + + // check FILES and then form fields + foreach ($CleanFiles as $fileKey => $fileInfo) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileKey, true)); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileInfo, true)); + if (in_array($fileInfo['type'], array_keys($allowedTypes))) { + $basename = basename($fileInfo['name']); + $filename = $fileKey . $allowedTypes[$fileInfo['type']]; + if ($HeaderFormFields[$fileKey]['FieldType'] == 'pix') { + $targetFile = $HeaderPath . '/' . $filename; + $un = $HeaderPath . '/' . $fileKey . ".*"; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "unlink $un"); + deleteFilesWithWildcard($HeaderPath, $fileKey . ".*"); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "target $targetFile"); + if (!is_uploaded_file($fileInfo['tmp_name']) || !@copy($fileInfo['tmp_name'], $targetFile)) { + $err = error_get_last(); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $err); + } else { + $FormData[$fileKey] = $filename; + $formSubmission = true; + } + @unlink($fileInfo['tmp_name']); + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$basename not legitimate for a pix upload"); + } + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Nothing to upload"); + } + } + // Form items + foreach ($CleanRequestData as $key => $value) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "check $key"); + if (isset($HeaderFormFields[$key])) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$key => $value"); + $FormData[$key] = $value; + $formSubmission = true; + } + } + } + if ($formSubmission) { + SaveTableData($HeaderPath, $HeaderFormFields, $FormData); + MoveFiles($UploadPath, $HeaderPath); + } + + // Read the event file if it exists + $success = ReadTableData($HeaderPath, $HeaderFormFields, $FormData); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, ($success) ? 'ReadTableData() success' : 'ReadTableData() fail'); + EmitHTMLStart("Header Editor"); + EmitBodyStart(); + EmitPageHeader("Header Editor"); +?> +
+ + +
+ + + diff --git a/inc/Editor_Place.php b/inc/Editor_Place.php new file mode 100644 index 0000000..88bf167 --- /dev/null +++ b/inc/Editor_Place.php @@ -0,0 +1,161 @@ + 'NewHeaderForm', // must be unique + 'ActionValue' => 'PlaceEdit', + 'Field1Label' => 'New Place', + 'Input1Name' => 'PlaceName', + 'Field2Label' => 'Edit Place', + 'Select1Name' => 'ExistingPlace', + 'DocPath' => $PlacesPath, + 'FormFields' => $PlaceFormFields, + 'dbKey' => 'PlaceName', + ]; + EmitAdminFormType2($args); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); +} + + +// X Action=PlaceEdit +// X PlaceName= +// # ExistingPlace= +// +function ShowPlaceForm() { + global $PlacesPath, $PlaceFormFields; + global $ckEditor_FQFN, $allowedTypes, $UploadPath; + global $CleanRequestData, $CleanFiles; + + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_ENTRY); + $actDelete = 'DeletePlaceItem'; + $FormData = array(); + $Action = $CleanRequestData['Action'] ?? ''; + $PlaceName = ''; + // Form Submission could be new or edit existing + $formSubmission = false; + + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($CleanRequestData, true)); + if (isset($CleanRequestData['PlaceName']) && $CleanRequestData['PlaceName'] != "") { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $CleanRequestData['PlaceName']); + $PlaceName = $ProgramFolder = $CleanRequestData['PlaceName']; + } else { + $ProgramFolder = $CleanRequestData['ExistingPlace'] ?? ''; + } + $PlacePath = $PlacesPath .'/'. MakeValidFolderName($ProgramFolder); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "PlacePath: '$PlacePath'"); + if (!is_dir($PlacePath)) { + if (mkdir($PlacePath, 0777, true)) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "mkdir '$PlacePath'"); + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Failed to mkdir '$PlacePath'"); + } + } + + if ($Action == $actDelete) { + $item = $CleanRequestData['Item'] ?? ''; + $success = ReadTableData($PlacePath, $PlaceformFields, $evData); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $success); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($evData, true)); + $fqfn = $evData[$item]; + $targetFile = $PlacePath . '/' . $fqfn; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "unlink '$targetFile'"); + unlink($targetFile); + echo "ok"; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); + exit(); + } + if (($Action == 'PlaceEdit') && ($PlaceName != '')) { + // Form Submission could be new place or edit existing + + // FILE Submissions + foreach ($CleanFiles as $fileKey => $fileInfo) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileKey, true)); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileInfo, true)); + if (in_array($fileInfo['type'], array_keys($allowedTypes))) { + $basename = basename($fileInfo['name']); + $filename = $fileKey . $allowedTypes[$fileInfo['type']]; + if ($PlaceFormFields[$fileKey]['FieldType'] == 'pix') { + $targetFile = $PlacePath . '/' . $filename; + $un = $PlacePath . '/' . $fileKey . ".*"; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "unlink $un"); + deleteFilesWithWildcard($PlacePath, $fileKey . ".*"); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "target $targetFile"); + if (!is_uploaded_file($fileInfo['tmp_name']) || !@copy($fileInfo['tmp_name'], $targetFile)) { + $err = error_get_last(); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $err); + } else { + $FormData[$fileKey] = $filename; + $formSubmission = true; + } + @unlink($fileInfo['tmp_name']); + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$basename not legitimate for a pix upload"); + } + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Nothing to upload"); + } + } + // Form Submissions + foreach ($CleanRequestData as $key => $value) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "check $key"); + if (isset($PlaceFormFields[$key])) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$key => $value"); + $FormData[$key] = $value; + $formSubmission = true; + } + } + } + if ($formSubmission) { + SaveTableData($PlacePath, $PlaceFormFields, $FormData); + MoveFiles($UploadPath, $PlacePath); + } + + // Read the event file if it exists + $success = ReadTableData($PlacePath, $PlaceFormFields, $FormData); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, ($success) ? 'ReadTableData() success' : 'ReadTableData() fail'); + EmitHTMLStart("Place Editor"); + EmitBodyStart(); + EmitPageHeader("Place Editor"); +?> +
+ + +
+ + + diff --git a/inc/Editor_ProgChair.php b/inc/Editor_ProgChair.php new file mode 100644 index 0000000..823ed33 --- /dev/null +++ b/inc/Editor_ProgChair.php @@ -0,0 +1,161 @@ + 'NewHeaderForm', // must be unique + 'ActionValue' => 'ProgChairEdit', + 'Field1Label' => 'New Prog Chair', + 'Input1Name' => 'ProgramChair', + 'Field2Label' => 'Edit Prog Chair', + 'Select1Name' => 'ExistingProgChair', + 'DocPath' => $ProgChairPath, + 'FormFields' => $ProgChairFormFields, + 'dbKey' => 'ProgramChair', + ]; + EmitAdminFormType2($args); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); +} + + +// X Action=ProgChairEdit +// X ProgramChair= +// # ChairNotes= +// +function ShowProgChairForm() { + global $ProgChairPath, $ProgChairFormFields; + global $ckEditor_FQFN, $allowedTypes, $UploadPath; + global $CleanRequestData, $CleanFiles; + + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_ENTRY); + $actDelete = 'DeleteProgChairItem'; + $FormData = array(); + $Action = $CleanRequestData['Action'] ?? ''; + $ProgramChair = ''; + // Form Submission could be new or edit existing + $formSubmission = false; + + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($CleanRequestData, true)); + if (isset($CleanRequestData['ProgramChair']) && $CleanRequestData['ProgramChair'] != "") { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $CleanRequestData['ProgramChair']); + $ProgramChair = $ProgramFolder = $CleanRequestData['ProgramChair']; + } else { + $ProgramFolder = $CleanRequestData['ExistingProgChair'] ?? ''; + } + $ProgChairPath = $ProgChairPath . '/' . MakeValidFolderName($ProgramFolder); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "ProgChairPath: '$ProgChairPath'"); + if (!is_dir($ProgChairPath)) { + if (mkdir($ProgChairPath, 0777, true)) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "mkdir '$ProgChairPath'"); + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Failed to mkdir '$ProgChairPath'"); + } + } + + if ($Action == $actDelete) { + $item = $CleanRequestData['Item'] ?? ''; + $success = ReadTableData($ProgChairPath, $ProgChairformFields, $evData); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $success); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($evData, true)); + $fqfn = $evData[$item]; + $targetFile = $ProgChairPath . '/' . $fqfn; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "unlink '$targetFile'"); + unlink($targetFile); + echo "ok"; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); + exit(); + } + if (($Action == 'ProgChairEdit') && ($ProgramChair != '')) { + // Form Submission could be new ProgChair or edit existing + + // check FILES and then form fields + foreach ($CleanFiles as $fileKey => $fileInfo) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileKey, true)); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileInfo, true)); + if (in_array($fileInfo['type'], array_keys($allowedTypes))) { + $basename = basename($fileInfo['name']); + $filename = $fileKey . $allowedTypes[$fileInfo['type']]; + if ($ProgChairFormFields[$fileKey]['FieldType'] == 'pix') { + $targetFile = $ProgChairPath . '/' . $filename; + $un = $ProgChairPath . '/' . $fileKey . ".*"; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "unlink $un"); + deleteFilesWithWildcard($ProgChairPath, $fileKey . ".*"); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "target $targetFile"); + if (!is_uploaded_file($fileInfo['tmp_name']) || !@copy($fileInfo['tmp_name'], $targetFile)) { + $err = error_get_last(); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $err); + } else { + $FormData[$fileKey] = $filename; + $formSubmission = true; + } + @unlink($fileInfo['tmp_name']); + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$basename not legitimate for a pix upload"); + } + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Nothing to upload"); + } + } + // Form items + foreach ($CleanRequestData as $key => $value) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "check $key"); + if (isset($ProgChairFormFields[$key])) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$key => $value"); + $FormData[$key] = $value; + $formSubmission = true; + } + } + } + if ($formSubmission) { + SaveTableData($ProgChairPath, $ProgChairFormFields, $FormData); + MoveFiles($UploadPath, $ProgChairPath); + } + + // Read the event file if it exists + $success = ReadTableData($ProgChairPath, $ProgChairFormFields, $FormData); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $success); + EmitHTMLStart("ProgChair Editor"); + EmitBodyStart(); + EmitPageHeader("ProgChair Editor"); +?> +
+ + +
+ + + diff --git a/inc/FileHelpers.php b/inc/FileHelpers.php new file mode 100644 index 0000000..15f662f --- /dev/null +++ b/inc/FileHelpers.php @@ -0,0 +1,110 @@ +|\x00-\x1F]~', '', $input); + $input = preg_replace('/[^A-Za-z0-9._-]/', $replacement, $input); + $input = preg_replace('/' . preg_quote($replacement, '/') . '+/', $replacement, $input); + $input = trim($input, $replacement); + if ($input === '') { + return 'untitled'; + } + return $input; +} + + +function ReadTableData($path, $formFields, &$userData) { + $success = false; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_ENTRY); + $path = @rtrim($path, "/"); + $fqfnData = $path . '/' . 'data.txt'; + if (file_exists($fqfnData)) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $fqfnData); + $fh = fopen($fqfnData, "r"); + while (!feof($fh)) { + $line = trim(fgets($fh)); + if ($line != "") { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$line"); + $array = explode("=", $line, 2); + $userData[$array[0]] = $array[1]; + $success = true; + } + } + fclose($fh); + foreach ($formFields as $key => $value) { + if ($value['FieldType'] == "pix") { + if (isset($userData[$key])) { + $fqfnPix = sprintf("%s/%s", $path, $userData[$key]); + if ($userData[$key] == '') { // but maybe the file exists + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "fqfnPix: $fqfnPix, key: $key"); + $candidates = glob($fqfnPix . $key . ".*"); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($candidates, true)); + foreach ($candidates as $candidate) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $candidate); + $userData[$key] = basename($candidate); + } + } + $userData[$key] = (file_exists($fqfnPix)) ? $userData[$key] : ''; + $success = true; + } + } + } + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "file '$fqfnData' does not exist."); + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); + return $success; +} + +function SaveTableData($path, $formFields, $formData) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "\nSaveTableData: " . print_r($formData, true), TR_ENTRY); + $dataFile = $path . "/data.txt"; + $fh = fopen($dataFile, "wt"); + if ($fh) { + foreach ($formFields as $key => $value) { + fprintf($fh, "%s=%s\n", $key, isset($formData[$key]) ? $formData[$key] : $value['Default']); + } + fclose($fh); + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); +} + + +?> \ No newline at end of file diff --git a/inc/HelperFunctions.php b/inc/HelperFunctions.php new file mode 100644 index 0000000..0dbfeba --- /dev/null +++ b/inc/HelperFunctions.php @@ -0,0 +1,714 @@ +ERROR in Nesting. Depth -1 from %s, %s: %d [%s]
", + $file, $func, $line, $msg); + } + $func_elapsed = sprintf("%9.4f", $elapsed - $timeFuncs[$nest]); + break; + default: + $flag = 1; + $pre = " | "; + break; + } + if (strlen($AppRoot) && strpos($file, $AppRoot) >= 0) { + $file = substr($file, strlen($AppRoot)); + } +// if ($nest < 0) +// $nest = 0; + // + Elapsed, + // | + Function Elapsed + // | | +tag, +nest, + // | | | | +type, + // | | | | | +timestamp, + // | | | | | | +file, +line, + // | | | | | | | | +whitespace + // | | | | | | | | | +flag + // | | | | | | | | | | +function, + // | | | | | | | | | | | +user text. + $o = sprintf("%9.4f, %9s, %03d, %2d, %s, %s, %-26s, %5s, %s%s%-24s, %s", + $elapsed, + $func_elapsed, + $tag, + $nest, + $flag, + date("H:i.s"), + $file, + $line, + str_repeat(" ",$nest), $pre, $func, + $msg); + + // Uncomment these when you need to see the details from the command line, but don't + // want to generate the tracefile. + // + //if (!count($_SESSION)) // && $flag == TR_ENTRY) // zero if running from a command shell + // printf("%s\n", $o); + if (TRACELOG) { + $fh = @fopen(TRACEPATH . "/" . TRACEFILE, "at"); + if ($fh) { + if ($flag == TR_ENTRY && $func == "") + fprintf($fh, "\r\n\r\n"); + fprintf($fh, "%s\n", $o); + fclose($fh); + } else { + echo "Configuration Error, cannot write to trace file [" . TRACEPATH ."/" . TRACEFILE . "\n"; + } + } + // Track the stack depth + if ($flag == TR_ENTRY) + $nest++; +} + + +function deleteFilesWithWildcard($directory, $pattern) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "del($directory, $pattern)", TR_ENTRY); + if (!is_dir($directory)) { + throw new InvalidArgumentException("Directory does not exist: $directory"); + } + $searchPath = rtrim($directory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $pattern; + $files = glob($searchPath); + if ($files === false) { + throw new RuntimeException("Error reading files with glob()"); + } + + // Delete each file + foreach ($files as $file) { + if (is_file($file)) { // Ensure it's a file, not a directory + if (@unlink($file)) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Deleted $file"); + } else { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Delete Failed on $file"); + } + } + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); +} + +function GetFolderUp(string $path): ?string { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_ENTRY); + if (trim($path) === '') { // Basic validation + return null; // Empty path + } + $normalizedPath = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $path); // Normalize slashes for cross-platform compatibility + $parent = dirname($normalizedPath); // Use dirname to get one level up + if ($parent === '.' || $parent === DIRECTORY_SEPARATOR) { // If dirname returns '.' for relative paths, handle it + $parent = null; // No parent directory + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $parent, TR_EXIT); + return $parent; +} + + + +function GetPrevEvent($curItem = '') { + global $EventsPath, $EventFormFields; + + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_ENTRY); + $prevEvent = ''; + $ref = ($curItem != '') ? $curItem : date("Y-m-d"); + $events = GetDocMap($EventsPath, $EventFormFields, 'ProgramDate'); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$ref: " . print_r($events, true)); + foreach (array_keys($events) as $event) { + if ($ref > $event) { + $prevEvent = $event; + } + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $prevEvent, TR_EXIT); + return $prevEvent; +} + + +function GetNextEvent($curItem = '') { + global $EventsPath, $EventFormFields; + + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_ENTRY); + $nextEvent = ''; + $ref = ($curItem != '') ? $curItem : date("Y-m-d"); + $events = GetDocMap($EventsPath, $EventFormFields, 'ProgramDate'); + foreach (array_keys($events) as $event) { + if ($nextEvent == '') { + if (($curItem == '') && ($ref <= $event)) { + $nextEvent = $event; + } else if (($curItem != '') && ($ref < $event)) { + $nextEvent = $event; + } + } + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "[$nextEvent]", TR_EXIT); + return $nextEvent; +} + + + + +function EmitForm($formFields, $formData, $pathToArtifacts, $thisItem, $showNavigation = false) { + global $PlacesPath, $PlaceFormFields; + global $ProgChairPath, $ProgChairFormFields; + + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$pathToArtifacts, $thisItem", TR_ENTRY); + $CK_EditorFieldIDs = array(); + $showHR = false; + printf("\n", TBL_BORDER); + if ($showNavigation) { + $prev = GetPrevEvent($thisItem); + $next = GetNextEvent($thisItem); + if ($prev != '') { + $linkPrev = "<=="; + } else { + $linkPrev = "<=="; + } + if ($next != '') { + $linkNext = "==>"; + } else { + $linkNext = "==>"; + } + printf("\n", $linkPrev, $linkNext); + $showHR = true; + } + foreach ($formFields as $key => $data) { + if ($data['bg']) { + printf("\n"); + $showHR = true; + } + printf("\n"); + printf("\t\n", + $key, $data['Label']); + $value = ($formData[$key]) ?? $formFields[$key]['Default']; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "[$value]"); + switch ($data['FieldType']) { + case 'text': + if ($formFields[$key]['RW'] == 'W') { + printf("\n", + $key, $key, $value, $formFields[$key]['Placeholder']); + } else { + printf("\n", + $value, $key, $key, $value, $formFields[$key]['Placeholder']); + } + break; + case 'date': + printf("\n", + DateToMDY($value), $key, $key, $value); + } + printf("\n"); + break; + case 'time': + printf("\n", + $key, $key, $value); + break; + case 'bool': + printf("\n", + $key, $key, ($value) ? "checked" : ""); + break; + case 'html': + printf("\n", + $key, $key, $value); + $CK_EditorFieldIDs[] = $key; + break; + case 'pix': + printf("\n"); + break; + case 'chair': + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "pathToArtifacts: $pathToArtifacts"); + //TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($formFields, true)); + $map = GetDocMap($ProgChairPath, $ProgChairFormFields, 'ProgramChair'); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($map, true)); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($formData, true)); + printf(""); + break; + case 'place': + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "pathToArtifacts: $pathToArtifacts, 'placeName'"); + //TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($formFields, true)); + $map = GetDocMap($PlacesPath, $PlaceFormFields, 'PlaceName'); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($map, true)); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($formData, true)); + printf(""); + break; + default: + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "unexpected path from '" . $data['FieldType'] . "'"); + break; + } + //printf("\t\n", $data['FieldType']); + printf("\n"); + } +?> + + + + + + +
%s  Navigate  %s

%s\n"); + if ($formFields[$key]['RW'] == 'W') { + printf("\n", + $key, $key, $value, ($formFields[$key]['RW'] != 'W') ? 'disabled' : ''); + } else { + printf("%s\n", + $key, $key, $key + ); + if (isset($formData[$key])) { + $pix = $formData[$key]; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "key: $key, " . $pix); + $fqfn = ($pix != '') ? $pathToArtifacts . '/' . $pix : ''; + if (!file_exists($fqfn)) { + $pix = $fqfn = ''; + } + } else { + $pix = $fqfn = ''; + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "pathToArtifacts: $pathToArtifacts, fqfn: $fqfn"); + printf("
Preview
\n", + $key, $fqfn, ($pix == '') ? 'none' : 'block'); + if ($fqfn != '') { + printf("", + $thisItem, $key); + } + //printf("\n"); + printf("
\n"); + printf("\n"); + printf("%s

+ +     +
+ + + => + $listOfItems = array(); + $folderList = glob("$path/*"); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "\n$path: " . print_r($folderList, true)); + foreach ($folderList as $folder) { + $listOfItems[] = basename($folder); + } + foreach ($listOfItems as $place) { + //printf("[%s][%s]
\n", $path, $place); + $fqPath = sprintf("%s/%s", $path, $place); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $fqPath); + $success = ReadTableData($fqPath, $formFields, $tag); + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $success); + $name = $tag[$tagOfInterest] ?? 'untitled'; + $map[$place] = $name; + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_EXIT); + return $map; +} + + +function DateToMDY($inDate) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "[$inDate]", TR_ENTRY); + if ($inDate != '') { + $parts = explode("-", $inDate); + $mmddyyyy = sprintf("%s/%s/%s", $parts[1], $parts[2], $parts[0]); + } else { + $mmddyyyy = $inDate; + } + TraceProgram(__FILE__, __FUNCTION__, __LINE__, $mmddyyyy, TR_EXIT); + return $mmddyyyy; +} + +function TimeTo12HR($t) { + $AMPM = ''; + $parts = explode(':', $t); + if ($parts[0] == '00') { + $parts[0] = '12'; + $AMPM = 'AM'; + } else if ($parts[0] > 12) { + $parts[0] -= 12; + $AMPM = 'PM'; + } + return sprintf("%s %s", implode(':', $parts), $AMPM); +} + +function EmitPageHeader($title, $subtitle = '') { + $sub = ($subtitle != '') ? "
$subtitle" : ""; + echo " + + + + + + +
+ logo + + $title + $sub + + + +
+ Go Admin +
+"; +} + +function EmitHTMLStart($title) { + global $ckEditor_FQFN; + ?> + + + +Admin Center + + + + + +\n", $ckEditor_FQFN); ?> + +\n"; +} + +function EmitBodyStart() { + echo "\n"; +} + +function EmitBodyEnd() { + ?> + + + +\n"; + $html .= GenerateTransactionInfo(); + if ($helpTag) + $html .= " Need help?\n"; + $html .= "\n"; + return $html; +} + +function GenerateTransactionInfo($webIF = true) { + global $time_start, $AppName, $link; + // Show the CPU time for the transaction + $time_end = microtime(true); + $time_elapsed = sprintf("%3.3f", $time_end - $time_start); + return sprintf("%s App v%s, transaction completed in %s seconds.", + $AppName, AppVersion, $time_elapsed); +} + + +function EmitEvent($event) { + global $EventsPath, $EventFormFields; + global $PlacesPath, $PlaceFormFields; + + $EventPath = $EventsPath .'/'. $event . '/'; + $success = ReadTableData($EventPath, $EventFormFields, $evData); + $evData['ProgramDate'] = $event; + + printf("\n", TBL_BORDER); + $prev = GetPrevEvent($event); + $next = GetNextEvent($event); + if ($prev != '') { + $linkPrev = "<=="; + } else { + $linkPrev = "<=="; + } + if ($next != '') { + $linkNext = "==>"; + } else { + $linkNext = "==>"; + } + printf("\n", $linkPrev, $linkNext); + foreach ($EventFormFields as $key => $data) { + if ($data['bg']) { + printf("\n"); + } + printf("\n"); + printf("\t\n", + $key, $data['Label']); + $value = $evData[$key] ?? $EventFormFields[$key]['Default']; + switch ($data['FieldType']) { + case 'text': + printf("\n", $value); + break; + case 'date': + printf("\n", DateToMDY($value)); + break; + case 'time': + printf("\n", TimeTo12HR($value)); + break; + case 'bool': + printf("\n", + $key, ($value) ? "checked" : ""); + break; + case 'html': + printf("\n", $value); + break; + case 'pix': + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$key, $value"); + $pix = $value; + $fqfn = ($pix != '') ? $EventPath . '/' . $pix : ''; + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$pix, $fqfn, $EventPath"); + if (file_exists($fqfn)) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "EventPath: $EventPath, fqfn: $fqfn"); + printf("\n"); + } + break; + case 'chair': + printf("\n", $value); + break; + case 'place': + $refPlaceName = $evData[$key] ?? ''; + printf("\n"); + break; + default: + break; + } + printf("\n"); + } +?> +
%s  Navigate  %s

%s%s%s%s
Preview
\n", + $key, $fqfn); + printf("
%s\n"); + //printf("%s
", $refPlaceName); + $placeHash = GetDocMap($PlacesPath, $PlaceFormFields, 'PlaceName'); + //printf("
%s
", print_r($placeHash, true)); + foreach ($placeHash as $folder => $placeName) { + // TraceProgram(__FILE__, __FUNCTION__, __LINE__, $formData[$key] . ", $folder => $placeName"); + if ($placeName == $refPlaceName) { + //printf("%s, %s
", $placeName, $folder); + EmitPlace($folder); + } + } + printf("
+ +%s\n", print_r($evData, true)); + printf("%s
%s
\n", $evData['PlaceName'], $evData['PlaceAddress']); + $imgFQFN = sprintf("%s/%s/%s", $PlacesPath, $place, $evData['PlacePix']); + printf("\n", $imgFQFN); + } +} + + +/// EmitAdminFormType1 +/// +/// This is in the Editor_Event.php at the top of the file. +/// +/// This is the admin event manager form +/// New item: [date picker] Pick Place: [Pick list] Pick Chair: [Pick list] +/// Edit item: [Pick list] +/// [Submit] [Reset] + + + +/// EmitAdminFormType2 +/// +/// Emit a small form for the Admin page +/// New item: [ free form text ] +/// Edit item: [ selection list ] +/// [Submit] [Reset] +/// Validate that the form is not empty in order to accept it. +/// +function EmitAdminFormType2($args) { + TraceProgram(__FILE__, __FUNCTION__, __LINE__, "", TR_ENTRY); +?> +
+
' onsubmit='return validateMyForm(event,this);' > +' /> + + + + + + + + + + + + + +
' id='inp1' value='' size='50' />
+
   
+
+ +
+ diff --git a/inc/SiteLogo.png b/inc/SiteLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..50bbba386cad1d0d5ef328c5c215ff168dfe286b GIT binary patch literal 28996 zcmX6^Wmr^Q7d1cxlunTzx&)+#E@5EkZfR-h4v|J`=&qs5p&RKEkfB=%fuW?Ozw7(` zmEMrA$@( zy~V0dGFO{|9h-xbjRSnrw!W>G7_;@No}Wp9qGX><4`bgnD9Hs1Ok^*?dyMRt81h0V z?2UG6%KA&X$d3VZ4oUUgwaRbaWvGwKht@u!KlPBll2SbWX!+c{+B~wpnHi6`MfJ^v zkmTYG@|`>d)83HnRfhT|TuQGy{%S#{^EFFVVtp@sG71{`Og}Z^_Zyp|q3fPXUj=*^ zmLIh63bGnQ98Xg)zc-l4Q^WiF~0Truh|tG)}pQs??}Ff@l+&`AF9Fo};K|i4xTEg~?a%7Dw1$03$r+ z!9@+F))g6nV#xQCPB4haYNQZc{(1G1wTB#tad;oF-k9%-MH6{R74~SW9&f9wgS=#Y zG#Bq`ageeqk!hODgb`5JEG0wM0}Gq|CS}O+IebKYmPw*mC;r=rr{tzMlaI3+t z`}Lbozjl?rWpnEx#x(nJl>bmDH|j6e%NR zh$eHLL^1J39Ij&Tie9Mo)=0A1Y^C1%c5WaEul2a0Q&y&UU?)RV;KNthV}LfE*%ZFGb3P~4xd-TO5BEv-nGglIdh`&p*(07uMp2_Q|mK}@Glo% zM(R2e+KpxKt%p+w;3YDtkZ2S`5ypsxI_n#fuToN1D{fOt{o}$%_6y3w2NoTUbz}Ty zpI@?WmRDIKt6>9FE`H|4%)N3Gal^K*_PmKHtayjBt1<^vIvg>uncoqwhL zZVsBXo0{7t1OkBHNPQ0)Qs=F6{rfs^4%r&#&9KjHLW7*oT`lgEFXPyN;qcQrmv7O5 zb^ARNNdGHJ?9*(O0TZKg7PHvhnT8@6{!okScDV{04lr{Au8f1FCQ^sRdVH<&q`fgs zwxaV?e$`pmIt9%~z)+9V8OJt96Oqrme-`hc!;X6|SAA7pP>UIUA>;1J_yA$SHqQla zzIkUJQMmIX|MQ2%`m$^IvZUV$uZ2;rhL0{cB$P+d!Uqrc2GeHC_MLA}2&NhE!Sxl- zHR41@rCNO$OLrdCe&dqkdIWteUbe7jqkiUArQ;vCh{5VqW>GkCoF?;Ax~cpyzZQ)} zZ{$dSOyJ%5-1=6k2}w=+NmQDce=C@RE16A)|cL*&)76^_fI*cjF2A zr51FVh;J?Mp@U4s>nlV2cTG9Wt3$hMi#5u%mR*Os@F6} z4}w=G^>5c_i5S?lE5GW;#EIWG|J|>fm|pm3I<_7weApaN_Hw{^rPX~#05-VZAKfpo z=2sUWL^$BAX(ybH2EJT&?LQu*=CYm6`>bA%SF_Eo_h2KU`CL7Jn&v3eYFr8Vkxn&9 zKw-}3N1o*R)pl-EYk{exXF6Z__ebUjiw$-9kz4s9s;f2*0rywiv+Uvni$C799lzkq zav5P+&vG5dZ`-ep1{=81yzm0Gs{i(FF>&2xN}45g(>6}HoRtS^LR2iD-E7heavnI` zVX4tVm6@?^V0NwT8daefhD&WsXJCj5tRVZ?wJdO{0*YikY(bS*C;(xhOV^fx3Y6!T1Sc57DR#G$s~5X_4?g<!yT^ugo^Q^O{{HU9N)P#QA8)ji1J8F66N5@b z$pX)7juDPywv&!W`~_19;Y`YJezhHS)}5RVGv$7_>9E=ui0OYRu>5|@8eecLjlC*y zI02eV~!uT9dUAYoT=Mg4u(-M zI;DMB4uP!q(>j$F?g;IMjGG;adT7WEKP?&D&uHDNZe#cKSO_Nk7r4^)En6ulC|y3= zv?Qt@j_h6URbd|0`pE5FCpdSft4}9OfPp(_k>qtsi)vMfg% zG*>*D`X|?>1dZP(m2$xDEco3EN5wH$PVhhu|K64?AdF8b^)SRlUt;Pxh#sj=@#LjSk0} zEJzZFjC$joD41Z_>Q=^=644uCF9YLd)z1zwV}6zp!fhV;=4XsD$Zpz>`IS>c-MrUe zN0m-&$D7FgX0AHw4Gz#I)0M(KY(mns-~({mq#ZuzwF44_&yV4&Dd&h~^fk6?lA`we zheR$eMMXmsBHVRR--~*~K=dN-)8FgAGo46EvOO}kvI^36rY`l*tJ%eIJ5)MuQf=K) z(b=)029-u_?|#Mw7ray3OsUXZkbsh3hv+tdrY7Yo%zZ07Ey=xZ&QV6rpLk<|LaKdx z+4Vr&^>E(?-otg=r}Ey!civ2hoQBUJTOoHt0eGDfNqZzkwh%^Tkh8BxH#(_qs9>o) zfp+ppFzzt#xM1Oq3=c*5sP;yzTrRD`Y!z{Gk(8rq5v)|bik}#1HTTH1Xe({a~DxznTBb3?_69z(cW)F+Rasx7*Nf()R&PzYAhk4eeETN zZH#^a%-&(f=9N7QI~!K>v+7X0^~L6Q)qJU;YoWm|65fAz3gaqI@X-c1Sv-@(M@)nB z0&uj>8%kNg`AL!E;9<|As@&%Mbz&EhaR=(u6d*p4HKsiTl)L}W9g#pCdk z@2{NZCb;xfUY4pcvw&pYYjrA?RLtP(>zwi~S;*w`BB;fMBkx~LD{gOES(x+CXB;r| z4|@jl4{kBKD(Rbl9_@pG>Xb`79yI)f)h2DFMb_0S3f5prk9~VSXOhB;X`KD1L)JC8 zhV1#1%N|i@r)B!f5m6@c5$vt76KSE7&nNONa6iW9C=NCB(m`1{HQccLA zY9^uU*hGE^`}H&E`0Z@xm84y2j{-JhS(W_2{yYKXgB~Nk3%Tcatc903Vz#9X+Aik` zN0uB}+o#mxRJQ)&w$0Xu*>7n$U?Q=QGsTgqP*P*EQUO`uD!2wu8hLcDfO%ib= z*AAM!t5dJMvQD;q-?c50d)krb_vY+_^L%%AO*b|&sGdeiJ~L#DrY0OQdUM#O@`8f@ zdsM|C##XXRX0%3ZM4lLvt>L#gnWOIsbMKfJmK5T!Mwgtr9NZ^@>-p!cE>1?dFj)IS zADKi7M!s~Vc)Q)J-%FC>o@7T1EH%QrD`f#-BG%+NfY2bc6Uba@0kKBSzharvpl@w0MxJ)eI6@z{lUHX=UL(_ zUWpDaW}wsQYh>OEtwUYRA`5$Z@&pg7gCjss&bl$ELF%9dhI$}>N7YS;3EL&uBR@zx zyUhJI8`7Zc8&#pSq7?StM+{E4?Mn~^=7N>|1Wp2HDDk^9LY6B*a@aHln> zo5=eF!S$eivx$|FLmIQ?${&7Ut5zQ!thu2EmoY=(%WoYYRTd%`ZQd;=gh4_gbAXW4 z06=G-r#0yo854)dk5fv=;m4@DIx5%O`tqYlMrSD&!kG7a_DXJ?JRoOtN{siz&zF9E zY(@=g8#q{UtmR=Ry(Q~&TBt4JYol=c{t{oPapT?k@h6A=Q(Pww&OJRN&84sV-)&OO zn?_ngNtg^N=5|7Se;PM49me>+@WF*s+Q{oOelUZ-5OlS2myJJwdl_55Yk#CzxO|@G zGp;R%@;8GdsgCrSjSjrG;ix2hAgGY9t$#9!%~Llvo`EnQwBk$0C&d-{6EtrY&GE#O z!r_zOZsc8`E3N|rj%|s__4N6WLct!lQsvtFUSrO7(oDPSM!i5$U?QcTeK)9D=IqfD z>p@D8B~b0%#gf5Rf_qXx`=1`{+0GL*LA2sdT+ed%RL&Gv zEpcVBD~sbkLKQT9wAV~-Wq-WMriIYxCL5I;obOxOBK$oj9LH9AWZh-67c2V0C@Kkb zM3*JAIihWNm<*taLSKE9_z)I0d{otpuSG8eYJI6Ks^O1`Ex9Hs|@(81N7g!(7 zdy)MKq3zel%dQh;ygp!$eP&~zdjnODH!ImH2cC;*L&47@ZPZ4vMU^|>j2gWmYais( z$4h7jka?w4+S`P_yV>GQ$Bbn8Rj;jaZO^v`3211T2~aFU#YQ^JWnmi$eKZFn*Z`c* zCg<%(tdsA&6A=|Po%-36pVu_0DqF%JI0*)AHSy8H5JnU$2j;Ot0~zt$l5-*NRiG!J zm+eOMXOfMYVDF9WwLbsPBeE}URB1Tm6YXinAigIwk*dZlO#w!BuWeLuvD&xrDZR9I zrOf1|qED1<4u|d#d^60OUm({FAU%(6H3ROHQB*aDW>fAs~Ml?^%;^x~+^0P-q@-NVd74(|H!>OkV zakJ7aF|y2huew)_ySO3k-+we<@g$N7yqL$(>yeS|+AHRt6j7CW(Q9gE5PsXpPk(v|}t$A_KRI z=Fh)!#u|~m(B%#zVtk!{2taZa)FqFuHg_3~IO9B|J|csURTwAo(b+*ql_2WtvlJtbUyi86 zC~TYeB^Wm5(eRf*P%rMuDa8vwh!sb8w-!~{%cz0wp#{wP-0)|j0vDEoQEO zy0PJ4XdjGbf5pn60JD`z#5<80ww>c!P4@OfJoqFm%I|`OL*`-i*uhJ_2Rzc;eBOz^ z9=RQOY~%_NcpXj)*#vfLZR1tsk-Hd!3F65DGC~0XR*6 z92ctU?9>(D>1@?x!4bk07e4@R$kl~eZyFKgXKAb|DTbGFO=n^fGM4ftNEZ$ZC59Nk zP`_5gTX$5ufc@6a)2)6i_beOi&eN)3uEzO!9+I_U)kt7n%UJpqcNLK;SiKyQts({l z>>*PMFeYiy)2(b5C;g<@X#QK>@hl;Y?8w)i6$C31;#gAlQY^X8?ESi0&OV5~J)k>s zsS6?rgt`9yu4di-t1P$A9cG^(y{W_--ze`PNVD*%c7z_@0!-F()0Ch|_{r94&CDn# z2sL@Kg{W*fSNNWp9NVXy#W50IB!nUDW!8sGI$WqLar*o0!jZ{&@Fnq=Kji_~L0m^2 zzN|3xka{LuXngpl<>S<4viw^OTqvGhyIdRGp4HbE~Jq)lWDRlJ(^ zHgO6dtK_pGI8d=)H2j$k7GDywR~K95+oXE@J{{;N=o25GG&O0&Xlj=2D`r$A?50J>OVWyp#!C zYVucs`A6Dbx`K%rEf0_bBwdp@J+lbkkq9!rk50iPdBVi)_w=j80#Ryc%0{W_U{pSr z$M<>PWtTcsfltE+%H3*xBk5&Ubeq&WapI=sQ>9rtd}2e4xn6f?e?#l(_*r<%OK-`X zc!A9X8^$aVWt5p)Ucg@m$M=^RYm2K95;{AwE6D&)pgtAdZTYw{VKKZG|76O`F-{ea&Q5x`K&y0 zF&qML+f|%`lB2MZeo_yxUdLY`0(6AE zKk}Uvg?m1P=DUcEm-nJ0(rr+_REj0kmhH+#VOP!1(0eO+faal|-?3}uV1Yx3=8Q2n z^b5jhO(2K!vcyD_@W$;{zWwC4U!gp|!{W65TT#mqqR9q39Xs`c_&*P>l!mx-{pY(s zJDbH16K`U$PvYCBCCT3iIY6FF(`)QyckJKYkb>S`vM2=7(e5M1J_J-ERMH)I4_s&t zFR;1V<3oNP>ffK{K75#iBA*ETj+jL;>*x4*CkvhiPsBWdfC<<#LWk<9VEn72K_EFD;9`92J{QV`hzbNV1ZcQjn^EN-pwzI=8(jAvk zG3d{Q!>gs1-QvtX&bB_`#?+TysZ=}`5#W&!NRZ&Vqxj!x0_RgBjTpM&sK;4!U#Xjw zDXrapZFZkKXB%?ORec7o*YY4p!=*$hoP;hOw-Fk4Ez^ON^q2XgQx$de7`{{O#_ZN( zuU7CI0iJE&N-^l0F4LG%V`L}hQHlpWmdZk1U`(9|9_?q(sJSiQ4beGI^orZc);g}V z&dQMILl-XepdUL71?DFFy}JEfAK=oj<4an#87x2XB)FC8Omk6IinW~28qBEK=ZPoO zvr6MDlC+10NQ|ZEemmHdajkyzys0b2mfP_}3uwYrViK1jWFOGI;EBd5W?%~9c z#sz<%I%{u@xf?m;|7vXsIFxR3h`(W?l#eT=RT(y*Ou}4Ig{tQnt93!8xu#W6Hs7=I z&X_fOY}JgpIA-qfm9& z*E;rARO7t{yq_^?e?x3DUV2)M(ZH#rfsbFSqm}oq$_Wi}1JF>aV%zhh2cZA@C<3Fn z7hI9scX~SezI}uG3Gk)q8WVAMqAz0pHCjg_1cT#QpPH<71U?+>SXo0(Cy%I@Gx*sl z)&)$A{Yzxp`OoAw4jD56I-DV(l0duK&<68&z0K5gI&>b>y1WKIsPq7It|-pA-2?xO z_bwW?^%oHdG8fzzlY)m!Oj<7A)=u9gi!`&sM5CJzVc`xf5aUz%Jjr;cT)esaK_2M(~aN0CYKy z|0w+=%*+!&YI1c?GW@e@r5RUfTOg_hR6(1-%LTiD>)@+c{Q&Xh-^cz4|n;VQ>FHVy<@7K};@>Ne~0SkmSD8a@APQfoO{I$}J#~iBc=zyC9~y z*V2ptiX|&V{XXoRaH^<(*3bOU%5+r#s;s1s+&U{i7KY86-n?+B;K{nB_<1o})B{J{ z@#N@qFX~Qs*Se*bCi0%SH^}d5^WdrMDdVs4;3a69p+=V1xOI-VG$knDB^xN}G2Po7 zA5NVg^gs7dDRWm&3fGxPR8L6mzeIS9BXVFr-j_Hcy<)dlBktg0Q= z(&*%i=yVJ`vAa&;n!|qX>w|sJ!N^>kEvS?sv#sedjQm?jn8H+`EUvMdIRZuIq5G}4 z&jD$wbg-Dxo%Yuu)^?SSUPZKDPXmlAJcUXYH(~YT^YYJk#Q>bB1S^PvQy<)pltsnB zT#`2p=Q*+}$Kh`DcLgEsb6YB~UKuavvq`yV(aU8GN=qq!ep&gLAn9bsEhy*M*E%@x zcne1z7R%-B)CE#9-mV5d_#dS7GqV=ttO4uiVMWOc)?OgO3uLXKKAGh=`EK=}Ph6!%>#9@o= z-3_hWL?(jwdWo2_eW^@1syiCq?pIOVlBPYGV8FldqV||K1$GN#na}0L_(X)@JKIGA zlt1}x2+tCyn|-3-{w{w%0b|%l09N7E84NO+>qN4M^OGv3G6hnWCdP@^uvWK=kyl;Y zIg+!9y(V0GhxkD=G3+}Mgrl(lVVzddsB}U#jg#8RY*w0lGDte{{bEHZEs#=0fffb+ zh1LJ)ukaK@Owq*22+jAZn`yI>L4aeh% zv{DD&9;29DRJTaf=Xk7OK%MqTCRw`YZ)8JBd^CeDs{(E7dwLR0GLi4^rNg<1npT9h z&YA@cRrpQcSec#k(4`YK=eS;fY0z(lgtUWzS}C0Sx!CjvPZFrKr1)8IS&rPJ>(E$B zC4Q+gPh0|?zp&TB9+d#NaE^haH=JxFs)zycVm(lqyk67aFs=4W5~L#R1YMUw4v;8T z^Fsc$hSi%IVOZ$r({FJgq9vV!^2%Tmd1lMHq>F$yV8Ofl+i})&@Kh`3X};K2*DqJL zeoz%4H#*{CoP*ZOFMb4i3|Jpb1jOaakjtYfUs}`ZCHubo2>*xjuAVlUgBsE>#uBj} zMa))tR{+*!G*vi*n=LlZRBTV0p|*|snU35@q;pU-hpjeFlY3bl{oItVA{?_bqkJ7_ zF`T0aWllh2Ih!D}=&k0OM8fj4|DFL*2pIn@_9IJ4xfccxbf2yjI%XvOOI8Qbz$xyR z!apoxZ*lH^c2s?i@V;2E?g#Xq>R6uc(P)-OzUukd>swpt!{JV1c3kB;F^&jtGU#n_ z%8tiu$-4w-xyB3R-+sx1eq(&j9o*>ThiM|=#>)UQ{2!x4<}AZ_95b8QC?H-Ur%ZYU z%N!hLe52ceY)}1O5Zt^pRD<%6Iu6GHb>WFb-G2Uee>2OWwIqC4T1}xz)+v|rG zNBthcVvu!~4u+*%3>et$G$8^*wFZDfvHi1Tie3a^@4RSkhY?n z?Fl-s6^?Ej6!@oX&>to2`-JI%JSz+ozc{KJXc`-(F$g8kRW{xSR!d{d1+FjT>R%?h zK`nbUQ(&=W_v%OH%TuvAmJRld@_Yvc#`M;Ies-gb7-foht16&8QzaX%Q<c@J! z8EVXyr}dG3kyT4~fP7Hlnf|r8-D)fYRoeVM|7+|kzVb59;U@_qzu{_~bXR7DJL|FA zPt02C+Bqp3bpv=gT7>idKUJLbxq3*S<^z4up};lC^DdID1f<#S>)Mo&`qY`X-M}4j z7NMpg#=1sN&Tb+%IUCBEltB*0u(^i9I9(61Ey6w1cp0cAozL~*Hcp=&9uG;#0I_mZV{J-g^mXn4a|XAdU9^yNfQu;z_2*jH0ecxS&Ot% z$Ip*}A}=~~6GRYilQA{)Sf7;+PFquQH?cn5%Y-nKGf%eNKPSKN*n3Zrd}n@;a}} zxND|VRJSTD1L7&FR8R;2$9;ejTN*pE?pC4Ae7o$2PCP8vdZGG%(3?{uR=&C`WOng{ z+pb~t!Ia?S3G~VtP=BKn=;g`_*SAm=H6#KnZi!%4MS#;;x7UiT(kvsm>6*zG0OxN` zj+8oYj%8n+Zb!!mtm;-8G%07ZU_Y^Sxz~H~+IutMpWRAJu3wg)V;GLj@Hf&DDFoQ9 z`Tzx`Fg7X`a62FgWVj+q!PeuiC*hEvGs0KjQiQOYxmUxh_r{D1b+1E?IxcgxL79AZ z+Gi_{rP>_nb_{pSzYiN@Jp~*<{A+K>H+ouBD=mj#o@ZPip!)=I_Mw4G)(pyiU~b)` z_*?)VQ1z;%3*h1)J-2UCI!6r~u{sQa7z#5@Q$cVm&8Di$FzKHC%C$V{IL)wLv(XH2Ch`t@!&sS zP+_fRnR-82cU9VlRguM?SEc}$a1fZIGcZD!qU-ox|8IgwR2ln~R~C#G81~nk+kAEA&OEs z6O`qNAR|fCT|FBlI9HCK*yh6LYUy*akU+F=#0rZ{2`Cq`Co@6Mm*Keh@25p;kocpE z5Hen?FFvWmfZ4BNwP>^VDXs|3KYxzxbNgQP4P6uUGreEpJcRhIar?Haa>9SPFG~6lL21?RE|5M zXzqM!#4o^RA;^JR0b##RpYl&9POfJ8B>@yS-%nzBgxsdnqL;+A9Htcj$!_MOzh6J4 zEK4rI4*97sZjj&>oul#o7Ojq~Wh<^|T_{yIV4pq(&a|5mWhtmSQFa72v)3x{U3Abp zBtS&JJ*DRZK{s%1nuNvihN(n-HfLbdYG2H3Y|mF&`%lst(#;lz@Z!2jMge3A&4vtP zX!yrDXTe^`J%~7`hRrv2`yKa_0=c+M_4l}jiYRfqJPEyI*t2Ksx~w_w4ea7JzqnEW z&&U^HX6=?f%{3)3{$u?+*VGVQsn-Nbhk$acC6^B0NNkZTU2`25Vj_mf@^6%s%#432 zB$Q$IW){8LOhiEyIMYzV;QZ+Kum1aT@WG57{O5_$HfPjNX%2%%O*s}x@57euN}AK+ zl@|+97TnP3oq7M_`^A-ws`hPT?#m;*(Pvs`OCRtR3jmr$VfZDgjdO<#Y>I_X$fJM9 z7NM$~Bcj(a8bY(XWg6(2^;7JjvTl6D0Ms!+?eG}E^6c2pWtaz{K2_?04d;OI-;Vpo z6&k$dj$+symu4j%UC!&&I0CW{oy8MOOLLnTg|&C1Nh})EZBUO@Z|ieThUXEW=y;_S z!Y28}^=*E_)+4V-J6dn4sLgEbl=8yb9V#^A<_QdZMJjFXK|dCOG*kzKOX}I3GzRZS zEKBy$;BRLkfa_JTrt98EnXc^fL@j?c z$mw-^wU)r-RE@KPvwPxq8uOM2%ge)+s&GApH&9o?9oa9FOrq{@Jo2;n>{2|gu&Cmu zD21%TUQ&=m$u9<%5Q^Rij34cGX3DtD-6WY7V6@Javs8c3^!Pk*PPHDXJIf!za3w9) zaXdhQf<|GYI>tAId_Fn$h194H)G}@ZPGapN9!M&Bx+JL0ZP)Be-!=(^Yx#*f^hp}7 zy-vF{Zy09N9b(!?BFnfWWu`S`6#jvVtA8q*>q!JdFa4%Llz8#A6EY_LxczyFs$;P+ zz2)!k>HlqKlsCY~O5;N)w~W}GgStKXX+$^-ve_k=l*VBNHa#lr!(1mE#EOB?^EEgH z?MB(>M%8sIL6W)QVv1G2)3KR0BBqE<#2^(#x_p@I*33hx=drqXOaNKWGYm3gnlORp z)>*Fm4yg_{$_aS#?puKfOQqgL69aZ7Qx)~^=i=}3WiWV`tCyr&5cRqRoEeVIS{2$T zqbNWgz#k@NyRT|@tR;rjjO1{wY_k*X@xS$%iu>YDVb83bCGBP@T1?`qv(VrX#Xw7E zY+{TeUa=FIQhdWye?~ewo-J&E+dZcwfHeGLob;fSy*jjO#=wJ5Lh8eR}`EBM4 zxNOS1GxkT8-46<;KPC71fNg32RP%IuLg$EQ!M;v63=;iB=A^VRmS8j`x$28@a1^|n z&$8)@y{nn+Cm|v8L#boSPqN6cy`MhNv_9m3f92<4Y5_t6{+FPXO(zAt|DH8|yqdfj z>4^Blv}eLAz9>r!%k^%(-AOs>>}2_Ct;4(?49PCv!}hK|QZ^VZjNfoV=%f|uwX#;h z8XL<=dG*pG8+aCbHvwjl&J#Rne=YleJK*^btfI>&#qj{`5ZL!0SvC?Z{P&+$L#btm z2U(}&(knQ+-j(6`pg1I>njjK*Z(??K(gR)n%l*!H&imvV+I*B)-GsC4sq)5e0@F-y zOpaaH9Yy46m?k5AHy0WzA@CzEZRm&eO?fT#=E&nIjr@SS>qW9IV)U#eI#@I*m$o&} zu^l9%59vs}`6XYZ(hM8jq8vX= zVQgyTiC6wA<+2$umF?!nW#L(JkiFCd3pAkg3epAqwUewE#FU9Ree(t1fAsb}x0H2I z3jn<3+6=?8|I$^_8X__?wThsI1E@3qkzcgKkFQyan!E>|2#_Ro@cU=xr z z@qJuI@^UEzD`(-C!^)1h?8 zm)%I!23ym{F5)LLu#xw#vSuUU)RJg#O674_%jl?X`)?kWKlZ-lP+9#)c!CpOG*eYa z@13san`}ojZThGGQOvdbeG|Post&42TyqtNgGU_y1|1l@>W76hZEa*ab*fpj;sDn~ z$foCq+eGtN0kBB8g5Y~*32BGDEb=bBtN?>}c)MJa`11R$5oK~{gJU1AwVEHnuhwR< zm5lbbE&mRhqY1R#&Bn|OtLq{+DY16Ae!^T^U(&?9IF4MUF0JE=hpPz!KG-eYK$mbv zV%Z&9OIOcaqLgVxeE&vP9fMd{Crq=7_8Ig+YX@BR&%7fDV1*eqo?q9^%3RGg23vO> zwWjAt!pE4k4>!+dqRz~Y7XvlUO10SfIcg~!ZI{%Qy-Kw~h_|~E1R=reB&z_aQQAqe?5%a3d`u{5^(o=S)QxjDCUKa*@iWw%WLOT zR*?dBXm<2FeO#FsNb+h(jxt+Hbf)DfQiUB?{PttTttJ`)T@twuS+vAr+5p*z>)cIA zZa}U6Gt&q-PUqfRiU9LW>Z93m`s(`&rYiZ1gC(7R>Jreg`~<`{uI7n{fSWopW8NlO zA7Q1>aE`U(kz8|&Q3AwUEt!#*xC>D<|LuS;JWquK&D6@^j8aK7Fd`Qt3BKoxD~%K0 z{=Wx|Xz$4MnmU`;Gk49Zz#dbDa=6a_X&>vsd%v$ceg@nqXVbo$<*tc$jW)$|u1Cls zBTvZ??WURU%^=>a6CgNu@-g*-H=&=R6cq@rM@jMbN8!f@0O+EijK*{}bQH(fBTVNM z5sIDnk~`YuJgb*KKjYdKZZc3-XYS3#RJg3ADqpGju}*cP1zTqlYUFrD!eb5)&tq?x zh!y3B{usWKY&z|4Z)OLv!c^&EF{u4M&eB1OdX|&9NrP`=CIoDmeFD!reh4Y{dah5Y zh#Q^ZC^iQie!c-tZs|Rh4@ZcZ?K0{lpfwHB^__sJ5pWUO6z*qBQOP0CEyJi5y$KY% z=G+Rm%Jv*ct)>#!YT77e*sqptly3vDHz@cCIy!G>2{5_l)dw^BUIM5?L4NZiHJ}M@ z^|Pkqbij3=F;FL{qNZb#|(5o`}d|w&b zaXCh9`ehn;`s$;Wz8|?Ygv6=5guW?KVra4l8K* zkgo;Xrn&MRS76XGBSGrgL9&(l=MN$?yuCeX8Kw>la zOOpM@2~p;J@(6KeprmFGg8z%-Mpdhe$8_J$WZr~|GC$Kj3X{)B`Dnog^Ro)1D%L%` zS&~B7XE!PQcYNyapI`4V%C{aL#@%cNbm+29S&OGD12A%~{0|;ug4<0iTFnu7<4;z* zW5Z6u@AmH^Yr)fCN~O0oEi&6IX8V)(c8s4B2@)8}lxKNJ~|mWa8tR z!1fZyhzh9SOtI4GLtxZnK(w6cPrTPCp8AE|E{Z0!TTCa2l7US)dfrh^d0y>DG86?n zqZR{Y#B)=MI?_!Kms?QKV>9F@GXGiIP-NHJ5DBR)moSBR2dk?HkRUqpYIR^Qi!?hm zHDb+(R@=dTvh+j3n--I)UeiXRN=}}Y;CPkQM{5nI_na)1Dhp;T1}Uix{KD_vvEMZg zk~{?xpBgjo*_&AsOR44d@Mq~!58v#8l$6{Df_>W_ca>x_n*hi3*L$ySIG&?s>RR&+ z92$~=YWlOYB@o#iePq#kUQYQPQLnQqC@s75vkgEi(otKy3hWc?$E1o&Y+Bs^ikF$& zVU>eg#?$DKklo0jDP)74`;8PV`~YioQ$TeN=BD$U(hGV!xwEsO6;_;?*pCY7znvfcN@I_QwP^IM)J_} z2a@9{UWAdF-5bgvA*%VG^VU&T zQZsq^yL!CFeH(&j5i&PG7&9Ncd=_&?mbtl zY?rw2x1h%bc5~Gz=6^?yWC#13*2-45R2u1QrZl3q&@-JXW7`qEU()nHKLd2#&<-N+1g80T4-agAzqvBZgtawg% z9O=JanJa*9*hfLkGjr@Jc`nlUaUbkNpWV!+{DE;LBIpZRT_{f@f2$+Qv+saaszZ?~ zgh=#ch+di$l1cLsU&sr`EeJe3my`etW@}gfJ}q{&9vo_){WHbawHD;FX^x#&G^q z4cwDn%(Dc^2VC!#0Ciy@0v=OV&=Q!bScKMPCqJBRcp5VF1&z|RcWnx@6la@nnWNt& zK2G-#P=*HLJ41iN6O{=*W8iAbS$YE`mFz^0=#1LtYx;vKWK+?+(b2rE=4cAXOdAw7 zd;SgtoZTq>AxrQ#_Rx16E8Z>?3SnewHmvBLvBid`%CFAX$7(%mANf>wYp5<8F(qIF zY><4pzCUW}P1u?Lf6Rqui&ErE?b|wp}T(V^lZ)XA% z9c3hdvSZ}bUR#|+(z4MFoQ;gi;5nUnFnBgFLPpB!Huor@uba(a$t_I=skf7zEX5QR zU&D+N^g9n*k6W`c=p@lNDb#16edSbJMuspA*r?)f))Fqe=&GL0GNeVHZkb;mxD%~$ zaa|JM>#OU!%a3gr`Wf`J@2hDq!3J%V_oIPy_tvj|S1t!uLGj(cL?6`BSGYW)VTp)( z)|Le&f%DZUSvq3yj;|P<4XIh%pH^%H5vv zx(byp)+kY)o%$Y~hT$+8#3h1-`*an2D}#)zrpc6<1QoMvrP6T7GWo3?2@6!~vpsuo zT`uJYj+^oL-qR8o?f8kqN5ugEVXL|y@zv+z@t;E0H zpCCg%_^`b?sDv)vOnSkY6YN>Y#x{OrVpJ8iv*<>@*MZ}s4CvB^-IUgu|L7IEZyFfc zQbI-@?_wQkxrn5g^#lfI`Ha{|fwr2W?PqIOYLr@;LpMiO>%LXzRPLL*mwW<5 zgM54#P;-BVm=LL`qO#S@GrA`t?mt+Pc&F_)({k{N5mC&*gxvS6>=!c`9c#Od(z283 ziN}e$c;4TX)FVcx_^9@Hx;gCxW-3`@?aYkhRp=ih*k$%vyILaC43cudJFg4-!inxq zhxF>KVoHtL8ZR*4vBwLhJe{Y5d}X1OltHotNPP0lJ*6WaB;slx!N~`Ws}hPxj-S+wdD|~0u@}nJ@@4sN8?mrd^(EiufS;j^6MekmPpMXdR2q@j%2#AD)z|bHPgA85L z-5@31!vNALNOyOKlynM$G|13>H~#N^aqs8)7U9g9v(GteJ?nYCn^3oVRVp!QPnyC@ z4Ojz!p@0ZSEk)2T9HRQ!YT>_`+aa~G)Yd4J#aEBpZ>`v;NssSd zd5yp$t#_A=k4S#G=zp}BL9NFrwLmM~X|OzeayXoBqPy5j;nP%|Du5jW9%Bhp5VNNOP8K*;DE?C4Unb3IN=vGjB##SH>Ss!1B)U>5x-ogssE?PEwa)z5Q~GQ^ zqgCl;p3vh`i%4!!|63~;xU}egjDg#^RIbO6(`cf=Ue!-(tTAyQ?gIT<5*3wD)(c(~ zJqwZuk|2#bp`vArMsX@Y=Yt>P2}XhUrJwx5ns`dbW|vMuJ@&jjtx6j+cl}zzv<9-y_~@TZz&zp=@_TG(m)_-%h_waqQH{yKe^ zh2oc))7%+%nKzrAo>!%&s!bN&AgWWN*!>Y`q3XD;nVEW@)RRx4rv7ZPQKBVha->G` z<60_BPrhr=JzBgF*IV{K60t9Eo%LMaX&k=ePi|fBa^tYZ^rxJT->D7~;jHh>6^SKr!qtBn}$J3AQ8nfY30uEpTbb7!9J@zki5m|mYB zx=F_vO5OQkviE7zrq0BxXeeW9xh})q$DA*$R=Gp+H5ic$Mt4v_r>(a@hxV3T;zq7EdB5`bqn_9cwH+&e;n58 z_8J!xqIZ%9li6Ul)<)L}PBvk&T}!n2umP85ldR!ew;bbzisf&(LNed;#=V+k!GW$S zqWK>_cUQ|z;O*fx%to5Bk)p`yv=R4U+B%t}bqD)WyR;SmxOVo}buvsnh7yZwb!T%w z)%vpF;k)rac@f*_qUAX)V*>qz@0+D?Mg!69`2EM;82%oWV_d;M`4o58SNyP}eVZ7V z8{JL++)w&y7wp3X2WS&QNLpo0iIkH+vUsVjxeL!;5AQUJ`J`7JGdpXt6m(7~@cU|# zzn>=k^01ti-i0r5yBdNc-mw_yw4?J_Fw-%J{3(NY%NHQLg4wcsGT)EdE3duk>Cj~B z1_+rk-f35aw$O!_DvMY24)Rhl+JoCGZN%oiy??p%LV0~Zf3b~)=7klxH$gj9J_*OoltT#weh? z?foou(yihPD`(=;~Im`$E6jAyFJds1NX{+0h2%ounr$Ijz(2W?4 zC{6C;72c{wHMaz*+!;Rhs`NwY*T{BDbDSw0H~0-C!$BFLZ>hjMMi z2mD$(>Nnnhl1zm}Ya=cxcuEKEro~(MzivQ+QkmG)=W1=zV?Gz;BA|yaBa*KUT9-9z zFNz+dFx}Z;UMvA_0@;+>9MrsgkMQPDevFKoqXIU~WSNvtF`H-ROb5m`X^q^&XuG->Tq^hcF z?9+!`^6Zl>m)k7mgY36*k>aRh7HlV0CR>?4VdEN%V%`i>`}~vvhP}vTlku!~n1GxT zuIX3#4fUJSvc+U$#kJ6}$O*d-lx$wRnPsqTzEtBtH5S#bJtXIRkfSx9$Jl(n#%lAK z28wdtJeIfki<}*-(){U}y0ut2Fh`Sdd{p%at*$bw3_qi~}eUxn?;C1j3x>E(@OIy-x)Rhg`D#--nmW;)l^Sp^Zr#P~bWaj7|kZE&Mf0`~~b3fk9jN}H~7)a!-oVSj5XMtyrTfYO93z#IF;NVJ|ExGToad}_6g3ox8Dw{H(Dl(g2D;Y`@G=$NIn_(I0T_YFxPhCr)2<&kp*hfZASGp)ysJN*&47r0l+x(Co?YwhV12I|D5jqFDcEL;5VWKk$*(*E}|wIz&V5vZYQOqFL|9U z2HJ-Ni)6lci>p+YjfYX|lCueiCP-kvmUP@-&;r-aYL3^CNSKa}jx^tNf}gCH)FE78 zx2$tQWmo9CBeMp4D$L)-0*slb8X@Q zd$Jowu9}5ded=TQ^@b)n0<6G}K=*eyS!r8(Kh{9lHaF71v~2vF za$oH`4A(!b!5U8plWb}ioq><>)OQ(>O12rn=VJY5nxD6BEdC&hiRw=9-SnU-Q1$yM z!G$VrDS<1M+x21ZyY+#~`8tpf?ON*xqPwiDY>RSwzJ_3aRFv>(Vm_?7K@k6qL_B+- z6fv8u9+9UQG#;e6OUD{V0ZOI|AV*S${l4V{JU9uy4+FG+j{{AJ5?MF4V9wb<42^FV z=VP&3vQ=eLU3UTwIRxvoH@jv2=O-G?K`tqu7F={)#~v*Hl1zNm@su+8HcANDCvJ7i zLF~hJ#x7?ksc)&wQ)4y|q6aFI)l`?Iau|rETNM6RJ0fzGuauqban6pq_|udW%?f5)ACEWBynygBECUSICs+xJ((#w?GTInJD?UIr;Ixkz`zuzNTsfLGg4!CvaWG1N#vmdMWkMS`Fc`|r^P z(VPB;TdOU7TVN37Re4XO5&goJ5@qDgfe`r97-Hd(0H{&Gv(jD?5Xv6Q6c~s!og<6m zm>}7Xf+%mQJXfamP1-Md$BnLEd+S<6WGReoQIlx(Q;dK8eys1+ugo0F1fl$HFXNTD zr0nBp2@qFP*eQ?1b0dqipM6)BePtSQdz34E=znHJ8uXPgtCHiDCC(riWz@ST#HtEp zF$YZ$ZAV~llbn%oVn!L@UXa*7tT2IbM5M39eokc%!S3x%t1T(SY?c5hpXC z+ABercvavM+ZZR^s3*msRNKy{%;3K?GoiwrGm6B&;7>~9&>Xc|-5_<}%v{Zm5>Ykf zZl6ci+5PT1o##P|rvMnRW7eFfWkif3GGa2O&A%U_O~Mv;(|vBW05D3GY<=XO8Faej zVPm-V`F=EWkK*X59^$fX1_>qv>V?7|NjkXXqbt~)$yCUrHrFRguZ7Zg^gbHz&Xi|? zN8Gl&HRTX`X@Y1AaO@~Iv)t`AZQO3_XszN7^#2xBIT#RyE&c*RgQg!LLXQnvB~xWJ zuYUcv69=eQlBy{Jb_SUV?d9~g+65onP7H1WxMO=iH*EU3kJ24&@+J1LFrflbA?17{ z{rcKnSwJC9hKWf<;sR5Swg6`WGfu|3Zsm(XUo;g&lg0C03-yZt#`!@G2#L;R4QJVd zX&d^;{nyD?H))LCWs&2U&e#A{7+4~-HK1FgjFXR(r_Z9d!2Qse#7oSSngK-Xn4^%m zSVb8RYcZnS=FGnp(AcDT?7uc-U8US~es|v;0+mYkc5~ppW}|&c^C`4YBvD`;{yuyq z+whT2z08*Un&fPjB&!_-LJaZ%yZpet(hTDHB z5egh@$iBWRCY}ZAXjgU=VV7=gvMIc!OFT!sfHL~PZ@f0p*LR9A)zoWHKh z^v;sKY`V$(XWsUvu4a)(2Zol7umYt2v;A7NmY==!#UR>1v#tzU4^4q|kp?^GCZyu}dpd{8jf^X@C;9Pys;)ApG zQXK3FVSIaG`A`nh|9k*vy$@5T9`n(93ex(?t1$G|^VKi|Q2MEvJ{hphWhloBQ)d3F zSzdH(wIXo2neCM=P(hBxA))Ja5)XhrDA)pTNn~q3w=cgRc-VlHaLZm;f3%)#Zw*z( zo=7l^5>_XBPH-%7a6vC_fDb~diA=i3)-i?wFB(O>E*gj*U#y_aS18Z441c{EiQ@(gqB}gmk|SkHWw=ALyj#`iYOr z=hpMypJ+N+K^tCD62|RuYH7jXzigiiC-@%>3QT!eUO(AM8AP_>Huw`btzJu9e%1km zAGov)p37eFYO?4K$Eg3Udm8>8aOr-|VGxr%!N1b-kJK9Qs1hoeDAv{h9>%4a!<{oA zzT{M{Fr_K8Gg83u2f~Qp90M=b*+>|B;ijT7IUo)y|NDZ=50;XBoK4xam_=)N=(p5* zoL^>H*8X^k(y2F+Z1RQ8W*Tmn@TR2zl^`0{%N!ud?l=JcP8gu0Ow4hAnWk};%uy5S zb3vv9Xidh)bF2&HmI|!@=oItZ}qzXwj zaCHC@FOTU zR$o@`aml zG?mmv&6q?0!vf(C6P+s2VM+73bsOB;K3o3%z4Gtq6XVmkHcOB|%@Is~)6EW-Ps1%Z z>ckPP0zK@5Gjjo-o@ej)@L9rLkhZ4|whxbU{*fu1YFAVWL@z(zP`!UD-rqA8GM<7> z_F^K;E35yDxbrxKA!Hinp^!S(8J8$tGbTk+z+)nF01nc%El$iZ5C_lyOm>Q6b5cI9J4(bYoIWE^FTO zR(Kq6%2Hp~r$wy=hN+B!xexx+PHv;T0(N$`G_O-FCn=ogSSpiy17l)yN}!>KvPjpa zXf(Kb%kgJ@;e0u($o;k)gD%b_fQykfoPme7;}qI3-DKT-GWB{|cmQYB)V{&OAGZ>f zQLJ*l%{{*cc}s)wrZAfktR*MMcn*o2?z8mEHp>&B+K~4Z{Ac(%oGP&VTXH$4$-9v5 zBS1GSN#|ORXQ#qP!z5y_VjWPfAKEwN!T7)`-k&2=0?YDyyAw|SxM%I91Zk0GnFhOM z&8!K+0YjZP;6*)d)a_G>b1Mj{$qz00v}mVTzThzoRTmhWaClVKGuh~A?zb&n+agTp z_nwNn&8)B@J1NogrM=o^>mQN5592$4uhR-30uXKE#T)Va$MKMdysiKYeAWXAN!Me4YeJs>Ax4I0CTA~peL(wOlq)XQ z@V981H=>jN1Ebs9vX(I%a@62H;83=yZ6eU!pbsLAPVQ%dm)3c_~ zPU?AuVcc$laLVu6rY`<<)xHQgKji9#s4nN;oO!|ds|9^F{E}2}QHlL?)~|pQHUwlg zC%5^&zO_s&H!U{jYICx024l$kNb7wDlvay&3uDyj4;85-EmJ9cJ|L9#q)Cnn)Py1U zve6+@tl>O4^~OuAS6pqBLW}BC)fesWLk|_6Y)d!4CD2K-lX;dh*=yP||QcRhVq6))bOxBYSt@`(}0 z;68*QI5ZIC#X;qt{le%Bg<02{L7?i9!rZT4dcd4c2#hhNii6gxe%0{lj}8%&AG+QA zFvuUso6tT379*Z^kg#5`>2S_=6|c{{-USS=)qifH6J>U$bol!L3-Nl@$)m2gIxbm$ zqsp|SIsy#i&Fg9ph;$!9tNelRvDJh<5 z6x0i%qmq-~KTK)~6SzZPRWaXuY<&JwGBD(Ua})s&@S3TxQuo_a44|#k2Fs}KGy1?g z1Hx!e65p+dJnN^Vg)xfJGbh`=fn5C%jCrfsHxGoC8CW5+pg=4tai!96OEMeH@FnIl2ryf2X%@s!ktI=k9?z^% zE`OUn+=DVb=;Uw%`QpiN$AktC%J@YRhwLFg43KCR{y6zNi{{V}ZoPK08hs#Peo~B& z@drFjY8EalBRCm%Z!;PLJN;<$L;)8j6ZX4Yn0=S!`*X9QNsI7U^%rlxcPuE8@lA*d zLAcBj5ex+ie6x~504LC0krzLMj|PSV1;?Cj1UJOFB=Iv{27i|?boBtf%ZLpNjEFRT zu|JDnpLnlS4MpG0`8(KFC+7HfHjy)m=f!>QOZ8o>C!J5fDe_IejB4a&v2sbMByGVr zX?iVMe`QDTrHsv14StzivvRXj`KCx_p+NCQvLXq$okehdi&&RLB;~Jozi;5&uCH@k z&LLL`M?s@SpVB|jsDH-{f1D8TewD3fWTR(zujUG!(_aOs!tZaPE$`o7iy2Ku60N#7 zXwzIP>|zChd^5O%WoQ+6n!1U4=%N&wysg)&HW#P)9A^~TovO!_?aj=0fO(SIUd$}U}W~D$pA_X6<^( zAe%+S@4^V_?wE(3=UVj>41Ej5U&KA-Z6!TJ)@DzZ&g=Q z#_{iVP{c)kjrij>USl8*I}jTulw)Bw8Z47^#+Q4^XQ`Q&g<1^~$q1kmeUq#aoY0kL zqOEwPZ4Xii3HJbLp4RK|e}y9fm0S)P>p}Kr^t2W4NLNR}?~==u>~ zDBixu4kg&udE>_ME~LpB=)hIQ#4*#&VE{O9U+PcD{{`?(tl>ow|9|1VvwtTwbc^pu zFbP?eO)-b3$78qPymD(^#Q)AHvMES#d@26VvZ>%?`aP>rH%vL=N@Ys>^RaSr9rm73|{1M zgi1nx5~I%y?^jto!`jV9svm`|Ng5Oc?Ib`6P7;^rpD!T>z#*mnCbuKmB_Ok%r27DO z3tgdlafQeTT7x0cM_Vyi90p9i-hMq+$9Xn)4UEn?+*SgKWbchM_CG)TL!pELCPKY# zsbk+{9}Y6`8p9tD&P}f=bbS;``BkUBYcLS_c_Z&QT>7rKp<`}1188ogyQ^+csF^lt z@Ip{81%rS=;%f&JDK&{%?lR|3zrHUo6|w|QxW^Y058C@OM%{zFU4gjA)*7bLc7j)C z0W20U8&ZbXOGAKoU97`~x>gZkIP0gjj80U;0HlZd)pG!McS?V~ZUTl!>e6=|UXt)z zNh61YIT|RnZ(AsJk3vnNBQ7&s*{^9?cx}*P92rRx`IbsPh+>~C*N>P%pyTg%UcjPD zczzS5;T_efd&)>tQvZbh9>P0?c|p;dVHAm$Gwj(b+Zj z$fSVTiJ$ri_M2VYPzG{8RjR})J^-IC8ScS6Yj39c8sNVkPso3@WOu69I(INjq{u>2 zxqK8#Aukz2yx7DJt?H8<6d!GHvKTAY=9iR-{s3{MQ1kAPeo=N`|0oH2n|4zWH>wP*x z{V^dPNQL*((MU&DA(A=kI}MCCY&cE2eL$NTK5KXDt;Sh@4B+XAzI}rb%a!;GpZ6@U zPCo+Ob#d-%pOhb`K4S6K$2I?QrHQ?!S1`)z3bbRBwGzIUpD{b1_&4ePJA4-9L42x^ zZ?o*^r!`YW2b&L)tVy#bA-D(4PtFfo?@C&9F1=8PF6wtH3YG2xUnLJ!&9lXMt{ixQ zR{`Q%GDz~VS2_82oBYF_mwB?JuM2r|8tz@UD$IZMcQ<}w2O(0r&RRB)V?(C>d*6fx zG%ddzCx`zje5*#i5sL*SMUTXQCY+veEiS<}T+GY`#Yit&H*XKM)WRacrMIpY@HpO7 zsQ^m(dUFJ~dC!fl?g9my)IL9UA4lnqergW(l$`rbj}?nXiCSx4m~_r0+^4jI>R{gN zxjlDpfILpest8qah*JmJ<8{0IZT{$ec{!8DB(hUkU6U~@j;Sscs$hb_x5Qk*uNlR+yl8OigPCZ}A)UU5smoA&ttY0Or~ z4_(SVXLGknzJN%lKt44>m#{Ab0eu1z#4~OZfxm>}ed|{EDz0Es0_JwZ$^0V&wRsB3 zP&sSMRRU!O)`Rkd1 zp+!YxSQTo$NfcEx&4lsEzg}wk4Bl;d;x>*7&uG0}(w%$jMrIP9|KJ=W_vF9ST+OXY z|EiH(w|3XOgGBn@G1pA`G~qP z3lN^>#eI~az$?@_^yO99uwxpxv22oIIGvH0?Ja#*l11v<3V}0f^XCRuMtps|Twqu| zuR1{eGbgZ0e_Y;G(T7I;8e<+;5c+inFq#HEza%)4AfEajISe&ZrcPxaIc&&(-?vHZ z%E%HIjJ+*VJwF-|ot&*0ovZyB?Nsp#>~I1Gm&@_Ezpf)3*w|-q2BX^+_2e$@a$G5Y z_T29kAa^L0r{H3qyN!Zrv%yFU^33s$A77N< zk)A;t3?_bUPOq`>SBE}2F_EcM;3vj65^JMrAw#?nUK4w3K!jH}mBolvbk(cS=Syi` zpc1S1l$~>~Xll^|$yu^*pBmV@DUuYea=e&-5J7#bR#P7Kl>rS<3v;Hqp(EUBthur^ z%wLOtf9iYXpjqvwg<`UKOJWL#v@@UzK)b6d><^bx35Z>C-fgsScu)^vxNTlzFFM+$ zbp{WT8M$^|kZhF6k$ci(acD6;jM*~2FGzAxCGwsR7AeB{3(5YEW-Jv`$MqXq#fkbOez}=}?lR@;owiWYB$I!Iq^xrvZz0nj)I3vx z>9?}Ks8#ZtPZVs!zz(Q)vk}hGAf}w+(^>D6SpF&?`B31B)FZXIji>I0EZib}@7A#AbvEpf{7As)SH)!U`UUfAAF|ieS5&R2BO4E4f;KNKYY8ER z-y^TzX5qxBuPkJ|i;#bR{{m*C`)KrapLWm5Tnm$aQM70DoClVdjB2YiUiKKD*ux>M zR$+s4M)>z$;L)3*iblIzm?_`BQ#$OtTJWg-!sSqExN`uLJ~?IC>8pp37K-dPzoY~R z999jry=Ka!{5kdSG(sLH)$CIEs6vOe4T*8GV^`(Is#tp$p;f)}j)tFMVY9yFN*iZQ zwvh?$Zu`#nhp3uL8O&<3t=;VCs=s>t6N7GJQGzD%<}I?F6*W$-sP)+XeAca$z|g{goY!f@*v$OZA-fA!Xx#yo#Mi# z^OM&;VYXiaJs|NOgZcPfu~WQkAE!FMwiN!|QQ=H>POef|yGzAG;V%AHG{9Y>&2^+- z4nN^0+FK8){O~8u*NH>iG*%{vhw-50kJqJBx^qymzT%9_35ghfUO)NpV)Kvs#(LR z6uyS&Aapj&HYfJU3+xMp78|C)c40W0hztbRdfgE!yAr*%EISu5ZX$>I=*HMEVOaS6 zURuVALut9dSvdb2$IYzDFVV)b`-eh3Jk1RUryFA0@bIJA)=ce#p4+E}1!^+_L|15} z4nvQD_F+YL=Pm0SbD>u?(dpI^b0HxY5KXWl`$iRN)`Hr9l`EG3&3ue*{P~+DlkE#^ ze%ol@phL?0ZH(-{uLM>Kt(+`kLIYhn&`Jik%sSYsfJ)JCMs^4I`)P+}cs)?_0~wEx zbB)}>Q?}f>e-j-?JJ>y8h*(ymG|mfu6#bg+a|Lvxi0L^Qz1S|YcjJSJ`qMX9e=j2v zX6sDnoc>f(yb+70e7b!ab85p|2A8Bd>M=79tB{Gg=&5<-H{lXjlTbCo9Y#pc-c<(V zBkf`l>POK329!rAU$_GfIIw`kOCp94oPO*!#B^)iHLFXQ#X=*P4j$!fQ|bAjnNzGtc#ACy7cpZBc)UA8hT14B2 z(Uw4_u~E*&wVoU5(Zns)*W(aAQ{p3=%o6d!^r>$O%^-WDo~r62u<05wsf6Nqizm6` z02>tKuze;A_;$cQZ8&ffF|~jl-(q894J3o_(D3{A=2su$-0zO~0P;>zvP4|Z?|%VH CdfRCL literal 0 HcmV?d00001 diff --git a/inc/UploadPreview.js b/inc/UploadPreview.js new file mode 100644 index 0000000..f5ce616 --- /dev/null +++ b/inc/UploadPreview.js @@ -0,0 +1,33 @@ +/* + * Shows a pix if they add one + */ +document.querySelectorAll('input[type=file]').forEach(input => { + + input.addEventListener('change', function () { + + const preview = document.getElementById( + this.dataset.preview + ); + console.log("preview: ", {preview}); + if (!preview) { + console.error( + "Preview element not found:", + this.dataset.preview + ); + return; + } + if (!this.files.length) return; + const reader = new FileReader(); + + reader.onload = e => { + console.log("loaded"); + //console.log(e.target.result.substring(0,50)); + preview.src = e.target.result; + preview.style.display = 'block'; + //console.log("preview.src = ", preview.src); + }; + console.log("reading: ", this.files[0]); + reader.readAsDataURL(this.files[0]); + }); +}); + diff --git a/inc/WonB.png b/inc/WonB.png new file mode 100644 index 0000000000000000000000000000000000000000..02d462319ec42ca3e15d231c84d42fd50e02425b GIT binary patch literal 1358 zcmV-U1+n^xP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!TU#ETVeQ>!|)wj-fhVPzRD*p%EhI%}D^oThi+!|b%aUF_* zz0S@~oz?n12zSrGa=BdA&CQL)wfB5?*y{|Db$NMdot~cR{q^;=zJswRPoD4_m-jm0 zO|A$J50{CF33>PKoh&Xc>iykeS(eUWVPUemx+(($1A1@B-Bv`tfB!C#k&&{qv%{@l z2O`|F!bGC;hYuelFE39_G%_|eCRtfoGCw~rU%!5p)YMdIXlRiB{(gyyijwEgpNpxl z3=a>h({J9qQ5z70^z?Mu-`|(Cv^0!|=|eZ{8^e3+B6UOny1Kf=q*soQkCg<{l#~>W zZgzH7nwy(7x{n_}N=8P8UbnWkimA1{efw74zkjc5&d<-)xxKwTb;Q8qz~9mi#>dBn zdKDBDNK#Ug93CFZ%aeMMZ_$NKQ`H8DjAG@na3f zz*7Rhk>e$`Dl03K?(S}R_UxHdS69o=pFg#>WMXr3Q&WpkvVr0C^>xY5&sQz9wY5oI zU7h^+@x!AB9A8^obG5g(TNf7>o(w>KZ45B`V0U--*57j{V9#lkl$0?0MsDD#IW~xZ zVc+|Mz0SS{wvBt>GV9rn?zi0JX4XA=7v2Pcfc3T`_IvCchAEYY+{eYq$w?I(poY{K z6=UGbmoH+Pi4IdQU1RDey}iA%y}hl5udc3CoV?3Dx?r2Jp5DOlhEL?9qodZr!GVem z&reQHBq1R|MFlAaxyHekmKIfVM@NTLRaI$2LTs!nE-seks7_s+1a`Vg|jXuCPrdoW2LsXRx^{6lcUZN9SUbamYJF9*?x8j zZ1_ZO8j6L{=;&x|4$Qn@zeE{GEnAIe5fKq8F0#b^!oq?&S5#D_YkA-Pje&D!y??=( zVX?@5!3KnOyZjS4lAAtmQ76*;^yyRWQix_|W=0wt8)a*2OTK;krZvPNx*+McBedZ! z0N_YII5=q0e<35Ch>z4#3Jh&*Y-o$c2}mK}Aj!?m^-Fdaj^swM7AG1tNb4hOcBKX5?MSU7CZ0;Iu2 z?+u^GX)1h=oT8N8_lh2<&>nTRtZE9)?s1%No+e(IbX=zDo zzp}C-BO@bnbabSV^F0SK8Nx}p0qz8AdfQhU*zuj-^9b!_xBL_1;2td({#nG Qx&QzG07*qoM6N<$f+*pUD*ylh literal 0 HcmV?d00001 diff --git a/inc/ckeditor5/LICENSE.md b/inc/ckeditor5/LICENSE.md new file mode 100644 index 0000000..437e62c --- /dev/null +++ b/inc/ckeditor5/LICENSE.md @@ -0,0 +1,21 @@ +Software License Agreement +========================== + +**CKEditor 5 classic editor build** – https://github.com/ckeditor/ckeditor5-build-classic
+Copyright (c) 2003-2021, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved. + +Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). + +Sources of Intellectual Property Included in CKEditor +----------------------------------------------------- + +Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission. + +The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT): + +* Lo-Dash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/. + +Trademarks +---------- + +**CKEditor** is a trademark of [CKSource](http://cksource.com) Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. diff --git a/inc/ckeditor5/README.md b/inc/ckeditor5/README.md new file mode 100644 index 0000000..e698ae1 --- /dev/null +++ b/inc/ckeditor5/README.md @@ -0,0 +1,9 @@ +CKEditor 5 classic editor build v27.1.0 +======================================= + +In order to start using CKEditor 5 Builds, configure or customize them, please visit http://docs.ckeditor.com/ckeditor5/latest/builds/index.html + +## License + +Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). +For full details about the license, please check the LICENSE.md file. diff --git a/inc/ckeditor5/ckeditor-manifest.json b/inc/ckeditor5/ckeditor-manifest.json new file mode 100644 index 0000000..161daae --- /dev/null +++ b/inc/ckeditor5/ckeditor-manifest.json @@ -0,0 +1,10888 @@ +{ + "content": { + "../../node_modules/lodash-es/_DataView.js": { + "id": "../../node_modules/lodash-es/_DataView.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_Hash.js": { + "id": "../../node_modules/lodash-es/_Hash.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_LazyWrapper.js": { + "id": "../../node_modules/lodash-es/_LazyWrapper.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_ListCache.js": { + "id": "../../node_modules/lodash-es/_ListCache.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_LodashWrapper.js": { + "id": "../../node_modules/lodash-es/_LodashWrapper.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_Map.js": { + "id": "../../node_modules/lodash-es/_Map.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_MapCache.js": { + "id": "../../node_modules/lodash-es/_MapCache.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_Promise.js": { + "id": "../../node_modules/lodash-es/_Promise.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_Set.js": { + "id": "../../node_modules/lodash-es/_Set.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_SetCache.js": { + "id": "../../node_modules/lodash-es/_SetCache.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_Stack.js": { + "id": "../../node_modules/lodash-es/_Stack.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_Symbol.js": { + "id": "../../node_modules/lodash-es/_Symbol.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_Uint8Array.js": { + "id": "../../node_modules/lodash-es/_Uint8Array.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_WeakMap.js": { + "id": "../../node_modules/lodash-es/_WeakMap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_apply.js": { + "id": "../../node_modules/lodash-es/_apply.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayAggregator.js": { + "id": "../../node_modules/lodash-es/_arrayAggregator.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayEach.js": { + "id": "../../node_modules/lodash-es/_arrayEach.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayEachRight.js": { + "id": "../../node_modules/lodash-es/_arrayEachRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayEvery.js": { + "id": "../../node_modules/lodash-es/_arrayEvery.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayFilter.js": { + "id": "../../node_modules/lodash-es/_arrayFilter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayIncludes.js": { + "id": "../../node_modules/lodash-es/_arrayIncludes.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayIncludesWith.js": { + "id": "../../node_modules/lodash-es/_arrayIncludesWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayLikeKeys.js": { + "id": "../../node_modules/lodash-es/_arrayLikeKeys.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayMap.js": { + "id": "../../node_modules/lodash-es/_arrayMap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayPush.js": { + "id": "../../node_modules/lodash-es/_arrayPush.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayReduce.js": { + "id": "../../node_modules/lodash-es/_arrayReduce.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayReduceRight.js": { + "id": "../../node_modules/lodash-es/_arrayReduceRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arraySample.js": { + "id": "../../node_modules/lodash-es/_arraySample.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arraySampleSize.js": { + "id": "../../node_modules/lodash-es/_arraySampleSize.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arrayShuffle.js": { + "id": "../../node_modules/lodash-es/_arrayShuffle.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_arraySome.js": { + "id": "../../node_modules/lodash-es/_arraySome.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_asciiSize.js": { + "id": "../../node_modules/lodash-es/_asciiSize.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_asciiToArray.js": { + "id": "../../node_modules/lodash-es/_asciiToArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_asciiWords.js": { + "id": "../../node_modules/lodash-es/_asciiWords.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_assignMergeValue.js": { + "id": "../../node_modules/lodash-es/_assignMergeValue.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_assignValue.js": { + "id": "../../node_modules/lodash-es/_assignValue.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_assocIndexOf.js": { + "id": "../../node_modules/lodash-es/_assocIndexOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseAggregator.js": { + "id": "../../node_modules/lodash-es/_baseAggregator.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseAssign.js": { + "id": "../../node_modules/lodash-es/_baseAssign.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseAssignIn.js": { + "id": "../../node_modules/lodash-es/_baseAssignIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseAssignValue.js": { + "id": "../../node_modules/lodash-es/_baseAssignValue.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseAt.js": { + "id": "../../node_modules/lodash-es/_baseAt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseClamp.js": { + "id": "../../node_modules/lodash-es/_baseClamp.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseClone.js": { + "id": "../../node_modules/lodash-es/_baseClone.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseConforms.js": { + "id": "../../node_modules/lodash-es/_baseConforms.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseConformsTo.js": { + "id": "../../node_modules/lodash-es/_baseConformsTo.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseCreate.js": { + "id": "../../node_modules/lodash-es/_baseCreate.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseDelay.js": { + "id": "../../node_modules/lodash-es/_baseDelay.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseDifference.js": { + "id": "../../node_modules/lodash-es/_baseDifference.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseEach.js": { + "id": "../../node_modules/lodash-es/_baseEach.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseEachRight.js": { + "id": "../../node_modules/lodash-es/_baseEachRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseEvery.js": { + "id": "../../node_modules/lodash-es/_baseEvery.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseExtremum.js": { + "id": "../../node_modules/lodash-es/_baseExtremum.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseFill.js": { + "id": "../../node_modules/lodash-es/_baseFill.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseFilter.js": { + "id": "../../node_modules/lodash-es/_baseFilter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseFindIndex.js": { + "id": "../../node_modules/lodash-es/_baseFindIndex.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseFindKey.js": { + "id": "../../node_modules/lodash-es/_baseFindKey.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseFlatten.js": { + "id": "../../node_modules/lodash-es/_baseFlatten.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseFor.js": { + "id": "../../node_modules/lodash-es/_baseFor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseForOwn.js": { + "id": "../../node_modules/lodash-es/_baseForOwn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseForOwnRight.js": { + "id": "../../node_modules/lodash-es/_baseForOwnRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseForRight.js": { + "id": "../../node_modules/lodash-es/_baseForRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseFunctions.js": { + "id": "../../node_modules/lodash-es/_baseFunctions.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseGet.js": { + "id": "../../node_modules/lodash-es/_baseGet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseGetAllKeys.js": { + "id": "../../node_modules/lodash-es/_baseGetAllKeys.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseGetTag.js": { + "id": "../../node_modules/lodash-es/_baseGetTag.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseGt.js": { + "id": "../../node_modules/lodash-es/_baseGt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseHas.js": { + "id": "../../node_modules/lodash-es/_baseHas.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseHasIn.js": { + "id": "../../node_modules/lodash-es/_baseHasIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseInRange.js": { + "id": "../../node_modules/lodash-es/_baseInRange.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIndexOf.js": { + "id": "../../node_modules/lodash-es/_baseIndexOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIndexOfWith.js": { + "id": "../../node_modules/lodash-es/_baseIndexOfWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIntersection.js": { + "id": "../../node_modules/lodash-es/_baseIntersection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseInverter.js": { + "id": "../../node_modules/lodash-es/_baseInverter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseInvoke.js": { + "id": "../../node_modules/lodash-es/_baseInvoke.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsArguments.js": { + "id": "../../node_modules/lodash-es/_baseIsArguments.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsArrayBuffer.js": { + "id": "../../node_modules/lodash-es/_baseIsArrayBuffer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsDate.js": { + "id": "../../node_modules/lodash-es/_baseIsDate.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsEqual.js": { + "id": "../../node_modules/lodash-es/_baseIsEqual.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsEqualDeep.js": { + "id": "../../node_modules/lodash-es/_baseIsEqualDeep.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsMap.js": { + "id": "../../node_modules/lodash-es/_baseIsMap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsMatch.js": { + "id": "../../node_modules/lodash-es/_baseIsMatch.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsNaN.js": { + "id": "../../node_modules/lodash-es/_baseIsNaN.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsNative.js": { + "id": "../../node_modules/lodash-es/_baseIsNative.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsRegExp.js": { + "id": "../../node_modules/lodash-es/_baseIsRegExp.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsSet.js": { + "id": "../../node_modules/lodash-es/_baseIsSet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIsTypedArray.js": { + "id": "../../node_modules/lodash-es/_baseIsTypedArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseIteratee.js": { + "id": "../../node_modules/lodash-es/_baseIteratee.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseKeys.js": { + "id": "../../node_modules/lodash-es/_baseKeys.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseKeysIn.js": { + "id": "../../node_modules/lodash-es/_baseKeysIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseLodash.js": { + "id": "../../node_modules/lodash-es/_baseLodash.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseLt.js": { + "id": "../../node_modules/lodash-es/_baseLt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseMap.js": { + "id": "../../node_modules/lodash-es/_baseMap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseMatches.js": { + "id": "../../node_modules/lodash-es/_baseMatches.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseMatchesProperty.js": { + "id": "../../node_modules/lodash-es/_baseMatchesProperty.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseMean.js": { + "id": "../../node_modules/lodash-es/_baseMean.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseMerge.js": { + "id": "../../node_modules/lodash-es/_baseMerge.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseMergeDeep.js": { + "id": "../../node_modules/lodash-es/_baseMergeDeep.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseNth.js": { + "id": "../../node_modules/lodash-es/_baseNth.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseOrderBy.js": { + "id": "../../node_modules/lodash-es/_baseOrderBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_basePick.js": { + "id": "../../node_modules/lodash-es/_basePick.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_basePickBy.js": { + "id": "../../node_modules/lodash-es/_basePickBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseProperty.js": { + "id": "../../node_modules/lodash-es/_baseProperty.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_basePropertyDeep.js": { + "id": "../../node_modules/lodash-es/_basePropertyDeep.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_basePropertyOf.js": { + "id": "../../node_modules/lodash-es/_basePropertyOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_basePullAll.js": { + "id": "../../node_modules/lodash-es/_basePullAll.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_basePullAt.js": { + "id": "../../node_modules/lodash-es/_basePullAt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseRandom.js": { + "id": "../../node_modules/lodash-es/_baseRandom.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseRange.js": { + "id": "../../node_modules/lodash-es/_baseRange.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseReduce.js": { + "id": "../../node_modules/lodash-es/_baseReduce.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseRepeat.js": { + "id": "../../node_modules/lodash-es/_baseRepeat.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseRest.js": { + "id": "../../node_modules/lodash-es/_baseRest.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSample.js": { + "id": "../../node_modules/lodash-es/_baseSample.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSampleSize.js": { + "id": "../../node_modules/lodash-es/_baseSampleSize.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSet.js": { + "id": "../../node_modules/lodash-es/_baseSet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSetData.js": { + "id": "../../node_modules/lodash-es/_baseSetData.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSetToString.js": { + "id": "../../node_modules/lodash-es/_baseSetToString.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseShuffle.js": { + "id": "../../node_modules/lodash-es/_baseShuffle.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSlice.js": { + "id": "../../node_modules/lodash-es/_baseSlice.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSome.js": { + "id": "../../node_modules/lodash-es/_baseSome.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSortBy.js": { + "id": "../../node_modules/lodash-es/_baseSortBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSortedIndex.js": { + "id": "../../node_modules/lodash-es/_baseSortedIndex.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSortedIndexBy.js": { + "id": "../../node_modules/lodash-es/_baseSortedIndexBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSortedUniq.js": { + "id": "../../node_modules/lodash-es/_baseSortedUniq.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseSum.js": { + "id": "../../node_modules/lodash-es/_baseSum.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseTimes.js": { + "id": "../../node_modules/lodash-es/_baseTimes.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseToNumber.js": { + "id": "../../node_modules/lodash-es/_baseToNumber.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseToPairs.js": { + "id": "../../node_modules/lodash-es/_baseToPairs.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseToString.js": { + "id": "../../node_modules/lodash-es/_baseToString.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseUnary.js": { + "id": "../../node_modules/lodash-es/_baseUnary.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseUniq.js": { + "id": "../../node_modules/lodash-es/_baseUniq.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseUnset.js": { + "id": "../../node_modules/lodash-es/_baseUnset.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseUpdate.js": { + "id": "../../node_modules/lodash-es/_baseUpdate.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseValues.js": { + "id": "../../node_modules/lodash-es/_baseValues.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseWhile.js": { + "id": "../../node_modules/lodash-es/_baseWhile.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseWrapperValue.js": { + "id": "../../node_modules/lodash-es/_baseWrapperValue.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseXor.js": { + "id": "../../node_modules/lodash-es/_baseXor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_baseZipObject.js": { + "id": "../../node_modules/lodash-es/_baseZipObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_cacheHas.js": { + "id": "../../node_modules/lodash-es/_cacheHas.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_castArrayLikeObject.js": { + "id": "../../node_modules/lodash-es/_castArrayLikeObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_castFunction.js": { + "id": "../../node_modules/lodash-es/_castFunction.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_castPath.js": { + "id": "../../node_modules/lodash-es/_castPath.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_castRest.js": { + "id": "../../node_modules/lodash-es/_castRest.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_castSlice.js": { + "id": "../../node_modules/lodash-es/_castSlice.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_charsEndIndex.js": { + "id": "../../node_modules/lodash-es/_charsEndIndex.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_charsStartIndex.js": { + "id": "../../node_modules/lodash-es/_charsStartIndex.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_cloneArrayBuffer.js": { + "id": "../../node_modules/lodash-es/_cloneArrayBuffer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_cloneBuffer.js": { + "id": "../../node_modules/lodash-es/_cloneBuffer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_cloneDataView.js": { + "id": "../../node_modules/lodash-es/_cloneDataView.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_cloneRegExp.js": { + "id": "../../node_modules/lodash-es/_cloneRegExp.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_cloneSymbol.js": { + "id": "../../node_modules/lodash-es/_cloneSymbol.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_cloneTypedArray.js": { + "id": "../../node_modules/lodash-es/_cloneTypedArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_compareAscending.js": { + "id": "../../node_modules/lodash-es/_compareAscending.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_compareMultiple.js": { + "id": "../../node_modules/lodash-es/_compareMultiple.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_composeArgs.js": { + "id": "../../node_modules/lodash-es/_composeArgs.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_composeArgsRight.js": { + "id": "../../node_modules/lodash-es/_composeArgsRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_copyArray.js": { + "id": "../../node_modules/lodash-es/_copyArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_copyObject.js": { + "id": "../../node_modules/lodash-es/_copyObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_copySymbols.js": { + "id": "../../node_modules/lodash-es/_copySymbols.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_copySymbolsIn.js": { + "id": "../../node_modules/lodash-es/_copySymbolsIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_coreJsData.js": { + "id": "../../node_modules/lodash-es/_coreJsData.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_countHolders.js": { + "id": "../../node_modules/lodash-es/_countHolders.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createAggregator.js": { + "id": "../../node_modules/lodash-es/_createAggregator.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createAssigner.js": { + "id": "../../node_modules/lodash-es/_createAssigner.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createBaseEach.js": { + "id": "../../node_modules/lodash-es/_createBaseEach.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createBaseFor.js": { + "id": "../../node_modules/lodash-es/_createBaseFor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createBind.js": { + "id": "../../node_modules/lodash-es/_createBind.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createCaseFirst.js": { + "id": "../../node_modules/lodash-es/_createCaseFirst.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createCompounder.js": { + "id": "../../node_modules/lodash-es/_createCompounder.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createCtor.js": { + "id": "../../node_modules/lodash-es/_createCtor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createCurry.js": { + "id": "../../node_modules/lodash-es/_createCurry.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createFind.js": { + "id": "../../node_modules/lodash-es/_createFind.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createFlow.js": { + "id": "../../node_modules/lodash-es/_createFlow.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createHybrid.js": { + "id": "../../node_modules/lodash-es/_createHybrid.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createInverter.js": { + "id": "../../node_modules/lodash-es/_createInverter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createMathOperation.js": { + "id": "../../node_modules/lodash-es/_createMathOperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createOver.js": { + "id": "../../node_modules/lodash-es/_createOver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createPadding.js": { + "id": "../../node_modules/lodash-es/_createPadding.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createPartial.js": { + "id": "../../node_modules/lodash-es/_createPartial.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createRange.js": { + "id": "../../node_modules/lodash-es/_createRange.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createRecurry.js": { + "id": "../../node_modules/lodash-es/_createRecurry.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createRelationalOperation.js": { + "id": "../../node_modules/lodash-es/_createRelationalOperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createRound.js": { + "id": "../../node_modules/lodash-es/_createRound.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createSet.js": { + "id": "../../node_modules/lodash-es/_createSet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createToPairs.js": { + "id": "../../node_modules/lodash-es/_createToPairs.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_createWrap.js": { + "id": "../../node_modules/lodash-es/_createWrap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_customDefaultsAssignIn.js": { + "id": "../../node_modules/lodash-es/_customDefaultsAssignIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_customDefaultsMerge.js": { + "id": "../../node_modules/lodash-es/_customDefaultsMerge.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_customOmitClone.js": { + "id": "../../node_modules/lodash-es/_customOmitClone.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_deburrLetter.js": { + "id": "../../node_modules/lodash-es/_deburrLetter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_defineProperty.js": { + "id": "../../node_modules/lodash-es/_defineProperty.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_equalArrays.js": { + "id": "../../node_modules/lodash-es/_equalArrays.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_equalByTag.js": { + "id": "../../node_modules/lodash-es/_equalByTag.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_equalObjects.js": { + "id": "../../node_modules/lodash-es/_equalObjects.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_escapeHtmlChar.js": { + "id": "../../node_modules/lodash-es/_escapeHtmlChar.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_escapeStringChar.js": { + "id": "../../node_modules/lodash-es/_escapeStringChar.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_flatRest.js": { + "id": "../../node_modules/lodash-es/_flatRest.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_freeGlobal.js": { + "id": "../../node_modules/lodash-es/_freeGlobal.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getAllKeys.js": { + "id": "../../node_modules/lodash-es/_getAllKeys.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getAllKeysIn.js": { + "id": "../../node_modules/lodash-es/_getAllKeysIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getData.js": { + "id": "../../node_modules/lodash-es/_getData.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getFuncName.js": { + "id": "../../node_modules/lodash-es/_getFuncName.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getHolder.js": { + "id": "../../node_modules/lodash-es/_getHolder.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getMapData.js": { + "id": "../../node_modules/lodash-es/_getMapData.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getMatchData.js": { + "id": "../../node_modules/lodash-es/_getMatchData.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getNative.js": { + "id": "../../node_modules/lodash-es/_getNative.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getPrototype.js": { + "id": "../../node_modules/lodash-es/_getPrototype.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getRawTag.js": { + "id": "../../node_modules/lodash-es/_getRawTag.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getSymbols.js": { + "id": "../../node_modules/lodash-es/_getSymbols.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getSymbolsIn.js": { + "id": "../../node_modules/lodash-es/_getSymbolsIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getTag.js": { + "id": "../../node_modules/lodash-es/_getTag.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getValue.js": { + "id": "../../node_modules/lodash-es/_getValue.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getView.js": { + "id": "../../node_modules/lodash-es/_getView.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_getWrapDetails.js": { + "id": "../../node_modules/lodash-es/_getWrapDetails.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_hasPath.js": { + "id": "../../node_modules/lodash-es/_hasPath.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_hasUnicode.js": { + "id": "../../node_modules/lodash-es/_hasUnicode.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_hasUnicodeWord.js": { + "id": "../../node_modules/lodash-es/_hasUnicodeWord.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_hashClear.js": { + "id": "../../node_modules/lodash-es/_hashClear.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_hashDelete.js": { + "id": "../../node_modules/lodash-es/_hashDelete.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_hashGet.js": { + "id": "../../node_modules/lodash-es/_hashGet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_hashHas.js": { + "id": "../../node_modules/lodash-es/_hashHas.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_hashSet.js": { + "id": "../../node_modules/lodash-es/_hashSet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_initCloneArray.js": { + "id": "../../node_modules/lodash-es/_initCloneArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_initCloneByTag.js": { + "id": "../../node_modules/lodash-es/_initCloneByTag.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_initCloneObject.js": { + "id": "../../node_modules/lodash-es/_initCloneObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_insertWrapDetails.js": { + "id": "../../node_modules/lodash-es/_insertWrapDetails.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isFlattenable.js": { + "id": "../../node_modules/lodash-es/_isFlattenable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isIndex.js": { + "id": "../../node_modules/lodash-es/_isIndex.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isIterateeCall.js": { + "id": "../../node_modules/lodash-es/_isIterateeCall.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isKey.js": { + "id": "../../node_modules/lodash-es/_isKey.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isKeyable.js": { + "id": "../../node_modules/lodash-es/_isKeyable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isLaziable.js": { + "id": "../../node_modules/lodash-es/_isLaziable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isMaskable.js": { + "id": "../../node_modules/lodash-es/_isMaskable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isMasked.js": { + "id": "../../node_modules/lodash-es/_isMasked.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isPrototype.js": { + "id": "../../node_modules/lodash-es/_isPrototype.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_isStrictComparable.js": { + "id": "../../node_modules/lodash-es/_isStrictComparable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_iteratorToArray.js": { + "id": "../../node_modules/lodash-es/_iteratorToArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_lazyClone.js": { + "id": "../../node_modules/lodash-es/_lazyClone.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_lazyReverse.js": { + "id": "../../node_modules/lodash-es/_lazyReverse.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_lazyValue.js": { + "id": "../../node_modules/lodash-es/_lazyValue.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_listCacheClear.js": { + "id": "../../node_modules/lodash-es/_listCacheClear.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_listCacheDelete.js": { + "id": "../../node_modules/lodash-es/_listCacheDelete.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_listCacheGet.js": { + "id": "../../node_modules/lodash-es/_listCacheGet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_listCacheHas.js": { + "id": "../../node_modules/lodash-es/_listCacheHas.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_listCacheSet.js": { + "id": "../../node_modules/lodash-es/_listCacheSet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_mapCacheClear.js": { + "id": "../../node_modules/lodash-es/_mapCacheClear.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_mapCacheDelete.js": { + "id": "../../node_modules/lodash-es/_mapCacheDelete.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_mapCacheGet.js": { + "id": "../../node_modules/lodash-es/_mapCacheGet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_mapCacheHas.js": { + "id": "../../node_modules/lodash-es/_mapCacheHas.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_mapCacheSet.js": { + "id": "../../node_modules/lodash-es/_mapCacheSet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_mapToArray.js": { + "id": "../../node_modules/lodash-es/_mapToArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_matchesStrictComparable.js": { + "id": "../../node_modules/lodash-es/_matchesStrictComparable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_memoizeCapped.js": { + "id": "../../node_modules/lodash-es/_memoizeCapped.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_mergeData.js": { + "id": "../../node_modules/lodash-es/_mergeData.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_metaMap.js": { + "id": "../../node_modules/lodash-es/_metaMap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_nativeCreate.js": { + "id": "../../node_modules/lodash-es/_nativeCreate.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_nativeKeys.js": { + "id": "../../node_modules/lodash-es/_nativeKeys.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_nativeKeysIn.js": { + "id": "../../node_modules/lodash-es/_nativeKeysIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_nodeUtil.js": { + "id": "../../node_modules/lodash-es/_nodeUtil.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_objectToString.js": { + "id": "../../node_modules/lodash-es/_objectToString.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_overArg.js": { + "id": "../../node_modules/lodash-es/_overArg.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_overRest.js": { + "id": "../../node_modules/lodash-es/_overRest.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_parent.js": { + "id": "../../node_modules/lodash-es/_parent.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_reEscape.js": { + "id": "../../node_modules/lodash-es/_reEscape.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_reEvaluate.js": { + "id": "../../node_modules/lodash-es/_reEvaluate.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_reInterpolate.js": { + "id": "../../node_modules/lodash-es/_reInterpolate.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_realNames.js": { + "id": "../../node_modules/lodash-es/_realNames.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_reorder.js": { + "id": "../../node_modules/lodash-es/_reorder.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_replaceHolders.js": { + "id": "../../node_modules/lodash-es/_replaceHolders.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_root.js": { + "id": "../../node_modules/lodash-es/_root.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_safeGet.js": { + "id": "../../node_modules/lodash-es/_safeGet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_setCacheAdd.js": { + "id": "../../node_modules/lodash-es/_setCacheAdd.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_setCacheHas.js": { + "id": "../../node_modules/lodash-es/_setCacheHas.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_setData.js": { + "id": "../../node_modules/lodash-es/_setData.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_setToArray.js": { + "id": "../../node_modules/lodash-es/_setToArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_setToPairs.js": { + "id": "../../node_modules/lodash-es/_setToPairs.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_setToString.js": { + "id": "../../node_modules/lodash-es/_setToString.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_setWrapToString.js": { + "id": "../../node_modules/lodash-es/_setWrapToString.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_shortOut.js": { + "id": "../../node_modules/lodash-es/_shortOut.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_shuffleSelf.js": { + "id": "../../node_modules/lodash-es/_shuffleSelf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_stackClear.js": { + "id": "../../node_modules/lodash-es/_stackClear.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_stackDelete.js": { + "id": "../../node_modules/lodash-es/_stackDelete.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_stackGet.js": { + "id": "../../node_modules/lodash-es/_stackGet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_stackHas.js": { + "id": "../../node_modules/lodash-es/_stackHas.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_stackSet.js": { + "id": "../../node_modules/lodash-es/_stackSet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_strictIndexOf.js": { + "id": "../../node_modules/lodash-es/_strictIndexOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_strictLastIndexOf.js": { + "id": "../../node_modules/lodash-es/_strictLastIndexOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_stringSize.js": { + "id": "../../node_modules/lodash-es/_stringSize.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_stringToArray.js": { + "id": "../../node_modules/lodash-es/_stringToArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_stringToPath.js": { + "id": "../../node_modules/lodash-es/_stringToPath.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_toKey.js": { + "id": "../../node_modules/lodash-es/_toKey.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_toSource.js": { + "id": "../../node_modules/lodash-es/_toSource.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_unescapeHtmlChar.js": { + "id": "../../node_modules/lodash-es/_unescapeHtmlChar.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_unicodeSize.js": { + "id": "../../node_modules/lodash-es/_unicodeSize.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_unicodeToArray.js": { + "id": "../../node_modules/lodash-es/_unicodeToArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_unicodeWords.js": { + "id": "../../node_modules/lodash-es/_unicodeWords.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_updateWrapDetails.js": { + "id": "../../node_modules/lodash-es/_updateWrapDetails.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/_wrapperClone.js": { + "id": "../../node_modules/lodash-es/_wrapperClone.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/add.js": { + "id": "../../node_modules/lodash-es/add.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/after.js": { + "id": "../../node_modules/lodash-es/after.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/array.default.js": { + "id": "../../node_modules/lodash-es/array.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/array.js": { + "id": "../../node_modules/lodash-es/array.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "chunk", + "compact", + "concat", + "difference", + "differenceBy", + "differenceWith", + "drop", + "dropRight", + "dropRightWhile", + "dropWhile", + "fill", + "findIndex", + "findLastIndex", + "first", + "flatten", + "flattenDeep", + "flattenDepth", + "fromPairs", + "head", + "indexOf", + "initial", + "intersection", + "intersectionBy", + "intersectionWith", + "join", + "last", + "lastIndexOf", + "nth", + "pull", + "pullAll", + "pullAllBy", + "pullAllWith", + "pullAt", + "remove", + "reverse", + "slice", + "sortedIndex", + "sortedIndexBy", + "sortedIndexOf", + "sortedLastIndex", + "sortedLastIndexBy", + "sortedLastIndexOf", + "sortedUniq", + "sortedUniqBy", + "tail", + "take", + "takeRight", + "takeRightWhile", + "takeWhile", + "union", + "unionBy", + "unionWith", + "uniq", + "uniqBy", + "uniqWith", + "unzip", + "unzipWith", + "without", + "xor", + "xorBy", + "xorWith", + "zip", + "zipObject", + "zipObjectDeep", + "zipWith", + "default" + ] + } + }, + "../../node_modules/lodash-es/ary.js": { + "id": "../../node_modules/lodash-es/ary.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/assign.js": { + "id": "../../node_modules/lodash-es/assign.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/assignIn.js": { + "id": "../../node_modules/lodash-es/assignIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/assignInWith.js": { + "id": "../../node_modules/lodash-es/assignInWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/assignWith.js": { + "id": "../../node_modules/lodash-es/assignWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/at.js": { + "id": "../../node_modules/lodash-es/at.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/attempt.js": { + "id": "../../node_modules/lodash-es/attempt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/before.js": { + "id": "../../node_modules/lodash-es/before.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/bind.js": { + "id": "../../node_modules/lodash-es/bind.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/bindAll.js": { + "id": "../../node_modules/lodash-es/bindAll.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/bindKey.js": { + "id": "../../node_modules/lodash-es/bindKey.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/camelCase.js": { + "id": "../../node_modules/lodash-es/camelCase.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/capitalize.js": { + "id": "../../node_modules/lodash-es/capitalize.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/castArray.js": { + "id": "../../node_modules/lodash-es/castArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/ceil.js": { + "id": "../../node_modules/lodash-es/ceil.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/chain.js": { + "id": "../../node_modules/lodash-es/chain.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/chunk.js": { + "id": "../../node_modules/lodash-es/chunk.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/clamp.js": { + "id": "../../node_modules/lodash-es/clamp.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/clone.js": { + "id": "../../node_modules/lodash-es/clone.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/cloneDeep.js": { + "id": "../../node_modules/lodash-es/cloneDeep.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/cloneDeepWith.js": { + "id": "../../node_modules/lodash-es/cloneDeepWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/cloneWith.js": { + "id": "../../node_modules/lodash-es/cloneWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/collection.default.js": { + "id": "../../node_modules/lodash-es/collection.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/collection.js": { + "id": "../../node_modules/lodash-es/collection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "countBy", + "each", + "eachRight", + "every", + "filter", + "find", + "findLast", + "flatMap", + "flatMapDeep", + "flatMapDepth", + "forEach", + "forEachRight", + "groupBy", + "includes", + "invokeMap", + "keyBy", + "map", + "orderBy", + "partition", + "reduce", + "reduceRight", + "reject", + "sample", + "sampleSize", + "shuffle", + "size", + "some", + "sortBy", + "default" + ] + } + }, + "../../node_modules/lodash-es/commit.js": { + "id": "../../node_modules/lodash-es/commit.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/compact.js": { + "id": "../../node_modules/lodash-es/compact.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/concat.js": { + "id": "../../node_modules/lodash-es/concat.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/cond.js": { + "id": "../../node_modules/lodash-es/cond.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/conforms.js": { + "id": "../../node_modules/lodash-es/conforms.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/conformsTo.js": { + "id": "../../node_modules/lodash-es/conformsTo.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/constant.js": { + "id": "../../node_modules/lodash-es/constant.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/countBy.js": { + "id": "../../node_modules/lodash-es/countBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/create.js": { + "id": "../../node_modules/lodash-es/create.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/curry.js": { + "id": "../../node_modules/lodash-es/curry.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/curryRight.js": { + "id": "../../node_modules/lodash-es/curryRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/date.default.js": { + "id": "../../node_modules/lodash-es/date.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/date.js": { + "id": "../../node_modules/lodash-es/date.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "now", + "default" + ] + } + }, + "../../node_modules/lodash-es/debounce.js": { + "id": "../../node_modules/lodash-es/debounce.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/deburr.js": { + "id": "../../node_modules/lodash-es/deburr.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/defaultTo.js": { + "id": "../../node_modules/lodash-es/defaultTo.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/defaults.js": { + "id": "../../node_modules/lodash-es/defaults.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/defaultsDeep.js": { + "id": "../../node_modules/lodash-es/defaultsDeep.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/defer.js": { + "id": "../../node_modules/lodash-es/defer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/delay.js": { + "id": "../../node_modules/lodash-es/delay.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/difference.js": { + "id": "../../node_modules/lodash-es/difference.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/differenceBy.js": { + "id": "../../node_modules/lodash-es/differenceBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/differenceWith.js": { + "id": "../../node_modules/lodash-es/differenceWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/divide.js": { + "id": "../../node_modules/lodash-es/divide.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/drop.js": { + "id": "../../node_modules/lodash-es/drop.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/dropRight.js": { + "id": "../../node_modules/lodash-es/dropRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/dropRightWhile.js": { + "id": "../../node_modules/lodash-es/dropRightWhile.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/dropWhile.js": { + "id": "../../node_modules/lodash-es/dropWhile.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/each.js": { + "id": "../../node_modules/lodash-es/each.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/eachRight.js": { + "id": "../../node_modules/lodash-es/eachRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/endsWith.js": { + "id": "../../node_modules/lodash-es/endsWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/entries.js": { + "id": "../../node_modules/lodash-es/entries.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/entriesIn.js": { + "id": "../../node_modules/lodash-es/entriesIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/eq.js": { + "id": "../../node_modules/lodash-es/eq.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/escape.js": { + "id": "../../node_modules/lodash-es/escape.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/escapeRegExp.js": { + "id": "../../node_modules/lodash-es/escapeRegExp.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/every.js": { + "id": "../../node_modules/lodash-es/every.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/extend.js": { + "id": "../../node_modules/lodash-es/extend.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/extendWith.js": { + "id": "../../node_modules/lodash-es/extendWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/fill.js": { + "id": "../../node_modules/lodash-es/fill.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/filter.js": { + "id": "../../node_modules/lodash-es/filter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/find.js": { + "id": "../../node_modules/lodash-es/find.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/findIndex.js": { + "id": "../../node_modules/lodash-es/findIndex.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/findKey.js": { + "id": "../../node_modules/lodash-es/findKey.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/findLast.js": { + "id": "../../node_modules/lodash-es/findLast.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/findLastIndex.js": { + "id": "../../node_modules/lodash-es/findLastIndex.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/findLastKey.js": { + "id": "../../node_modules/lodash-es/findLastKey.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/first.js": { + "id": "../../node_modules/lodash-es/first.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/flatMap.js": { + "id": "../../node_modules/lodash-es/flatMap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/flatMapDeep.js": { + "id": "../../node_modules/lodash-es/flatMapDeep.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/flatMapDepth.js": { + "id": "../../node_modules/lodash-es/flatMapDepth.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/flatten.js": { + "id": "../../node_modules/lodash-es/flatten.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/flattenDeep.js": { + "id": "../../node_modules/lodash-es/flattenDeep.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/flattenDepth.js": { + "id": "../../node_modules/lodash-es/flattenDepth.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/flip.js": { + "id": "../../node_modules/lodash-es/flip.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/floor.js": { + "id": "../../node_modules/lodash-es/floor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/flow.js": { + "id": "../../node_modules/lodash-es/flow.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/flowRight.js": { + "id": "../../node_modules/lodash-es/flowRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/forEach.js": { + "id": "../../node_modules/lodash-es/forEach.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/forEachRight.js": { + "id": "../../node_modules/lodash-es/forEachRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/forIn.js": { + "id": "../../node_modules/lodash-es/forIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/forInRight.js": { + "id": "../../node_modules/lodash-es/forInRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/forOwn.js": { + "id": "../../node_modules/lodash-es/forOwn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/forOwnRight.js": { + "id": "../../node_modules/lodash-es/forOwnRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/fromPairs.js": { + "id": "../../node_modules/lodash-es/fromPairs.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/function.default.js": { + "id": "../../node_modules/lodash-es/function.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/function.js": { + "id": "../../node_modules/lodash-es/function.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "after", + "ary", + "before", + "bind", + "bindKey", + "curry", + "curryRight", + "debounce", + "defer", + "delay", + "flip", + "memoize", + "negate", + "once", + "overArgs", + "partial", + "partialRight", + "rearg", + "rest", + "spread", + "throttle", + "unary", + "wrap", + "default" + ] + } + }, + "../../node_modules/lodash-es/functions.js": { + "id": "../../node_modules/lodash-es/functions.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/functionsIn.js": { + "id": "../../node_modules/lodash-es/functionsIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/get.js": { + "id": "../../node_modules/lodash-es/get.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/groupBy.js": { + "id": "../../node_modules/lodash-es/groupBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/gt.js": { + "id": "../../node_modules/lodash-es/gt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/gte.js": { + "id": "../../node_modules/lodash-es/gte.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/has.js": { + "id": "../../node_modules/lodash-es/has.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/hasIn.js": { + "id": "../../node_modules/lodash-es/hasIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/head.js": { + "id": "../../node_modules/lodash-es/head.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/identity.js": { + "id": "../../node_modules/lodash-es/identity.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/inRange.js": { + "id": "../../node_modules/lodash-es/inRange.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/includes.js": { + "id": "../../node_modules/lodash-es/includes.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/indexOf.js": { + "id": "../../node_modules/lodash-es/indexOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/initial.js": { + "id": "../../node_modules/lodash-es/initial.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/intersection.js": { + "id": "../../node_modules/lodash-es/intersection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/intersectionBy.js": { + "id": "../../node_modules/lodash-es/intersectionBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/intersectionWith.js": { + "id": "../../node_modules/lodash-es/intersectionWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/invert.js": { + "id": "../../node_modules/lodash-es/invert.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/invertBy.js": { + "id": "../../node_modules/lodash-es/invertBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/invoke.js": { + "id": "../../node_modules/lodash-es/invoke.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/invokeMap.js": { + "id": "../../node_modules/lodash-es/invokeMap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isArguments.js": { + "id": "../../node_modules/lodash-es/isArguments.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isArray.js": { + "id": "../../node_modules/lodash-es/isArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isArrayBuffer.js": { + "id": "../../node_modules/lodash-es/isArrayBuffer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isArrayLike.js": { + "id": "../../node_modules/lodash-es/isArrayLike.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isArrayLikeObject.js": { + "id": "../../node_modules/lodash-es/isArrayLikeObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isBoolean.js": { + "id": "../../node_modules/lodash-es/isBoolean.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isBuffer.js": { + "id": "../../node_modules/lodash-es/isBuffer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isDate.js": { + "id": "../../node_modules/lodash-es/isDate.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isElement.js": { + "id": "../../node_modules/lodash-es/isElement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isEmpty.js": { + "id": "../../node_modules/lodash-es/isEmpty.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isEqual.js": { + "id": "../../node_modules/lodash-es/isEqual.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isEqualWith.js": { + "id": "../../node_modules/lodash-es/isEqualWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isError.js": { + "id": "../../node_modules/lodash-es/isError.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isFinite.js": { + "id": "../../node_modules/lodash-es/isFinite.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isFunction.js": { + "id": "../../node_modules/lodash-es/isFunction.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isInteger.js": { + "id": "../../node_modules/lodash-es/isInteger.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isLength.js": { + "id": "../../node_modules/lodash-es/isLength.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isMap.js": { + "id": "../../node_modules/lodash-es/isMap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isMatch.js": { + "id": "../../node_modules/lodash-es/isMatch.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isMatchWith.js": { + "id": "../../node_modules/lodash-es/isMatchWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isNaN.js": { + "id": "../../node_modules/lodash-es/isNaN.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isNative.js": { + "id": "../../node_modules/lodash-es/isNative.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isNil.js": { + "id": "../../node_modules/lodash-es/isNil.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isNull.js": { + "id": "../../node_modules/lodash-es/isNull.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isNumber.js": { + "id": "../../node_modules/lodash-es/isNumber.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isObject.js": { + "id": "../../node_modules/lodash-es/isObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isObjectLike.js": { + "id": "../../node_modules/lodash-es/isObjectLike.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isPlainObject.js": { + "id": "../../node_modules/lodash-es/isPlainObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isRegExp.js": { + "id": "../../node_modules/lodash-es/isRegExp.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isSafeInteger.js": { + "id": "../../node_modules/lodash-es/isSafeInteger.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isSet.js": { + "id": "../../node_modules/lodash-es/isSet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isString.js": { + "id": "../../node_modules/lodash-es/isString.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isSymbol.js": { + "id": "../../node_modules/lodash-es/isSymbol.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isTypedArray.js": { + "id": "../../node_modules/lodash-es/isTypedArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isUndefined.js": { + "id": "../../node_modules/lodash-es/isUndefined.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isWeakMap.js": { + "id": "../../node_modules/lodash-es/isWeakMap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/isWeakSet.js": { + "id": "../../node_modules/lodash-es/isWeakSet.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/iteratee.js": { + "id": "../../node_modules/lodash-es/iteratee.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/join.js": { + "id": "../../node_modules/lodash-es/join.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/kebabCase.js": { + "id": "../../node_modules/lodash-es/kebabCase.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/keyBy.js": { + "id": "../../node_modules/lodash-es/keyBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/keys.js": { + "id": "../../node_modules/lodash-es/keys.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/keysIn.js": { + "id": "../../node_modules/lodash-es/keysIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/lang.default.js": { + "id": "../../node_modules/lodash-es/lang.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/lang.js": { + "id": "../../node_modules/lodash-es/lang.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "castArray", + "clone", + "cloneDeep", + "cloneDeepWith", + "cloneWith", + "conformsTo", + "eq", + "gt", + "gte", + "isArguments", + "isArray", + "isArrayBuffer", + "isArrayLike", + "isArrayLikeObject", + "isBoolean", + "isBuffer", + "isDate", + "isElement", + "isEmpty", + "isEqual", + "isEqualWith", + "isError", + "isFinite", + "isFunction", + "isInteger", + "isLength", + "isMap", + "isMatch", + "isMatchWith", + "isNaN", + "isNative", + "isNil", + "isNull", + "isNumber", + "isObject", + "isObjectLike", + "isPlainObject", + "isRegExp", + "isSafeInteger", + "isSet", + "isString", + "isSymbol", + "isTypedArray", + "isUndefined", + "isWeakMap", + "isWeakSet", + "lt", + "lte", + "toArray", + "toFinite", + "toInteger", + "toLength", + "toNumber", + "toPlainObject", + "toSafeInteger", + "toString", + "default" + ] + } + }, + "../../node_modules/lodash-es/last.js": { + "id": "../../node_modules/lodash-es/last.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/lastIndexOf.js": { + "id": "../../node_modules/lodash-es/lastIndexOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/lodash.default.js": { + "id": "../../node_modules/lodash-es/lodash.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/lodash.js": { + "id": "../../node_modules/lodash-es/lodash.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "add", + "after", + "ary", + "assign", + "assignIn", + "assignInWith", + "assignWith", + "at", + "attempt", + "before", + "bind", + "bindAll", + "bindKey", + "camelCase", + "capitalize", + "castArray", + "ceil", + "chain", + "chunk", + "clamp", + "clone", + "cloneDeep", + "cloneDeepWith", + "cloneWith", + "commit", + "compact", + "concat", + "cond", + "conforms", + "conformsTo", + "constant", + "countBy", + "create", + "curry", + "curryRight", + "debounce", + "deburr", + "defaultTo", + "defaults", + "defaultsDeep", + "defer", + "delay", + "difference", + "differenceBy", + "differenceWith", + "divide", + "drop", + "dropRight", + "dropRightWhile", + "dropWhile", + "each", + "eachRight", + "endsWith", + "entries", + "entriesIn", + "eq", + "escape", + "escapeRegExp", + "every", + "extend", + "extendWith", + "fill", + "filter", + "find", + "findIndex", + "findKey", + "findLast", + "findLastIndex", + "findLastKey", + "first", + "flatMap", + "flatMapDeep", + "flatMapDepth", + "flatten", + "flattenDeep", + "flattenDepth", + "flip", + "floor", + "flow", + "flowRight", + "forEach", + "forEachRight", + "forIn", + "forInRight", + "forOwn", + "forOwnRight", + "fromPairs", + "functions", + "functionsIn", + "get", + "groupBy", + "gt", + "gte", + "has", + "hasIn", + "head", + "identity", + "inRange", + "includes", + "indexOf", + "initial", + "intersection", + "intersectionBy", + "intersectionWith", + "invert", + "invertBy", + "invoke", + "invokeMap", + "isArguments", + "isArray", + "isArrayBuffer", + "isArrayLike", + "isArrayLikeObject", + "isBoolean", + "isBuffer", + "isDate", + "isElement", + "isEmpty", + "isEqual", + "isEqualWith", + "isError", + "isFinite", + "isFunction", + "isInteger", + "isLength", + "isMap", + "isMatch", + "isMatchWith", + "isNaN", + "isNative", + "isNil", + "isNull", + "isNumber", + "isObject", + "isObjectLike", + "isPlainObject", + "isRegExp", + "isSafeInteger", + "isSet", + "isString", + "isSymbol", + "isTypedArray", + "isUndefined", + "isWeakMap", + "isWeakSet", + "iteratee", + "join", + "kebabCase", + "keyBy", + "keys", + "keysIn", + "last", + "lastIndexOf", + "lodash", + "lowerCase", + "lowerFirst", + "lt", + "lte", + "map", + "mapKeys", + "mapValues", + "matches", + "matchesProperty", + "max", + "maxBy", + "mean", + "meanBy", + "memoize", + "merge", + "mergeWith", + "method", + "methodOf", + "min", + "minBy", + "mixin", + "multiply", + "negate", + "next", + "noop", + "now", + "nth", + "nthArg", + "omit", + "omitBy", + "once", + "orderBy", + "over", + "overArgs", + "overEvery", + "overSome", + "pad", + "padEnd", + "padStart", + "parseInt", + "partial", + "partialRight", + "partition", + "pick", + "pickBy", + "plant", + "property", + "propertyOf", + "pull", + "pullAll", + "pullAllBy", + "pullAllWith", + "pullAt", + "random", + "range", + "rangeRight", + "rearg", + "reduce", + "reduceRight", + "reject", + "remove", + "repeat", + "replace", + "rest", + "result", + "reverse", + "round", + "sample", + "sampleSize", + "set", + "setWith", + "shuffle", + "size", + "slice", + "snakeCase", + "some", + "sortBy", + "sortedIndex", + "sortedIndexBy", + "sortedIndexOf", + "sortedLastIndex", + "sortedLastIndexBy", + "sortedLastIndexOf", + "sortedUniq", + "sortedUniqBy", + "split", + "spread", + "startCase", + "startsWith", + "stubArray", + "stubFalse", + "stubObject", + "stubString", + "stubTrue", + "subtract", + "sum", + "sumBy", + "tail", + "take", + "takeRight", + "takeRightWhile", + "takeWhile", + "tap", + "template", + "templateSettings", + "throttle", + "thru", + "times", + "toArray", + "toFinite", + "toInteger", + "toIterator", + "toJSON", + "toLength", + "toLower", + "toNumber", + "toPairs", + "toPairsIn", + "toPath", + "toPlainObject", + "toSafeInteger", + "toString", + "toUpper", + "transform", + "trim", + "trimEnd", + "trimStart", + "truncate", + "unary", + "unescape", + "union", + "unionBy", + "unionWith", + "uniq", + "uniqBy", + "uniqWith", + "uniqueId", + "unset", + "unzip", + "unzipWith", + "update", + "updateWith", + "upperCase", + "upperFirst", + "value", + "valueOf", + "values", + "valuesIn", + "without", + "words", + "wrap", + "wrapperAt", + "wrapperChain", + "wrapperCommit", + "wrapperLodash", + "wrapperNext", + "wrapperPlant", + "wrapperReverse", + "wrapperToIterator", + "wrapperValue", + "xor", + "xorBy", + "xorWith", + "zip", + "zipObject", + "zipObjectDeep", + "zipWith", + "default" + ] + } + }, + "../../node_modules/lodash-es/lowerCase.js": { + "id": "../../node_modules/lodash-es/lowerCase.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/lowerFirst.js": { + "id": "../../node_modules/lodash-es/lowerFirst.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/lt.js": { + "id": "../../node_modules/lodash-es/lt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/lte.js": { + "id": "../../node_modules/lodash-es/lte.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/map.js": { + "id": "../../node_modules/lodash-es/map.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/mapKeys.js": { + "id": "../../node_modules/lodash-es/mapKeys.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/mapValues.js": { + "id": "../../node_modules/lodash-es/mapValues.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/matches.js": { + "id": "../../node_modules/lodash-es/matches.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/matchesProperty.js": { + "id": "../../node_modules/lodash-es/matchesProperty.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/math.default.js": { + "id": "../../node_modules/lodash-es/math.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/math.js": { + "id": "../../node_modules/lodash-es/math.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "add", + "ceil", + "divide", + "floor", + "max", + "maxBy", + "mean", + "meanBy", + "min", + "minBy", + "multiply", + "round", + "subtract", + "sum", + "sumBy", + "default" + ] + } + }, + "../../node_modules/lodash-es/max.js": { + "id": "../../node_modules/lodash-es/max.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/maxBy.js": { + "id": "../../node_modules/lodash-es/maxBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/mean.js": { + "id": "../../node_modules/lodash-es/mean.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/meanBy.js": { + "id": "../../node_modules/lodash-es/meanBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/memoize.js": { + "id": "../../node_modules/lodash-es/memoize.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/merge.js": { + "id": "../../node_modules/lodash-es/merge.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/mergeWith.js": { + "id": "../../node_modules/lodash-es/mergeWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/method.js": { + "id": "../../node_modules/lodash-es/method.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/methodOf.js": { + "id": "../../node_modules/lodash-es/methodOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/min.js": { + "id": "../../node_modules/lodash-es/min.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/minBy.js": { + "id": "../../node_modules/lodash-es/minBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/mixin.js": { + "id": "../../node_modules/lodash-es/mixin.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/multiply.js": { + "id": "../../node_modules/lodash-es/multiply.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/negate.js": { + "id": "../../node_modules/lodash-es/negate.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/next.js": { + "id": "../../node_modules/lodash-es/next.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/noop.js": { + "id": "../../node_modules/lodash-es/noop.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/now.js": { + "id": "../../node_modules/lodash-es/now.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/nth.js": { + "id": "../../node_modules/lodash-es/nth.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/nthArg.js": { + "id": "../../node_modules/lodash-es/nthArg.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/number.default.js": { + "id": "../../node_modules/lodash-es/number.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/number.js": { + "id": "../../node_modules/lodash-es/number.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "clamp", + "inRange", + "random", + "default" + ] + } + }, + "../../node_modules/lodash-es/object.default.js": { + "id": "../../node_modules/lodash-es/object.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/object.js": { + "id": "../../node_modules/lodash-es/object.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "assign", + "assignIn", + "assignInWith", + "assignWith", + "at", + "create", + "defaults", + "defaultsDeep", + "entries", + "entriesIn", + "extend", + "extendWith", + "findKey", + "findLastKey", + "forIn", + "forInRight", + "forOwn", + "forOwnRight", + "functions", + "functionsIn", + "get", + "has", + "hasIn", + "invert", + "invertBy", + "invoke", + "keys", + "keysIn", + "mapKeys", + "mapValues", + "merge", + "mergeWith", + "omit", + "omitBy", + "pick", + "pickBy", + "result", + "set", + "setWith", + "toPairs", + "toPairsIn", + "transform", + "unset", + "update", + "updateWith", + "values", + "valuesIn", + "default" + ] + } + }, + "../../node_modules/lodash-es/omit.js": { + "id": "../../node_modules/lodash-es/omit.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/omitBy.js": { + "id": "../../node_modules/lodash-es/omitBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/once.js": { + "id": "../../node_modules/lodash-es/once.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/orderBy.js": { + "id": "../../node_modules/lodash-es/orderBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/over.js": { + "id": "../../node_modules/lodash-es/over.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/overArgs.js": { + "id": "../../node_modules/lodash-es/overArgs.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/overEvery.js": { + "id": "../../node_modules/lodash-es/overEvery.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/overSome.js": { + "id": "../../node_modules/lodash-es/overSome.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/pad.js": { + "id": "../../node_modules/lodash-es/pad.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/padEnd.js": { + "id": "../../node_modules/lodash-es/padEnd.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/padStart.js": { + "id": "../../node_modules/lodash-es/padStart.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/parseInt.js": { + "id": "../../node_modules/lodash-es/parseInt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/partial.js": { + "id": "../../node_modules/lodash-es/partial.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/partialRight.js": { + "id": "../../node_modules/lodash-es/partialRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/partition.js": { + "id": "../../node_modules/lodash-es/partition.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/pick.js": { + "id": "../../node_modules/lodash-es/pick.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/pickBy.js": { + "id": "../../node_modules/lodash-es/pickBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/plant.js": { + "id": "../../node_modules/lodash-es/plant.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/property.js": { + "id": "../../node_modules/lodash-es/property.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/propertyOf.js": { + "id": "../../node_modules/lodash-es/propertyOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/pull.js": { + "id": "../../node_modules/lodash-es/pull.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/pullAll.js": { + "id": "../../node_modules/lodash-es/pullAll.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/pullAllBy.js": { + "id": "../../node_modules/lodash-es/pullAllBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/pullAllWith.js": { + "id": "../../node_modules/lodash-es/pullAllWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/pullAt.js": { + "id": "../../node_modules/lodash-es/pullAt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/random.js": { + "id": "../../node_modules/lodash-es/random.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/range.js": { + "id": "../../node_modules/lodash-es/range.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/rangeRight.js": { + "id": "../../node_modules/lodash-es/rangeRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/rearg.js": { + "id": "../../node_modules/lodash-es/rearg.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/reduce.js": { + "id": "../../node_modules/lodash-es/reduce.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/reduceRight.js": { + "id": "../../node_modules/lodash-es/reduceRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/reject.js": { + "id": "../../node_modules/lodash-es/reject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/remove.js": { + "id": "../../node_modules/lodash-es/remove.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/repeat.js": { + "id": "../../node_modules/lodash-es/repeat.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/replace.js": { + "id": "../../node_modules/lodash-es/replace.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/rest.js": { + "id": "../../node_modules/lodash-es/rest.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/result.js": { + "id": "../../node_modules/lodash-es/result.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/reverse.js": { + "id": "../../node_modules/lodash-es/reverse.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/round.js": { + "id": "../../node_modules/lodash-es/round.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sample.js": { + "id": "../../node_modules/lodash-es/sample.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sampleSize.js": { + "id": "../../node_modules/lodash-es/sampleSize.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/seq.default.js": { + "id": "../../node_modules/lodash-es/seq.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/seq.js": { + "id": "../../node_modules/lodash-es/seq.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "at", + "chain", + "commit", + "lodash", + "next", + "plant", + "reverse", + "tap", + "thru", + "toIterator", + "toJSON", + "value", + "valueOf", + "wrapperChain", + "default" + ] + } + }, + "../../node_modules/lodash-es/set.js": { + "id": "../../node_modules/lodash-es/set.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/setWith.js": { + "id": "../../node_modules/lodash-es/setWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/shuffle.js": { + "id": "../../node_modules/lodash-es/shuffle.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/size.js": { + "id": "../../node_modules/lodash-es/size.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/slice.js": { + "id": "../../node_modules/lodash-es/slice.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/snakeCase.js": { + "id": "../../node_modules/lodash-es/snakeCase.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/some.js": { + "id": "../../node_modules/lodash-es/some.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sortBy.js": { + "id": "../../node_modules/lodash-es/sortBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sortedIndex.js": { + "id": "../../node_modules/lodash-es/sortedIndex.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sortedIndexBy.js": { + "id": "../../node_modules/lodash-es/sortedIndexBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sortedIndexOf.js": { + "id": "../../node_modules/lodash-es/sortedIndexOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sortedLastIndex.js": { + "id": "../../node_modules/lodash-es/sortedLastIndex.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sortedLastIndexBy.js": { + "id": "../../node_modules/lodash-es/sortedLastIndexBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sortedLastIndexOf.js": { + "id": "../../node_modules/lodash-es/sortedLastIndexOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sortedUniq.js": { + "id": "../../node_modules/lodash-es/sortedUniq.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sortedUniqBy.js": { + "id": "../../node_modules/lodash-es/sortedUniqBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/split.js": { + "id": "../../node_modules/lodash-es/split.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/spread.js": { + "id": "../../node_modules/lodash-es/spread.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/startCase.js": { + "id": "../../node_modules/lodash-es/startCase.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/startsWith.js": { + "id": "../../node_modules/lodash-es/startsWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/string.default.js": { + "id": "../../node_modules/lodash-es/string.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/string.js": { + "id": "../../node_modules/lodash-es/string.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "camelCase", + "capitalize", + "deburr", + "endsWith", + "escape", + "escapeRegExp", + "kebabCase", + "lowerCase", + "lowerFirst", + "pad", + "padEnd", + "padStart", + "parseInt", + "repeat", + "replace", + "snakeCase", + "split", + "startCase", + "startsWith", + "template", + "templateSettings", + "toLower", + "toUpper", + "trim", + "trimEnd", + "trimStart", + "truncate", + "unescape", + "upperCase", + "upperFirst", + "words", + "default" + ] + } + }, + "../../node_modules/lodash-es/stubArray.js": { + "id": "../../node_modules/lodash-es/stubArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/stubFalse.js": { + "id": "../../node_modules/lodash-es/stubFalse.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/stubObject.js": { + "id": "../../node_modules/lodash-es/stubObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/stubString.js": { + "id": "../../node_modules/lodash-es/stubString.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/stubTrue.js": { + "id": "../../node_modules/lodash-es/stubTrue.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/subtract.js": { + "id": "../../node_modules/lodash-es/subtract.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sum.js": { + "id": "../../node_modules/lodash-es/sum.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/sumBy.js": { + "id": "../../node_modules/lodash-es/sumBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/tail.js": { + "id": "../../node_modules/lodash-es/tail.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/take.js": { + "id": "../../node_modules/lodash-es/take.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/takeRight.js": { + "id": "../../node_modules/lodash-es/takeRight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/takeRightWhile.js": { + "id": "../../node_modules/lodash-es/takeRightWhile.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/takeWhile.js": { + "id": "../../node_modules/lodash-es/takeWhile.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/tap.js": { + "id": "../../node_modules/lodash-es/tap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/template.js": { + "id": "../../node_modules/lodash-es/template.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/templateSettings.js": { + "id": "../../node_modules/lodash-es/templateSettings.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/throttle.js": { + "id": "../../node_modules/lodash-es/throttle.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/thru.js": { + "id": "../../node_modules/lodash-es/thru.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/times.js": { + "id": "../../node_modules/lodash-es/times.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toArray.js": { + "id": "../../node_modules/lodash-es/toArray.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toFinite.js": { + "id": "../../node_modules/lodash-es/toFinite.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toInteger.js": { + "id": "../../node_modules/lodash-es/toInteger.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toIterator.js": { + "id": "../../node_modules/lodash-es/toIterator.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toJSON.js": { + "id": "../../node_modules/lodash-es/toJSON.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toLength.js": { + "id": "../../node_modules/lodash-es/toLength.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toLower.js": { + "id": "../../node_modules/lodash-es/toLower.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toNumber.js": { + "id": "../../node_modules/lodash-es/toNumber.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toPairs.js": { + "id": "../../node_modules/lodash-es/toPairs.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toPairsIn.js": { + "id": "../../node_modules/lodash-es/toPairsIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toPath.js": { + "id": "../../node_modules/lodash-es/toPath.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toPlainObject.js": { + "id": "../../node_modules/lodash-es/toPlainObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toSafeInteger.js": { + "id": "../../node_modules/lodash-es/toSafeInteger.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toString.js": { + "id": "../../node_modules/lodash-es/toString.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/toUpper.js": { + "id": "../../node_modules/lodash-es/toUpper.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/transform.js": { + "id": "../../node_modules/lodash-es/transform.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/trim.js": { + "id": "../../node_modules/lodash-es/trim.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/trimEnd.js": { + "id": "../../node_modules/lodash-es/trimEnd.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/trimStart.js": { + "id": "../../node_modules/lodash-es/trimStart.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/truncate.js": { + "id": "../../node_modules/lodash-es/truncate.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/unary.js": { + "id": "../../node_modules/lodash-es/unary.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/unescape.js": { + "id": "../../node_modules/lodash-es/unescape.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/union.js": { + "id": "../../node_modules/lodash-es/union.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/unionBy.js": { + "id": "../../node_modules/lodash-es/unionBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/unionWith.js": { + "id": "../../node_modules/lodash-es/unionWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/uniq.js": { + "id": "../../node_modules/lodash-es/uniq.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/uniqBy.js": { + "id": "../../node_modules/lodash-es/uniqBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/uniqWith.js": { + "id": "../../node_modules/lodash-es/uniqWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/uniqueId.js": { + "id": "../../node_modules/lodash-es/uniqueId.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/unset.js": { + "id": "../../node_modules/lodash-es/unset.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/unzip.js": { + "id": "../../node_modules/lodash-es/unzip.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/unzipWith.js": { + "id": "../../node_modules/lodash-es/unzipWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/update.js": { + "id": "../../node_modules/lodash-es/update.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/updateWith.js": { + "id": "../../node_modules/lodash-es/updateWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/upperCase.js": { + "id": "../../node_modules/lodash-es/upperCase.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/upperFirst.js": { + "id": "../../node_modules/lodash-es/upperFirst.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/util.default.js": { + "id": "../../node_modules/lodash-es/util.default.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/util.js": { + "id": "../../node_modules/lodash-es/util.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "attempt", + "bindAll", + "cond", + "conforms", + "constant", + "defaultTo", + "flow", + "flowRight", + "identity", + "iteratee", + "matches", + "matchesProperty", + "method", + "methodOf", + "mixin", + "noop", + "nthArg", + "over", + "overEvery", + "overSome", + "property", + "propertyOf", + "range", + "rangeRight", + "stubArray", + "stubFalse", + "stubObject", + "stubString", + "stubTrue", + "times", + "toPath", + "uniqueId", + "default" + ] + } + }, + "../../node_modules/lodash-es/value.js": { + "id": "../../node_modules/lodash-es/value.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/valueOf.js": { + "id": "../../node_modules/lodash-es/valueOf.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/values.js": { + "id": "../../node_modules/lodash-es/values.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/valuesIn.js": { + "id": "../../node_modules/lodash-es/valuesIn.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/without.js": { + "id": "../../node_modules/lodash-es/without.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/words.js": { + "id": "../../node_modules/lodash-es/words.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/wrap.js": { + "id": "../../node_modules/lodash-es/wrap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/wrapperAt.js": { + "id": "../../node_modules/lodash-es/wrapperAt.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/wrapperChain.js": { + "id": "../../node_modules/lodash-es/wrapperChain.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/wrapperLodash.js": { + "id": "../../node_modules/lodash-es/wrapperLodash.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/wrapperReverse.js": { + "id": "../../node_modules/lodash-es/wrapperReverse.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/wrapperValue.js": { + "id": "../../node_modules/lodash-es/wrapperValue.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/xor.js": { + "id": "../../node_modules/lodash-es/xor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/xorBy.js": { + "id": "../../node_modules/lodash-es/xorBy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/xorWith.js": { + "id": "../../node_modules/lodash-es/xorWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/zip.js": { + "id": "../../node_modules/lodash-es/zip.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/zipObject.js": { + "id": "../../node_modules/lodash-es/zipObject.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/zipObjectDeep.js": { + "id": "../../node_modules/lodash-es/zipObjectDeep.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/lodash-es/zipWith.js": { + "id": "../../node_modules/lodash-es/zipWith.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-block-quote/theme/blockquote.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-block-quote/theme/blockquote.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-editor-classic/theme/classiceditor.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-editor-classic/theme/classiceditor.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-engine/theme/placeholder.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-engine/theme/placeholder.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-heading/theme/heading.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-heading/theme/heading.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/image.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/image.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imagecaption.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imagecaption.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imagestyle.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imagestyle.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imageuploadicon.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imageuploadicon.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imageuploadloader.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imageuploadloader.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imageuploadprogress.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/imageuploadprogress.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/textalternativeform.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-image/theme/textalternativeform.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-link/theme/link.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-link/theme/link.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-link/theme/linkactions.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-link/theme/linkactions.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-link/theme/linkform.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-link/theme/linkform.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-media-embed/theme/mediaembed.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-media-embed/theme/mediaembed.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-media-embed/theme/mediaembedediting.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-media-embed/theme/mediaembedediting.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-media-embed/theme/mediaform.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-media-embed/theme/mediaform.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-table/theme/inserttable.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-table/theme/inserttable.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-table/theme/table.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-table/theme/table.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-table/theme/tableediting.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-table/theme/tableediting.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-table/theme/tableselection.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-table/theme/tableselection.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/button/button.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/button/button.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/button/switchbutton.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/button/switchbutton.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/dropdown/dropdown.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/dropdown/dropdown.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/dropdown/listdropdown.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/dropdown/listdropdown.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/dropdown/splitbutton.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/dropdown/splitbutton.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/editorui/editorui.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/editorui/editorui.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/icon/icon.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/icon/icon.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/inputtext/inputtext.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/inputtext/inputtext.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/label/label.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/label/label.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/list/list.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/list/list.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/panel/balloonpanel.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/panel/balloonpanel.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/panel/balloonrotator.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/panel/balloonrotator.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/panel/fakepanel.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/panel/fakepanel.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/panel/stickypanel.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/panel/stickypanel.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/responsive-form/responsiveform.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/responsive-form/responsiveform.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/toolbar/toolbar.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/toolbar/toolbar.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/tooltip/tooltip.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/components/tooltip/tooltip.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/globals/globals.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-ui/theme/globals/globals.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-widget/theme/widget.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-widget/theme/widget.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-widget/theme/widgettypearound.css": { + "id": "../../node_modules/postcss-loader/src/index.js?!../ckeditor5-widget/theme/widgettypearound.css", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": { + "id": "../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/webpack/buildin/global.js": { + "id": "../../node_modules/webpack/buildin/global.js", + "buildMeta": { + "providedExports": true + } + }, + "../../node_modules/webpack/buildin/harmony-module.js": { + "id": "../../node_modules/webpack/buildin/harmony-module.js", + "buildMeta": { + "providedExports": true + } + }, + "../ckeditor-cloud-services-core/src/token/token.js": { + "id": "../ckeditor-cloud-services-core/src/token/token.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor-cloud-services-core/src/uploadgateway/fileuploader.js": { + "id": "../ckeditor-cloud-services-core/src/uploadgateway/fileuploader.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor-cloud-services-core/src/uploadgateway/uploadgateway.js": { + "id": "../ckeditor-cloud-services-core/src/uploadgateway/uploadgateway.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-adapter-ckfinder/src/uploadadapter.js": { + "id": "../ckeditor5-adapter-ckfinder/src/uploadadapter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-adapter-ckfinder/src/utils.js": { + "id": "../ckeditor5-adapter-ckfinder/src/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "getCsrfToken", + "getCookie", + "setCookie" + ] + } + }, + "../ckeditor5-autoformat/src/autoformat.js": { + "id": "../ckeditor5-autoformat/src/autoformat.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-autoformat/src/blockautoformatediting.js": { + "id": "../ckeditor5-autoformat/src/blockautoformatediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-autoformat/src/inlineautoformatediting.js": { + "id": "../ckeditor5-autoformat/src/inlineautoformatediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-basic-styles/src/attributecommand.js": { + "id": "../ckeditor5-basic-styles/src/attributecommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-basic-styles/src/bold.js": { + "id": "../ckeditor5-basic-styles/src/bold.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-basic-styles/src/bold/boldediting.js": { + "id": "../ckeditor5-basic-styles/src/bold/boldediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-basic-styles/src/bold/boldui.js": { + "id": "../ckeditor5-basic-styles/src/bold/boldui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-basic-styles/src/italic.js": { + "id": "../ckeditor5-basic-styles/src/italic.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-basic-styles/src/italic/italicediting.js": { + "id": "../ckeditor5-basic-styles/src/italic/italicediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-basic-styles/src/italic/italicui.js": { + "id": "../ckeditor5-basic-styles/src/italic/italicui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-basic-styles/theme/icons/bold.svg": { + "id": "../ckeditor5-basic-styles/theme/icons/bold.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-basic-styles/theme/icons/italic.svg": { + "id": "../ckeditor5-basic-styles/theme/icons/italic.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-block-quote/src/blockquote.js": { + "id": "../ckeditor5-block-quote/src/blockquote.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-block-quote/src/blockquotecommand.js": { + "id": "../ckeditor5-block-quote/src/blockquotecommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-block-quote/src/blockquoteediting.js": { + "id": "../ckeditor5-block-quote/src/blockquoteediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-block-quote/src/blockquoteui.js": { + "id": "../ckeditor5-block-quote/src/blockquoteui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-block-quote/theme/blockquote.css": { + "id": "../ckeditor5-block-quote/theme/blockquote.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ckfinder/src/ckfinder.js": { + "id": "../ckeditor5-ckfinder/src/ckfinder.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ckfinder/src/ckfindercommand.js": { + "id": "../ckeditor5-ckfinder/src/ckfindercommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ckfinder/src/ckfinderediting.js": { + "id": "../ckeditor5-ckfinder/src/ckfinderediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ckfinder/src/ckfinderui.js": { + "id": "../ckeditor5-ckfinder/src/ckfinderui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ckfinder/theme/icons/browse-files.svg": { + "id": "../ckeditor5-ckfinder/theme/icons/browse-files.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-clipboard/src/clipboard.js": { + "id": "../ckeditor5-clipboard/src/clipboard.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-clipboard/src/clipboardobserver.js": { + "id": "../ckeditor5-clipboard/src/clipboardobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-clipboard/src/datatransfer.js": { + "id": "../ckeditor5-clipboard/src/datatransfer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-clipboard/src/pasteplaintext.js": { + "id": "../ckeditor5-clipboard/src/pasteplaintext.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-clipboard/src/utils/normalizeclipboarddata.js": { + "id": "../ckeditor5-clipboard/src/utils/normalizeclipboarddata.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-clipboard/src/utils/plaintexttohtml.js": { + "id": "../ckeditor5-clipboard/src/utils/plaintexttohtml.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-clipboard/src/utils/viewtoplaintext.js": { + "id": "../ckeditor5-clipboard/src/utils/viewtoplaintext.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-cloud-services/src/cloudservices.js": { + "id": "../ckeditor5-cloud-services/src/cloudservices.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/command.js": { + "id": "../ckeditor5-core/src/command.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/commandcollection.js": { + "id": "../ckeditor5-core/src/commandcollection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/context.js": { + "id": "../ckeditor5-core/src/context.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/contextplugin.js": { + "id": "../ckeditor5-core/src/contextplugin.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/editingkeystrokehandler.js": { + "id": "../ckeditor5-core/src/editingkeystrokehandler.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/editor/editor.js": { + "id": "../ckeditor5-core/src/editor/editor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/editor/editorui.js": { + "id": "../ckeditor5-core/src/editor/editorui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/editor/utils/attachtoform.js": { + "id": "../ckeditor5-core/src/editor/utils/attachtoform.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/editor/utils/dataapimixin.js": { + "id": "../ckeditor5-core/src/editor/utils/dataapimixin.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/editor/utils/elementapimixin.js": { + "id": "../ckeditor5-core/src/editor/utils/elementapimixin.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/multicommand.js": { + "id": "../ckeditor5-core/src/multicommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/pendingactions.js": { + "id": "../ckeditor5-core/src/pendingactions.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/plugin.js": { + "id": "../ckeditor5-core/src/plugin.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/src/plugincollection.js": { + "id": "../ckeditor5-core/src/plugincollection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/cancel.svg": { + "id": "../ckeditor5-core/theme/icons/cancel.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/check.svg": { + "id": "../ckeditor5-core/theme/icons/check.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/image.svg": { + "id": "../ckeditor5-core/theme/icons/image.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/low-vision.svg": { + "id": "../ckeditor5-core/theme/icons/low-vision.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/object-center.svg": { + "id": "../ckeditor5-core/theme/icons/object-center.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/object-full-width.svg": { + "id": "../ckeditor5-core/theme/icons/object-full-width.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/object-left.svg": { + "id": "../ckeditor5-core/theme/icons/object-left.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/object-right.svg": { + "id": "../ckeditor5-core/theme/icons/object-right.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/pencil.svg": { + "id": "../ckeditor5-core/theme/icons/pencil.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/quote.svg": { + "id": "../ckeditor5-core/theme/icons/quote.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-core/theme/icons/three-vertical-dots.svg": { + "id": "../ckeditor5-core/theme/icons/three-vertical-dots.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-easy-image/src/cloudservicesuploadadapter.js": { + "id": "../ckeditor5-easy-image/src/cloudservicesuploadadapter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-easy-image/src/easyimage.js": { + "id": "../ckeditor5-easy-image/src/easyimage.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-editor-classic/src/classiceditor.js": { + "id": "../ckeditor5-editor-classic/src/classiceditor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-editor-classic/src/classiceditorui.js": { + "id": "../ckeditor5-editor-classic/src/classiceditorui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-editor-classic/src/classiceditoruiview.js": { + "id": "../ckeditor5-editor-classic/src/classiceditoruiview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-editor-classic/theme/classiceditor.css": { + "id": "../ckeditor5-editor-classic/theme/classiceditor.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-engine/src/controller/datacontroller.js": { + "id": "../ckeditor5-engine/src/controller/datacontroller.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/controller/editingcontroller.js": { + "id": "../ckeditor5-engine/src/controller/editingcontroller.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/conversion/conversion.js": { + "id": "../ckeditor5-engine/src/conversion/conversion.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/conversion/conversionhelpers.js": { + "id": "../ckeditor5-engine/src/conversion/conversionhelpers.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/conversion/downcastdispatcher.js": { + "id": "../ckeditor5-engine/src/conversion/downcastdispatcher.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/conversion/downcasthelpers.js": { + "id": "../ckeditor5-engine/src/conversion/downcasthelpers.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "insertText", + "remove", + "createViewElementFromHighlightDescriptor", + "convertRangeSelection", + "convertCollapsedSelection", + "clearAttributes", + "wrap", + "insertElement", + "insertUIElement" + ] + } + }, + "../ckeditor5-engine/src/conversion/mapper.js": { + "id": "../ckeditor5-engine/src/conversion/mapper.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/conversion/modelconsumable.js": { + "id": "../ckeditor5-engine/src/conversion/modelconsumable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/conversion/upcastdispatcher.js": { + "id": "../ckeditor5-engine/src/conversion/upcastdispatcher.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/conversion/upcasthelpers.js": { + "id": "../ckeditor5-engine/src/conversion/upcasthelpers.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "convertToModelFragment", + "convertText", + "convertSelectionChange" + ] + } + }, + "../ckeditor5-engine/src/conversion/viewconsumable.js": { + "id": "../ckeditor5-engine/src/conversion/viewconsumable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/dataprocessor/basichtmlwriter.js": { + "id": "../ckeditor5-engine/src/dataprocessor/basichtmlwriter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/dataprocessor/htmldataprocessor.js": { + "id": "../ckeditor5-engine/src/dataprocessor/htmldataprocessor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/batch.js": { + "id": "../ckeditor5-engine/src/model/batch.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/differ.js": { + "id": "../ckeditor5-engine/src/model/differ.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/document.js": { + "id": "../ckeditor5-engine/src/model/document.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/documentfragment.js": { + "id": "../ckeditor5-engine/src/model/documentfragment.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/documentselection.js": { + "id": "../ckeditor5-engine/src/model/documentselection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/element.js": { + "id": "../ckeditor5-engine/src/model/element.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/history.js": { + "id": "../ckeditor5-engine/src/model/history.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/liveposition.js": { + "id": "../ckeditor5-engine/src/model/liveposition.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/liverange.js": { + "id": "../ckeditor5-engine/src/model/liverange.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/markercollection.js": { + "id": "../ckeditor5-engine/src/model/markercollection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/model.js": { + "id": "../ckeditor5-engine/src/model/model.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/node.js": { + "id": "../ckeditor5-engine/src/model/node.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/nodelist.js": { + "id": "../ckeditor5-engine/src/model/nodelist.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/attributeoperation.js": { + "id": "../ckeditor5-engine/src/model/operation/attributeoperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/detachoperation.js": { + "id": "../ckeditor5-engine/src/model/operation/detachoperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/insertoperation.js": { + "id": "../ckeditor5-engine/src/model/operation/insertoperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/markeroperation.js": { + "id": "../ckeditor5-engine/src/model/operation/markeroperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/mergeoperation.js": { + "id": "../ckeditor5-engine/src/model/operation/mergeoperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/moveoperation.js": { + "id": "../ckeditor5-engine/src/model/operation/moveoperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/nooperation.js": { + "id": "../ckeditor5-engine/src/model/operation/nooperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/operation.js": { + "id": "../ckeditor5-engine/src/model/operation/operation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/operationfactory.js": { + "id": "../ckeditor5-engine/src/model/operation/operationfactory.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/renameoperation.js": { + "id": "../ckeditor5-engine/src/model/operation/renameoperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/rootattributeoperation.js": { + "id": "../ckeditor5-engine/src/model/operation/rootattributeoperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/splitoperation.js": { + "id": "../ckeditor5-engine/src/model/operation/splitoperation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/operation/transform.js": { + "id": "../ckeditor5-engine/src/model/operation/transform.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "transform", + "transformSets" + ] + } + }, + "../ckeditor5-engine/src/model/operation/utils.js": { + "id": "../ckeditor5-engine/src/model/operation/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "_insert", + "_remove", + "_move", + "_setAttribute", + "_normalizeNodes" + ] + } + }, + "../ckeditor5-engine/src/model/position.js": { + "id": "../ckeditor5-engine/src/model/position.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "getTextNodeAtPosition", + "getNodeAfterPosition", + "getNodeBeforePosition" + ] + } + }, + "../ckeditor5-engine/src/model/range.js": { + "id": "../ckeditor5-engine/src/model/range.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/rootelement.js": { + "id": "../ckeditor5-engine/src/model/rootelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/schema.js": { + "id": "../ckeditor5-engine/src/model/schema.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "SchemaContext" + ] + } + }, + "../ckeditor5-engine/src/model/selection.js": { + "id": "../ckeditor5-engine/src/model/selection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/text.js": { + "id": "../ckeditor5-engine/src/model/text.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/textproxy.js": { + "id": "../ckeditor5-engine/src/model/textproxy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/treewalker.js": { + "id": "../ckeditor5-engine/src/model/treewalker.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/utils/autoparagraphing.js": { + "id": "../ckeditor5-engine/src/model/utils/autoparagraphing.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "autoParagraphEmptyRoots", + "isParagraphable", + "wrapInParagraph" + ] + } + }, + "../ckeditor5-engine/src/model/utils/deletecontent.js": { + "id": "../ckeditor5-engine/src/model/utils/deletecontent.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/utils/getselectedcontent.js": { + "id": "../ckeditor5-engine/src/model/utils/getselectedcontent.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/utils/insertcontent.js": { + "id": "../ckeditor5-engine/src/model/utils/insertcontent.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/utils/modifyselection.js": { + "id": "../ckeditor5-engine/src/model/utils/modifyselection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/model/utils/selection-post-fixer.js": { + "id": "../ckeditor5-engine/src/model/utils/selection-post-fixer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "injectSelectionPostFixer" + ] + } + }, + "../ckeditor5-engine/src/model/writer.js": { + "id": "../ckeditor5-engine/src/model/writer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/attributeelement.js": { + "id": "../ckeditor5-engine/src/view/attributeelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/containerelement.js": { + "id": "../ckeditor5-engine/src/view/containerelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "getFillerOffset" + ] + } + }, + "../ckeditor5-engine/src/view/document.js": { + "id": "../ckeditor5-engine/src/view/document.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/documentfragment.js": { + "id": "../ckeditor5-engine/src/view/documentfragment.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/documentselection.js": { + "id": "../ckeditor5-engine/src/view/documentselection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/domconverter.js": { + "id": "../ckeditor5-engine/src/view/domconverter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/downcastwriter.js": { + "id": "../ckeditor5-engine/src/view/downcastwriter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/editableelement.js": { + "id": "../ckeditor5-engine/src/view/editableelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/element.js": { + "id": "../ckeditor5-engine/src/view/element.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/emptyelement.js": { + "id": "../ckeditor5-engine/src/view/emptyelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/filler.js": { + "id": "../ckeditor5-engine/src/view/filler.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "NBSP_FILLER", + "BR_FILLER", + "INLINE_FILLER_LENGTH", + "INLINE_FILLER", + "startsWithFiller", + "isInlineFiller", + "getDataWithoutFiller", + "injectQuirksHandling" + ] + } + }, + "../ckeditor5-engine/src/view/matcher.js": { + "id": "../ckeditor5-engine/src/view/matcher.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/node.js": { + "id": "../ckeditor5-engine/src/view/node.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/clickobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/clickobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/compositionobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/compositionobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/domeventdata.js": { + "id": "../ckeditor5-engine/src/view/observer/domeventdata.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/domeventobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/domeventobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/fakeselectionobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/fakeselectionobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/focusobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/focusobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/inputobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/inputobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/keyobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/keyobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/mouseobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/mouseobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/mutationobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/mutationobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/observer.js": { + "id": "../ckeditor5-engine/src/view/observer/observer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/observer/selectionobserver.js": { + "id": "../ckeditor5-engine/src/view/observer/selectionobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/placeholder.js": { + "id": "../ckeditor5-engine/src/view/placeholder.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "enablePlaceholder", + "disablePlaceholder", + "showPlaceholder", + "hidePlaceholder", + "needsPlaceholder" + ] + } + }, + "../ckeditor5-engine/src/view/position.js": { + "id": "../ckeditor5-engine/src/view/position.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/range.js": { + "id": "../ckeditor5-engine/src/view/range.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/rawelement.js": { + "id": "../ckeditor5-engine/src/view/rawelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/renderer.js": { + "id": "../ckeditor5-engine/src/view/renderer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/rooteditableelement.js": { + "id": "../ckeditor5-engine/src/view/rooteditableelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/selection.js": { + "id": "../ckeditor5-engine/src/view/selection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/stylesmap.js": { + "id": "../ckeditor5-engine/src/view/stylesmap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "StylesProcessor" + ] + } + }, + "../ckeditor5-engine/src/view/text.js": { + "id": "../ckeditor5-engine/src/view/text.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/textproxy.js": { + "id": "../ckeditor5-engine/src/view/textproxy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/treewalker.js": { + "id": "../ckeditor5-engine/src/view/treewalker.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/uielement.js": { + "id": "../ckeditor5-engine/src/view/uielement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "injectUiElementHandling" + ] + } + }, + "../ckeditor5-engine/src/view/upcastwriter.js": { + "id": "../ckeditor5-engine/src/view/upcastwriter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/src/view/view.js": { + "id": "../ckeditor5-engine/src/view/view.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-engine/theme/placeholder.css": { + "id": "../ckeditor5-engine/theme/placeholder.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-enter/src/enter.js": { + "id": "../ckeditor5-enter/src/enter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-enter/src/entercommand.js": { + "id": "../ckeditor5-enter/src/entercommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-enter/src/enterobserver.js": { + "id": "../ckeditor5-enter/src/enterobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-enter/src/shiftenter.js": { + "id": "../ckeditor5-enter/src/shiftenter.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-enter/src/shiftentercommand.js": { + "id": "../ckeditor5-enter/src/shiftentercommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-enter/src/utils.js": { + "id": "../ckeditor5-enter/src/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "getCopyOnEnterAttributes" + ] + } + }, + "../ckeditor5-essentials/src/essentials.js": { + "id": "../ckeditor5-essentials/src/essentials.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-heading/src/heading.js": { + "id": "../ckeditor5-heading/src/heading.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-heading/src/headingcommand.js": { + "id": "../ckeditor5-heading/src/headingcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-heading/src/headingediting.js": { + "id": "../ckeditor5-heading/src/headingediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-heading/src/headingui.js": { + "id": "../ckeditor5-heading/src/headingui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-heading/src/utils.js": { + "id": "../ckeditor5-heading/src/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "getLocalizedOptions" + ] + } + }, + "../ckeditor5-heading/theme/heading.css": { + "id": "../ckeditor5-heading/theme/heading.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-image/src/image.js": { + "id": "../ckeditor5-image/src/image.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/image/converters.js": { + "id": "../ckeditor5-image/src/image/converters.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "viewFigureToModel", + "srcsetAttributeConverter", + "modelToViewAttributeConverter" + ] + } + }, + "../ckeditor5-image/src/image/imageediting.js": { + "id": "../ckeditor5-image/src/image/imageediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "createImageViewElement" + ] + } + }, + "../ckeditor5-image/src/image/imageinsertcommand.js": { + "id": "../ckeditor5-image/src/image/imageinsertcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/image/imageloadobserver.js": { + "id": "../ckeditor5-image/src/image/imageloadobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/image/ui/utils.js": { + "id": "../ckeditor5-image/src/image/ui/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "repositionContextualBalloon", + "getBalloonPositionData" + ] + } + }, + "../ckeditor5-image/src/image/utils.js": { + "id": "../ckeditor5-image/src/image/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "toImageWidget", + "isImageWidget", + "getSelectedImageWidget", + "isImage", + "insertImage", + "isImageAllowed", + "getViewImgFromWidget" + ] + } + }, + "../ckeditor5-image/src/imagecaption.js": { + "id": "../ckeditor5-image/src/imagecaption.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagecaption/imagecaptionediting.js": { + "id": "../ckeditor5-image/src/imagecaption/imagecaptionediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagecaption/utils.js": { + "id": "../ckeditor5-image/src/imagecaption/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "captionElementCreator", + "isCaption", + "getCaptionFromImage", + "matchImageCaption" + ] + } + }, + "../ckeditor5-image/src/imagestyle.js": { + "id": "../ckeditor5-image/src/imagestyle.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagestyle/converters.js": { + "id": "../ckeditor5-image/src/imagestyle/converters.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "modelToViewStyleAttribute", + "viewToModelStyleAttribute" + ] + } + }, + "../ckeditor5-image/src/imagestyle/imagestylecommand.js": { + "id": "../ckeditor5-image/src/imagestyle/imagestylecommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagestyle/imagestyleediting.js": { + "id": "../ckeditor5-image/src/imagestyle/imagestyleediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagestyle/imagestyleui.js": { + "id": "../ckeditor5-image/src/imagestyle/imagestyleui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagestyle/utils.js": { + "id": "../ckeditor5-image/src/imagestyle/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "normalizeImageStyles" + ] + } + }, + "../ckeditor5-image/src/imagetextalternative.js": { + "id": "../ckeditor5-image/src/imagetextalternative.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagetextalternative/imagetextalternativecommand.js": { + "id": "../ckeditor5-image/src/imagetextalternative/imagetextalternativecommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagetextalternative/imagetextalternativeediting.js": { + "id": "../ckeditor5-image/src/imagetextalternative/imagetextalternativeediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagetextalternative/imagetextalternativeui.js": { + "id": "../ckeditor5-image/src/imagetextalternative/imagetextalternativeui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagetextalternative/ui/textalternativeformview.js": { + "id": "../ckeditor5-image/src/imagetextalternative/ui/textalternativeformview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imagetoolbar.js": { + "id": "../ckeditor5-image/src/imagetoolbar.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imageupload.js": { + "id": "../ckeditor5-image/src/imageupload.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imageupload/imageuploadcommand.js": { + "id": "../ckeditor5-image/src/imageupload/imageuploadcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imageupload/imageuploadediting.js": { + "id": "../ckeditor5-image/src/imageupload/imageuploadediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "isHtmlIncluded" + ] + } + }, + "../ckeditor5-image/src/imageupload/imageuploadprogress.js": { + "id": "../ckeditor5-image/src/imageupload/imageuploadprogress.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imageupload/imageuploadui.js": { + "id": "../ckeditor5-image/src/imageupload/imageuploadui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/src/imageupload/utils.js": { + "id": "../ckeditor5-image/src/imageupload/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "createImageTypeRegExp", + "fetchLocalImage", + "isLocalImage" + ] + } + }, + "../ckeditor5-image/theme/icons/image_placeholder.svg": { + "id": "../ckeditor5-image/theme/icons/image_placeholder.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-image/theme/image.css": { + "id": "../ckeditor5-image/theme/image.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-image/theme/imagecaption.css": { + "id": "../ckeditor5-image/theme/imagecaption.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-image/theme/imagestyle.css": { + "id": "../ckeditor5-image/theme/imagestyle.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-image/theme/imageuploadicon.css": { + "id": "../ckeditor5-image/theme/imageuploadicon.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-image/theme/imageuploadloader.css": { + "id": "../ckeditor5-image/theme/imageuploadloader.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-image/theme/imageuploadprogress.css": { + "id": "../ckeditor5-image/theme/imageuploadprogress.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-image/theme/textalternativeform.css": { + "id": "../ckeditor5-image/theme/textalternativeform.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-indent/src/indent.js": { + "id": "../ckeditor5-indent/src/indent.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-indent/src/indentediting.js": { + "id": "../ckeditor5-indent/src/indentediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-indent/src/indentui.js": { + "id": "../ckeditor5-indent/src/indentui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-indent/theme/icons/indent.svg": { + "id": "../ckeditor5-indent/theme/icons/indent.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-indent/theme/icons/outdent.svg": { + "id": "../ckeditor5-indent/theme/icons/outdent.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/autolink.js": { + "id": "../ckeditor5-link/src/autolink.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/link.js": { + "id": "../ckeditor5-link/src/link.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/linkcommand.js": { + "id": "../ckeditor5-link/src/linkcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/linkediting.js": { + "id": "../ckeditor5-link/src/linkediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/linkui.js": { + "id": "../ckeditor5-link/src/linkui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/ui/linkactionsview.js": { + "id": "../ckeditor5-link/src/ui/linkactionsview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/ui/linkformview.js": { + "id": "../ckeditor5-link/src/ui/linkformview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/unlinkcommand.js": { + "id": "../ckeditor5-link/src/unlinkcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/utils.js": { + "id": "../ckeditor5-link/src/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "LINK_KEYSTROKE", + "isLinkElement", + "createLinkElement", + "ensureSafeUrl", + "getLocalizedDecorators", + "normalizeDecorators", + "isImageAllowed", + "isEmail", + "addLinkProtocolIfApplicable" + ] + } + }, + "../ckeditor5-link/src/utils/automaticdecorators.js": { + "id": "../ckeditor5-link/src/utils/automaticdecorators.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/src/utils/manualdecorator.js": { + "id": "../ckeditor5-link/src/utils/manualdecorator.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/theme/icons/link.svg": { + "id": "../ckeditor5-link/theme/icons/link.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/theme/icons/unlink.svg": { + "id": "../ckeditor5-link/theme/icons/unlink.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-link/theme/link.css": { + "id": "../ckeditor5-link/theme/link.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-link/theme/linkactions.css": { + "id": "../ckeditor5-link/theme/linkactions.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-link/theme/linkform.css": { + "id": "../ckeditor5-link/theme/linkform.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-list/src/converters.js": { + "id": "../ckeditor5-list/src/converters.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "modelViewInsertion", + "modelViewRemove", + "modelViewChangeType", + "modelViewMergeAfterChangeType", + "modelViewChangeIndent", + "modelViewSplitOnInsert", + "modelViewMergeAfter", + "viewModelConverter", + "cleanList", + "cleanListItem", + "modelToViewPosition", + "viewToModelPosition", + "modelChangePostFixer", + "modelIndentPasteFixer" + ] + } + }, + "../ckeditor5-list/src/indentcommand.js": { + "id": "../ckeditor5-list/src/indentcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-list/src/list.js": { + "id": "../ckeditor5-list/src/list.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-list/src/listcommand.js": { + "id": "../ckeditor5-list/src/listcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-list/src/listediting.js": { + "id": "../ckeditor5-list/src/listediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-list/src/listui.js": { + "id": "../ckeditor5-list/src/listui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-list/src/utils.js": { + "id": "../ckeditor5-list/src/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "createViewListItemElement", + "generateLiInUl", + "injectViewList", + "mergeViewLists", + "positionAfterUiElements", + "getSiblingListItem", + "createUIComponent", + "findNestedList", + "getSiblingNodes" + ] + } + }, + "../ckeditor5-list/theme/icons/bulletedlist.svg": { + "id": "../ckeditor5-list/theme/icons/bulletedlist.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-list/theme/icons/numberedlist.svg": { + "id": "../ckeditor5-list/theme/icons/numberedlist.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/src/automediaembed.js": { + "id": "../ckeditor5-media-embed/src/automediaembed.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/src/converters.js": { + "id": "../ckeditor5-media-embed/src/converters.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "modelToViewUrlAttributeConverter" + ] + } + }, + "../ckeditor5-media-embed/src/mediaembed.js": { + "id": "../ckeditor5-media-embed/src/mediaembed.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/src/mediaembedcommand.js": { + "id": "../ckeditor5-media-embed/src/mediaembedcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/src/mediaembedediting.js": { + "id": "../ckeditor5-media-embed/src/mediaembedediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/src/mediaembedui.js": { + "id": "../ckeditor5-media-embed/src/mediaembedui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/src/mediaregistry.js": { + "id": "../ckeditor5-media-embed/src/mediaregistry.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/src/ui/mediaformview.js": { + "id": "../ckeditor5-media-embed/src/ui/mediaformview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/src/utils.js": { + "id": "../ckeditor5-media-embed/src/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "toMediaWidget", + "getSelectedMediaViewWidget", + "isMediaWidget", + "createMediaFigureElement", + "getSelectedMediaModelWidget", + "insertMedia" + ] + } + }, + "../ckeditor5-media-embed/theme/icons/media-placeholder.svg": { + "id": "../ckeditor5-media-embed/theme/icons/media-placeholder.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/theme/icons/media.svg": { + "id": "../ckeditor5-media-embed/theme/icons/media.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-media-embed/theme/mediaembed.css": { + "id": "../ckeditor5-media-embed/theme/mediaembed.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-media-embed/theme/mediaembedediting.css": { + "id": "../ckeditor5-media-embed/theme/mediaembedediting.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-media-embed/theme/mediaform.css": { + "id": "../ckeditor5-media-embed/theme/mediaform.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-paragraph/src/insertparagraphcommand.js": { + "id": "../ckeditor5-paragraph/src/insertparagraphcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-paragraph/src/paragraph.js": { + "id": "../ckeditor5-paragraph/src/paragraph.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-paragraph/src/paragraphcommand.js": { + "id": "../ckeditor5-paragraph/src/paragraphcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-paste-from-office/src/filters/image.js": { + "id": "../ckeditor5-paste-from-office/src/filters/image.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "replaceImagesSourceWithBase64", + "_convertHexToBase64" + ] + } + }, + "../ckeditor5-paste-from-office/src/filters/list.js": { + "id": "../ckeditor5-paste-from-office/src/filters/list.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "transformListItemLikeElementsIntoLists", + "unwrapParagraphInListItem" + ] + } + }, + "../ckeditor5-paste-from-office/src/filters/parse.js": { + "id": "../ckeditor5-paste-from-office/src/filters/parse.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "parseHtml" + ] + } + }, + "../ckeditor5-paste-from-office/src/filters/removeboldwrapper.js": { + "id": "../ckeditor5-paste-from-office/src/filters/removeboldwrapper.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-paste-from-office/src/filters/space.js": { + "id": "../ckeditor5-paste-from-office/src/filters/space.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "normalizeSpacing", + "normalizeSpacerunSpans" + ] + } + }, + "../ckeditor5-paste-from-office/src/normalizers/googledocsnormalizer.js": { + "id": "../ckeditor5-paste-from-office/src/normalizers/googledocsnormalizer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-paste-from-office/src/normalizers/mswordnormalizer.js": { + "id": "../ckeditor5-paste-from-office/src/normalizers/mswordnormalizer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-paste-from-office/src/pastefromoffice.js": { + "id": "../ckeditor5-paste-from-office/src/pastefromoffice.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-select-all/src/selectall.js": { + "id": "../ckeditor5-select-all/src/selectall.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-select-all/src/selectallcommand.js": { + "id": "../ckeditor5-select-all/src/selectallcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-select-all/src/selectallediting.js": { + "id": "../ckeditor5-select-all/src/selectallediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-select-all/src/selectallui.js": { + "id": "../ckeditor5-select-all/src/selectallui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-select-all/theme/icons/select-all.svg": { + "id": "../ckeditor5-select-all/theme/icons/select-all.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/insertcolumncommand.js": { + "id": "../ckeditor5-table/src/commands/insertcolumncommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/insertrowcommand.js": { + "id": "../ckeditor5-table/src/commands/insertrowcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/inserttablecommand.js": { + "id": "../ckeditor5-table/src/commands/inserttablecommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/mergecellcommand.js": { + "id": "../ckeditor5-table/src/commands/mergecellcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/mergecellscommand.js": { + "id": "../ckeditor5-table/src/commands/mergecellscommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/removecolumncommand.js": { + "id": "../ckeditor5-table/src/commands/removecolumncommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/removerowcommand.js": { + "id": "../ckeditor5-table/src/commands/removerowcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/selectcolumncommand.js": { + "id": "../ckeditor5-table/src/commands/selectcolumncommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/selectrowcommand.js": { + "id": "../ckeditor5-table/src/commands/selectrowcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/setheadercolumncommand.js": { + "id": "../ckeditor5-table/src/commands/setheadercolumncommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/setheaderrowcommand.js": { + "id": "../ckeditor5-table/src/commands/setheaderrowcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/commands/splitcellcommand.js": { + "id": "../ckeditor5-table/src/commands/splitcellcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/converters/downcast.js": { + "id": "../ckeditor5-table/src/converters/downcast.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "downcastInsertTable", + "downcastInsertRow", + "downcastInsertCell", + "downcastTableHeadingColumnsChange", + "downcastRemoveRow", + "convertParagraphInTableCell", + "isSingleParagraphWithoutAttributes" + ] + } + }, + "../ckeditor5-table/src/converters/table-cell-paragraph-post-fixer.js": { + "id": "../ckeditor5-table/src/converters/table-cell-paragraph-post-fixer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/converters/table-cell-refresh-post-fixer.js": { + "id": "../ckeditor5-table/src/converters/table-cell-refresh-post-fixer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/converters/table-heading-rows-refresh-post-fixer.js": { + "id": "../ckeditor5-table/src/converters/table-heading-rows-refresh-post-fixer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/converters/table-layout-post-fixer.js": { + "id": "../ckeditor5-table/src/converters/table-layout-post-fixer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/converters/upcasttable.js": { + "id": "../ckeditor5-table/src/converters/upcasttable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "skipEmptyTableRow" + ] + } + }, + "../ckeditor5-table/src/table.js": { + "id": "../ckeditor5-table/src/table.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/tableclipboard.js": { + "id": "../ckeditor5-table/src/tableclipboard.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "getTableIfOnlyTableInContent" + ] + } + }, + "../ckeditor5-table/src/tableediting.js": { + "id": "../ckeditor5-table/src/tableediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/tablekeyboard.js": { + "id": "../ckeditor5-table/src/tablekeyboard.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/tablemouse.js": { + "id": "../ckeditor5-table/src/tablemouse.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/tablemouse/mouseeventsobserver.js": { + "id": "../ckeditor5-table/src/tablemouse/mouseeventsobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/tableselection.js": { + "id": "../ckeditor5-table/src/tableselection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/tabletoolbar.js": { + "id": "../ckeditor5-table/src/tabletoolbar.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/tableui.js": { + "id": "../ckeditor5-table/src/tableui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/tableutils.js": { + "id": "../ckeditor5-table/src/tableutils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/tablewalker.js": { + "id": "../ckeditor5-table/src/tablewalker.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/ui/inserttableview.js": { + "id": "../ckeditor5-table/src/ui/inserttableview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/src/utils/common.js": { + "id": "../ckeditor5-table/src/utils/common.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "updateNumericAttribute", + "createEmptyTableCell", + "isHeadingColumnCell" + ] + } + }, + "../ckeditor5-table/src/utils/selection.js": { + "id": "../ckeditor5-table/src/utils/selection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "getSelectedTableCells", + "getTableCellsContainingSelection", + "getSelectionAffectedTableCells", + "getRowIndexes", + "getColumnIndexes", + "isSelectionRectangular", + "sortRanges" + ] + } + }, + "../ckeditor5-table/src/utils/structure.js": { + "id": "../ckeditor5-table/src/utils/structure.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "cropTableToDimensions", + "getVerticallyOverlappingCells", + "splitHorizontally", + "getHorizontallyOverlappingCells", + "splitVertically", + "trimTableCellIfNeeded", + "removeEmptyColumns", + "removeEmptyRows", + "removeEmptyRowsColumns", + "adjustLastRowIndex", + "adjustLastColumnIndex" + ] + } + }, + "../ckeditor5-table/src/utils/ui/widget.js": { + "id": "../ckeditor5-table/src/utils/ui/widget.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "getSelectedTableWidget", + "getTableWidgetAncestor" + ] + } + }, + "../ckeditor5-table/theme/icons/table-column.svg": { + "id": "../ckeditor5-table/theme/icons/table-column.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/theme/icons/table-merge-cell.svg": { + "id": "../ckeditor5-table/theme/icons/table-merge-cell.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/theme/icons/table-row.svg": { + "id": "../ckeditor5-table/theme/icons/table-row.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/theme/icons/table.svg": { + "id": "../ckeditor5-table/theme/icons/table.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-table/theme/inserttable.css": { + "id": "../ckeditor5-table/theme/inserttable.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-table/theme/table.css": { + "id": "../ckeditor5-table/theme/table.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-table/theme/tableediting.css": { + "id": "../ckeditor5-table/theme/tableediting.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-table/theme/tableselection.css": { + "id": "../ckeditor5-table/theme/tableselection.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-typing/src/delete.js": { + "id": "../ckeditor5-typing/src/delete.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/deletecommand.js": { + "id": "../ckeditor5-typing/src/deletecommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/deleteobserver.js": { + "id": "../ckeditor5-typing/src/deleteobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/input.js": { + "id": "../ckeditor5-typing/src/input.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/inputcommand.js": { + "id": "../ckeditor5-typing/src/inputcommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/texttransformation.js": { + "id": "../ckeditor5-typing/src/texttransformation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/textwatcher.js": { + "id": "../ckeditor5-typing/src/textwatcher.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/twostepcaretmovement.js": { + "id": "../ckeditor5-typing/src/twostepcaretmovement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/typing.js": { + "id": "../ckeditor5-typing/src/typing.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/utils/changebuffer.js": { + "id": "../ckeditor5-typing/src/utils/changebuffer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/utils/findattributerange.js": { + "id": "../ckeditor5-typing/src/utils/findattributerange.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/utils/getlasttextline.js": { + "id": "../ckeditor5-typing/src/utils/getlasttextline.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/utils/injecttypingmutationshandling.js": { + "id": "../ckeditor5-typing/src/utils/injecttypingmutationshandling.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/utils/injectunsafekeystrokeshandling.js": { + "id": "../ckeditor5-typing/src/utils/injectunsafekeystrokeshandling.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "isNonTypingKeystroke" + ] + } + }, + "../ckeditor5-typing/src/utils/inlinehighlight.js": { + "id": "../ckeditor5-typing/src/utils/inlinehighlight.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-typing/src/utils/utils.js": { + "id": "../ckeditor5-typing/src/utils/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "containerChildrenMutated", + "getSingleTextNodeChange", + "compareChildNodes" + ] + } + }, + "../ckeditor5-ui/src/bindings/clickoutsidehandler.js": { + "id": "../ckeditor5-ui/src/bindings/clickoutsidehandler.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/bindings/preventdefault.js": { + "id": "../ckeditor5-ui/src/bindings/preventdefault.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/bindings/submithandler.js": { + "id": "../ckeditor5-ui/src/bindings/submithandler.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/button/buttonview.js": { + "id": "../ckeditor5-ui/src/button/buttonview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/button/switchbuttonview.js": { + "id": "../ckeditor5-ui/src/button/switchbuttonview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/componentfactory.js": { + "id": "../ckeditor5-ui/src/componentfactory.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/dropdown/button/dropdownbuttonview.js": { + "id": "../ckeditor5-ui/src/dropdown/button/dropdownbuttonview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/dropdown/button/splitbuttonview.js": { + "id": "../ckeditor5-ui/src/dropdown/button/splitbuttonview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/dropdown/dropdownpanelview.js": { + "id": "../ckeditor5-ui/src/dropdown/dropdownpanelview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/dropdown/dropdownview.js": { + "id": "../ckeditor5-ui/src/dropdown/dropdownview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/dropdown/utils.js": { + "id": "../ckeditor5-ui/src/dropdown/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "createDropdown", + "addToolbarToDropdown", + "addListToDropdown" + ] + } + }, + "../ckeditor5-ui/src/editableui/editableuiview.js": { + "id": "../ckeditor5-ui/src/editableui/editableuiview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/editableui/inline/inlineeditableuiview.js": { + "id": "../ckeditor5-ui/src/editableui/inline/inlineeditableuiview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/editorui/bodycollection.js": { + "id": "../ckeditor5-ui/src/editorui/bodycollection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/editorui/boxed/boxededitoruiview.js": { + "id": "../ckeditor5-ui/src/editorui/boxed/boxededitoruiview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/editorui/editoruiview.js": { + "id": "../ckeditor5-ui/src/editorui/editoruiview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/focuscycler.js": { + "id": "../ckeditor5-ui/src/focuscycler.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/icon/iconview.js": { + "id": "../ckeditor5-ui/src/icon/iconview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/inputtext/inputtextview.js": { + "id": "../ckeditor5-ui/src/inputtext/inputtextview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/label/labelview.js": { + "id": "../ckeditor5-ui/src/label/labelview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/labeledfield/labeledfieldview.js": { + "id": "../ckeditor5-ui/src/labeledfield/labeledfieldview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/labeledfield/utils.js": { + "id": "../ckeditor5-ui/src/labeledfield/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "createLabeledInputText", + "createLabeledDropdown" + ] + } + }, + "../ckeditor5-ui/src/list/listitemview.js": { + "id": "../ckeditor5-ui/src/list/listitemview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/list/listseparatorview.js": { + "id": "../ckeditor5-ui/src/list/listseparatorview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/list/listview.js": { + "id": "../ckeditor5-ui/src/list/listview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/model.js": { + "id": "../ckeditor5-ui/src/model.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/notification/notification.js": { + "id": "../ckeditor5-ui/src/notification/notification.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/panel/balloon/balloonpanelview.js": { + "id": "../ckeditor5-ui/src/panel/balloon/balloonpanelview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/panel/balloon/contextualballoon.js": { + "id": "../ckeditor5-ui/src/panel/balloon/contextualballoon.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/panel/sticky/stickypanelview.js": { + "id": "../ckeditor5-ui/src/panel/sticky/stickypanelview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/template.js": { + "id": "../ckeditor5-ui/src/template.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "TemplateBinding", + "TemplateToBinding", + "TemplateIfBinding" + ] + } + }, + "../ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus.js": { + "id": "../ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/toolbar/normalizetoolbarconfig.js": { + "id": "../ckeditor5-ui/src/toolbar/normalizetoolbarconfig.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/toolbar/toolbarseparatorview.js": { + "id": "../ckeditor5-ui/src/toolbar/toolbarseparatorview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/toolbar/toolbarview.js": { + "id": "../ckeditor5-ui/src/toolbar/toolbarview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/tooltip/tooltipview.js": { + "id": "../ckeditor5-ui/src/tooltip/tooltipview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/view.js": { + "id": "../ckeditor5-ui/src/view.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/src/viewcollection.js": { + "id": "../ckeditor5-ui/src/viewcollection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/theme/components/button/button.css": { + "id": "../ckeditor5-ui/theme/components/button/button.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/button/switchbutton.css": { + "id": "../ckeditor5-ui/theme/components/button/switchbutton.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/dropdown/dropdown.css": { + "id": "../ckeditor5-ui/theme/components/dropdown/dropdown.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/dropdown/listdropdown.css": { + "id": "../ckeditor5-ui/theme/components/dropdown/listdropdown.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/dropdown/splitbutton.css": { + "id": "../ckeditor5-ui/theme/components/dropdown/splitbutton.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css": { + "id": "../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/editorui/editorui.css": { + "id": "../ckeditor5-ui/theme/components/editorui/editorui.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/icon/icon.css": { + "id": "../ckeditor5-ui/theme/components/icon/icon.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/inputtext/inputtext.css": { + "id": "../ckeditor5-ui/theme/components/inputtext/inputtext.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/label/label.css": { + "id": "../ckeditor5-ui/theme/components/label/label.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css": { + "id": "../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/list/list.css": { + "id": "../ckeditor5-ui/theme/components/list/list.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/panel/balloonpanel.css": { + "id": "../ckeditor5-ui/theme/components/panel/balloonpanel.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/panel/balloonrotator.css": { + "id": "../ckeditor5-ui/theme/components/panel/balloonrotator.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/panel/fakepanel.css": { + "id": "../ckeditor5-ui/theme/components/panel/fakepanel.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/panel/stickypanel.css": { + "id": "../ckeditor5-ui/theme/components/panel/stickypanel.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/responsive-form/responsiveform.css": { + "id": "../ckeditor5-ui/theme/components/responsive-form/responsiveform.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/toolbar/toolbar.css": { + "id": "../ckeditor5-ui/theme/components/toolbar/toolbar.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/components/tooltip/tooltip.css": { + "id": "../ckeditor5-ui/theme/components/tooltip/tooltip.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/globals/globals.css": { + "id": "../ckeditor5-ui/theme/globals/globals.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-ui/theme/icons/dropdown-arrow.svg": { + "id": "../ckeditor5-ui/theme/icons/dropdown-arrow.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/theme/icons/next-arrow.svg": { + "id": "../ckeditor5-ui/theme/icons/next-arrow.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-ui/theme/icons/previous-arrow.svg": { + "id": "../ckeditor5-ui/theme/icons/previous-arrow.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-undo/src/basecommand.js": { + "id": "../ckeditor5-undo/src/basecommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-undo/src/redocommand.js": { + "id": "../ckeditor5-undo/src/redocommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-undo/src/undo.js": { + "id": "../ckeditor5-undo/src/undo.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-undo/src/undocommand.js": { + "id": "../ckeditor5-undo/src/undocommand.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-undo/src/undoediting.js": { + "id": "../ckeditor5-undo/src/undoediting.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-undo/src/undoui.js": { + "id": "../ckeditor5-undo/src/undoui.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-undo/theme/icons/redo.svg": { + "id": "../ckeditor5-undo/theme/icons/redo.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-undo/theme/icons/undo.svg": { + "id": "../ckeditor5-undo/theme/icons/undo.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-upload/src/filereader.js": { + "id": "../ckeditor5-upload/src/filereader.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-upload/src/filerepository.js": { + "id": "../ckeditor5-upload/src/filerepository.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-upload/src/ui/filedialogbuttonview.js": { + "id": "../ckeditor5-upload/src/ui/filedialogbuttonview.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/ckeditorerror.js": { + "id": "../ckeditor5-utils/src/ckeditorerror.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "DOCUMENTATION_URL", + "default", + "logWarning", + "logError" + ] + } + }, + "../ckeditor5-utils/src/collection.js": { + "id": "../ckeditor5-utils/src/collection.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/comparearrays.js": { + "id": "../ckeditor5-utils/src/comparearrays.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/config.js": { + "id": "../ckeditor5-utils/src/config.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/count.js": { + "id": "../ckeditor5-utils/src/count.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/diff.js": { + "id": "../ckeditor5-utils/src/diff.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/difftochanges.js": { + "id": "../ckeditor5-utils/src/difftochanges.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/createelement.js": { + "id": "../ckeditor5-utils/src/dom/createelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/emittermixin.js": { + "id": "../ckeditor5-utils/src/dom/emittermixin.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/getancestors.js": { + "id": "../ckeditor5-utils/src/dom/getancestors.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/getborderwidths.js": { + "id": "../ckeditor5-utils/src/dom/getborderwidths.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/getcommonancestor.js": { + "id": "../ckeditor5-utils/src/dom/getcommonancestor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/getdatafromelement.js": { + "id": "../ckeditor5-utils/src/dom/getdatafromelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/getpositionedancestor.js": { + "id": "../ckeditor5-utils/src/dom/getpositionedancestor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/global.js": { + "id": "../ckeditor5-utils/src/dom/global.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/indexof.js": { + "id": "../ckeditor5-utils/src/dom/indexof.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/insertat.js": { + "id": "../ckeditor5-utils/src/dom/insertat.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/isnode.js": { + "id": "../ckeditor5-utils/src/dom/isnode.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/isrange.js": { + "id": "../ckeditor5-utils/src/dom/isrange.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/istext.js": { + "id": "../ckeditor5-utils/src/dom/istext.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/iswindow.js": { + "id": "../ckeditor5-utils/src/dom/iswindow.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/position.js": { + "id": "../ckeditor5-utils/src/dom/position.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "getOptimalPosition" + ] + } + }, + "../ckeditor5-utils/src/dom/rect.js": { + "id": "../ckeditor5-utils/src/dom/rect.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/remove.js": { + "id": "../ckeditor5-utils/src/dom/remove.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/resizeobserver.js": { + "id": "../ckeditor5-utils/src/dom/resizeobserver.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/scroll.js": { + "id": "../ckeditor5-utils/src/dom/scroll.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "scrollViewportToShowTarget", + "scrollAncestorsToShowTarget" + ] + } + }, + "../ckeditor5-utils/src/dom/setdatainelement.js": { + "id": "../ckeditor5-utils/src/dom/setdatainelement.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/dom/tounit.js": { + "id": "../ckeditor5-utils/src/dom/tounit.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/elementreplacer.js": { + "id": "../ckeditor5-utils/src/elementreplacer.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/emittermixin.js": { + "id": "../ckeditor5-utils/src/emittermixin.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "_getEmitterListenedTo", + "_setEmitterId", + "_getEmitterId" + ] + } + }, + "../ckeditor5-utils/src/env.js": { + "id": "../ckeditor5-utils/src/env.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default", + "isMac", + "isGecko", + "isSafari", + "isAndroid", + "isBlink", + "isRegExpUnicodePropertySupported" + ] + } + }, + "../ckeditor5-utils/src/eventinfo.js": { + "id": "../ckeditor5-utils/src/eventinfo.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/fastdiff.js": { + "id": "../ckeditor5-utils/src/fastdiff.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/first.js": { + "id": "../ckeditor5-utils/src/first.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/focustracker.js": { + "id": "../ckeditor5-utils/src/focustracker.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/isiterable.js": { + "id": "../ckeditor5-utils/src/isiterable.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/keyboard.js": { + "id": "../ckeditor5-utils/src/keyboard.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "keyCodes", + "getCode", + "parseKeystroke", + "getEnvKeystrokeText", + "isArrowKeyCode", + "getLocalizedArrowKeyCodeDirection", + "isForwardArrowKeyCode" + ] + } + }, + "../ckeditor5-utils/src/keystrokehandler.js": { + "id": "../ckeditor5-utils/src/keystrokehandler.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/locale.js": { + "id": "../ckeditor5-utils/src/locale.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/mix.js": { + "id": "../ckeditor5-utils/src/mix.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/objecttomap.js": { + "id": "../ckeditor5-utils/src/objecttomap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/observablemixin.js": { + "id": "../ckeditor5-utils/src/observablemixin.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/priorities.js": { + "id": "../ckeditor5-utils/src/priorities.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/spy.js": { + "id": "../ckeditor5-utils/src/spy.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/tomap.js": { + "id": "../ckeditor5-utils/src/tomap.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/translation-service.js": { + "id": "../ckeditor5-utils/src/translation-service.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "add", + "_translate", + "_clear" + ] + } + }, + "../ckeditor5-utils/src/uid.js": { + "id": "../ckeditor5-utils/src/uid.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-utils/src/unicode.js": { + "id": "../ckeditor5-utils/src/unicode.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "isCombiningMark", + "isHighSurrogateHalf", + "isLowSurrogateHalf", + "isInsideSurrogatePair", + "isInsideCombinedSymbol" + ] + } + }, + "../ckeditor5-utils/src/version.js": { + "id": "../ckeditor5-utils/src/version.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [] + } + }, + "../ckeditor5-widget/src/highlightstack.js": { + "id": "../ckeditor5-widget/src/highlightstack.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-widget/src/utils.js": { + "id": "../ckeditor5-widget/src/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "WIDGET_CLASS_NAME", + "WIDGET_SELECTED_CLASS_NAME", + "isWidget", + "toWidget", + "setHighlightHandling", + "setLabel", + "getLabel", + "toWidgetEditable", + "findOptimalInsertionPosition", + "viewToModelPositionOutsideModelElement", + "centeredBalloonPositionForLongWidgets" + ] + } + }, + "../ckeditor5-widget/src/verticalnavigation.js": { + "id": "../ckeditor5-widget/src/verticalnavigation.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-widget/src/widget.js": { + "id": "../ckeditor5-widget/src/widget.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-widget/src/widgettoolbarrepository.js": { + "id": "../ckeditor5-widget/src/widgettoolbarrepository.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-widget/src/widgettypearound/utils.js": { + "id": "../ckeditor5-widget/src/widgettypearound/utils.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "TYPE_AROUND_SELECTION_ATTRIBUTE", + "isTypeAroundWidget", + "getClosestTypeAroundDomButton", + "getTypeAroundButtonPosition", + "getClosestWidgetViewElement", + "getTypeAroundFakeCaretPosition" + ] + } + }, + "../ckeditor5-widget/src/widgettypearound/widgettypearound.js": { + "id": "../ckeditor5-widget/src/widgettypearound/widgettypearound.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-widget/theme/icons/drag-handle.svg": { + "id": "../ckeditor5-widget/theme/icons/drag-handle.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-widget/theme/icons/return-arrow.svg": { + "id": "../ckeditor5-widget/theme/icons/return-arrow.svg", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + }, + "../ckeditor5-widget/theme/widget.css": { + "id": "../ckeditor5-widget/theme/widget.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "../ckeditor5-widget/theme/widgettypearound.css": { + "id": "../ckeditor5-widget/theme/widgettypearound.css", + "buildMeta": { + "moduleConcatenationBailout": "module.id", + "providedExports": true + } + }, + "./src/ckeditor.js": { + "id": "./src/ckeditor.js", + "buildMeta": { + "exportsType": "namespace", + "providedExports": [ + "default" + ] + } + } + } +} diff --git a/inc/ckeditor5/ckeditor.js b/inc/ckeditor5/ckeditor.js new file mode 100644 index 0000000..0449c1c --- /dev/null +++ b/inc/ckeditor5/ckeditor.js @@ -0,0 +1,29123 @@ +/*! + * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +!function (e) { + const t = e.en = e.en || {}; + t.dictionary = Object.assign(t.dictionary || {}, { + "%0 of %1": "%0 of %1", + Aquamarine: "Aquamarine", + Black: "Black", + "Block quote": "Block quote", + Blue: "Blue", + Bold: "Bold", + "Bulleted List": "Bulleted List", + Cancel: "Cancel", + "Cannot upload file:": "Cannot upload file:", + "Centered image": "Centered image", + "Change image text alternative": "Change image text alternative", + "Choose heading": "Choose heading", + Column: "Column", + "Could not insert image at the current position.": "Could not insert image at the current position.", + "Could not obtain resized image URL.": "Could not obtain resized image URL.", + "Decrease indent": "Decrease indent", + "Delete column": "Delete column", + "Delete row": "Delete row", + "Dim grey": "Dim grey", + Downloadable: "Downloadable", + "Dropdown toolbar": "Dropdown toolbar", + "Edit block": "Edit block", + "Edit link": "Edit link", + "Editor toolbar": "Editor toolbar", + "Enter image caption": "Enter image caption", + "Full size image": "Full size image", + Green: "Green", + Grey: "Grey", + "Header column": "Header column", + "Header row": "Header row", + Heading: "Heading", + "Heading 1": "Heading 1", + "Heading 2": "Heading 2", + "Heading 3": "Heading 3", + "Heading 4": "Heading 4", + "Heading 5": "Heading 5", + "Heading 6": "Heading 6", + "Image toolbar": "Image toolbar", + "image widget": "image widget", + "Increase indent": "Increase indent", + "Insert column left": "Insert column left", + "Insert column right": "Insert column right", + "Insert image": "Insert image", + "Insert image or file": "Insert image or file", + "Insert media": "Insert media", + "Insert paragraph after block": "Insert paragraph after block", + "Insert paragraph before block": "Insert paragraph before block", + "Insert row above": "Insert row above", + "Insert row below": "Insert row below", + "Insert table": "Insert table", + "Inserting image failed": "Inserting image failed", + Italic: "Italic", + "Left aligned image": "Left aligned image", + "Light blue": "Light blue", + "Light green": "Light green", + "Light grey": "Light grey", + Link: "Link", + "Link URL": "Link URL", + "Media URL": "Media URL", + "media widget": "media widget", + "Merge cell down": "Merge cell down", + "Merge cell left": "Merge cell left", + "Merge cell right": "Merge cell right", + "Merge cell up": "Merge cell up", + "Merge cells": "Merge cells", + Next: "Next", + "Numbered List": "Numbered List", + "Open in a new tab": "Open in a new tab", + "Open link in new tab": "Open link in new tab", + Orange: "Orange", + Paragraph: "Paragraph", + "Paste the media URL in the input.": "Paste the media URL in the input.", + Previous: "Previous", + Purple: "Purple", + Red: "Red", + Redo: "Redo", + "Rich Text Editor": "Rich Text Editor", + "Rich Text Editor, %0": "Rich Text Editor, %0", + "Right aligned image": "Right aligned image", + Row: "Row", + Save: "Save", + "Select all": "Select all", + "Select column": "Select column", + "Select row": "Select row", + "Selecting resized image failed": "Selecting resized image failed", + "Show more items": "Show more items", + "Side image": "Side image", + "Split cell horizontally": "Split cell horizontally", + "Split cell vertically": "Split cell vertically", + "Table toolbar": "Table toolbar", + "Text alternative": "Text alternative", + "The URL must not be empty.": "The URL must not be empty.", + "This link has no URL": "This link has no URL", + "This media URL is not supported.": "This media URL is not supported.", + "Tip: Paste the URL into the content to embed faster.": "Tip: Paste the URL into the content to embed faster.", + Turquoise: "Turquoise", + Undo: "Undo", + Unlink: "Unlink", + "Upload failed": "Upload failed", + "Upload in progress": "Upload in progress", + White: "White", + "Widget toolbar": "Widget toolbar", + Yellow: "Yellow" + }) +} +(window.CKEDITOR_TRANSLATIONS || (window.CKEDITOR_TRANSLATIONS = {})), function (e, t) { + "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.ClassicEditor = t() : e.ClassicEditor = t() +} +(window, (function () { + return function (e) { + var t = {}; + function i(n) { + if (t[n]) + return t[n].exports; + var o = t[n] = { + i: n, + l: !1, + exports: {} + }; + return e[n].call(o.exports, o, o.exports, i), + o.l = !0, + o.exports + } + return i.m = e, + i.c = t, + i.d = function (e, t, n) { + i.o(e, t) || Object.defineProperty(e, t, { + enumerable: !0, + get: n + }) + }, + i.r = function (e) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { + value: "Module" + }), + Object.defineProperty(e, "__esModule", { + value: !0 + }) + }, + i.t = function (e, t) { + if (1 & t && (e = i(e)), 8 & t) + return e; + if (4 & t && "object" == typeof e && e && e.__esModule) + return e; + var n = Object.create(null); + if (i.r(n), Object.defineProperty(n, "default", { + enumerable: !0, + value: e + }), 2 & t && "string" != typeof e) + for (var o in e) + i.d(n, o, function (t) { + return e[t] + } + .bind(null, o)); + return n + }, + i.n = function (e) { + var t = e && e.__esModule ? function () { + return e.default + } + : function () { + return e + }; + return i.d(t, "a", t), + t + }, + i.o = function (e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + }, + i.p = "", + i(i.s = 108) + } + ([function (e, t, i) { + "use strict"; + i.d(t, "a", (function () { + return n + })), + i.d(t, "b", (function () { + return o + })); + class n extends Error { + constructor(e, t, i) { + super(`${e}${i?" "+JSON.stringify(i):""}${r(e)}`), + this.name = "CKEditorError", + this.context = t, + this.data = i + } + is(e) { + return "CKEditorError" === e + } + static rethrowUnexpectedError(e, t) { + if (e.is && e.is("CKEditorError")) + throw e; + const i = new n(e.message, t); + throw i.stack = e.stack, + i + } + } + function o(e, t) { + console.warn(...s(e, t)) + } + function r(e) { + return "\nRead more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-" + e + } + function s(e, t) { + const i = r(e); + return t ? [e, t, i] : [e, i] + } + }, function (e, t, i) { + "use strict"; + var n, + o = function () { + return void 0 === n && (n = Boolean(window && document && document.all && !window.atob)), + n + }, + r = function () { + var e = {}; + return function (t) { + if (void 0 === e[t]) { + var i = document.querySelector(t); + if (window.HTMLIFrameElement && i instanceof window.HTMLIFrameElement) + try { + i = i.contentDocument.head + } catch (e) { + i = null + } + e[t] = i + } + return e[t] + } + } + (), + s = []; + function a(e) { + for (var t = -1, i = 0; i < s.length; i++) + if (s[i].identifier === e) { + t = i; + break + } + return t + } + function c(e, t) { + for (var i = {}, n = [], o = 0; o < e.length; o++) { + var r = e[o], + c = t.base ? r[0] + t.base : r[0], + l = i[c] || 0, + d = "".concat(c, " ").concat(l); + i[c] = l + 1; + var u = a(d), + h = { + css: r[1], + media: r[2], + sourceMap: r[3] + }; + -1 !== u ? (s[u].references++, s[u].updater(h)) : s.push({ + identifier: d, + updater: p(h, t), + references: 1 + }), + n.push(d) + } + return n + } + function l(e) { + var t = document.createElement("style"), + n = e.attributes || {}; + if (void 0 === n.nonce) { + var o = i.nc; + o && (n.nonce = o) + } + if (Object.keys(n).forEach((function (e) { + t.setAttribute(e, n[e]) + })), "function" == typeof e.insert) + e.insert(t); + else { + var s = r(e.insert || "head"); + if (!s) + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + s.appendChild(t) + } + return t + } + var d, + u = (d = [], function (e, t) { + return d[e] = t, + d.filter(Boolean).join("\n") + }); + function h(e, t, i, n) { + var o = i ? "" : n.media ? "@media ".concat(n.media, " {").concat(n.css, "}") : n.css; + if (e.styleSheet) + e.styleSheet.cssText = u(t, o); + else { + var r = document.createTextNode(o), + s = e.childNodes; + s[t] && e.removeChild(s[t]), + s.length ? e.insertBefore(r, s[t]) : e.appendChild(r) + } + } + function f(e, t, i) { + var n = i.css, + o = i.media, + r = i.sourceMap; + if (o ? e.setAttribute("media", o) : e.removeAttribute("media"), r && "undefined" != typeof btoa && (n += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r)))), " */")), e.styleSheet) + e.styleSheet.cssText = n; + else { + for (; e.firstChild; ) + e.removeChild(e.firstChild); + e.appendChild(document.createTextNode(n)) + } + } + var g = null, + m = 0; + function p(e, t) { + var i, + n, + o; + if (t.singleton) { + var r = m++; + i = g || (g = l(t)), + n = h.bind(null, i, r, !1), + o = h.bind(null, i, r, !0) + } else + i = l(t), n = f.bind(null, i, t), o = function () { + !function (e) { + if (null === e.parentNode) + return !1; + e.parentNode.removeChild(e) + } + (i) + }; + return n(e), + function (t) { + if (t) { + if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) + return; + n(e = t) + } else + o() + } + } + e.exports = function (e, t) { + (t = t || {}).singleton || "boolean" == typeof t.singleton || (t.singleton = o()); + var i = c(e = e || [], t); + return function (e) { + if (e = e || [], "[object Array]" === Object.prototype.toString.call(e)) { + for (var n = 0; n < i.length; n++) { + var o = a(i[n]); + s[o].references-- + } + for (var r = c(e, t), l = 0; l < i.length; l++) { + var d = a(i[l]); + 0 === s[d].references && (s[d].updater(), s.splice(d, 1)) + } + i = r + } + } + } + }, , function (e, t, i) { + "use strict"; + var n = i(8), + o = "object" == typeof self && self && self.Object === Object && self, + r = n.a || o || Function("return this")(); + t.a = r + }, function (e, t, i) { + "use strict"; + (function (e) { + var n = i(3), + o = i(13), + r = "object" == typeof exports && exports && !exports.nodeType && exports, + s = r && "object" == typeof e && e && !e.nodeType && e, + a = s && s.exports === r ? n.a.Buffer : void 0, + c = (a ? a.isBuffer : void 0) || o.a; + t.a = c + }).call(this, i(10)(e)) + }, function (e, t, i) { + "use strict"; + (function (e) { + var n = i(8), + o = "object" == typeof exports && exports && !exports.nodeType && exports, + r = o && "object" == typeof e && e && !e.nodeType && e, + s = r && r.exports === o && n.a.process, + a = function () { + try { + var e = r && r.require && r.require("util").types; + return e || s && s.binding && s.binding("util") + } catch (e) {} + } + (); + t.a = a + }).call(this, i(10)(e)) + }, function (e, t, i) { + "use strict"; + (function (e) { + var t = i(0); + const n = "object" == typeof window ? window : e; + if (n.CKEDITOR_VERSION) + throw new t.a("ckeditor-duplicated-modules", null); + n.CKEDITOR_VERSION = "27.1.0" + }).call(this, i(11)) + }, function (e, t, i) { + var n = i(1), + o = i(75); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t, i) { + "use strict"; + (function (e) { + var i = "object" == typeof e && e && e.Object === Object && e; + t.a = i + }).call(this, i(11)) + }, function (e, t, i) { + "use strict"; + (function (e) { + var n = i(3), + o = "object" == typeof exports && exports && !exports.nodeType && exports, + r = o && "object" == typeof e && e && !e.nodeType && e, + s = r && r.exports === o ? n.a.Buffer : void 0, + a = s ? s.allocUnsafe : void 0; + t.a = function (e, t) { + if (t) + return e.slice(); + var i = e.length, + n = a ? a(i) : new e.constructor(i); + return e.copy(n), + n + } + }).call(this, i(10)(e)) + }, function (e, t) { + e.exports = function (e) { + if (!e.webpackPolyfill) { + var t = Object.create(e); + t.children || (t.children = []), + Object.defineProperty(t, "loaded", { + enumerable: !0, + get: function () { + return t.l + } + }), + Object.defineProperty(t, "id", { + enumerable: !0, + get: function () { + return t.i + } + }), + Object.defineProperty(t, "exports", { + enumerable: !0 + }), + t.webpackPolyfill = 1 + } + return t + } + }, function (e, t) { + var i; + i = function () { + return this + } + (); + try { + i = i || new Function("return this")() + } catch (e) { + "object" == typeof window && (i = window) + } + e.exports = i + }, function (e, t, i) { + var n = i(1), + o = i(70); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t, i) { + "use strict"; + t.a = function () { + return !1 + } + }, function (e, t, i) { + var n = i(1), + o = i(15); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck-hidden{display:none!important}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{box-sizing:border-box;width:auto;height:auto;position:static}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--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-coordinates:208,79%,51%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#bcdefb;--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:#757575;--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-color-link-fake-selection:rgba(31,177,255,0.3);--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-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck.ck-reset_all,.ck.ck-reset_all *{border-collapse:collapse;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);color:var(--ck-color-text);text-align:left;white-space:nowrap;cursor:auto;float:none}.ck.ck-reset_all .ck-rtl *{text-align:right}.ck.ck-reset_all iframe{vertical-align:inherit}.ck.ck-reset_all textarea{white-space:pre-wrap}.ck.ck-reset_all input[type=password],.ck.ck-reset_all input[type=text],.ck.ck-reset_all textarea{cursor:text}.ck.ck-reset_all input[type=password][disabled],.ck.ck-reset_all input[type=text][disabled],.ck.ck-reset_all textarea[disabled]{cursor:default}.ck.ck-reset_all fieldset{padding:10px;border:2px groove #dfdee3}.ck.ck-reset_all button::-moz-focus-inner{padding:0;border:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}" + }, function (e, t, i) { + var n = i(1), + o = i(17); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}" + }, function (e, t, i) { + var n = i(1), + o = i(19); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = '.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.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{transition:opacity .2s ease-in-out .2s;border-style:solid;left:50%}.ck.ck-tooltip.ck-tooltip_s,.ck.ck-tooltip.ck-tooltip_se,.ck.ck-tooltip.ck-tooltip_sw{bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{top:calc(var(--ck-tooltip-arrow-size)*-1 + 1px);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_sw{right:50%;left:auto}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text{left:auto;right:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{left:auto;right:0}.ck.ck-tooltip.ck-tooltip_se{left:50%;right:auto}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text{right:auto;left:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after{right:auto;left:0;transform:translateX(50%)}.ck.ck-tooltip.ck-tooltip_n{top:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(var(--ck-tooltip-arrow-size)*-1);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_e{left:calc(100% + var(--ck-tooltip-arrow-size));top:50%}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text:after{left:calc(var(--ck-tooltip-arrow-size)*-1);top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:transparent;border-bottom-color:transparent;border-right-color:var(--ck-color-tooltip-background);border-top-color:transparent;border-left-width:0;border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_w{right:calc(100% + var(--ck-tooltip-arrow-size));left:auto;top:50%}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text:after{left:100%;top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:var(--ck-color-tooltip-background);border-bottom-color:transparent;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:0;border-top-width:var(--ck-tooltip-arrow-size)}' + }, function (e, t, i) { + var n = i(1), + o = i(21); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.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:focus:not(:hover) .ck-tooltip,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,border .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}.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 .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.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-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.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(var(--ck-spacing-small)*-1);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(var(--ck-spacing-small)*-1);margin-left:var(--ck-spacing-small)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.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-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}" + }, function (e, t, i) { + var n = i(1), + o = i(23); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - var(--ck-switch-button-toggle-spacing)*2)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.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 .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(var(--ck-border-radius)*0.5)}.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-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-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.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(var(--ck-switch-button-translation)*-1))}" + }, function (e, t, i) { + var n = i(1), + o = i(25); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{width:var(--ck-color-grid-tile-size);height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{display:none;color:var(--ck-color-color-grid-check-icon)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}" + }, function (e, t, i) { + var n = i(1), + o = i(27); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-left-radius:unset;border-bottom-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-radius:0}.ck-rounded-corners [dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow,[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:unset;border-bottom-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-right-radius:unset;border-bottom-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-left-color:var(--ck-color-split-button-hover-border)}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-right-color:var(--ck-color-split-button-hover-border)}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}" + }, function (e, t, i) { + var n = i(1), + o = i(29); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ":root{--ck-dropdown-max-width:75vw}.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);max-width:var(--ck-dropdown-max-width);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{top:100%;bottom:auto}.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}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.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-standard)}[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-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.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-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}" + }, function (e, t, i) { + var n = i(1), + o = i(31); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.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 .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;background:var(--ck-color-toolbar-border);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}" + }, function (e, t, i) { + var n = i(1), + o = i(33); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;padding:calc(var(--ck-line-height-base)*0.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*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:active{box-shadow:none}.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:focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}" + }, function (e, t, i) { + var n = i(1), + o = i(35); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{width:max-content;max-width:var(--ck-toolbar-dropdown-max-width)}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}" + }, function (e, t, i) { + var n = i(1), + o = i(37); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}" + }, function (e, t, i) { + var n = i(1), + o = i(39); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ":root{--ck-color-editable-blur-selection:#d9d9d9}.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-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}" + }, function (e, t, i) { + var n = i(1), + o = i(41); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}" + }, function (e, t, i) { + var n = i(1), + o = i(43); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-form__header{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{padding:var(--ck-spacing-small) var(--ck-spacing-large);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-form__header .ck-form__header__label{font-weight:700}" + }, function (e, t, i) { + var n = i(1), + o = i(45); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{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:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.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),0 0}.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),0 0}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}" + }, function (e, t, i) { + var n = i(1), + o = i(47); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{pointer-events:none;transform-origin:0 0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);background:var(--ck-color-labeled-field-label-background);padding:0 calc(var(--ck-font-size-tiny)*0.5);line-height:normal;font-weight:400;text-overflow:ellipsis;overflow:hidden;max-width:100%;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-spacing-medium),calc(var(--ck-font-size-base)*0.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-spacing-medium)*-1),calc(var(--ck-font-size-base)*0.6)) scale(1)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));background:transparent;padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}" + }, function (e, t, i) { + var n = i(1), + o = i(49); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.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);filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow))}.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(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*-1);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{right:25%;margin-right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{right:25%;margin-right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}' + }, function (e, t, i) { + var n = i(1), + o = i(51); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}" + }, function (e, t, i) { + var n = i(1), + o = i(53); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}" + }, function (e, t, i) { + var n = i(1), + o = i(55); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}" + }, function (e, t, i) { + var n = i(1), + o = i(57); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}" + }, function (e, t, i) { + var n = i(1), + o = i(59); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-placeholder,.ck .ck-placeholder{position:relative}.ck.ck-placeholder:before,.ck .ck-placeholder:before{position:absolute;left:0;right:0;content:attr(data-placeholder);pointer-events:none}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-placeholder:before,.ck .ck-placeholder:before{cursor:text;color:var(--ck-color-engine-placeholder-text)}" + }, function (e, t, i) { + var n = i(1), + o = i(61); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}" + }, function (e, t, i) { + var n = i(1), + o = i(63); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = '.ck .ck-widget .ck-widget__type-around__button{display:block;position:absolute;overflow:hidden;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{position:absolute;top:50%;left:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{top:calc(var(--ck-widget-outline-thickness)*-0.5);left:min(10%,30px);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-0.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;position:absolute;top:1px;left:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;position:absolute;left:0;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{top:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{width:var(--ck-widget-type-around-button-size);height:var(--ck-widget-type-around-button-size);background:var(--ck-color-widget-type-around-button);border-radius:100px;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);opacity:0;pointer-events:none}.ck .ck-widget .ck-widget__type-around__button svg{width:10px;height:8px;transform:translate(-50%,-50%);transition:transform .5s ease;margin-top:1px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{width:calc(var(--ck-widget-type-around-button-size) - 2px);height:calc(var(--ck-widget-type-around-button-size) - 2px);border-radius:100px;background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3))}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{pointer-events:none;height:1px;animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;outline:1px solid hsla(0,0%,100%,.5);background:var(--ck-color-base-text)}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}' + }, function (e, t, i) { + var n = i(1), + o = i(65); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{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 .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{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-handle .ck-widget__selection-handle .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-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}" + }, function (e, t, i) { + var n = i(1), + o = i(67); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = '.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;position:relative;pointer-events:none}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);border:1px solid var(--ck-clipboard-drop-target-color);background:var(--ck-clipboard-drop-target-color);margin-left:-1px}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{content:"";width:0;height:0;display:block;position:absolute;left:50%;top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);transform:translateX(-50%);border-left:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-bottom:0 solid transparent;border-right:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-top:calc(var(--ck-clipboard-drop-target-dot-height)) solid var(--ck-clipboard-drop-target-color)}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}' + }, function (e, t, i) { + var n = i(1), + o = i(69); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:5px solid #ccc}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}" + }, function (e, t) { + e.exports = ".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}" + }, function (e, t, i) { + var n = i(1), + o = i(72); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{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)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}" + }, function (e, t, i) { + var n = i(1), + o = i(74); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{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-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}" + }, function (e, t) { + e.exports = '.ck-vertical-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-text-width)*0.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-large);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after,[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}' + }, function (e, t, i) { + var n = i(1), + o = i(77); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:50px}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{position:static}" + }, function (e, t, i) { + var n = i(1), + o = i(79); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}" + }, function (e, t, i) { + var n = i(1), + o = i(81); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ":root{--ck-image-style-spacing:1.5em}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}" + }, function (e, t, i) { + var n = i(1), + o = i(83); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}" + }, function (e, t, i) { + var n = i(1), + o = i(85); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = '.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20px;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}' + }, function (e, t, i) { + var n = i(1), + o = i(87); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = '.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}' + }, function (e, t, i) { + var n = i(1), + o = i(89); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{height:100%;border-right:1px solid var(--ck-color-base-text);margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}" + }, function (e, t, i) { + var n = i(1), + o = i(91); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .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,[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:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}" + }, function (e, t, i) { + var n = i(1), + o = i(93); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.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 .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}[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 .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%}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}" + }, function (e, t, i) { + var n = i(1), + o = i(95); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = '.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(var(--ck-spacing-standard)*3);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__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__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*="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,#1400c7,#b800b1,#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}.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}' + }, function (e, t, i) { + var n = i(1), + o = i(97); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{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-field-view{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}" + }, function (e, t, i) { + var n = i(1), + o = i(99); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}" + }, function (e, t, i) { + var n = i(1), + o = i(101); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ":root{--ck-color-table-focused-cell-background:rgba(158,207,250,0.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}" + }, function (e, t, i) { + var n = i(1), + o = i(103); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}: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 .ck-insert-table-dropdown__grid{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-color-base-border);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-color-focus-border);background:var(--ck-color-focus-outer-shadow)}" + }, function (e, t, i) { + var n = i(1), + o = i(105); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ':root{--ck-table-selected-cell-background:rgba(158,207,250,0.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{position:relative;caret-color:transparent;outline:unset;box-shadow:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{content:"";pointer-events:none;background-color:var(--ck-table-selected-cell-background);position:absolute;top:0;left:0;right:0;bottom:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget_selected{outline:unset}' + }, function (e, t, i) { + var n = i(1), + o = i(107); + "string" == typeof(o = o.__esModule ? o.default : o) && (o = [[e.i, o, ""]]); + var r = { + injectType: "singletonStyleTag", + attributes: { + "data-cke": !0 + }, + insert: "head", + singleton: !0 + }; + n(o, r); + e.exports = o.locals || {} + }, function (e, t) { + e.exports = ".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border:1px solid #bfbfbf}.ck-content .table table th{font-weight:700;background:hsla(0,0%,0%,5%)}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}" + }, function (e, t, i) { + "use strict"; + i.r(t), + i.d(t, "default", (function () { + return _w + })); + var n = function () { + return function e() { + e.called = !0 + } + }; + class o { + constructor(e, t) { + this.source = e, + this.name = t, + this.path = [], + this.stop = n(), + this.off = n() + } + } + const r = new Array(256).fill().map((e, t) => ("0" + t.toString(16)).slice(-2)); + function s() { + const e = 4294967296 * Math.random() >>> 0, + t = 4294967296 * Math.random() >>> 0, + i = 4294967296 * Math.random() >>> 0, + n = 4294967296 * Math.random() >>> 0; + return "e" + r[e >> 0 & 255] + r[e >> 8 & 255] + r[e >> 16 & 255] + r[e >> 24 & 255] + r[t >> 0 & 255] + r[t >> 8 & 255] + r[t >> 16 & 255] + r[t >> 24 & 255] + r[i >> 0 & 255] + r[i >> 8 & 255] + r[i >> 16 & 255] + r[i >> 24 & 255] + r[n >> 0 & 255] + r[n >> 8 & 255] + r[n >> 16 & 255] + r[n >> 24 & 255] + } + var a = { + get(e) { + return "number" != typeof e ? this[e] || this.normal : e + }, + highest: 1e5, + high: 1e3, + normal: 0, + low: -1e3, + lowest: -1e5 + }, + c = (i(6), i(0)); + const l = Symbol("listeningTo"), + d = Symbol("emitterId"); + var u = { + on(e, t, i = {}) { + this.listenTo(this, e, t, i) + }, + once(e, t, i) { + let n = !1; + this.listenTo(this, e, (function (e, ...i) { + n || (n = !0, e.off(), t.call(this, e, ...i)) + }), i) + }, + off(e, t) { + this.stopListening(this, e, t) + }, + listenTo(e, t, i, n = {}) { + let o, + r; + this[l] || (this[l] = {}); + const s = this[l]; + f(e) || h(e); + const a = f(e); + (o = s[a]) || (o = s[a] = { + emitter: e, + callbacks: {} + }), + (r = o.callbacks[t]) || (r = o.callbacks[t] = []), + r.push(i), + function (e, t, i, n, o) { + t._addEventListener ? t._addEventListener(i, n, o) : e._addEventListener.call(t, i, n, o) + } + (this, e, t, i, n) + }, + stopListening(e, t, i) { + const n = this[l]; + let o = e && f(e); + const r = n && o && n[o], + s = r && t && r.callbacks[t]; + if (!(!n || e && !r || t && !s)) + if (i) { + b(this, e, t, i); + -1 !== s.indexOf(i) && (1 === s.length ? delete r.callbacks[t] : b(this, e, t, i)) + } else if (s) { + for (; i = s.pop(); ) + b(this, e, t, i); + delete r.callbacks[t] + } else if (r) { + for (t in r.callbacks) + this.stopListening(e, t); + delete n[o] + } else { + for (o in n) + this.stopListening(n[o].emitter); + delete this[l] + } + }, + fire(e, ...t) { + try { + const i = e instanceof o ? e : new o(this, e), + n = i.name; + let r = function e(t, i) { + let n; + if (!t._events || !(n = t._events[i]) || !n.callbacks.length) + return i.indexOf(":") > -1 ? e(t, i.substr(0, i.lastIndexOf(":"))) : null; + return n.callbacks + } + (this, n); + if (i.path.push(this), r) { + const e = [i, ...t]; + r = Array.from(r); + for (let t = 0; t < r.length && (r[t].callback.apply(this, e), i.off.called && (delete i.off.called, this._removeEventListener(n, r[t].callback)), !i.stop.called); t++); + } + if (this._delegations) { + const e = this._delegations.get(n), + o = this._delegations.get("*"); + e && p(e, i, t), + o && p(o, i, t) + } + return i.return + } catch (e) { + c.a.rethrowUnexpectedError(e, this) + } + }, + delegate(...e) { + return { + to: (t, i) => { + this._delegations || (this._delegations = new Map), + e.forEach(e => { + const n = this._delegations.get(e); + n ? n.set(t, i) : this._delegations.set(e, new Map([[t, i]])) + }) + } + } + }, + stopDelegating(e, t) { + if (this._delegations) + if (e) + if (t) { + const i = this._delegations.get(e); + i && i.delete(t) + } else + this._delegations.delete(e); + else + this._delegations.clear() + }, + _addEventListener(e, t, i) { + !function (e, t) { + const i = g(e); + if (i[t]) + return; + let n = t, + o = null; + const r = []; + for (; "" !== n && !i[n]; ) + i[n] = { + callbacks: [], + childEvents: [] + }, + r.push(i[n]), + o && i[n].childEvents.push(o), + o = n, + n = n.substr(0, n.lastIndexOf(":")); + if ("" !== n) { + for (const e of r) + e.callbacks = i[n].callbacks.slice(); + i[n].childEvents.push(o) + } + } + (this, e); + const n = m(this, e), + o = a.get(i.priority), + r = { + callback: t, + priority: o + }; + for (const e of n) { + let t = !1; + for (let i = 0; i < e.length; i++) + if (e[i].priority < o) { + e.splice(i, 0, r), + t = !0; + break + } + t || e.push(r) + } + }, + _removeEventListener(e, t) { + const i = m(this, e); + for (const e of i) + for (let i = 0; i < e.length; i++) + e[i].callback == t && (e.splice(i, 1), i--) + } + }; + function h(e, t) { + e[d] || (e[d] = t || s()) + } + function f(e) { + return e[d] + } + function g(e) { + return e._events || Object.defineProperty(e, "_events", { + value: {} + }), + e._events + } + function m(e, t) { + const i = g(e)[t]; + if (!i) + return []; + let n = [i.callbacks]; + for (let t = 0; t < i.childEvents.length; t++) { + const o = m(e, i.childEvents[t]); + n = n.concat(o) + } + return n + } + function p(e, t, i) { + for (let[n, r]of e) { + r ? "function" == typeof r && (r = r(t.name)) : r = t.name; + const e = new o(t.source, r); + e.path = [...t.path], + n.fire(e, ...i) + } + } + function b(e, t, i, n) { + t._removeEventListener ? t._removeEventListener(i, n) : e._removeEventListener.call(t, i, n) + } + var w = function (e) { + var t = typeof e; + return null != e && ("object" == t || "function" == t) + }, + k = i(3), + _ = k.a.Symbol, + v = Object.prototype, + y = v.hasOwnProperty, + x = v.toString, + A = _ ? _.toStringTag : void 0; + var C = function (e) { + var t = y.call(e, A), + i = e[A]; + try { + e[A] = void 0; + var n = !0 + } catch (e) {} + var o = x.call(e); + return n && (t ? e[A] = i : delete e[A]), + o + }, + T = Object.prototype.toString; + var E = function (e) { + return T.call(e) + }, + P = _ ? _.toStringTag : void 0; + var S = function (e) { + return null == e ? void 0 === e ? "[object Undefined]" : "[object Null]" : P && P in Object(e) ? C(e) : E(e) + }; + var M, + I = function (e) { + if (!w(e)) + return !1; + var t = S(e); + return "[object Function]" == t || "[object GeneratorFunction]" == t || "[object AsyncFunction]" == t || "[object Proxy]" == t + }, + N = k.a["__core-js_shared__"], + R = (M = /[^.]+$/.exec(N && N.keys && N.keys.IE_PROTO || "")) ? "Symbol(src)_1." + M : ""; + var O = function (e) { + return !!R && R in e + }, + D = Function.prototype.toString; + var L = function (e) { + if (null != e) { + try { + return D.call(e) + } catch (e) {} + try { + return e + "" + } catch (e) {} + } + return "" + }, + z = /^\[object .+?Constructor\]$/, + V = Function.prototype, + j = Object.prototype, + B = V.toString, + F = j.hasOwnProperty, + H = RegExp("^" + B.call(F).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); + var U = function (e) { + return !(!w(e) || O(e)) && (I(e) ? H : z).test(L(e)) + }; + var W = function (e, t) { + return null == e ? void 0 : e[t] + }; + var q = function (e, t) { + var i = W(e, t); + return U(i) ? i : void 0 + }, + $ = function () { + try { + var e = q(Object, "defineProperty"); + return e({}, "", {}), + e + } catch (e) {} + } + (); + var Y = function (e, t, i) { + "__proto__" == t && $ ? $(e, t, { + configurable: !0, + enumerable: !0, + value: i, + writable: !0 + }) : e[t] = i + }; + var G = function (e, t) { + return e === t || e != e && t != t + }, + K = Object.prototype.hasOwnProperty; + var Q = function (e, t, i) { + var n = e[t]; + K.call(e, t) && G(n, i) && (void 0 !== i || t in e) || Y(e, t, i) + }; + var J = function (e, t, i, n) { + var o = !i; + i || (i = {}); + for (var r = -1, s = t.length; ++r < s; ) { + var a = t[r], + c = n ? n(i[a], e[a], a, i, e) : void 0; + void 0 === c && (c = e[a]), + o ? Y(i, a, c) : Q(i, a, c) + } + return i + }; + var Z = function (e) { + return e + }; + var X = function (e, t, i) { + switch (i.length) { + case 0: + return e.call(t); + case 1: + return e.call(t, i[0]); + case 2: + return e.call(t, i[0], i[1]); + case 3: + return e.call(t, i[0], i[1], i[2]) + } + return e.apply(t, i) + }, + ee = Math.max; + var te = function (e, t, i) { + return t = ee(void 0 === t ? e.length - 1 : t, 0), + function () { + for (var n = arguments, o = -1, r = ee(n.length - t, 0), s = Array(r); ++o < r; ) + s[o] = n[t + o]; + o = -1; + for (var a = Array(t + 1); ++o < t; ) + a[o] = n[o]; + return a[t] = i(s), + X(e, this, a) + } + }; + var ie = function (e) { + return function () { + return e + } + }, + ne = $ ? function (e, t) { + return $(e, "toString", { + configurable: !0, + enumerable: !1, + value: ie(t), + writable: !0 + }) + } + : Z, + oe = Date.now; + var re = function (e) { + var t = 0, + i = 0; + return function () { + var n = oe(), + o = 16 - (n - i); + if (i = n, o > 0) { + if (++t >= 800) + return arguments[0] + } else + t = 0; + return e.apply(void 0, arguments) + } + } + (ne); + var se = function (e, t) { + return re(te(e, t, Z), e + "") + }; + var ae = function (e) { + return "number" == typeof e && e > -1 && e % 1 == 0 && e <= 9007199254740991 + }; + var ce = function (e) { + return null != e && ae(e.length) && !I(e) + }, + le = /^(?:0|[1-9]\d*)$/; + var de = function (e, t) { + var i = typeof e; + return !!(t = null == t ? 9007199254740991 : t) && ("number" == i || "symbol" != i && le.test(e)) && e > -1 && e % 1 == 0 && e < t + }; + var ue = function (e, t, i) { + if (!w(i)) + return !1; + var n = typeof t; + return !!("number" == n ? ce(i) && de(t, i.length) : "string" == n && t in i) && G(i[t], e) + }; + var he = function (e) { + return se((function (t, i) { + var n = -1, + o = i.length, + r = o > 1 ? i[o - 1] : void 0, + s = o > 2 ? i[2] : void 0; + for (r = e.length > 3 && "function" == typeof r ? (o--, r) : void 0, s && ue(i[0], i[1], s) && (r = o < 3 ? void 0 : r, o = 1), t = Object(t); ++n < o; ) { + var a = i[n]; + a && e(t, a, n, r) + } + return t + })) + }; + var fe = function (e, t) { + for (var i = -1, n = Array(e); ++i < e; ) + n[i] = t(i); + return n + }; + var ge = function (e) { + return null != e && "object" == typeof e + }; + var me = function (e) { + return ge(e) && "[object Arguments]" == S(e) + }, + pe = Object.prototype, + be = pe.hasOwnProperty, + we = pe.propertyIsEnumerable, + ke = me(function () { + return arguments + } + ()) ? me : function (e) { + return ge(e) && be.call(e, "callee") && !we.call(e, "callee") + }, + _e = Array.isArray, + ve = i(4), + ye = {}; + ye["[object Float32Array]"] = ye["[object Float64Array]"] = ye["[object Int8Array]"] = ye["[object Int16Array]"] = ye["[object Int32Array]"] = ye["[object Uint8Array]"] = ye["[object Uint8ClampedArray]"] = ye["[object Uint16Array]"] = ye["[object Uint32Array]"] = !0, + ye["[object Arguments]"] = ye["[object Array]"] = ye["[object ArrayBuffer]"] = ye["[object Boolean]"] = ye["[object DataView]"] = ye["[object Date]"] = ye["[object Error]"] = ye["[object Function]"] = ye["[object Map]"] = ye["[object Number]"] = ye["[object Object]"] = ye["[object RegExp]"] = ye["[object Set]"] = ye["[object String]"] = ye["[object WeakMap]"] = !1; + var xe = function (e) { + return ge(e) && ae(e.length) && !!ye[S(e)] + }; + var Ae = function (e) { + return function (t) { + return e(t) + } + }, + Ce = i(5), + Te = Ce.a && Ce.a.isTypedArray, + Ee = Te ? Ae(Te) : xe, + Pe = Object.prototype.hasOwnProperty; + var Se = function (e, t) { + var i = _e(e), + n = !i && ke(e), + o = !i && !n && Object(ve.a)(e), + r = !i && !n && !o && Ee(e), + s = i || n || o || r, + a = s ? fe(e.length, String) : [], + c = a.length; + for (var l in e) + !t && !Pe.call(e, l) || s && ("length" == l || o && ("offset" == l || "parent" == l) || r && ("buffer" == l || "byteLength" == l || "byteOffset" == l) || de(l, c)) || a.push(l); + return a + }, + Me = Object.prototype; + var Ie = function (e) { + var t = e && e.constructor; + return e === ("function" == typeof t && t.prototype || Me) + }; + var Ne = function (e) { + var t = []; + if (null != e) + for (var i in Object(e)) + t.push(i); + return t + }, + Re = Object.prototype.hasOwnProperty; + var Oe = function (e) { + if (!w(e)) + return Ne(e); + var t = Ie(e), + i = []; + for (var n in e) + ("constructor" != n || !t && Re.call(e, n)) && i.push(n); + return i + }; + var De = function (e) { + return ce(e) ? Se(e, !0) : Oe(e) + }, + Le = he((function (e, t) { + J(t, De(t), e) + })); + const ze = Symbol("observableProperties"), + Ve = Symbol("boundObservables"), + je = Symbol("boundProperties"), + Be = Symbol("decoratedMethods"), + Fe = Symbol("decoratedOriginal"), + He = { + set(e, t) { + if (w(e)) + return void Object.keys(e).forEach(t => { + this.set(t, e[t]) + }, this); + We(this); + const i = this[ze]; + if (e in this && !i.has(e)) + throw new c.a("observable-set-cannot-override", this); + Object.defineProperty(this, e, { + enumerable: !0, + configurable: !0, + get: () => i.get(e), + set(t) { + const n = i.get(e); + let o = this.fire("set:" + e, e, t, n); + void 0 === o && (o = t), + n === o && i.has(e) || (i.set(e, o), this.fire("change:" + e, e, o, n)) + } + }), + this[e] = t + }, + bind(...e) { + if (!e.length || !Ye(e)) + throw new c.a("observable-bind-wrong-properties", this); + if (new Set(e).size !== e.length) + throw new c.a("observable-bind-duplicate-properties", this); + We(this); + const t = this[je]; + e.forEach(e => { + if (t.has(e)) + throw new c.a("observable-bind-rebind", this) + }); + const i = new Map; + return e.forEach(e => { + const n = { + property: e, + to: [] + }; + t.set(e, n), + i.set(e, n) + }), { + to: qe, + toMany: $e, + _observable: this, + _bindProperties: e, + _to: [], + _bindings: i + } + }, + unbind(...e) { + if (!this[ze]) + return; + const t = this[je], + i = this[Ve]; + if (e.length) { + if (!Ye(e)) + throw new c.a("observable-unbind-wrong-properties", this); + e.forEach(e => { + const n = t.get(e); + if (!n) + return; + let o, + r, + s, + a; + n.to.forEach(e => { + o = e[0], + r = e[1], + s = i.get(o), + a = s[r], + a.delete(n), + a.size || delete s[r], + Object.keys(s).length || (i.delete(o), this.stopListening(o, "change")) + }), + t.delete(e) + }) + } else + i.forEach((e, t) => { + this.stopListening(t, "change") + }), i.clear(), t.clear() + }, + decorate(e) { + const t = this[e]; + if (!t) + throw new c.a("observablemixin-cannot-decorate-undefined", this, { + object: this, + methodName: e + }); + this.on(e, (e, i) => { + e.return = t.apply(this, i) + }), + this[e] = function (...t) { + return this.fire(e, t) + }, + this[e][Fe] = t, + this[Be] || (this[Be] = []), + this[Be].push(e) + } + }; + Le(He, u), + He.stopListening = function (e, t, i) { + if (!e && this[Be]) { + for (const e of this[Be]) + this[e] = this[e][Fe]; + delete this[Be] + } + u.stopListening.call(this, e, t, i) + }; + var Ue = He; + function We(e) { + e[ze] || (Object.defineProperty(e, ze, { + value: new Map + }), Object.defineProperty(e, Ve, { + value: new Map + }), Object.defineProperty(e, je, { + value: new Map + })) + } + function qe(...e) { + const t = function (...e) { + if (!e.length) + throw new c.a("observable-bind-to-parse-error", null); + const t = { + to: [] + }; + let i; + "function" == typeof e[e.length - 1] && (t.callback = e.pop()); + return e.forEach(e => { + if ("string" == typeof e) + i.properties.push(e); + else { + if ("object" != typeof e) + throw new c.a("observable-bind-to-parse-error", null); + i = { + observable: e, + properties: [] + }, + t.to.push(i) + } + }), + t + } + (...e), + i = Array.from(this._bindings.keys()), + n = i.length; + if (!t.callback && t.to.length > 1) + throw new c.a("observable-bind-to-no-callback", this); + if (n > 1 && t.callback) + throw new c.a("observable-bind-to-extra-callback", this); + var o; + t.to.forEach(e => { + if (e.properties.length && e.properties.length !== n) + throw new c.a("observable-bind-to-properties-length", this); + e.properties.length || (e.properties = this._bindProperties) + }), + this._to = t.to, + t.callback && (this._bindings.get(i[0]).callback = t.callback), + o = this._observable, + this._to.forEach(e => { + const t = o[Ve]; + let i; + t.get(e.observable) || o.listenTo(e.observable, "change", (n, r) => { + i = t.get(e.observable)[r], + i && i.forEach(e => { + Ge(o, e.property) + }) + }) + }), + function (e) { + let t; + e._bindings.forEach((i, n) => { + e._to.forEach(o => { + t = o.properties[i.callback ? 0 : e._bindProperties.indexOf(n)], + i.to.push([o.observable, t]), + function (e, t, i, n) { + const o = e[Ve], + r = o.get(i), + s = r || {}; + s[n] || (s[n] = new Set); + s[n].add(t), + r || o.set(i, s) + } + (e._observable, i, o.observable, t) + }) + }) + } + (this), + this._bindProperties.forEach(e => { + Ge(this._observable, e) + }) + } + function $e(e, t, i) { + if (this._bindings.size > 1) + throw new c.a("observable-bind-to-many-not-one-binding", this); + this.to(...function(e, t) { + const i = e.map(e => [e, t]); + return Array.prototype.concat.apply([], i) + } + (e, t), i) + } + function Ye(e) { + return e.every(e => "string" == typeof e) + } + function Ge(e, t) { + const i = e[je].get(t); + let n; + i.callback ? n = i.callback.apply(e, i.to.map(e => e[0][e[1]])) : (n = i.to[0], n = n[0][n[1]]), + Object.prototype.hasOwnProperty.call(e, t) ? e[t] = n : e.set(t, n) + } + function Ke(e, ...t) { + t.forEach(t => { + Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach(i => { + if (i in e.prototype) + return; + const n = Object.getOwnPropertyDescriptor(t, i); + n.enumerable = !1, + Object.defineProperty(e.prototype, i, n) + }) + }) + } + class Qe { + constructor(e) { + this.editor = e, + this.set("isEnabled", !0), + this._disableStack = new Set + } + forceDisabled(e) { + this._disableStack.add(e), + 1 == this._disableStack.size && (this.on("set:isEnabled", Je, { + priority: "highest" + }), this.isEnabled = !1) + } + clearForceDisabled(e) { + this._disableStack.delete(e), + 0 == this._disableStack.size && (this.off("set:isEnabled", Je), this.isEnabled = !0) + } + destroy() { + this.stopListening() + } + static get isContextPlugin() { + return !1 + } + } + function Je(e) { + e.return = !1, + e.stop() + } + Ke(Qe, Ue); + class Ze { + constructor(e) { + this.editor = e, + this.set("value", void 0), + this.set("isEnabled", !1), + this._disableStack = new Set, + this.decorate("execute"), + this.listenTo(this.editor.model.document, "change", () => { + this.refresh() + }), + this.on("execute", e => { + this.isEnabled || e.stop() + }, { + priority: "high" + }), + this.listenTo(e, "change:isReadOnly", (e, t, i) => { + i ? this.forceDisabled("readOnlyMode") : this.clearForceDisabled("readOnlyMode") + }) + } + refresh() { + this.isEnabled = !0 + } + forceDisabled(e) { + this._disableStack.add(e), + 1 == this._disableStack.size && (this.on("set:isEnabled", Xe, { + priority: "highest" + }), this.isEnabled = !1) + } + clearForceDisabled(e) { + this._disableStack.delete(e), + 0 == this._disableStack.size && (this.off("set:isEnabled", Xe), this.refresh()) + } + execute() {} + destroy() { + this.stopListening() + } + } + function Xe(e) { + e.return = !1, + e.stop() + } + Ke(Ze, Ue); + class et extends Ze { + constructor(e) { + super(e), + this._childCommands = [] + } + refresh() {} + execute(...e) { + const t = this._getFirstEnabledCommand(); + return null != t && t.execute(e) + } + registerChildCommand(e) { + this._childCommands.push(e), + e.on("change:isEnabled", () => this._checkEnabled()), + this._checkEnabled() + } + _checkEnabled() { + this.isEnabled = !!this._getFirstEnabledCommand() + } + _getFirstEnabledCommand() { + return this._childCommands.find(e => e.isEnabled) + } + } + var tt = function (e, t) { + return function (i) { + return e(t(i)) + } + }, + it = tt(Object.getPrototypeOf, Object), + nt = Function.prototype, + ot = Object.prototype, + rt = nt.toString, + st = ot.hasOwnProperty, + at = rt.call(Object); + var ct = function (e) { + if (!ge(e) || "[object Object]" != S(e)) + return !1; + var t = it(e); + if (null === t) + return !0; + var i = st.call(t, "constructor") && t.constructor; + return "function" == typeof i && i instanceof i && rt.call(i) == at + }; + var lt = function () { + this.__data__ = [], + this.size = 0 + }; + var dt = function (e, t) { + for (var i = e.length; i--; ) + if (G(e[i][0], t)) + return i; + return -1 + }, + ut = Array.prototype.splice; + var ht = function (e) { + var t = this.__data__, + i = dt(t, e); + return !(i < 0) && (i == t.length - 1 ? t.pop() : ut.call(t, i, 1), --this.size, !0) + }; + var ft = function (e) { + var t = this.__data__, + i = dt(t, e); + return i < 0 ? void 0 : t[i][1] + }; + var gt = function (e) { + return dt(this.__data__, e) > -1 + }; + var mt = function (e, t) { + var i = this.__data__, + n = dt(i, e); + return n < 0 ? (++this.size, i.push([e, t])) : i[n][1] = t, + this + }; + function pt(e) { + var t = -1, + i = null == e ? 0 : e.length; + for (this.clear(); ++t < i; ) { + var n = e[t]; + this.set(n[0], n[1]) + } + } + pt.prototype.clear = lt, + pt.prototype.delete = ht, + pt.prototype.get = ft, + pt.prototype.has = gt, + pt.prototype.set = mt; + var bt = pt; + var wt = function () { + this.__data__ = new bt, + this.size = 0 + }; + var kt = function (e) { + var t = this.__data__, + i = t.delete(e); + return this.size = t.size, + i + }; + var _t = function (e) { + return this.__data__.get(e) + }; + var vt = function (e) { + return this.__data__.has(e) + }, + yt = q(k.a, "Map"), + xt = q(Object, "create"); + var At = function () { + this.__data__ = xt ? xt(null) : {}, + this.size = 0 + }; + var Ct = function (e) { + var t = this.has(e) && delete this.__data__[e]; + return this.size -= t ? 1 : 0, + t + }, + Tt = Object.prototype.hasOwnProperty; + var Et = function (e) { + var t = this.__data__; + if (xt) { + var i = t[e]; + return "__lodash_hash_undefined__" === i ? void 0 : i + } + return Tt.call(t, e) ? t[e] : void 0 + }, + Pt = Object.prototype.hasOwnProperty; + var St = function (e) { + var t = this.__data__; + return xt ? void 0 !== t[e] : Pt.call(t, e) + }; + var Mt = function (e, t) { + var i = this.__data__; + return this.size += this.has(e) ? 0 : 1, + i[e] = xt && void 0 === t ? "__lodash_hash_undefined__" : t, + this + }; + function It(e) { + var t = -1, + i = null == e ? 0 : e.length; + for (this.clear(); ++t < i; ) { + var n = e[t]; + this.set(n[0], n[1]) + } + } + It.prototype.clear = At, + It.prototype.delete = Ct, + It.prototype.get = Et, + It.prototype.has = St, + It.prototype.set = Mt; + var Nt = It; + var Rt = function () { + this.size = 0, + this.__data__ = { + hash: new Nt, + map: new(yt || bt), + string: new Nt + } + }; + var Ot = function (e) { + var t = typeof e; + return "string" == t || "number" == t || "symbol" == t || "boolean" == t ? "__proto__" !== e : null === e + }; + var Dt = function (e, t) { + var i = e.__data__; + return Ot(t) ? i["string" == typeof t ? "string" : "hash"] : i.map + }; + var Lt = function (e) { + var t = Dt(this, e).delete(e); + return this.size -= t ? 1 : 0, + t + }; + var zt = function (e) { + return Dt(this, e).get(e) + }; + var Vt = function (e) { + return Dt(this, e).has(e) + }; + var jt = function (e, t) { + var i = Dt(this, e), + n = i.size; + return i.set(e, t), + this.size += i.size == n ? 0 : 1, + this + }; + function Bt(e) { + var t = -1, + i = null == e ? 0 : e.length; + for (this.clear(); ++t < i; ) { + var n = e[t]; + this.set(n[0], n[1]) + } + } + Bt.prototype.clear = Rt, + Bt.prototype.delete = Lt, + Bt.prototype.get = zt, + Bt.prototype.has = Vt, + Bt.prototype.set = jt; + var Ft = Bt; + var Ht = function (e, t) { + var i = this.__data__; + if (i instanceof bt) { + var n = i.__data__; + if (!yt || n.length < 199) + return n.push([e, t]), this.size = ++i.size, this; + i = this.__data__ = new Ft(n) + } + return i.set(e, t), + this.size = i.size, + this + }; + function Ut(e) { + var t = this.__data__ = new bt(e); + this.size = t.size + } + Ut.prototype.clear = wt, + Ut.prototype.delete = kt, + Ut.prototype.get = _t, + Ut.prototype.has = vt, + Ut.prototype.set = Ht; + var Wt = Ut; + var qt = function (e, t) { + for (var i = -1, n = null == e ? 0 : e.length; ++i < n && !1 !== t(e[i], i, e); ); + return e + }, + $t = tt(Object.keys, Object), + Yt = Object.prototype.hasOwnProperty; + var Gt = function (e) { + if (!Ie(e)) + return $t(e); + var t = []; + for (var i in Object(e)) + Yt.call(e, i) && "constructor" != i && t.push(i); + return t + }; + var Kt = function (e) { + return ce(e) ? Se(e) : Gt(e) + }; + var Qt = function (e, t) { + return e && J(t, Kt(t), e) + }; + var Jt = function (e, t) { + return e && J(t, De(t), e) + }, + Zt = i(9); + var Xt = function (e, t) { + var i = -1, + n = e.length; + for (t || (t = Array(n)); ++i < n; ) + t[i] = e[i]; + return t + }; + var ei = function (e, t) { + for (var i = -1, n = null == e ? 0 : e.length, o = 0, r = []; ++i < n; ) { + var s = e[i]; + t(s, i, e) && (r[o++] = s) + } + return r + }; + var ti = function () { + return [] + }, + ii = Object.prototype.propertyIsEnumerable, + ni = Object.getOwnPropertySymbols, + oi = ni ? function (e) { + return null == e ? [] : (e = Object(e), ei(ni(e), (function (t) { + return ii.call(e, t) + }))) + } + : ti; + var ri = function (e, t) { + return J(e, oi(e), t) + }; + var si = function (e, t) { + for (var i = -1, n = t.length, o = e.length; ++i < n; ) + e[o + i] = t[i]; + return e + }, + ai = Object.getOwnPropertySymbols ? function (e) { + for (var t = []; e; ) + si(t, oi(e)), e = it(e); + return t + } + : ti; + var ci = function (e, t) { + return J(e, ai(e), t) + }; + var li = function (e, t, i) { + var n = t(e); + return _e(e) ? n : si(n, i(e)) + }; + var di = function (e) { + return li(e, Kt, oi) + }; + var ui = function (e) { + return li(e, De, ai) + }, + hi = q(k.a, "DataView"), + fi = q(k.a, "Promise"), + gi = q(k.a, "Set"), + mi = q(k.a, "WeakMap"), + pi = L(hi), + bi = L(yt), + wi = L(fi), + ki = L(gi), + _i = L(mi), + vi = S; + (hi && "[object DataView]" != vi(new hi(new ArrayBuffer(1))) || yt && "[object Map]" != vi(new yt) || fi && "[object Promise]" != vi(fi.resolve()) || gi && "[object Set]" != vi(new gi) || mi && "[object WeakMap]" != vi(new mi)) && (vi = function (e) { + var t = S(e), + i = "[object Object]" == t ? e.constructor : void 0, + n = i ? L(i) : ""; + if (n) + switch (n) { + case pi: + return "[object DataView]"; + case bi: + return "[object Map]"; + case wi: + return "[object Promise]"; + case ki: + return "[object Set]"; + case _i: + return "[object WeakMap]" + } + return t + }); + var yi = vi, + xi = Object.prototype.hasOwnProperty; + var Ai = function (e) { + var t = e.length, + i = new e.constructor(t); + return t && "string" == typeof e[0] && xi.call(e, "index") && (i.index = e.index, i.input = e.input), + i + }, + Ci = k.a.Uint8Array; + var Ti = function (e) { + var t = new e.constructor(e.byteLength); + return new Ci(t).set(new Ci(e)), + t + }; + var Ei = function (e, t) { + var i = t ? Ti(e.buffer) : e.buffer; + return new e.constructor(i, e.byteOffset, e.byteLength) + }, + Pi = /\w*$/; + var Si = function (e) { + var t = new e.constructor(e.source, Pi.exec(e)); + return t.lastIndex = e.lastIndex, + t + }, + Mi = _ ? _.prototype : void 0, + Ii = Mi ? Mi.valueOf : void 0; + var Ni = function (e) { + return Ii ? Object(Ii.call(e)) : {} + }; + var Ri = function (e, t) { + var i = t ? Ti(e.buffer) : e.buffer; + return new e.constructor(i, e.byteOffset, e.length) + }; + var Oi = function (e, t, i) { + var n = e.constructor; + switch (t) { + case "[object ArrayBuffer]": + return Ti(e); + case "[object Boolean]": + case "[object Date]": + return new n(+e); + case "[object DataView]": + return Ei(e, i); + case "[object Float32Array]": + case "[object Float64Array]": + case "[object Int8Array]": + case "[object Int16Array]": + case "[object Int32Array]": + case "[object Uint8Array]": + case "[object Uint8ClampedArray]": + case "[object Uint16Array]": + case "[object Uint32Array]": + return Ri(e, i); + case "[object Map]": + return new n; + case "[object Number]": + case "[object String]": + return new n(e); + case "[object RegExp]": + return Si(e); + case "[object Set]": + return new n; + case "[object Symbol]": + return Ni(e) + } + }, + Di = Object.create, + Li = function () { + function e() {} + return function (t) { + if (!w(t)) + return {}; + if (Di) + return Di(t); + e.prototype = t; + var i = new e; + return e.prototype = void 0, + i + } + } + (); + var zi = function (e) { + return "function" != typeof e.constructor || Ie(e) ? {} + : Li(it(e)) + }; + var Vi = function (e) { + return ge(e) && "[object Map]" == yi(e) + }, + ji = Ce.a && Ce.a.isMap, + Bi = ji ? Ae(ji) : Vi; + var Fi = function (e) { + return ge(e) && "[object Set]" == yi(e) + }, + Hi = Ce.a && Ce.a.isSet, + Ui = Hi ? Ae(Hi) : Fi, + Wi = {}; + Wi["[object Arguments]"] = Wi["[object Array]"] = Wi["[object ArrayBuffer]"] = Wi["[object DataView]"] = Wi["[object Boolean]"] = Wi["[object Date]"] = Wi["[object Float32Array]"] = Wi["[object Float64Array]"] = Wi["[object Int8Array]"] = Wi["[object Int16Array]"] = Wi["[object Int32Array]"] = Wi["[object Map]"] = Wi["[object Number]"] = Wi["[object Object]"] = Wi["[object RegExp]"] = Wi["[object Set]"] = Wi["[object String]"] = Wi["[object Symbol]"] = Wi["[object Uint8Array]"] = Wi["[object Uint8ClampedArray]"] = Wi["[object Uint16Array]"] = Wi["[object Uint32Array]"] = !0, + Wi["[object Error]"] = Wi["[object Function]"] = Wi["[object WeakMap]"] = !1; + var qi = function e(t, i, n, o, r, s) { + var a, + c = 1 & i, + l = 2 & i, + d = 4 & i; + if (n && (a = r ? n(t, o, r, s) : n(t)), void 0 !== a) + return a; + if (!w(t)) + return t; + var u = _e(t); + if (u) { + if (a = Ai(t), !c) + return Xt(t, a) + } else { + var h = yi(t), + f = "[object Function]" == h || "[object GeneratorFunction]" == h; + if (Object(ve.a)(t)) + return Object(Zt.a)(t, c); + if ("[object Object]" == h || "[object Arguments]" == h || f && !r) { + if (a = l || f ? {} + : zi(t), !c) + return l ? ci(t, Jt(a, t)) : ri(t, Qt(a, t)) + } else { + if (!Wi[h]) + return r ? t : {}; + a = Oi(t, h, c) + } + } + s || (s = new Wt); + var g = s.get(t); + if (g) + return g; + s.set(t, a), + Ui(t) ? t.forEach((function (o) { + a.add(e(o, i, n, o, t, s)) + })) : Bi(t) && t.forEach((function (o, r) { + a.set(r, e(o, i, n, r, t, s)) + })); + var m = u ? void 0 : (d ? l ? ui : di : l ? De : Kt)(t); + return qt(m || t, (function (o, r) { + m && (o = t[r = o]), + Q(a, r, e(o, i, n, r, t, s)) + })), + a + }; + var $i = function (e, t) { + return qi(e, 5, t = "function" == typeof t ? t : void 0) + }; + var Yi = function (e) { + return ge(e) && 1 === e.nodeType && !ct(e) + }; + class Gi { + constructor(e, t) { + this._config = {}, + t && this.define(Ki(t)), + e && this._setObjectToTarget(this._config, e) + } + set(e, t) { + this._setToTarget(this._config, e, t) + } + define(e, t) { + this._setToTarget(this._config, e, t, !0) + } + get(e) { + return this._getFromSource(this._config, e) + } + * names() { + for (const e of Object.keys(this._config)) + yield e + } + _setToTarget(e, t, i, n = !1) { + if (ct(t)) + return void this._setObjectToTarget(e, t, n); + const o = t.split("."); + t = o.pop(); + for (const t of o) + ct(e[t]) || (e[t] = {}), e = e[t]; + if (ct(i)) + return ct(e[t]) || (e[t] = {}), e = e[t], void this._setObjectToTarget(e, i, n); + n && void 0 !== e[t] || (e[t] = i) + } + _getFromSource(e, t) { + const i = t.split("."); + t = i.pop(); + for (const t of i) { + if (!ct(e[t])) { + e = null; + break + } + e = e[t] + } + return e ? Ki(e[t]) : void 0 + } + _setObjectToTarget(e, t, i) { + Object.keys(t).forEach(n => { + this._setToTarget(e, n, t[n], i) + }) + } + } + function Ki(e) { + return $i(e, Qi) + } + function Qi(e) { + return Yi(e) ? e : void 0 + } + function Ji(e) { + return !(!e || !e[Symbol.iterator]) + } + class Zi { + constructor(e = {}, t = {}) { + const i = Ji(e); + if (i || (t = e), this._items = [], this._itemMap = new Map, this._idProperty = t.idProperty || "id", this._bindToExternalToInternalMap = new WeakMap, this._bindToInternalToExternalMap = new WeakMap, this._skippedIndexesFromExternal = [], i) + for (const t of e) + this._items.push(t), this._itemMap.set(this._getItemIdBeforeAdding(t), t) + } + get length() { + return this._items.length + } + get first() { + return this._items[0] || null + } + get last() { + return this._items[this.length - 1] || null + } + add(e, t) { + return this.addMany([e], t) + } + addMany(e, t) { + if (void 0 === t) + t = this._items.length; + else if (t > this._items.length || t < 0) + throw new c.a("collection-add-item-invalid-index", this); + for (let i = 0; i < e.length; i++) { + const n = e[i], + o = this._getItemIdBeforeAdding(n), + r = t + i; + this._items.splice(r, 0, n), + this._itemMap.set(o, n), + this.fire("add", n, r) + } + return this.fire("change", { + added: e, + removed: [], + index: t + }), + this + } + get(e) { + let t; + if ("string" == typeof e) + t = this._itemMap.get(e); + else { + if ("number" != typeof e) + throw new c.a("collection-get-invalid-arg", this); + t = this._items[e] + } + return t || null + } + has(e) { + if ("string" == typeof e) + return this._itemMap.has(e); { + const t = e[this._idProperty]; + return this._itemMap.has(t) + } + } + getIndex(e) { + let t; + return t = "string" == typeof e ? this._itemMap.get(e) : e, + this._items.indexOf(t) + } + remove(e) { + const[t, i] = this._remove(e); + return this.fire("change", { + added: [], + removed: [t], + index: i + }), + t + } + map(e, t) { + return this._items.map(e, t) + } + find(e, t) { + return this._items.find(e, t) + } + filter(e, t) { + return this._items.filter(e, t) + } + clear() { + this._bindToCollection && (this.stopListening(this._bindToCollection), this._bindToCollection = null); + const e = Array.from(this._items); + for (; this.length; ) + this._remove(0); + this.fire("change", { + added: [], + removed: e, + index: 0 + }) + } + bindTo(e) { + if (this._bindToCollection) + throw new c.a("collection-bind-to-rebind", this); + return this._bindToCollection = e, { + as: e => { + this._setUpBindToBinding(t => new e(t)) + }, + using: e => { + "function" == typeof e ? this._setUpBindToBinding(t => e(t)) : this._setUpBindToBinding(t => t[e]) + } + } + } + _setUpBindToBinding(e) { + const t = this._bindToCollection, + i = (i, n, o) => { + const r = t._bindToCollection == this, + s = t._bindToInternalToExternalMap.get(n); + if (r && s) + this._bindToExternalToInternalMap.set(n, s), this._bindToInternalToExternalMap.set(s, n); + else { + const i = e(n); + if (!i) + return void this._skippedIndexesFromExternal.push(o); + let r = o; + for (const e of this._skippedIndexesFromExternal) + o > e && r--; + for (const e of t._skippedIndexesFromExternal) + r >= e && r++; + this._bindToExternalToInternalMap.set(n, i), + this._bindToInternalToExternalMap.set(i, n), + this.add(i, r); + for (let e = 0; e < t._skippedIndexesFromExternal.length; e++) + r <= t._skippedIndexesFromExternal[e] && t._skippedIndexesFromExternal[e]++ + } + }; + for (const e of t) + i(0, e, t.getIndex(e)); + this.listenTo(t, "add", i), + this.listenTo(t, "remove", (e, t, i) => { + const n = this._bindToExternalToInternalMap.get(t); + n && this.remove(n), + this._skippedIndexesFromExternal = this._skippedIndexesFromExternal.reduce((e, t) => (i < t && e.push(t - 1), i > t && e.push(t), e), []) + }) + } + _getItemIdBeforeAdding(e) { + const t = this._idProperty; + let i; + if (t in e) { + if (i = e[t], "string" != typeof i) + throw new c.a("collection-add-invalid-id", this); + if (this.get(i)) + throw new c.a("collection-add-item-already-exists", this) + } else + e[t] = i = s(); + return i + } + _remove(e) { + let t, + i, + n, + o = !1; + const r = this._idProperty; + if ("string" == typeof e ? (i = e, n = this._itemMap.get(i), o = !n, n && (t = this._items.indexOf(n))) : "number" == typeof e ? (t = e, n = this._items[t], o = !n, n && (i = n[r])) : (n = e, i = n[r], t = this._items.indexOf(n), o = -1 == t || !this._itemMap.get(i)), o) + throw new c.a("collection-remove-404", this); + this._items.splice(t, 1), + this._itemMap.delete(i); + const s = this._bindToInternalToExternalMap.get(n); + return this._bindToInternalToExternalMap.delete(n), + this._bindToExternalToInternalMap.delete(s), + this.fire("remove", n, t), + [n, t] + } + [Symbol.iterator]() { + return this._items[Symbol.iterator]() + } + } + Ke(Zi, u); + class Xi { + constructor(e, t = [], i = []) { + this._context = e, + this._plugins = new Map, + this._availablePlugins = new Map; + for (const e of t) + e.pluginName && this._availablePlugins.set(e.pluginName, e); + this._contextPlugins = new Map; + for (const[e, t]of i) + this._contextPlugins.set(e, t), this._contextPlugins.set(t, e), e.pluginName && this._availablePlugins.set(e.pluginName, e) + } + * [Symbol.iterator]() { + for (const e of this._plugins) + "function" == typeof e[0] && (yield e) + } + get(e) { + const t = this._plugins.get(e); + if (!t) { + let t = e; + throw "function" == typeof e && (t = e.pluginName || e.name), + new c.a("plugincollection-plugin-not-loaded", this._context, { + plugin: t + }) + } + return t + } + has(e) { + return this._plugins.has(e) + } + init(e, t = [], i = []) { + const n = this, + o = this._context; + !function e(t, i = new Set) { + t.forEach(t => { + a(t) && (i.has(t) || (i.add(t), t.pluginName && !n._availablePlugins.has(t.pluginName) && n._availablePlugins.set(t.pluginName, t), t.requires && e(t.requires, i))) + }) + } + (e), + h(e); + const r = [...function e(t, i = new Set) { + return t.map(e => a(e) ? e : n._availablePlugins.get(e)).reduce((t, n) => i.has(n) ? t : (i.add(n), n.requires && (h(n.requires, n), e(n.requires, i).forEach(e => t.add(e))), t.add(n)), new Set) + } + (e.filter(e => !d(e, t)))]; + !function (e, t) { + for (const i of t) { + if ("function" != typeof i) + throw new c.a("plugincollection-replace-plugin-invalid-type", null, { + pluginItem: i + }); + const t = i.pluginName; + if (!t) + throw new c.a("plugincollection-replace-plugin-missing-name", null, { + pluginItem: i + }); + if (i.requires && i.requires.length) + throw new c.a("plugincollection-plugin-for-replacing-cannot-have-dependencies", null, { + pluginName: t + }); + const o = n._availablePlugins.get(t); + if (!o) + throw new c.a("plugincollection-plugin-for-replacing-not-exist", null, { + pluginName: t + }); + const r = e.indexOf(o); + if (-1 === r) { + if (n._contextPlugins.has(o)) + return; + throw new c.a("plugincollection-plugin-for-replacing-not-loaded", null, { + pluginName: t + }) + } + if (o.requires && o.requires.length) + throw new c.a("plugincollection-replaced-plugin-cannot-have-dependencies", null, { + pluginName: t + }); + e.splice(r, 1, i), + n._availablePlugins.set(t, i) + } + } + (r, i); + const s = function (e) { + return e.map(e => { + const t = n._contextPlugins.get(e) || new e(o); + return n._add(e, t), + t + }) + } + (r); + return f(s, "init").then(() => f(s, "afterInit")).then(() => s); + function a(e) { + return "function" == typeof e + } + function l(e) { + return a(e) && e.isContextPlugin + } + function d(e, t) { + return t.some(t => t === e || (u(e) === t || u(t) === e)) + } + function u(e) { + return a(e) ? e.pluginName || e.name : e + } + function h(e, i = null) { + e.map(e => a(e) ? e : n._availablePlugins.get(e) || e).forEach(e => { + !function (e, t) { + if (a(e)) + return; + if (t) + throw new c.a("plugincollection-soft-required", o, { + missingPlugin: e, + requiredBy: u(t) + }); + throw new c.a("plugincollection-plugin-not-found", o, { + plugin: e + }) + } + (e, i), + function (e, t) { + if (!l(t)) + return; + if (l(e)) + return; + throw new c.a("plugincollection-context-required", o, { + plugin: u(e), + requiredBy: u(t) + }) + } + (e, i), + function (e, i) { + if (!i) + return; + if (!d(e, t)) + return; + throw new c.a("plugincollection-required", o, { + plugin: u(e), + requiredBy: u(i) + }) + } + (e, i) + }) + } + function f(e, t) { + return e.reduce((e, i) => i[t] ? n._contextPlugins.has(i) ? e : e.then(i[t].bind(i)) : e, Promise.resolve()) + } + } + destroy() { + const e = []; + for (const[, t]of this) + "function" != typeof t.destroy || this._contextPlugins.has(t) || e.push(t.destroy()); + return Promise.all(e) + } + _add(e, t) { + this._plugins.set(e, t); + const i = e.pluginName; + if (i) { + if (this._plugins.has(i)) + throw new c.a("plugincollection-plugin-name-conflict", null, { + pluginName: i, + plugin1: this._plugins.get(i).constructor, + plugin2: e + }); + this._plugins.set(i, t) + } + } + } + function en(e) { + return Array.isArray(e) ? e : [e] + } + function tn(e, t, i = 1) { + if ("number" != typeof i) + throw new c.a("translation-service-quantity-not-a-number", null, { + quantity: i + }); + const n = Object.keys(window.CKEDITOR_TRANSLATIONS).length; + 1 === n && (e = Object.keys(window.CKEDITOR_TRANSLATIONS)[0]); + const o = t.id || t.string; + if (0 === n || !function (e, t) { + return !!window.CKEDITOR_TRANSLATIONS[e] && !!window.CKEDITOR_TRANSLATIONS[e].dictionary[t] + } + (e, o)) + return 1 !== i ? t.plural : t.string; + const r = window.CKEDITOR_TRANSLATIONS[e].dictionary, + s = window.CKEDITOR_TRANSLATIONS[e].getPluralForm || (e => 1 === e ? 0 : 1); + if ("string" == typeof r[o]) + return r[o]; + const a = Number(s(i)); + return r[o][a] + } + Ke(Xi, u), + window.CKEDITOR_TRANSLATIONS || (window.CKEDITOR_TRANSLATIONS = {}); + const nn = ["ar", "ara", "fa", "per", "fas", "he", "heb", "ku", "kur", "ug", "uig"]; + function on(e) { + return nn.includes(e) ? "rtl" : "ltr" + } + class rn { + constructor(e = {}) { + this.uiLanguage = e.uiLanguage || "en", + this.contentLanguage = e.contentLanguage || this.uiLanguage, + this.uiLanguageDirection = on(this.uiLanguage), + this.contentLanguageDirection = on(this.contentLanguage), + this.t = (e, t) => this._t(e, t) + } + get language() { + return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."), + this.uiLanguage + } + _t(e, t = []) { + t = en(t), + "string" == typeof e && (e = { + string: e + }); + const i = !!e.plural ? t[0] : 1; + return function (e, t) { + return e.replace(/%(\d+)/g, (e, i) => i < t.length ? t[i] : e) + } + (tn(this.uiLanguage, e, i), t) + } + } + class sn { + constructor(e) { + this.config = new Gi(e, this.constructor.defaultConfig); + const t = this.constructor.builtinPlugins; + this.config.define("plugins", t), + this.plugins = new Xi(this, t); + const i = this.config.get("language") || {}; + this.locale = new rn({ + uiLanguage: "string" == typeof i ? i : i.ui, + contentLanguage: this.config.get("language.content") + }), + this.t = this.locale.t, + this.editors = new Zi, + this._contextOwner = null + } + initPlugins() { + const e = this.config.get("plugins") || [], + t = this.config.get("substitutePlugins") || []; + for (const i of e.concat(t)) { + if ("function" != typeof i) + throw new c.a("context-initplugins-constructor-only", null, { + Plugin: i + }); + if (!0 !== i.isContextPlugin) + throw new c.a("context-initplugins-invalid-plugin", null, { + Plugin: i + }) + } + return this.plugins.init(e, [], t) + } + destroy() { + return Promise.all(Array.from(this.editors, e => e.destroy())).then(() => this.plugins.destroy()) + } + _addEditor(e, t) { + if (this._contextOwner) + throw new c.a("context-addeditor-private-context"); + this.editors.add(e), + t && (this._contextOwner = e) + } + _removeEditor(e) { + return this.editors.has(e) && this.editors.remove(e), + this._contextOwner === e ? this.destroy() : Promise.resolve() + } + _getEditorConfig() { + const e = {}; + for (const t of this.config.names()) + ["plugins", "removePlugins", "extraPlugins"].includes(t) || (e[t] = this.config.get(t)); + return e + } + static create(e) { + return new Promise(t => { + const i = new this(e); + t(i.initPlugins().then(() => i)) + }) + } + } + class an { + constructor(e) { + this.context = e + } + destroy() { + this.stopListening() + } + static get isContextPlugin() { + return !0 + } + } + function cn(e, t) { + const i = Math.min(e.length, t.length); + for (let n = 0; n < i; n++) + if (e[n] != t[n]) + return n; + return e.length == t.length ? "same" : e.length < t.length ? "prefix" : "extension" + } + Ke(an, Ue); + var ln = function (e) { + return qi(e, 4) + }; + class dn { + constructor(e) { + this.document = e, + this.parent = null + } + get index() { + let e; + if (!this.parent) + return null; + if (-1 == (e = this.parent.getChildIndex(this))) + throw new c.a("view-node-not-found-in-parent", this); + return e + } + get nextSibling() { + const e = this.index; + return null !== e && this.parent.getChild(e + 1) || null + } + get previousSibling() { + const e = this.index; + return null !== e && this.parent.getChild(e - 1) || null + } + get root() { + let e = this; + for (; e.parent; ) + e = e.parent; + return e + } + isAttached() { + return this.root.is("rootElement") + } + getPath() { + const e = []; + let t = this; + for (; t.parent; ) + e.unshift(t.index), t = t.parent; + return e + } + getAncestors(e = { + includeSelf: !1, + parentFirst: !1 + }) { + const t = []; + let i = e.includeSelf ? this : this.parent; + for (; i; ) + t[e.parentFirst ? "push" : "unshift"](i), i = i.parent; + return t + } + getCommonAncestor(e, t = {}) { + const i = this.getAncestors(t), + n = e.getAncestors(t); + let o = 0; + for (; i[o] == n[o] && i[o]; ) + o++; + return 0 === o ? null : i[o - 1] + } + isBefore(e) { + if (this == e) + return !1; + if (this.root !== e.root) + return !1; + const t = this.getPath(), + i = e.getPath(), + n = cn(t, i); + switch (n) { + case "prefix": + return !0; + case "extension": + return !1; + default: + return t[n] < i[n] + } + } + isAfter(e) { + return this != e && (this.root === e.root && !this.isBefore(e)) + } + _remove() { + this.parent._removeChildren(this.index) + } + _fireChange(e, t) { + this.fire("change:" + e, t), + this.parent && this.parent._fireChange(e, t) + } + toJSON() { + const e = ln(this); + return delete e.parent, + e + } + is(e) { + return "node" === e || "view:node" === e + } + } + Ke(dn, u); + class un extends dn { + constructor(e, t) { + super(e), + this._textData = t + } + is(e) { + return "$text" === e || "view:$text" === e || "text" === e || "view:text" === e || "node" === e || "view:node" === e + } + get data() { + return this._textData + } + get _data() { + return this.data + } + set _data(e) { + this._fireChange("text", this), + this._textData = e + } + isSimilar(e) { + return e instanceof un && (this === e || this.data === e.data) + } + _clone() { + return new un(this.document, this.data) + } + } + class hn { + constructor(e, t, i) { + if (this.textNode = e, t < 0 || t > e.data.length) + throw new c.a("view-textproxy-wrong-offsetintext", this); + if (i < 0 || t + i > e.data.length) + throw new c.a("view-textproxy-wrong-length", this); + this.data = e.data.substring(t, t + i), + this.offsetInText = t + } + get offsetSize() { + return this.data.length + } + get isPartial() { + return this.data.length !== this.textNode.data.length + } + get parent() { + return this.textNode.parent + } + get root() { + return this.textNode.root + } + get document() { + return this.textNode.document + } + is(e) { + return "$textProxy" === e || "view:$textProxy" === e || "textProxy" === e || "view:textProxy" === e + } + getAncestors(e = { + includeSelf: !1, + parentFirst: !1 + }) { + const t = []; + let i = e.includeSelf ? this.textNode : this.parent; + for (; null !== i; ) + t[e.parentFirst ? "push" : "unshift"](i), i = i.parent; + return t + } + } + function fn(e) { + return Ji(e) ? new Map(e) : function (e) { + const t = new Map; + for (const i in e) + t.set(i, e[i]); + return t + } + (e) + } + class gn { + constructor(...e) { + this._patterns = [], + this.add(...e) + } + add(...e) { + for (let t of e) + ("string" == typeof t || t instanceof RegExp) && (t = { + name: t + }), t.classes && ("string" == typeof t.classes || t.classes instanceof RegExp) && (t.classes = [t.classes]), this._patterns.push(t) + } + match(...e) { + for (const t of e) + for (const e of this._patterns) { + const i = mn(t, e); + if (i) + return { + element: t, + pattern: e, + match: i + } + } + return null + } + matchAll(...e) { + const t = []; + for (const i of e) + for (const e of this._patterns) { + const n = mn(i, e); + n && t.push({ + element: i, + pattern: e, + match: n + }) + } + return t.length > 0 ? t : null + } + getElementName() { + if (1 !== this._patterns.length) + return null; + const e = this._patterns[0], + t = e.name; + return "function" == typeof e || !t || t instanceof RegExp ? null : t + } + } + function mn(e, t) { + if ("function" == typeof t) + return t(e); + const i = {}; + return t.name && (i.name = function (e, t) { + if (e instanceof RegExp) + return e.test(t); + return e === t + } + (t.name, e.name), !i.name) || t.attributes && (i.attributes = function (e, t) { + const i = []; + for (const n in e) { + const o = e[n]; + if (!t.hasAttribute(n)) + return null; { + const e = t.getAttribute(n); + if (!0 === o) + i.push(n); + else if (o instanceof RegExp) { + if (!o.test(e)) + return null; + i.push(n) + } else { + if (e !== o) + return null; + i.push(n) + } + } + } + return i + } + (t.attributes, e), !i.attributes) ? null : !(t.classes && (i.classes = function (e, t) { + const i = []; + for (const n of e) + if (n instanceof RegExp) { + const e = t.getClassNames(); + for (const t of e) + n.test(t) && i.push(t); + if (0 === i.length) + return null + } else { + if (!t.hasClass(n)) + return null; + i.push(n) + } + return i + } + (t.classes, e), !i.classes)) && (!(t.styles && (i.styles = function (e, t) { + const i = []; + for (const n in e) { + const o = e[n]; + if (!t.hasStyle(n)) + return null; { + const e = t.getStyle(n); + if (o instanceof RegExp) { + if (!o.test(e)) + return null; + i.push(n) + } else { + if (e !== o) + return null; + i.push(n) + } + } + } + return i + } + (t.styles, e), !i.styles)) && i) + } + var pn = function (e) { + return "symbol" == typeof e || ge(e) && "[object Symbol]" == S(e) + }, + bn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + wn = /^\w*$/; + var kn = function (e, t) { + if (_e(e)) + return !1; + var i = typeof e; + return !("number" != i && "symbol" != i && "boolean" != i && null != e && !pn(e)) || (wn.test(e) || !bn.test(e) || null != t && e in Object(t)) + }; + function _n(e, t) { + if ("function" != typeof e || null != t && "function" != typeof t) + throw new TypeError("Expected a function"); + var i = function () { + var n = arguments, + o = t ? t.apply(this, n) : n[0], + r = i.cache; + if (r.has(o)) + return r.get(o); + var s = e.apply(this, n); + return i.cache = r.set(o, s) || r, + s + }; + return i.cache = new(_n.Cache || Ft), + i + } + _n.Cache = Ft; + var vn = _n; + var yn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + xn = /\\(\\)?/g, + An = function (e) { + var t = vn(e, (function (e) { + return 500 === i.size && i.clear(), + e + })), + i = t.cache; + return t + } + ((function (e) { + var t = []; + return 46 === e.charCodeAt(0) && t.push(""), + e.replace(yn, (function (e, i, n, o) { + t.push(n ? o.replace(xn, "$1") : i || e) + })), + t + })); + var Cn = function (e, t) { + for (var i = -1, n = null == e ? 0 : e.length, o = Array(n); ++i < n; ) + o[i] = t(e[i], i, e); + return o + }, + Tn = _ ? _.prototype : void 0, + En = Tn ? Tn.toString : void 0; + var Pn = function e(t) { + if ("string" == typeof t) + return t; + if (_e(t)) + return Cn(t, e) + ""; + if (pn(t)) + return En ? En.call(t) : ""; + var i = t + ""; + return "0" == i && 1 / t == -1 / 0 ? "-0" : i + }; + var Sn = function (e) { + return null == e ? "" : Pn(e) + }; + var Mn = function (e, t) { + return _e(e) ? e : kn(e, t) ? [e] : An(Sn(e)) + }; + var In = function (e) { + var t = null == e ? 0 : e.length; + return t ? e[t - 1] : void 0 + }; + var Nn = function (e) { + if ("string" == typeof e || pn(e)) + return e; + var t = e + ""; + return "0" == t && 1 / e == -1 / 0 ? "-0" : t + }; + var Rn = function (e, t) { + for (var i = 0, n = (t = Mn(t, e)).length; null != e && i < n; ) + e = e[Nn(t[i++])]; + return i && i == n ? e : void 0 + }; + var On = function (e, t, i) { + var n = -1, + o = e.length; + t < 0 && (t = -t > o ? 0 : o + t), + (i = i > o ? o : i) < 0 && (i += o), + o = t > i ? 0 : i - t >>> 0, + t >>>= 0; + for (var r = Array(o); ++n < o; ) + r[n] = e[n + t]; + return r + }; + var Dn = function (e, t) { + return t.length < 2 ? e : Rn(e, On(t, 0, -1)) + }; + var Ln = function (e, t) { + return t = Mn(t, e), + null == (e = Dn(e, t)) || delete e[Nn(In(t))] + }; + var zn = function (e, t) { + return null == e || Ln(e, t) + }; + var Vn = function (e, t, i) { + var n = null == e ? void 0 : Rn(e, t); + return void 0 === n ? i : n + }; + var jn = function (e, t, i) { + (void 0 !== i && !G(e[t], i) || void 0 === i && !(t in e)) && Y(e, t, i) + }; + var Bn = function (e) { + return function (t, i, n) { + for (var o = -1, r = Object(t), s = n(t), a = s.length; a--; ) { + var c = s[e ? a : ++o]; + if (!1 === i(r[c], c, r)) + break + } + return t + } + } + (); + var Fn = function (e) { + return ge(e) && ce(e) + }; + var Hn = function (e, t) { + if (("constructor" !== t || "function" != typeof e[t]) && "__proto__" != t) + return e[t] + }; + var Un = function (e) { + return J(e, De(e)) + }; + var Wn = function (e, t, i, n, o, r, s) { + var a = Hn(e, i), + c = Hn(t, i), + l = s.get(c); + if (l) + jn(e, i, l); + else { + var d = r ? r(a, c, i + "", e, t, s) : void 0, + u = void 0 === d; + if (u) { + var h = _e(c), + f = !h && Object(ve.a)(c), + g = !h && !f && Ee(c); + d = c, + h || f || g ? _e(a) ? d = a : Fn(a) ? d = Xt(a) : f ? (u = !1, d = Object(Zt.a)(c, !0)) : g ? (u = !1, d = Ri(c, !0)) : d = [] : ct(c) || ke(c) ? (d = a, ke(a) ? d = Un(a) : w(a) && !I(a) || (d = zi(c))) : u = !1 + } + u && (s.set(c, d), o(d, c, n, r, s), s.delete(c)), + jn(e, i, d) + } + }; + var qn = function e(t, i, n, o, r) { + t !== i && Bn(i, (function (s, a) { + if (r || (r = new Wt), w(s)) + Wn(t, i, a, n, e, o, r); + else { + var c = o ? o(Hn(t, a), s, a + "", t, i, r) : void 0; + void 0 === c && (c = s), + jn(t, a, c) + } + }), De) + }, + $n = he((function (e, t, i) { + qn(e, t, i) + })); + var Yn = function (e, t, i, n) { + if (!w(e)) + return e; + for (var o = -1, r = (t = Mn(t, e)).length, s = r - 1, a = e; null != a && ++o < r; ) { + var c = Nn(t[o]), + l = i; + if ("__proto__" === c || "constructor" === c || "prototype" === c) + return e; + if (o != s) { + var d = a[c]; + void 0 === (l = n ? n(d, c, a) : void 0) && (l = w(d) ? d : de(t[o + 1]) ? [] : {}) + } + Q(a, c, l), + a = a[c] + } + return e + }; + var Gn = function (e, t, i) { + return null == e ? e : Yn(e, t, i) + }; + class Kn { + constructor(e) { + this._styles = {}, + this._styleProcessor = e + } + get isEmpty() { + const e = Object.entries(this._styles); + return !Array.from(e).length + } + get size() { + return this.isEmpty ? 0 : this.getStyleNames().length + } + setTo(e) { + this.clear(); + const t = Array.from(function (e) { + let t = null, + i = 0, + n = 0, + o = null; + const r = new Map; + if ("" === e) + return r; + ";" != e.charAt(e.length - 1) && (e += ";"); + for (let s = 0; s < e.length; s++) { + const a = e.charAt(s); + if (null === t) + switch (a) { + case ":": + o || (o = e.substr(i, s - i), n = s + 1); + break; + case '"': + case "'": + t = a; + break; + case ";": { + const t = e.substr(n, s - n); + o && r.set(o.trim(), t.trim()), + o = null, + i = s + 1; + break + } + } + else + a === t && (t = null) + } + return r + } + (e).entries()); + for (const[e, i]of t) + this._styleProcessor.toNormalizedForm(e, i, this._styles) + } + has(e) { + if (this.isEmpty) + return !1; + const t = this._styleProcessor.getReducedForm(e, this._styles).find(([t]) => t === e); + return Array.isArray(t) + } + set(e, t) { + if (w(e)) + for (const[t, i]of Object.entries(e)) + this._styleProcessor.toNormalizedForm(t, i, this._styles); + else + this._styleProcessor.toNormalizedForm(e, t, this._styles) + } + remove(e) { + const t = Jn(e); + zn(this._styles, t), + delete this._styles[e], + this._cleanEmptyObjectsOnPath(t) + } + getNormalized(e) { + return this._styleProcessor.getNormalized(e, this._styles) + } + toString() { + return this.isEmpty ? "" : this._getStylesEntries().map(e => e.join(":")).sort().join(";") + ";" + } + getAsString(e) { + if (this.isEmpty) + return; + if (this._styles[e] && !w(this._styles[e])) + return this._styles[e]; + const t = this._styleProcessor.getReducedForm(e, this._styles).find(([t]) => t === e); + return Array.isArray(t) ? t[1] : void 0 + } + getStyleNames() { + if (this.isEmpty) + return []; + return this._getStylesEntries().map(([e]) => e) + } + clear() { + this._styles = {} + } + _getStylesEntries() { + const e = [], + t = Object.keys(this._styles); + for (const i of t) + e.push(...this._styleProcessor.getReducedForm(i, this._styles)); + return e + } + _cleanEmptyObjectsOnPath(e) { + const t = e.split("."); + if (!(t.length > 1)) + return; + const i = t.splice(0, t.length - 1).join("."), + n = Vn(this._styles, i); + if (!n) + return; + !Array.from(Object.keys(n)).length && this.remove(i) + } + } + class Qn { + constructor() { + this._normalizers = new Map, + this._extractors = new Map, + this._reducers = new Map, + this._consumables = new Map + } + toNormalizedForm(e, t, i) { + if (w(t)) + Zn(i, Jn(e), t); + else if (this._normalizers.has(e)) { + const n = this._normalizers.get(e), { + path: o, + value: r + } = n(t); + Zn(i, o, r) + } else + Zn(i, e, t) + } + getNormalized(e, t) { + if (!e) + return $n({}, t); + if (void 0 !== t[e]) + return t[e]; + if (this._extractors.has(e)) { + const i = this._extractors.get(e); + if ("string" == typeof i) + return Vn(t, i); + const n = i(e, t); + if (n) + return n + } + return Vn(t, Jn(e)) + } + getReducedForm(e, t) { + const i = this.getNormalized(e, t); + if (void 0 === i) + return []; + if (this._reducers.has(e)) { + return this._reducers.get(e)(i) + } + return [[e, i]] + } + getRelatedStyles(e) { + return this._consumables.get(e) || [] + } + setNormalizer(e, t) { + this._normalizers.set(e, t) + } + setExtractor(e, t) { + this._extractors.set(e, t) + } + setReducer(e, t) { + this._reducers.set(e, t) + } + setStyleRelation(e, t) { + this._mapStyleNames(e, t); + for (const i of t) + this._mapStyleNames(i, [e]) + } + _mapStyleNames(e, t) { + this._consumables.has(e) || this._consumables.set(e, []), + this._consumables.get(e).push(...t) + } + } + function Jn(e) { + return e.replace("-", ".") + } + function Zn(e, t, i) { + let n = i; + w(i) && (n = $n({}, Vn(e, t), i)), + Gn(e, t, n) + } + class Xn extends dn { + constructor(e, t, i, n) { + if (super(e), this.name = t, this._attrs = function (e) { + e = fn(e); + for (const[t, i]of e) + null === i ? e.delete(t) + : "string" != typeof i && e.set(t, String(i)); + return e + } + (i), this._children = [], n && this._insertChild(0, n), this._classes = new Set, this._attrs.has("class")) { + const e = this._attrs.get("class"); + eo(this._classes, e), + this._attrs.delete("class") + } + this._styles = new Kn(this.document.stylesProcessor), + this._attrs.has("style") && (this._styles.setTo(this._attrs.get("style")), this._attrs.delete("style")), + this._customProperties = new Map, + this._isAllowedInsideAttributeElement = !1 + } + get childCount() { + return this._children.length + } + get isEmpty() { + return 0 === this._children.length + } + get isAllowedInsideAttributeElement() { + return this._isAllowedInsideAttributeElement + } + is(e, t = null) { + return t ? t === this.name && ("element" === e || "view:element" === e) : "element" === e || "view:element" === e || "node" === e || "view:node" === e + } + getChild(e) { + return this._children[e] + } + getChildIndex(e) { + return this._children.indexOf(e) + } + getChildren() { + return this._children[Symbol.iterator]() + } + * getAttributeKeys() { + this._classes.size > 0 && (yield "class"), + this._styles.isEmpty || (yield "style"), + yield * this._attrs.keys() + } + * getAttributes() { + yield * this._attrs.entries(), + this._classes.size > 0 && (yield["class", this.getAttribute("class")]), + this._styles.isEmpty || (yield["style", this.getAttribute("style")]) + } + getAttribute(e) { + if ("class" == e) + return this._classes.size > 0 ? [...this._classes].join(" ") : void 0; + if ("style" == e) { + const e = this._styles.toString(); + return "" == e ? void 0 : e + } + return this._attrs.get(e) + } + hasAttribute(e) { + return "class" == e ? this._classes.size > 0 : "style" == e ? !this._styles.isEmpty : this._attrs.has(e) + } + isSimilar(e) { + if (!(e instanceof Xn)) + return !1; + if (this === e) + return !0; + if (this.name != e.name) + return !1; + if (this.isAllowedInsideAttributeElement != e.isAllowedInsideAttributeElement) + return !1; + if (this._attrs.size !== e._attrs.size || this._classes.size !== e._classes.size || this._styles.size !== e._styles.size) + return !1; + for (const[t, i]of this._attrs) + if (!e._attrs.has(t) || e._attrs.get(t) !== i) + return !1; + for (const t of this._classes) + if (!e._classes.has(t)) + return !1; + for (const t of this._styles.getStyleNames()) + if (!e._styles.has(t) || e._styles.getAsString(t) !== this._styles.getAsString(t)) + return !1; + return !0 + } + hasClass(...e) { + for (const t of e) + if (!this._classes.has(t)) + return !1; + return !0 + } + getClassNames() { + return this._classes.keys() + } + getStyle(e) { + return this._styles.getAsString(e) + } + getNormalizedStyle(e) { + return this._styles.getNormalized(e) + } + getStyleNames() { + return this._styles.getStyleNames() + } + hasStyle(...e) { + for (const t of e) + if (!this._styles.has(t)) + return !1; + return !0 + } + findAncestor(...e) { + const t = new gn(...e); + let i = this.parent; + for (; i; ) { + if (t.match(i)) + return i; + i = i.parent + } + return null + } + getCustomProperty(e) { + return this._customProperties.get(e) + } + * getCustomProperties() { + yield * this._customProperties.entries() + } + getIdentity() { + const e = Array.from(this._classes).sort().join(","), + t = this._styles.toString(), + i = Array.from(this._attrs).map(e => `${e[0]}="${e[1]}"`).sort().join(" "); + return this.name + ("" == e ? "" : ` class="${e}"`) + (t ? ` style="${t}"` : "") + ("" == i ? "" : " " + i) + } + _clone(e = !1) { + const t = []; + if (e) + for (const i of this.getChildren()) + t.push(i._clone(e)); + const i = new this.constructor(this.document, this.name, this._attrs, t); + return i._classes = new Set(this._classes), + i._styles.set(this._styles.getNormalized()), + i._customProperties = new Map(this._customProperties), + i.getFillerOffset = this.getFillerOffset, + i._isAllowedInsideAttributeElement = this.isAllowedInsideAttributeElement, + i + } + _appendChild(e) { + return this._insertChild(this.childCount, e) + } + _insertChild(e, t) { + this._fireChange("children", this); + let i = 0; + const n = function (e, t) { + if ("string" == typeof t) + return [new un(e, t)]; + Ji(t) || (t = [t]); + return Array.from(t).map(t => "string" == typeof t ? new un(e, t) : t instanceof hn ? new un(e, t.data) : t) + } + (this.document, t); + for (const t of n) + null !== t.parent && t._remove(), t.parent = this, t.document = this.document, this._children.splice(e, 0, t), e++, i++; + return i + } + _removeChildren(e, t = 1) { + this._fireChange("children", this); + for (let i = e; i < e + t; i++) + this._children[i].parent = null; + return this._children.splice(e, t) + } + _setAttribute(e, t) { + t = String(t), + this._fireChange("attributes", this), + "class" == e ? eo(this._classes, t) : "style" == e ? this._styles.setTo(t) : this._attrs.set(e, t) + } + _removeAttribute(e) { + return this._fireChange("attributes", this), + "class" == e ? this._classes.size > 0 && (this._classes.clear(), !0) : "style" == e ? !this._styles.isEmpty && (this._styles.clear(), !0) : this._attrs.delete(e) + } + _addClass(e) { + this._fireChange("attributes", this); + for (const t of en(e)) + this._classes.add(t) + } + _removeClass(e) { + this._fireChange("attributes", this); + for (const t of en(e)) + this._classes.delete(t) + } + _setStyle(e, t) { + this._fireChange("attributes", this), + this._styles.set(e, t) + } + _removeStyle(e) { + this._fireChange("attributes", this); + for (const t of en(e)) + this._styles.remove(t) + } + _setCustomProperty(e, t) { + this._customProperties.set(e, t) + } + _removeCustomProperty(e) { + return this._customProperties.delete(e) + } + } + function eo(e, t) { + const i = t.split(/\s+/); + e.clear(), + i.forEach(t => e.add(t)) + } + class to extends Xn { + constructor(e, t, i, n) { + super(e, t, i, n), + this.getFillerOffset = io + } + is(e, t = null) { + return t ? t === this.name && ("containerElement" === e || "view:containerElement" === e || "element" === e || "view:element" === e) : "containerElement" === e || "view:containerElement" === e || "element" === e || "view:element" === e || "node" === e || "view:node" === e + } + } + function io() { + const e = [...this.getChildren()], + t = e[this.childCount - 1]; + if (t && t.is("element", "br")) + return this.childCount; + for (const t of e) + if (!t.is("uiElement")) + return null; + return this.childCount + } + class no extends to { + constructor(e, t, i, n) { + super(e, t, i, n), + this.set("isReadOnly", !1), + this.set("isFocused", !1), + this.bind("isReadOnly").to(e), + this.bind("isFocused").to(e, "isFocused", t => t && e.selection.editableElement == this), + this.listenTo(e.selection, "change", () => { + this.isFocused = e.isFocused && e.selection.editableElement == this + }) + } + is(e, t = null) { + return t ? t === this.name && ("editableElement" === e || "view:editableElement" === e || "containerElement" === e || "view:containerElement" === e || "element" === e || "view:element" === e) : "editableElement" === e || "view:editableElement" === e || "containerElement" === e || "view:containerElement" === e || "element" === e || "view:element" === e || "node" === e || "view:node" === e + } + destroy() { + this.stopListening() + } + } + Ke(no, Ue); + const oo = Symbol("rootName"); + class ro extends no { + constructor(e, t) { + super(e, t), + this.rootName = "main" + } + is(e, t = null) { + return t ? t === this.name && ("rootElement" === e || "view:rootElement" === e || "editableElement" === e || "view:editableElement" === e || "containerElement" === e || "view:containerElement" === e || "element" === e || "view:element" === e) : "rootElement" === e || "view:rootElement" === e || "editableElement" === e || "view:editableElement" === e || "containerElement" === e || "view:containerElement" === e || "element" === e || "view:element" === e || "node" === e || "view:node" === e + } + get rootName() { + return this.getCustomProperty(oo) + } + set rootName(e) { + this._setCustomProperty(oo, e) + } + set _name(e) { + this.name = e + } + } + class so { + constructor(e = {}) { + if (!e.boundaries && !e.startPosition) + throw new c.a("view-tree-walker-no-start-position", null); + if (e.direction && "forward" != e.direction && "backward" != e.direction) + throw new c.a("view-tree-walker-unknown-direction", e.startPosition, { + direction: e.direction + }); + this.boundaries = e.boundaries || null, + e.startPosition ? this.position = ao._createAt(e.startPosition) : this.position = ao._createAt(e.boundaries["backward" == e.direction ? "end" : "start"]), + this.direction = e.direction || "forward", + this.singleCharacters = !!e.singleCharacters, + this.shallow = !!e.shallow, + this.ignoreElementEnd = !!e.ignoreElementEnd, + this._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null, + this._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null + } + [Symbol.iterator]() { + return this + } + skip(e) { + let t, + i, + n; + do { + n = this.position, + ({ + done: t, + value: i + } = this.next()) + } while (!t && e(i)); + t || (this.position = n) + } + next() { + return "forward" == this.direction ? this._next() : this._previous() + } + _next() { + let e = this.position.clone(); + const t = this.position, + i = e.parent; + if (null === i.parent && e.offset === i.childCount) + return { + done: !0 + }; + if (i === this._boundaryEndParent && e.offset == this.boundaries.end.offset) + return { + done: !0 + }; + let n; + if (i instanceof un) { + if (e.isAtEnd) + return this.position = ao._createAfter(i), this._next(); + n = i.data[e.offset] + } else + n = i.getChild(e.offset); + if (n instanceof Xn) + return this.shallow ? e.offset++ : e = new ao(n, 0), this.position = e, this._formatReturnValue("elementStart", n, t, e, 1); + if (n instanceof un) { + if (this.singleCharacters) + return e = new ao(n, 0), this.position = e, this._next(); { + let i, + o = n.data.length; + return n == this._boundaryEndParent ? (o = this.boundaries.end.offset, i = new hn(n, 0, o), e = ao._createAfter(i)) : (i = new hn(n, 0, n.data.length), e.offset++), + this.position = e, + this._formatReturnValue("text", i, t, e, o) + } + } + if ("string" == typeof n) { + let n; + if (this.singleCharacters) + n = 1; + else { + n = (i === this._boundaryEndParent ? this.boundaries.end.offset : i.data.length) - e.offset + } + const o = new hn(i, e.offset, n); + return e.offset += n, + this.position = e, + this._formatReturnValue("text", o, t, e, n) + } + return e = ao._createAfter(i), + this.position = e, + this.ignoreElementEnd ? this._next() : this._formatReturnValue("elementEnd", i, t, e) + } + _previous() { + let e = this.position.clone(); + const t = this.position, + i = e.parent; + if (null === i.parent && 0 === e.offset) + return { + done: !0 + }; + if (i == this._boundaryStartParent && e.offset == this.boundaries.start.offset) + return { + done: !0 + }; + let n; + if (i instanceof un) { + if (e.isAtStart) + return this.position = ao._createBefore(i), this._previous(); + n = i.data[e.offset - 1] + } else + n = i.getChild(e.offset - 1); + if (n instanceof Xn) + return this.shallow ? (e.offset--, this.position = e, this._formatReturnValue("elementStart", n, t, e, 1)) : (e = new ao(n, n.childCount), this.position = e, this.ignoreElementEnd ? this._previous() : this._formatReturnValue("elementEnd", n, t, e)); + if (n instanceof un) { + if (this.singleCharacters) + return e = new ao(n, n.data.length), this.position = e, this._previous(); { + let i, + o = n.data.length; + if (n == this._boundaryStartParent) { + const t = this.boundaries.start.offset; + i = new hn(n, t, n.data.length - t), + o = i.data.length, + e = ao._createBefore(i) + } else + i = new hn(n, 0, n.data.length), e.offset--; + return this.position = e, + this._formatReturnValue("text", i, t, e, o) + } + } + if ("string" == typeof n) { + let n; + if (this.singleCharacters) + n = 1; + else { + const t = i === this._boundaryStartParent ? this.boundaries.start.offset : 0; + n = e.offset - t + } + e.offset -= n; + const o = new hn(i, e.offset, n); + return this.position = e, + this._formatReturnValue("text", o, t, e, n) + } + return e = ao._createBefore(i), + this.position = e, + this._formatReturnValue("elementStart", i, t, e, 1) + } + _formatReturnValue(e, t, i, n, o) { + return t instanceof hn && (t.offsetInText + t.data.length == t.textNode.data.length && ("forward" != this.direction || this.boundaries && this.boundaries.end.isEqual(this.position) ? i = ao._createAfter(t.textNode) : (n = ao._createAfter(t.textNode), this.position = n)), 0 === t.offsetInText && ("backward" != this.direction || this.boundaries && this.boundaries.start.isEqual(this.position) ? i = ao._createBefore(t.textNode) : (n = ao._createBefore(t.textNode), this.position = n))), { + done: !1, + value: { + type: e, + item: t, + previousPosition: i, + nextPosition: n, + length: o + } + } + } + } + class ao { + constructor(e, t) { + this.parent = e, + this.offset = t + } + get nodeAfter() { + return this.parent.is("$text") ? null : this.parent.getChild(this.offset) || null + } + get nodeBefore() { + return this.parent.is("$text") ? null : this.parent.getChild(this.offset - 1) || null + } + get isAtStart() { + return 0 === this.offset + } + get isAtEnd() { + const e = this.parent.is("$text") ? this.parent.data.length : this.parent.childCount; + return this.offset === e + } + get root() { + return this.parent.root + } + get editableElement() { + let e = this.parent; + for (; !(e instanceof no); ) { + if (!e.parent) + return null; + e = e.parent + } + return e + } + getShiftedBy(e) { + const t = ao._createAt(this), + i = t.offset + e; + return t.offset = i < 0 ? 0 : i, + t + } + getLastMatchingPosition(e, t = {}) { + t.startPosition = this; + const i = new so(t); + return i.skip(e), + i.position + } + getAncestors() { + return this.parent.is("documentFragment") ? [this.parent] : this.parent.getAncestors({ + includeSelf: !0 + }) + } + getCommonAncestor(e) { + const t = this.getAncestors(), + i = e.getAncestors(); + let n = 0; + for (; t[n] == i[n] && t[n]; ) + n++; + return 0 === n ? null : t[n - 1] + } + is(e) { + return "position" === e || "view:position" === e + } + isEqual(e) { + return this.parent == e.parent && this.offset == e.offset + } + isBefore(e) { + return "before" == this.compareWith(e) + } + isAfter(e) { + return "after" == this.compareWith(e) + } + compareWith(e) { + if (this.root !== e.root) + return "different"; + if (this.isEqual(e)) + return "same"; + const t = this.parent.is("node") ? this.parent.getPath() : [], + i = e.parent.is("node") ? e.parent.getPath() : []; + t.push(this.offset), + i.push(e.offset); + const n = cn(t, i); + switch (n) { + case "prefix": + return "before"; + case "extension": + return "after"; + default: + return t[n] < i[n] ? "before" : "after" + } + } + getWalker(e = {}) { + return e.startPosition = this, + new so(e) + } + clone() { + return new ao(this.parent, this.offset) + } + static _createAt(e, t) { + if (e instanceof ao) + return new this(e.parent, e.offset); { + const i = e; + if ("end" == t) + t = i.is("$text") ? i.data.length : i.childCount; + else { + if ("before" == t) + return this._createBefore(i); + if ("after" == t) + return this._createAfter(i); + if (0 !== t && !t) + throw new c.a("view-createpositionat-offset-required", i) + } + return new ao(i, t) + } + } + static _createAfter(e) { + if (e.is("$textProxy")) + return new ao(e.textNode, e.offsetInText + e.data.length); + if (!e.parent) + throw new c.a("view-position-after-root", e, { + root: e + }); + return new ao(e.parent, e.index + 1) + } + static _createBefore(e) { + if (e.is("$textProxy")) + return new ao(e.textNode, e.offsetInText); + if (!e.parent) + throw new c.a("view-position-before-root", e, { + root: e + }); + return new ao(e.parent, e.index) + } + } + class co { + constructor(e, t = null) { + this.start = e.clone(), + this.end = t ? t.clone() : e.clone() + } + * [Symbol.iterator]() { + yield * new so({ + boundaries: this, + ignoreElementEnd: !0 + }) + } + get isCollapsed() { + return this.start.isEqual(this.end) + } + get isFlat() { + return this.start.parent === this.end.parent + } + get root() { + return this.start.root + } + getEnlarged() { + let e = this.start.getLastMatchingPosition(lo, { + direction: "backward" + }), + t = this.end.getLastMatchingPosition(lo); + return e.parent.is("$text") && e.isAtStart && (e = ao._createBefore(e.parent)), + t.parent.is("$text") && t.isAtEnd && (t = ao._createAfter(t.parent)), + new co(e, t) + } + getTrimmed() { + let e = this.start.getLastMatchingPosition(lo); + if (e.isAfter(this.end) || e.isEqual(this.end)) + return new co(e, e); + let t = this.end.getLastMatchingPosition(lo, { + direction: "backward" + }); + const i = e.nodeAfter, + n = t.nodeBefore; + return i && i.is("$text") && (e = new ao(i, 0)), + n && n.is("$text") && (t = new ao(n, n.data.length)), + new co(e, t) + } + isEqual(e) { + return this == e || this.start.isEqual(e.start) && this.end.isEqual(e.end) + } + containsPosition(e) { + return e.isAfter(this.start) && e.isBefore(this.end) + } + containsRange(e, t = !1) { + e.isCollapsed && (t = !1); + const i = this.containsPosition(e.start) || t && this.start.isEqual(e.start), + n = this.containsPosition(e.end) || t && this.end.isEqual(e.end); + return i && n + } + getDifference(e) { + const t = []; + return this.isIntersecting(e) ? (this.containsPosition(e.start) && t.push(new co(this.start, e.start)), this.containsPosition(e.end) && t.push(new co(e.end, this.end))) : t.push(this.clone()), + t + } + getIntersection(e) { + if (this.isIntersecting(e)) { + let t = this.start, + i = this.end; + return this.containsPosition(e.start) && (t = e.start), + this.containsPosition(e.end) && (i = e.end), + new co(t, i) + } + return null + } + getWalker(e = {}) { + return e.boundaries = this, + new so(e) + } + getCommonAncestor() { + return this.start.getCommonAncestor(this.end) + } + getContainedElement() { + if (this.isCollapsed) + return null; + let e = this.start.nodeAfter, + t = this.end.nodeBefore; + return this.start.parent.is("$text") && this.start.isAtEnd && this.start.parent.nextSibling && (e = this.start.parent.nextSibling), + this.end.parent.is("$text") && this.end.isAtStart && this.end.parent.previousSibling && (t = this.end.parent.previousSibling), + e && e.is("element") && e === t ? e : null + } + clone() { + return new co(this.start, this.end) + } + * getItems(e = {}) { + e.boundaries = this, + e.ignoreElementEnd = !0; + const t = new so(e); + for (const e of t) + yield e.item + } + * getPositions(e = {}) { + e.boundaries = this; + const t = new so(e); + yield t.position; + for (const e of t) + yield e.nextPosition + } + is(e) { + return "range" === e || "view:range" === e + } + isIntersecting(e) { + return this.start.isBefore(e.end) && this.end.isAfter(e.start) + } + static _createFromParentsAndOffsets(e, t, i, n) { + return new this(new ao(e, t), new ao(i, n)) + } + static _createFromPositionAndShift(e, t) { + const i = e, + n = e.getShiftedBy(t); + return t > 0 ? new this(i, n) : new this(n, i) + } + static _createIn(e) { + return this._createFromParentsAndOffsets(e, 0, e, e.childCount) + } + static _createOn(e) { + const t = e.is("$textProxy") ? e.offsetSize : 1; + return this._createFromPositionAndShift(ao._createBefore(e), t) + } + } + function lo(e) { + return !(!e.item.is("attributeElement") && !e.item.is("uiElement")) + } + function uo(e) { + let t = 0; + for (const i of e) + t++; + return t + } + class ho { + constructor(e = null, t, i) { + this._ranges = [], + this._lastRangeBackward = !1, + this._isFake = !1, + this._fakeSelectionLabel = "", + this.setTo(e, t, i) + } + get isFake() { + return this._isFake + } + get fakeSelectionLabel() { + return this._fakeSelectionLabel + } + get anchor() { + if (!this._ranges.length) + return null; + const e = this._ranges[this._ranges.length - 1]; + return (this._lastRangeBackward ? e.end : e.start).clone() + } + get focus() { + if (!this._ranges.length) + return null; + const e = this._ranges[this._ranges.length - 1]; + return (this._lastRangeBackward ? e.start : e.end).clone() + } + get isCollapsed() { + return 1 === this.rangeCount && this._ranges[0].isCollapsed + } + get rangeCount() { + return this._ranges.length + } + get isBackward() { + return !this.isCollapsed && this._lastRangeBackward + } + get editableElement() { + return this.anchor ? this.anchor.editableElement : null + } + * getRanges() { + for (const e of this._ranges) + yield e.clone() + } + getFirstRange() { + let e = null; + for (const t of this._ranges) + e && !t.start.isBefore(e.start) || (e = t); + return e ? e.clone() : null + } + getLastRange() { + let e = null; + for (const t of this._ranges) + e && !t.end.isAfter(e.end) || (e = t); + return e ? e.clone() : null + } + getFirstPosition() { + const e = this.getFirstRange(); + return e ? e.start.clone() : null + } + getLastPosition() { + const e = this.getLastRange(); + return e ? e.end.clone() : null + } + isEqual(e) { + if (this.isFake != e.isFake) + return !1; + if (this.isFake && this.fakeSelectionLabel != e.fakeSelectionLabel) + return !1; + if (this.rangeCount != e.rangeCount) + return !1; + if (0 === this.rangeCount) + return !0; + if (!this.anchor.isEqual(e.anchor) || !this.focus.isEqual(e.focus)) + return !1; + for (const t of this._ranges) { + let i = !1; + for (const n of e._ranges) + if (t.isEqual(n)) { + i = !0; + break + } + if (!i) + return !1 + } + return !0 + } + isSimilar(e) { + if (this.isBackward != e.isBackward) + return !1; + const t = uo(this.getRanges()); + if (t != uo(e.getRanges())) + return !1; + if (0 == t) + return !0; + for (let t of this.getRanges()) { + t = t.getTrimmed(); + let i = !1; + for (let n of e.getRanges()) + if (n = n.getTrimmed(), t.start.isEqual(n.start) && t.end.isEqual(n.end)) { + i = !0; + break + } + if (!i) + return !1 + } + return !0 + } + getSelectedElement() { + return 1 !== this.rangeCount ? null : this.getFirstRange().getContainedElement() + } + setTo(e, t, i) { + if (null === e) + this._setRanges([]), this._setFakeOptions(t); + else if (e instanceof ho || e instanceof fo) + this._setRanges(e.getRanges(), e.isBackward), this._setFakeOptions({ + fake: e.isFake, + label: e.fakeSelectionLabel + }); + else if (e instanceof co) + this._setRanges([e], t && t.backward), this._setFakeOptions(t); + else if (e instanceof ao) + this._setRanges([new co(e)]), this._setFakeOptions(t); + else if (e instanceof dn) { + const n = !!i && !!i.backward; + let o; + if (void 0 === t) + throw new c.a("view-selection-setto-required-second-parameter", this); + o = "in" == t ? co._createIn(e) : "on" == t ? co._createOn(e) : new co(ao._createAt(e, t)), + this._setRanges([o], n), + this._setFakeOptions(i) + } else { + if (!Ji(e)) + throw new c.a("view-selection-setto-not-selectable", this); + this._setRanges(e, t && t.backward), + this._setFakeOptions(t) + } + this.fire("change") + } + setFocus(e, t) { + if (null === this.anchor) + throw new c.a("view-selection-setfocus-no-ranges", this); + const i = ao._createAt(e, t); + if ("same" == i.compareWith(this.focus)) + return; + const n = this.anchor; + this._ranges.pop(), + "before" == i.compareWith(n) ? this._addRange(new co(i, n), !0) : this._addRange(new co(n, i)), + this.fire("change") + } + is(e) { + return "selection" === e || "view:selection" === e + } + _setRanges(e, t = !1) { + e = Array.from(e), + this._ranges = []; + for (const t of e) + this._addRange(t); + this._lastRangeBackward = !!t + } + _setFakeOptions(e = {}) { + this._isFake = !!e.fake, + this._fakeSelectionLabel = e.fake && e.label || "" + } + _addRange(e, t = !1) { + if (!(e instanceof co)) + throw new c.a("view-selection-add-range-not-range", this); + this._pushRange(e), + this._lastRangeBackward = !!t + } + _pushRange(e) { + for (const t of this._ranges) + if (e.isIntersecting(t)) + throw new c.a("view-selection-range-intersects", this, { + addedRange: e, + intersectingRange: t + }); + this._ranges.push(new co(e.start, e.end)) + } + } + Ke(ho, u); + class fo { + constructor(e = null, t, i) { + this._selection = new ho, + this._selection.delegate("change").to(this), + this._selection.setTo(e, t, i) + } + get isFake() { + return this._selection.isFake + } + get fakeSelectionLabel() { + return this._selection.fakeSelectionLabel + } + get anchor() { + return this._selection.anchor + } + get focus() { + return this._selection.focus + } + get isCollapsed() { + return this._selection.isCollapsed + } + get rangeCount() { + return this._selection.rangeCount + } + get isBackward() { + return this._selection.isBackward + } + get editableElement() { + return this._selection.editableElement + } + get _ranges() { + return this._selection._ranges + } + * getRanges() { + yield * this._selection.getRanges() + } + getFirstRange() { + return this._selection.getFirstRange() + } + getLastRange() { + return this._selection.getLastRange() + } + getFirstPosition() { + return this._selection.getFirstPosition() + } + getLastPosition() { + return this._selection.getLastPosition() + } + getSelectedElement() { + return this._selection.getSelectedElement() + } + isEqual(e) { + return this._selection.isEqual(e) + } + isSimilar(e) { + return this._selection.isSimilar(e) + } + is(e) { + return "selection" === e || "documentSelection" == e || "view:selection" == e || "view:documentSelection" == e + } + _setTo(e, t, i) { + this._selection.setTo(e, t, i) + } + _setFocus(e, t) { + this._selection.setFocus(e, t) + } + } + Ke(fo, u); + class go extends o { + constructor(e, t, i) { + super(e, t), + this.startRange = i, + this._eventPhase = "none", + this._currentTarget = null + } + get eventPhase() { + return this._eventPhase + } + get currentTarget() { + return this._currentTarget + } + } + const mo = Symbol("bubbling contexts"); + var po = { + fire(e, ...t) { + try { + const i = e instanceof o ? e : new o(this, e), + n = _o(this); + if (!n.size) + return; + if (bo(i, "capturing", this), wo(n, "$capture", i, ...t)) + return i.return; + const r = i.startRange || this.selection.getFirstRange(), + s = r ? r.getContainedElement() : null, + a = !!s && Boolean(ko(n, s)); + let c = s || function (e) { + if (!e) + return null; + const t = e.start.parent, + i = e.end.parent, + n = t.getPath(), + o = i.getPath(); + return n.length > o.length ? t : i + } + (r); + if (bo(i, "atTarget", c), !a) { + if (wo(n, "$text", i, ...t)) + return i.return; + bo(i, "bubbling", c) + } + for (; c; ) { + if (c.is("rootElement")) { + if (wo(n, "$root", i, ...t)) + return i.return + } else if (c.is("element") && wo(n, c.name, i, ...t)) + return i.return; + if (wo(n, c, i, ...t)) + return i.return; + c = c.parent, + bo(i, "bubbling", c) + } + return bo(i, "bubbling", this), + wo(n, "$document", i, ...t), + i.return + } catch (e) { + c.a.rethrowUnexpectedError(e, this) + } + }, + _addEventListener(e, t, i) { + const n = en(i.context || "$document"), + o = _o(this); + for (const r of n) { + let n = o.get(r); + n || (n = Object.create(u), o.set(r, n)), + this.listenTo(n, e, t, i) + } + }, + _removeEventListener(e, t) { + const i = _o(this); + for (const n of i.values()) + this.stopListening(n, e, t) + } + }; + function bo(e, t, i) { + e instanceof go && (e._eventPhase = t, e._currentTarget = i) + } + function wo(e, t, i, ...n) { + const o = "string" == typeof t ? e.get(t) : ko(e, t); + return !!o && (o.fire(i, ...n), i.stop.called) + } + function ko(e, t) { + for (const[i, n]of e) + if ("function" == typeof i && i(t)) + return n; + return null + } + function _o(e) { + return e[mo] || (e[mo] = new Map), + e[mo] + } + class vo { + constructor(e) { + this.selection = new fo, + this.roots = new Zi({ + idProperty: "rootName" + }), + this.stylesProcessor = e, + this.set("isReadOnly", !1), + this.set("isFocused", !1), + this.set("isComposing", !1), + this._postFixers = new Set + } + getRoot(e = "main") { + return this.roots.get(e) + } + registerPostFixer(e) { + this._postFixers.add(e) + } + destroy() { + this.roots.map(e => e.destroy()), + this.stopListening() + } + _callPostFixers(e) { + let t = !1; + do { + for (const i of this._postFixers) + if (t = i(e), t) + break + } while (t) + } + } + Ke(vo, po), + Ke(vo, Ue); + class yo extends Xn { + constructor(e, t, i, n) { + super(e, t, i, n), + this.getFillerOffset = xo, + this._priority = 10, + this._id = null, + this._clonesGroup = null + } + get priority() { + return this._priority + } + get id() { + return this._id + } + getElementsWithSameId() { + if (null === this.id) + throw new c.a("attribute-element-get-elements-with-same-id-no-id", this); + return new Set(this._clonesGroup) + } + is(e, t = null) { + return t ? t === this.name && ("attributeElement" === e || "view:attributeElement" === e || "element" === e || "view:element" === e) : "attributeElement" === e || "view:attributeElement" === e || "element" === e || "view:element" === e || "node" === e || "view:node" === e + } + isSimilar(e) { + return null !== this.id || null !== e.id ? this.id === e.id : super.isSimilar(e) && this.priority == e.priority + } + _clone(e) { + const t = super._clone(e); + return t._priority = this._priority, + t._id = this._id, + t + } + } + function xo() { + if (Ao(this)) + return null; + let e = this.parent; + for (; e && e.is("attributeElement"); ) { + if (Ao(e) > 1) + return null; + e = e.parent + } + return !e || Ao(e) > 1 ? null : this.childCount + } + function Ao(e) { + return Array.from(e.getChildren()).filter(e => !e.is("uiElement")).length + } + yo.DEFAULT_PRIORITY = 10; + class Co extends Xn { + constructor(e, t, i, n) { + super(e, t, i, n), + this._isAllowedInsideAttributeElement = !0, + this.getFillerOffset = To + } + is(e, t = null) { + return t ? t === this.name && ("emptyElement" === e || "view:emptyElement" === e || "element" === e || "view:element" === e) : "emptyElement" === e || "view:emptyElement" === e || "element" === e || "view:element" === e || "node" === e || "view:node" === e + } + _insertChild(e, t) { + if (t && (t instanceof dn || Array.from(t).length > 0)) + throw new c.a("view-emptyelement-cannot-add", [this, t]) + } + } + function To() { + return null + } + const Eo = navigator.userAgent.toLowerCase(); + var Po = { + isMac: function (e) { + return e.indexOf("macintosh") > -1 + } + (Eo), + isGecko: function (e) { + return !!e.match(/gecko\/\d+/) + } + (Eo), + isSafari: function (e) { + return e.indexOf(" applewebkit/") > -1 && -1 === e.indexOf("chrome") + } + (Eo), + isAndroid: function (e) { + return e.indexOf("android") > -1 + } + (Eo), + isBlink: function (e) { + return e.indexOf("chrome/") > -1 && e.indexOf("edge/") < 0 + } + (Eo), + features: { + isRegExpUnicodePropertySupported: function () { + let e = !1; + try { + e = 0 === "ć".search(new RegExp("[\\p{L}]", "u")) + } catch (e) {} + return e + } + () + } + }; + const So = { + ctrl: "⌃", + cmd: "⌘", + alt: "⌥", + shift: "⇧" + }, + Mo = { + ctrl: "Ctrl+", + alt: "Alt+", + shift: "Shift+" + }, + Io = function () { + const e = { + arrowleft: 37, + arrowup: 38, + arrowright: 39, + arrowdown: 40, + backspace: 8, + delete : 46, + enter: 13, + space: 32, + esc: 27, + tab: 9, + ctrl: 1114112, + shift: 2228224, + alt: 4456448, + cmd: 8912896 + }; + for (let t = 65; t <= 90; t++) { + const i = String.fromCharCode(t); + e[i.toLowerCase()] = t + } + for (let t = 48; t <= 57; t++) + e[t - 48] = t; + for (let t = 112; t <= 123; t++) + e["f" + (t - 111)] = t; + return e + } + (), + No = Object.fromEntries(Object.entries(Io).map(([e, t]) => [t, e.charAt(0).toUpperCase() + e.slice(1)])); + function Ro(e) { + let t; + if ("string" == typeof e) { + if (t = Io[e.toLowerCase()], !t) + throw new c.a("keyboard-unknown-key", null, { + key: e + }) + } else + t = e.keyCode + (e.altKey ? Io.alt : 0) + (e.ctrlKey ? Io.ctrl : 0) + (e.shiftKey ? Io.shift : 0) + (e.metaKey ? Io.cmd : 0); + return t + } + function Oo(e) { + return "string" == typeof e && (e = function (e) { + return e.split("+").map(e => e.trim()) + } + (e)), + e.map(e => "string" == typeof e ? function (e) { + if (e.endsWith("!")) + return Ro(e.slice(0, -1)); + const t = Ro(e); + return Po.isMac && t == Io.ctrl ? Io.cmd : t + } + (e) : e).reduce((e, t) => t + e, 0) + } + function Do(e) { + let t = Oo(e); + return Object.entries(Po.isMac ? So : Mo).reduce((e, [i, n]) => (0 != (t & Io[i]) && (t &= ~Io[i], e += n), e), "") + (t ? No[t] : "") + } + function Lo(e, t) { + const i = "ltr" === t; + switch (e) { + case Io.arrowleft: + return i ? "left" : "right"; + case Io.arrowright: + return i ? "right" : "left"; + case Io.arrowup: + return "up"; + case Io.arrowdown: + return "down" + } + } + function zo(e, t) { + const i = Lo(e, t); + return "down" === i || "right" === i + } + class Vo extends Xn { + constructor(e, t, i, n) { + super(e, t, i, n), + this._isAllowedInsideAttributeElement = !0, + this.getFillerOffset = Bo + } + is(e, t = null) { + return t ? t === this.name && ("uiElement" === e || "view:uiElement" === e || "element" === e || "view:element" === e) : "uiElement" === e || "view:uiElement" === e || "element" === e || "view:element" === e || "node" === e || "view:node" === e + } + _insertChild(e, t) { + if (t && (t instanceof dn || Array.from(t).length > 0)) + throw new c.a("view-uielement-cannot-add", this) + } + render(e) { + return this.toDomElement(e) + } + toDomElement(e) { + const t = e.createElement(this.name); + for (const e of this.getAttributeKeys()) + t.setAttribute(e, this.getAttribute(e)); + return t + } + } + function jo(e) { + e.document.on("arrowKey", (t, i) => function (e, t, i) { + if (t.keyCode == Io.arrowright) { + const e = t.domTarget.ownerDocument.defaultView.getSelection(), + n = 1 == e.rangeCount && e.getRangeAt(0).collapsed; + if (n || t.shiftKey) { + const t = e.focusNode, + o = e.focusOffset, + r = i.domPositionToView(t, o); + if (null === r) + return; + let s = !1; + const a = r.getLastMatchingPosition(e => (e.item.is("uiElement") && (s = !0), !(!e.item.is("uiElement") && !e.item.is("attributeElement")))); + if (s) { + const t = i.viewPositionToDom(a); + n ? e.collapse(t.parent, t.offset) : e.extend(t.parent, t.offset) + } + } + } + } + (0, i, e.domConverter), { + priority: "low" + }) + } + function Bo() { + return null + } + class Fo extends Xn { + constructor(e, t, i, n) { + super(e, t, i, n), + this._isAllowedInsideAttributeElement = !0, + this.getFillerOffset = Ho + } + is(e, t = null) { + return t ? t === this.name && ("rawElement" === e || "view:rawElement" === e || "element" === e || "view:element" === e) : "rawElement" === e || "view:rawElement" === e || e === this.name || e === "view:" + this.name || "element" === e || "view:element" === e || "node" === e || "view:node" === e + } + _insertChild(e, t) { + if (t && (t instanceof dn || Array.from(t).length > 0)) + throw new c.a("view-rawelement-cannot-add", [this, t]) + } + } + function Ho() { + return null + } + class Uo { + constructor(e, t) { + this.document = e, + this._children = [], + t && this._insertChild(0, t) + } + [Symbol.iterator]() { + return this._children[Symbol.iterator]() + } + get childCount() { + return this._children.length + } + get isEmpty() { + return 0 === this.childCount + } + get root() { + return this + } + get parent() { + return null + } + is(e) { + return "documentFragment" === e || "view:documentFragment" === e + } + _appendChild(e) { + return this._insertChild(this.childCount, e) + } + getChild(e) { + return this._children[e] + } + getChildIndex(e) { + return this._children.indexOf(e) + } + getChildren() { + return this._children[Symbol.iterator]() + } + _insertChild(e, t) { + this._fireChange("children", this); + let i = 0; + const n = function (e, t) { + if ("string" == typeof t) + return [new un(e, t)]; + Ji(t) || (t = [t]); + return Array.from(t).map(t => "string" == typeof t ? new un(e, t) : t instanceof hn ? new un(e, t.data) : t) + } + (this.document, t); + for (const t of n) + null !== t.parent && t._remove(), t.parent = this, this._children.splice(e, 0, t), e++, i++; + return i + } + _removeChildren(e, t = 1) { + this._fireChange("children", this); + for (let i = e; i < e + t; i++) + this._children[i].parent = null; + return this._children.splice(e, t) + } + _fireChange(e, t) { + this.fire("change:" + e, t) + } + } + Ke(Uo, u); + class Wo { + constructor(e) { + this.document = e, + this._cloneGroups = new Map + } + setSelection(e, t, i) { + this.document.selection._setTo(e, t, i) + } + setSelectionFocus(e, t) { + this.document.selection._setFocus(e, t) + } + createDocumentFragment(e) { + return new Uo(this.document, e) + } + createText(e) { + return new un(this.document, e) + } + createAttributeElement(e, t, i = {}) { + const n = new yo(this.document, e, t); + return i.priority && (n._priority = i.priority), + i.id && (n._id = i.id), + n + } + createContainerElement(e, t, i = {}) { + const n = new to(this.document, e, t); + return void 0 !== i.isAllowedInsideAttributeElement && (n._isAllowedInsideAttributeElement = i.isAllowedInsideAttributeElement), + n + } + createEditableElement(e, t) { + const i = new no(this.document, e, t); + return i._document = this.document, + i + } + createEmptyElement(e, t, i = {}) { + const n = new Co(this.document, e, t); + return void 0 !== i.isAllowedInsideAttributeElement && (n._isAllowedInsideAttributeElement = i.isAllowedInsideAttributeElement), + n + } + createUIElement(e, t, i, n = {}) { + const o = new Vo(this.document, e, t); + return i && (o.render = i), + void 0 !== n.isAllowedInsideAttributeElement && (o._isAllowedInsideAttributeElement = n.isAllowedInsideAttributeElement), + o + } + createRawElement(e, t, i, n = {}) { + const o = new Fo(this.document, e, t); + return o.render = i || (() => {}), + void 0 !== n.isAllowedInsideAttributeElement && (o._isAllowedInsideAttributeElement = n.isAllowedInsideAttributeElement), + o + } + setAttribute(e, t, i) { + i._setAttribute(e, t) + } + removeAttribute(e, t) { + t._removeAttribute(e) + } + addClass(e, t) { + t._addClass(e) + } + removeClass(e, t) { + t._removeClass(e) + } + setStyle(e, t, i) { + ct(e) && void 0 === i && (i = t), + i._setStyle(e, t) + } + removeStyle(e, t) { + t._removeStyle(e) + } + setCustomProperty(e, t, i) { + i._setCustomProperty(e, t) + } + removeCustomProperty(e, t) { + return t._removeCustomProperty(e) + } + breakAttributes(e) { + return e instanceof ao ? this._breakAttributes(e) : this._breakAttributesRange(e) + } + breakContainer(e) { + const t = e.parent; + if (!t.is("containerElement")) + throw new c.a("view-writer-break-non-container-element", this.document); + if (!t.parent) + throw new c.a("view-writer-break-root", this.document); + if (e.isAtStart) + return ao._createBefore(t); + if (!e.isAtEnd) { + const i = t._clone(!1); + this.insert(ao._createAfter(t), i); + const n = new co(e, ao._createAt(t, "end")), + o = new ao(i, 0); + this.move(n, o) + } + return ao._createAfter(t) + } + mergeAttributes(e) { + const t = e.offset, + i = e.parent; + if (i.is("$text")) + return e; + if (i.is("attributeElement") && 0 === i.childCount) { + const e = i.parent, + t = i.index; + return i._remove(), + this._removeFromClonedElementsGroup(i), + this.mergeAttributes(new ao(e, t)) + } + const n = i.getChild(t - 1), + o = i.getChild(t); + if (!n || !o) + return e; + if (n.is("$text") && o.is("$text")) + return Ko(n, o); + if (n.is("attributeElement") && o.is("attributeElement") && n.isSimilar(o)) { + const e = n.childCount; + return n._appendChild(o.getChildren()), + o._remove(), + this._removeFromClonedElementsGroup(o), + this.mergeAttributes(new ao(n, e)) + } + return e + } + mergeContainers(e) { + const t = e.nodeBefore, + i = e.nodeAfter; + if (!(t && i && t.is("containerElement") && i.is("containerElement"))) + throw new c.a("view-writer-merge-containers-invalid-position", this.document); + const n = t.getChild(t.childCount - 1), + o = n instanceof un ? ao._createAt(n, "end") : ao._createAt(t, "end"); + return this.move(co._createIn(i), ao._createAt(t, "end")), + this.remove(co._createOn(i)), + o + } + insert(e, t) { + (function e(t, i) { + for (const n of t) { + if (!Qo.some(e => n instanceof e)) + throw new c.a("view-writer-insert-invalid-node-type", i); + n.is("$text") || e(n.getChildren(), i) + } + })(t = Ji(t) ? [...t] : [t], this.document); + const i = t.reduce((e, t) => { + const i = e[e.length - 1], + n = !(t.is("uiElement") && t.isAllowedInsideAttributeElement); + return i && i.breakAttributes == n ? i.nodes.push(t) : e.push({ + breakAttributes: n, + nodes: [t] + }), + e + }, []); + let n = null, + o = e; + for (const { + nodes: e, + breakAttributes: t + } + of i) { + const i = this._insertNodes(o, e, t); + n || (n = i.start), + o = i.end + } + return n ? new co(n, o) : new co(e) + } + remove(e) { + const t = e instanceof co ? e : co._createOn(e); + if (Zo(t, this.document), t.isCollapsed) + return new Uo(this.document); + const { + start: i, + end: n + } = this._breakAttributesRange(t, !0), + o = i.parent, + r = n.offset - i.offset, + s = o._removeChildren(i.offset, r); + for (const e of s) + this._removeFromClonedElementsGroup(e); + const a = this.mergeAttributes(i); + return t.start = a, + t.end = a.clone(), + new Uo(this.document, s) + } + clear(e, t) { + Zo(e, this.document); + const i = e.getWalker({ + direction: "backward", + ignoreElementEnd: !0 + }); + for (const n of i) { + const i = n.item; + let o; + if (i.is("element") && t.isSimilar(i)) + o = co._createOn(i); + else if (!n.nextPosition.isAfter(e.start) && i.is("$textProxy")) { + const e = i.getAncestors().find(e => e.is("element") && t.isSimilar(e)); + e && (o = co._createIn(e)) + } + o && (o.end.isAfter(e.end) && (o.end = e.end), o.start.isBefore(e.start) && (o.start = e.start), this.remove(o)) + } + } + move(e, t) { + let i; + if (t.isAfter(e.end)) { + const n = (t = this._breakAttributes(t, !0)).parent, + o = n.childCount; + e = this._breakAttributesRange(e, !0), + i = this.remove(e), + t.offset += n.childCount - o + } else + i = this.remove(e); + return this.insert(t, i) + } + wrap(e, t) { + if (!(t instanceof yo)) + throw new c.a("view-writer-wrap-invalid-attribute", this.document); + if (Zo(e, this.document), e.isCollapsed) { + let n = e.start; + n.parent.is("element") && (i = n.parent, !Array.from(i.getChildren()).some(e => !e.is("uiElement"))) && (n = n.getLastMatchingPosition(e => e.item.is("uiElement"))), + n = this._wrapPosition(n, t); + const o = this.document.selection; + return o.isCollapsed && o.getFirstPosition().isEqual(e.start) && this.setSelection(n), + new co(n) + } + return this._wrapRange(e, t); + var i + } + unwrap(e, t) { + if (!(t instanceof yo)) + throw new c.a("view-writer-unwrap-invalid-attribute", this.document); + if (Zo(e, this.document), e.isCollapsed) + return e; + const { + start: i, + end: n + } = this._breakAttributesRange(e, !0), + o = i.parent, + r = this._unwrapChildren(o, i.offset, n.offset, t), + s = this.mergeAttributes(r.start); + s.isEqual(r.start) || r.end.offset--; + const a = this.mergeAttributes(r.end); + return new co(s, a) + } + rename(e, t) { + const i = new to(this.document, e, t.getAttributes()); + return this.insert(ao._createAfter(t), i), + this.move(co._createIn(t), ao._createAt(i, 0)), + this.remove(co._createOn(t)), + i + } + clearClonedElementsGroup(e) { + this._cloneGroups.delete(e) + } + createPositionAt(e, t) { + return ao._createAt(e, t) + } + createPositionAfter(e) { + return ao._createAfter(e) + } + createPositionBefore(e) { + return ao._createBefore(e) + } + createRange(e, t) { + return new co(e, t) + } + createRangeOn(e) { + return co._createOn(e) + } + createRangeIn(e) { + return co._createIn(e) + } + createSelection(e, t, i) { + return new ho(e, t, i) + } + _insertNodes(e, t, i) { + let n, + o; + if (n = i ? qo(e) : e.parent.is("$text") ? e.parent.parent : e.parent, !n) + throw new c.a("view-writer-invalid-position-container", this.document); + o = i ? this._breakAttributes(e, !0) : e.parent.is("$text") ? Go(e) : e; + const r = n._insertChild(o.offset, t); + for (const e of t) + this._addToClonedElementsGroup(e); + const s = o.getShiftedBy(r), + a = this.mergeAttributes(o); + a.isEqual(o) || s.offset--; + const l = this.mergeAttributes(s); + return new co(a, l) + } + _wrapChildren(e, t, i, n) { + let o = t; + const r = []; + for (; o < i; ) { + const t = e.getChild(o), + i = t.is("$text"), + s = t.is("attributeElement"), + a = t.isAllowedInsideAttributeElement; + if (s && this._wrapAttributeElement(n, t)) + r.push(new ao(e, o)); + else if (i || a || s && $o(n, t)) { + const i = n._clone(); + t._remove(), + i._appendChild(t), + e._insertChild(o, i), + this._addToClonedElementsGroup(i), + r.push(new ao(e, o)) + } else + s && this._wrapChildren(t, 0, t.childCount, n); + o++ + } + let s = 0; + for (const e of r) { + if (e.offset -= s, e.offset == t) + continue; + this.mergeAttributes(e).isEqual(e) || (s++, i--) + } + return co._createFromParentsAndOffsets(e, t, e, i) + } + _unwrapChildren(e, t, i, n) { + let o = t; + const r = []; + for (; o < i; ) { + const t = e.getChild(o); + if (t.is("attributeElement")) + if (t.isSimilar(n)) { + const n = t.getChildren(), + s = t.childCount; + t._remove(), + e._insertChild(o, n), + this._removeFromClonedElementsGroup(t), + r.push(new ao(e, o), new ao(e, o + s)), + o += s, + i += s - 1 + } else + this._unwrapAttributeElement(n, t) ? (r.push(new ao(e, o), new ao(e, o + 1)), o++) : (this._unwrapChildren(t, 0, t.childCount, n), o++); + else + o++ + } + let s = 0; + for (const e of r) { + if (e.offset -= s, e.offset == t || e.offset == i) + continue; + this.mergeAttributes(e).isEqual(e) || (s++, i--) + } + return co._createFromParentsAndOffsets(e, t, e, i) + } + _wrapRange(e, t) { + const { + start: i, + end: n + } = this._breakAttributesRange(e, !0), + o = i.parent, + r = this._wrapChildren(o, i.offset, n.offset, t), + s = this.mergeAttributes(r.start); + s.isEqual(r.start) || r.end.offset--; + const a = this.mergeAttributes(r.end); + return new co(s, a) + } + _wrapPosition(e, t) { + if (t.isSimilar(e.parent)) + return Yo(e.clone()); + e.parent.is("$text") && (e = Go(e)); + const i = this.createAttributeElement(); + i._priority = Number.POSITIVE_INFINITY, + i.isSimilar = () => !1, + e.parent._insertChild(e.offset, i); + const n = new co(e, e.getShiftedBy(1)); + this.wrap(n, t); + const o = new ao(i.parent, i.index); + i._remove(); + const r = o.nodeBefore, + s = o.nodeAfter; + return r instanceof un && s instanceof un ? Ko(r, s) : Yo(o) + } + _wrapAttributeElement(e, t) { + if (!Xo(e, t)) + return !1; + if (e.name !== t.name || e.priority !== t.priority) + return !1; + for (const i of e.getAttributeKeys()) + if ("class" !== i && "style" !== i && t.hasAttribute(i) && t.getAttribute(i) !== e.getAttribute(i)) + return !1; + for (const i of e.getStyleNames()) + if (t.hasStyle(i) && t.getStyle(i) !== e.getStyle(i)) + return !1; + for (const i of e.getAttributeKeys()) + "class" !== i && "style" !== i && (t.hasAttribute(i) || this.setAttribute(i, e.getAttribute(i), t)); + for (const i of e.getStyleNames()) + t.hasStyle(i) || this.setStyle(i, e.getStyle(i), t); + for (const i of e.getClassNames()) + t.hasClass(i) || this.addClass(i, t); + return !0 + } + _unwrapAttributeElement(e, t) { + if (!Xo(e, t)) + return !1; + if (e.name !== t.name || e.priority !== t.priority) + return !1; + for (const i of e.getAttributeKeys()) + if ("class" !== i && "style" !== i && (!t.hasAttribute(i) || t.getAttribute(i) !== e.getAttribute(i))) + return !1; + if (!t.hasClass(...e.getClassNames())) + return !1; + for (const i of e.getStyleNames()) + if (!t.hasStyle(i) || t.getStyle(i) !== e.getStyle(i)) + return !1; + for (const i of e.getAttributeKeys()) + "class" !== i && "style" !== i && this.removeAttribute(i, t); + return this.removeClass(Array.from(e.getClassNames()), t), + this.removeStyle(Array.from(e.getStyleNames()), t), + !0 + } + _breakAttributesRange(e, t = !1) { + const i = e.start, + n = e.end; + if (Zo(e, this.document), e.isCollapsed) { + const i = this._breakAttributes(e.start, t); + return new co(i, i) + } + const o = this._breakAttributes(n, t), + r = o.parent.childCount, + s = this._breakAttributes(i, t); + return o.offset += o.parent.childCount - r, + new co(s, o) + } + _breakAttributes(e, t = !1) { + const i = e.offset, + n = e.parent; + if (e.parent.is("emptyElement")) + throw new c.a("view-writer-cannot-break-empty-element", this.document); + if (e.parent.is("uiElement")) + throw new c.a("view-writer-cannot-break-ui-element", this.document); + if (e.parent.is("rawElement")) + throw new c.a("view-writer-cannot-break-raw-element", this.document); + if (!t && n.is("$text") && Jo(n.parent)) + return e.clone(); + if (Jo(n)) + return e.clone(); + if (n.is("$text")) + return this._breakAttributes(Go(e), t); + if (i == n.childCount) { + const e = new ao(n.parent, n.index + 1); + return this._breakAttributes(e, t) + } + if (0 === i) { + const e = new ao(n.parent, n.index); + return this._breakAttributes(e, t) + } { + const e = n.index + 1, + o = n._clone(); + n.parent._insertChild(e, o), + this._addToClonedElementsGroup(o); + const r = n.childCount - i, + s = n._removeChildren(i, r); + o._appendChild(s); + const a = new ao(n.parent, e); + return this._breakAttributes(a, t) + } + } + _addToClonedElementsGroup(e) { + if (!e.root.is("rootElement")) + return; + if (e.is("element")) + for (const t of e.getChildren()) + this._addToClonedElementsGroup(t); + const t = e.id; + if (!t) + return; + let i = this._cloneGroups.get(t); + i || (i = new Set, this._cloneGroups.set(t, i)), + i.add(e), + e._clonesGroup = i + } + _removeFromClonedElementsGroup(e) { + if (e.is("element")) + for (const t of e.getChildren()) + this._removeFromClonedElementsGroup(t); + const t = e.id; + if (!t) + return; + const i = this._cloneGroups.get(t); + i && i.delete(e) + } + } + function qo(e) { + let t = e.parent; + for (; !Jo(t); ) { + if (!t) + return; + t = t.parent + } + return t + } + function $o(e, t) { + return e.priority < t.priority || !(e.priority > t.priority) && e.getIdentity() < t.getIdentity() + } + function Yo(e) { + const t = e.nodeBefore; + if (t && t.is("$text")) + return new ao(t, t.data.length); + const i = e.nodeAfter; + return i && i.is("$text") ? new ao(i, 0) : e + } + function Go(e) { + if (e.offset == e.parent.data.length) + return new ao(e.parent.parent, e.parent.index + 1); + if (0 === e.offset) + return new ao(e.parent.parent, e.parent.index); + const t = e.parent.data.slice(e.offset); + return e.parent._data = e.parent.data.slice(0, e.offset), + e.parent.parent._insertChild(e.parent.index + 1, new un(e.root.document, t)), + new ao(e.parent.parent, e.parent.index + 1) + } + function Ko(e, t) { + const i = e.data.length; + return e._data += t.data, + t._remove(), + new ao(e, i) + } + const Qo = [un, yo, to, Co, Fo, Vo]; + function Jo(e) { + return e && (e.is("containerElement") || e.is("documentFragment")) + } + function Zo(e, t) { + const i = qo(e.start), + n = qo(e.end); + if (!i || !n || i !== n) + throw new c.a("view-writer-invalid-range-container", t) + } + function Xo(e, t) { + return null === e.id && null === t.id + } + function er(e) { + return "[object Text]" == Object.prototype.toString.call(e) + } + const tr = e => e.createTextNode(" "), + ir = e => { + const t = e.createElement("span"); + return t.dataset.ckeFiller = !0, + t.innerHTML = " ", + t + }, + nr = e => { + const t = e.createElement("br"); + return t.dataset.ckeFiller = !0, + t + }, + or = "⁠".repeat(7); + function rr(e) { + return er(e) && e.data.substr(0, 7) === or + } + function sr(e) { + return 7 == e.data.length && rr(e) + } + function ar(e) { + return rr(e) ? e.data.slice(7) : e.data + } + function cr(e, t) { + if (t.keyCode == Io.arrowleft) { + const e = t.domTarget.ownerDocument.defaultView.getSelection(); + if (1 == e.rangeCount && e.getRangeAt(0).collapsed) { + const t = e.getRangeAt(0).startContainer, + i = e.getRangeAt(0).startOffset; + rr(t) && i <= 7 && e.collapse(t, 0) + } + } + } + function lr(e, t, i, n = !1) { + i = i || function (e, t) { + return e === t + }, + Array.isArray(e) || (e = Array.prototype.slice.call(e)), + Array.isArray(t) || (t = Array.prototype.slice.call(t)); + const o = function (e, t, i) { + const n = dr(e, t, i); + if (-1 === n) + return { + firstIndex: -1, + lastIndexOld: -1, + lastIndexNew: -1 + }; + const o = ur(e, n), + r = ur(t, n), + s = dr(o, r, i), + a = e.length - s, + c = t.length - s; + return { + firstIndex: n, + lastIndexOld: a, + lastIndexNew: c + } + } + (e, t, i); + return n ? function (e, t) { + const { + firstIndex: i, + lastIndexOld: n, + lastIndexNew: o + } = e; + if (-1 === i) + return Array(t).fill("equal"); + let r = []; + i > 0 && (r = r.concat(Array(i).fill("equal"))); + o - i > 0 && (r = r.concat(Array(o - i).fill("insert"))); + n - i > 0 && (r = r.concat(Array(n - i).fill("delete"))); + o < t && (r = r.concat(Array(t - o).fill("equal"))); + return r + } + (o, t.length) : function (e, t) { + const i = [], { + firstIndex: n, + lastIndexOld: o, + lastIndexNew: r + } = t; + r - n > 0 && i.push({ + index: n, + type: "insert", + values: e.slice(n, r) + }); + o - n > 0 && i.push({ + index: n + (r - n), + type: "delete", + howMany: o - n + }); + return i + } + (t, o) + } + function dr(e, t, i) { + for (let n = 0; n < Math.max(e.length, t.length); n++) + if (void 0 === e[n] || void 0 === t[n] || !i(e[n], t[n])) + return n; + return -1 + } + function ur(e, t) { + return e.slice(t).reverse() + } + function hr(e, t, i) { + i = i || function (e, t) { + return e === t + }; + const n = e.length, + o = t.length; + if (n > 200 || o > 200 || n + o > 300) + return hr.fastDiff(e, t, i, !0); + let r, + s; + if (o < n) { + const i = e; + e = t, + t = i, + r = "delete", + s = "insert" + } else + r = "insert", s = "delete"; + const a = e.length, + c = t.length, + l = c - a, + d = {}, + u = {}; + function h(n) { + const o = (void 0 !== u[n - 1] ? u[n - 1] : -1) + 1, + l = void 0 !== u[n + 1] ? u[n + 1] : -1, + h = o > l ? -1 : 1; + d[n + h] && (d[n] = d[n + h].slice(0)), + d[n] || (d[n] = []), + d[n].push(o > l ? r : s); + let f = Math.max(o, l), + g = f - n; + for (; g < a && f < c && i(e[g], t[f]); ) + g++, f++, d[n].push("equal"); + return f + } + let f, + g = 0; + do { + for (f = -g; f < l; f++) + u[f] = h(f); + for (f = l + g; f > l; f--) + u[f] = h(f); + u[l] = h(l), + g++ + } while (u[l] !== c); + return d[l].slice(1) + } + function fr(e, t, i) { + e.insertBefore(i, e.childNodes[t] || null) + } + function gr(e) { + const t = e.parentNode; + t && t.removeChild(e) + } + function mr(e) { + if (e) { + if (e.defaultView) + return e instanceof e.defaultView.Document; + if (e.ownerDocument && e.ownerDocument.defaultView) + return e instanceof e.ownerDocument.defaultView.Node + } + return !1 + } + hr.fastDiff = lr; + class pr { + constructor(e, t) { + this.domDocuments = new Set, + this.domConverter = e, + this.markedAttributes = new Set, + this.markedChildren = new Set, + this.markedTexts = new Set, + this.selection = t, + this.isFocused = !1, + this._inlineFiller = null, + this._fakeSelectionContainer = null + } + markToSync(e, t) { + if ("text" === e) + this.domConverter.mapViewToDom(t.parent) && this.markedTexts.add(t); + else { + if (!this.domConverter.mapViewToDom(t)) + return; + if ("attributes" === e) + this.markedAttributes.add(t); + else { + if ("children" !== e) + throw new c.a("view-renderer-unknown-type", this); + this.markedChildren.add(t) + } + } + } + render() { + let e; + for (const e of this.markedChildren) + this._updateChildrenMappings(e); + this._inlineFiller && !this._isSelectionInInlineFiller() && this._removeInlineFiller(), + this._inlineFiller ? e = this._getInlineFillerPosition() : this._needsInlineFillerAtSelection() && (e = this.selection.getFirstPosition(), this.markedChildren.add(e.parent)); + for (const e of this.markedAttributes) + this._updateAttrs(e); + for (const t of this.markedChildren) + this._updateChildren(t, { + inlineFillerPosition: e + }); + for (const t of this.markedTexts) + !this.markedChildren.has(t.parent) && this.domConverter.mapViewToDom(t.parent) && this._updateText(t, { + inlineFillerPosition: e + }); + if (e) { + const t = this.domConverter.viewPositionToDom(e), + i = t.parent.ownerDocument; + rr(t.parent) ? this._inlineFiller = t.parent : this._inlineFiller = br(i, t.parent, t.offset) + } else + this._inlineFiller = null; + this._updateFocus(), + this._updateSelection(), + this.markedTexts.clear(), + this.markedAttributes.clear(), + this.markedChildren.clear() + } + _updateChildrenMappings(e) { + const t = this.domConverter.mapViewToDom(e); + if (!t) + return; + const i = this.domConverter.mapViewToDom(e).childNodes, + n = Array.from(this.domConverter.viewChildrenToDom(e, t.ownerDocument, { + withChildren: !1 + })), + o = this._diffNodeLists(i, n), + r = this._findReplaceActions(o, i, n); + if (-1 !== r.indexOf("replace")) { + const t = { + equal: 0, + insert: 0, + delete : 0 + }; + for (const o of r) + if ("replace" === o) { + const o = t.equal + t.insert, + r = t.equal + t.delete, + s = e.getChild(o); + !s || s.is("uiElement") || s.is("rawElement") || this._updateElementMappings(s, i[r]), + gr(n[o]), + t.equal++ + } else + t[o]++ + } + } + _updateElementMappings(e, t) { + this.domConverter.unbindDomElement(t), + this.domConverter.bindElements(t, e), + this.markedChildren.add(e), + this.markedAttributes.add(e) + } + _getInlineFillerPosition() { + const e = this.selection.getFirstPosition(); + return e.parent.is("$text") ? ao._createBefore(this.selection.getFirstPosition().parent) : e + } + _isSelectionInInlineFiller() { + if (1 != this.selection.rangeCount || !this.selection.isCollapsed) + return !1; + const e = this.selection.getFirstPosition(), + t = this.domConverter.viewPositionToDom(e); + return !!(t && er(t.parent) && rr(t.parent)) + } + _removeInlineFiller() { + const e = this._inlineFiller; + if (!rr(e)) + throw new c.a("view-renderer-filler-was-lost", this); + sr(e) ? e.parentNode.removeChild(e) : e.data = e.data.substr(7), + this._inlineFiller = null + } + _needsInlineFillerAtSelection() { + if (1 != this.selection.rangeCount || !this.selection.isCollapsed) + return !1; + const e = this.selection.getFirstPosition(), + t = e.parent, + i = e.offset; + if (!this.domConverter.mapViewToDom(t.root)) + return !1; + if (!t.is("element")) + return !1; + if (!function (e) { + if ("false" == e.getAttribute("contenteditable")) + return !1; + const t = e.findAncestor(e => e.hasAttribute("contenteditable")); + return !t || "true" == t.getAttribute("contenteditable") + } + (t)) + return !1; + if (i === t.getFillerOffset()) + return !1; + const n = e.nodeBefore, + o = e.nodeAfter; + return !(n instanceof un || o instanceof un) + } + _updateText(e, t) { + const i = this.domConverter.findCorrespondingDomText(e), + n = this.domConverter.viewToDom(e, i.ownerDocument), + o = i.data; + let r = n.data; + const s = t.inlineFillerPosition; + if (s && s.parent == e.parent && s.offset == e.index && (r = or + r), o != r) { + const e = lr(o, r); + for (const t of e) + "insert" === t.type ? i.insertData(t.index, t.values.join("")) : i.deleteData(t.index, t.howMany) + } + } + _updateAttrs(e) { + const t = this.domConverter.mapViewToDom(e); + if (!t) + return; + const i = Array.from(t.attributes).map(e => e.name), + n = e.getAttributeKeys(); + for (const i of n) + t.setAttribute(i, e.getAttribute(i)); + for (const n of i) + e.hasAttribute(n) || t.removeAttribute(n) + } + _updateChildren(e, t) { + const i = this.domConverter.mapViewToDom(e); + if (!i) + return; + const n = t.inlineFillerPosition, + o = this.domConverter.mapViewToDom(e).childNodes, + r = Array.from(this.domConverter.viewChildrenToDom(e, i.ownerDocument, { + bind: !0, + inlineFillerPosition: n + })); + n && n.parent === e && br(i.ownerDocument, r, n.offset); + const s = this._diffNodeLists(o, r); + let a = 0; + const c = new Set; + for (const e of s) + "delete" === e ? (c.add(o[a]), gr(o[a])) : "equal" === e && a++; + a = 0; + for (const e of s) + "insert" === e ? (fr(i, a, r[a]), a++) : "equal" === e && (this._markDescendantTextToSync(this.domConverter.domToView(r[a])), a++); + for (const e of c) + e.parentNode || this.domConverter.unbindDomElement(e) + } + _diffNodeLists(e, t) { + return hr(e = function (e, t) { + const i = Array.from(e); + if (0 == i.length || !t) + return i; + i[i.length - 1] == t && i.pop(); + return i + } + (e, this._fakeSelectionContainer), t, kr.bind(null, this.domConverter)) + } + _findReplaceActions(e, t, i) { + if (-1 === e.indexOf("insert") || -1 === e.indexOf("delete")) + return e; + let n = [], + o = [], + r = []; + const s = { + equal: 0, + insert: 0, + delete : 0 + }; + for (const a of e) + "insert" === a ? r.push(i[s.equal + s.insert]) : "delete" === a ? o.push(t[s.equal + s.delete]) : (n = n.concat(hr(o, r, wr).map(e => "equal" === e ? "replace" : e)), n.push("equal"), o = [], r = []), s[a]++; + return n.concat(hr(o, r, wr).map(e => "equal" === e ? "replace" : e)) + } + _markDescendantTextToSync(e) { + if (e) + if (e.is("$text")) + this.markedTexts.add(e); + else if (e.is("element")) + for (const t of e.getChildren()) + this._markDescendantTextToSync(t) + } + _updateSelection() { + if (0 === this.selection.rangeCount) + return this._removeDomSelection(), void this._removeFakeSelection(); + const e = this.domConverter.mapViewToDom(this.selection.editableElement); + this.isFocused && e && (this.selection.isFake ? this._updateFakeSelection(e) : (this._removeFakeSelection(), this._updateDomSelection(e))) + } + _updateFakeSelection(e) { + const t = e.ownerDocument; + this._fakeSelectionContainer || (this._fakeSelectionContainer = function (e) { + const t = e.createElement("div"); + return t.className = "ck-fake-selection-container", + Object.assign(t.style, { + position: "fixed", + top: 0, + left: "-9999px", + width: "42px" + }), + t.textContent = " ", + t + } + (t)); + const i = this._fakeSelectionContainer; + if (this.domConverter.bindFakeSelection(i, this.selection), !this._fakeSelectionNeedsUpdate(e)) + return; + i.parentElement && i.parentElement == e || e.appendChild(i), + i.textContent = this.selection.fakeSelectionLabel || " "; + const n = t.getSelection(), + o = t.createRange(); + n.removeAllRanges(), + o.selectNodeContents(i), + n.addRange(o) + } + _updateDomSelection(e) { + const t = e.ownerDocument.defaultView.getSelection(); + if (!this._domSelectionNeedsUpdate(t)) + return; + const i = this.domConverter.viewPositionToDom(this.selection.anchor), + n = this.domConverter.viewPositionToDom(this.selection.focus); + t.collapse(i.parent, i.offset), + t.extend(n.parent, n.offset), + Po.isGecko && function (e, t) { + const i = e.parent; + if (i.nodeType != Node.ELEMENT_NODE || e.offset != i.childNodes.length - 1) + return; + const n = i.childNodes[e.offset]; + n && "BR" == n.tagName && t.addRange(t.getRangeAt(0)) + } + (n, t) + } + _domSelectionNeedsUpdate(e) { + if (!this.domConverter.isDomSelectionCorrect(e)) + return !0; + const t = e && this.domConverter.domSelectionToView(e); + return (!t || !this.selection.isEqual(t)) && !(!this.selection.isCollapsed && this.selection.isSimilar(t)) + } + _fakeSelectionNeedsUpdate(e) { + const t = this._fakeSelectionContainer, + i = e.ownerDocument.getSelection(); + return !t || t.parentElement !== e || (i.anchorNode !== t && !t.contains(i.anchorNode) || t.textContent !== this.selection.fakeSelectionLabel) + } + _removeDomSelection() { + for (const e of this.domDocuments) { + if (e.getSelection().rangeCount) { + const t = e.activeElement, + i = this.domConverter.mapDomToView(t); + t && i && e.getSelection().removeAllRanges() + } + } + } + _removeFakeSelection() { + const e = this._fakeSelectionContainer; + e && e.remove() + } + _updateFocus() { + if (this.isFocused) { + const e = this.selection.editableElement; + e && this.domConverter.focus(e) + } + } + } + function br(e, t, i) { + const n = t instanceof Array ? t : t.childNodes, + o = n[i]; + if (er(o)) + return o.data = or + o.data, o; { + const o = e.createTextNode(or); + return Array.isArray(t) ? n.splice(i, 0, o) : fr(t, i, o), + o + } + } + function wr(e, t) { + return mr(e) && mr(t) && !er(e) && !er(t) && e.nodeType !== Node.COMMENT_NODE && t.nodeType !== Node.COMMENT_NODE && e.tagName.toLowerCase() === t.tagName.toLowerCase() + } + function kr(e, t, i) { + return t === i || (er(t) && er(i) ? t.data === i.data : !(!e.isBlockFiller(t) || !e.isBlockFiller(i))) + } + Ke(pr, Ue); + var _r = { + window: window, + document: document + }; + function vr(e) { + let t = 0; + for (; e.previousSibling; ) + e = e.previousSibling, t++; + return t + } + function yr(e) { + const t = []; + for (; e && e.nodeType != Node.DOCUMENT_NODE; ) + t.unshift(e), e = e.parentNode; + return t + } + const xr = nr(document), + Ar = tr(document), + Cr = ir(document); + class Tr { + constructor(e, t = {}) { + this.document = e, + this.blockFillerMode = t.blockFillerMode || "br", + this.preElements = ["pre"], + this.blockElements = ["p", "div", "h1", "h2", "h3", "h4", "h5", "h6", "li", "dd", "dt", "figcaption", "td", "th"], + this._domToViewMapping = new WeakMap, + this._viewToDomMapping = new WeakMap, + this._fakeSelectionMapping = new WeakMap, + this._rawContentElementMatcher = new gn, + this._encounteredRawContentDomNodes = new WeakSet + } + bindFakeSelection(e, t) { + this._fakeSelectionMapping.set(e, new ho(t)) + } + fakeSelectionToView(e) { + return this._fakeSelectionMapping.get(e) + } + bindElements(e, t) { + this._domToViewMapping.set(e, t), + this._viewToDomMapping.set(t, e) + } + unbindDomElement(e) { + const t = this._domToViewMapping.get(e); + if (t) { + this._domToViewMapping.delete(e), + this._viewToDomMapping.delete(t); + for (const t of e.childNodes) + this.unbindDomElement(t) + } + } + bindDocumentFragments(e, t) { + this._domToViewMapping.set(e, t), + this._viewToDomMapping.set(t, e) + } + viewToDom(e, t, i = {}) { + if (e.is("$text")) { + const i = this._processDataFromViewText(e); + return t.createTextNode(i) + } { + if (this.mapViewToDom(e)) + return this.mapViewToDom(e); + let n; + if (e.is("documentFragment")) + n = t.createDocumentFragment(), i.bind && this.bindDocumentFragments(n, e); + else { + if (e.is("uiElement")) + return n = e.render(t), i.bind && this.bindElements(n, e), n; + n = e.hasAttribute("xmlns") ? t.createElementNS(e.getAttribute("xmlns"), e.name) : t.createElement(e.name), + e.is("rawElement") && e.render(n), + i.bind && this.bindElements(n, e); + for (const t of e.getAttributeKeys()) + n.setAttribute(t, e.getAttribute(t)) + } + if (!1 !== i.withChildren) + for (const o of this.viewChildrenToDom(e, t, i)) + n.appendChild(o); + return n + } + } + * viewChildrenToDom(e, t, i = {}) { + const n = e.getFillerOffset && e.getFillerOffset(); + let o = 0; + for (const r of e.getChildren()) + n === o && (yield this._getBlockFiller(t)), yield this.viewToDom(r, t, i), o++; + n === o && (yield this._getBlockFiller(t)) + } + viewRangeToDom(e) { + const t = this.viewPositionToDom(e.start), + i = this.viewPositionToDom(e.end), + n = document.createRange(); + return n.setStart(t.parent, t.offset), + n.setEnd(i.parent, i.offset), + n + } + viewPositionToDom(e) { + const t = e.parent; + if (t.is("$text")) { + const i = this.findCorrespondingDomText(t); + if (!i) + return null; + let n = e.offset; + return rr(i) && (n += 7), { + parent: i, + offset: n + } + } { + let i, + n, + o; + if (0 === e.offset) { + if (i = this.mapViewToDom(t), !i) + return null; + o = i.childNodes[0] + } else { + const t = e.nodeBefore; + if (n = t.is("$text") ? this.findCorrespondingDomText(t) : this.mapViewToDom(e.nodeBefore), !n) + return null; + i = n.parentNode, + o = n.nextSibling + } + if (er(o) && rr(o)) + return { + parent: o, + offset: 7 + }; + return { + parent: i, + offset: n ? vr(n) + 1 : 0 + } + } + } + domToView(e, t = {}) { + if (this.isBlockFiller(e)) + return null; + const i = this.getHostViewElement(e); + if (i) + return i; + if (er(e)) { + if (sr(e)) + return null; { + const t = this._processDataFromDomText(e); + return "" === t ? null : new un(this.document, t) + } + } + if (this.isComment(e)) + return null; { + if (this.mapDomToView(e)) + return this.mapDomToView(e); + let i; + if (this.isDocumentFragment(e)) + i = new Uo(this.document), t.bind && this.bindDocumentFragments(e, i); + else { + const n = t.keepOriginalCase ? e.tagName : e.tagName.toLowerCase(); + i = new Xn(this.document, n), + t.bind && this.bindElements(e, i); + const o = e.attributes; + for (let e = o.length - 1; e >= 0; e--) + i._setAttribute(o[e].name, o[e].value); + if (!1 !== t.withChildren && this._rawContentElementMatcher.match(i)) + return i._setCustomProperty("$rawContent", e.innerHTML), this._encounteredRawContentDomNodes.add(e), i + } + if (!1 !== t.withChildren) + for (const n of this.domChildrenToView(e, t)) + i._appendChild(n); + return i + } + } + * domChildrenToView(e, t = {}) { + for (let i = 0; i < e.childNodes.length; i++) { + const n = e.childNodes[i], + o = this.domToView(n, t); + null !== o && (yield o) + } + } + domSelectionToView(e) { + if (1 === e.rangeCount) { + let t = e.getRangeAt(0).startContainer; + er(t) && (t = t.parentNode); + const i = this.fakeSelectionToView(t); + if (i) + return i + } + const t = this.isDomSelectionBackward(e), + i = []; + for (let t = 0; t < e.rangeCount; t++) { + const n = e.getRangeAt(t), + o = this.domRangeToView(n); + o && i.push(o) + } + return new ho(i, { + backward: t + }) + } + domRangeToView(e) { + const t = this.domPositionToView(e.startContainer, e.startOffset), + i = this.domPositionToView(e.endContainer, e.endOffset); + return t && i ? new co(t, i) : null + } + domPositionToView(e, t) { + if (this.isBlockFiller(e)) + return this.domPositionToView(e.parentNode, vr(e)); + const i = this.mapDomToView(e); + if (i && (i.is("uiElement") || i.is("rawElement"))) + return ao._createBefore(i); + if (er(e)) { + if (sr(e)) + return this.domPositionToView(e.parentNode, vr(e)); + const i = this.findCorrespondingViewText(e); + let n = t; + return i ? (rr(e) && (n -= 7, n = n < 0 ? 0 : n), new ao(i, n)) : null + } + if (0 === t) { + const t = this.mapDomToView(e); + if (t) + return new ao(t, 0) + } else { + const i = e.childNodes[t - 1], + n = er(i) ? this.findCorrespondingViewText(i) : this.mapDomToView(i); + if (n && n.parent) + return new ao(n.parent, n.index + 1) + } + return null + } + mapDomToView(e) { + return this.getHostViewElement(e) || this._domToViewMapping.get(e) + } + findCorrespondingViewText(e) { + if (sr(e)) + return null; + const t = this.getHostViewElement(e); + if (t) + return t; + const i = e.previousSibling; + if (i) { + if (!this.isElement(i)) + return null; + const e = this.mapDomToView(i); + if (e) { + return e.nextSibling instanceof un ? e.nextSibling : null + } + } else { + const t = this.mapDomToView(e.parentNode); + if (t) { + const e = t.getChild(0); + return e instanceof un ? e : null + } + } + return null + } + mapViewToDom(e) { + return this._viewToDomMapping.get(e) + } + findCorrespondingDomText(e) { + const t = e.previousSibling; + return t && this.mapViewToDom(t) ? this.mapViewToDom(t).nextSibling : !t && e.parent && this.mapViewToDom(e.parent) ? this.mapViewToDom(e.parent).childNodes[0] : null + } + focus(e) { + const t = this.mapViewToDom(e); + if (t && t.ownerDocument.activeElement !== t) { + const { + scrollX: e, + scrollY: i + } = _r.window, + n = []; + Pr(t, e => { + const { + scrollLeft: t, + scrollTop: i + } = e; + n.push([t, i]) + }), + t.focus(), + Pr(t, e => { + const[t, i] = n.shift(); + e.scrollLeft = t, + e.scrollTop = i + }), + _r.window.scrollTo(e, i) + } + } + isElement(e) { + return e && e.nodeType == Node.ELEMENT_NODE + } + isDocumentFragment(e) { + return e && e.nodeType == Node.DOCUMENT_FRAGMENT_NODE + } + isComment(e) { + return e && e.nodeType == Node.COMMENT_NODE + } + isBlockFiller(e) { + return "br" == this.blockFillerMode ? e.isEqualNode(xr) : !("BR" !== e.tagName || !Sr(e, this.blockElements) || 1 !== e.parentNode.childNodes.length) || (e.isEqualNode(Cr) || function (e, t) { + return e.isEqualNode(Ar) && Sr(e, t) && 1 === e.parentNode.childNodes.length + } + (e, this.blockElements)) + } + isDomSelectionBackward(e) { + if (e.isCollapsed) + return !1; + const t = document.createRange(); + t.setStart(e.anchorNode, e.anchorOffset), + t.setEnd(e.focusNode, e.focusOffset); + const i = t.collapsed; + return t.detach(), + i + } + getHostViewElement(e) { + const t = yr(e); + for (t.pop(); t.length; ) { + const e = t.pop(), + i = this._domToViewMapping.get(e); + if (i && (i.is("uiElement") || i.is("rawElement"))) + return i + } + return null + } + isDomSelectionCorrect(e) { + return this._isDomSelectionPositionCorrect(e.anchorNode, e.anchorOffset) && this._isDomSelectionPositionCorrect(e.focusNode, e.focusOffset) + } + registerRawContentMatcher(e) { + this._rawContentElementMatcher.add(e) + } + _getBlockFiller(e) { + switch (this.blockFillerMode) { + case "nbsp": + return tr(e); + case "markedNbsp": + return ir(e); + case "br": + return nr(e) + } + } + _isDomSelectionPositionCorrect(e, t) { + if (er(e) && rr(e) && t < 7) + return !1; + if (this.isElement(e) && rr(e.childNodes[t])) + return !1; + const i = this.mapDomToView(e); + return !i || !i.is("uiElement") && !i.is("rawElement") + } + _processDataFromViewText(e) { + let t = e.data; + if (e.getAncestors().some(e => this.preElements.includes(e.name))) + return t; + if (" " == t.charAt(0)) { + const i = this._getTouchingViewTextNode(e, !1); + !(i && this._nodeEndsWithSpace(i)) && i || (t = " " + t.substr(1)) + } + if (" " == t.charAt(t.length - 1)) { + const i = this._getTouchingViewTextNode(e, !0); + " " != t.charAt(t.length - 2) && i && " " != i.data.charAt(0) || (t = t.substr(0, t.length - 1) + " ") + } + return t.replace(/ {2}/g, "  ") + } + _nodeEndsWithSpace(e) { + if (e.getAncestors().some(e => this.preElements.includes(e.name))) + return !1; + const t = this._processDataFromViewText(e); + return " " == t.charAt(t.length - 1) + } + _processDataFromDomText(e) { + let t = e.data; + if (Er(e, this.preElements)) + return ar(e); + t = t.replace(/[ \n\t\r]{1,}/g, " "); + const i = this._getTouchingInlineDomNode(e, !1), + n = this._getTouchingInlineDomNode(e, !0), + o = this._checkShouldLeftTrimDomText(e, i), + r = this._checkShouldRightTrimDomText(e, n); + return o && (t = t.replace(/^ /, "")), + r && (t = t.replace(/ $/, "")), + t = ar(new Text(t)), + t = t.replace(/ \u00A0/g, " "), + (/( |\u00A0)\u00A0$/.test(t) || !n || n.data && " " == n.data.charAt(0)) && (t = t.replace(/\u00A0$/, " ")), + o && (t = t.replace(/^\u00A0/, " ")), + t + } + _checkShouldLeftTrimDomText(e, t) { + return !t || (!!Yi(t) || !this._encounteredRawContentDomNodes.has(e.previousSibling) && /[^\S\u00A0]/.test(t.data.charAt(t.data.length - 1))) + } + _checkShouldRightTrimDomText(e, t) { + return !t && !rr(e) + } + _getTouchingViewTextNode(e, t) { + const i = new so({ + startPosition: t ? ao._createAfter(e) : ao._createBefore(e), + direction: t ? "forward" : "backward" + }); + for (const e of i) { + if (e.item.is("containerElement")) + return null; + if (e.item.is("element", "br")) + return null; + if (e.item.is("$textProxy")) + return e.item + } + return null + } + _getTouchingInlineDomNode(e, t) { + if (!e.parentNode) + return null; + const i = t ? "nextNode" : "previousNode", + n = e.ownerDocument, + o = yr(e)[0], + r = n.createTreeWalker(o, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, { + acceptNode: e => er(e) || "BR" == e.tagName ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP + }); + r.currentNode = e; + const s = r[i](); + if (null !== s) { + const t = function (e, t) { + const i = yr(e), + n = yr(t); + let o = 0; + for (; i[o] == n[o] && i[o]; ) + o++; + return 0 === o ? null : i[o - 1] + } + (e, s); + if (t && !Er(e, this.blockElements, t) && !Er(s, this.blockElements, t)) + return s + } + return null + } + } + function Er(e, t, i) { + let n = yr(e); + return i && (n = n.slice(n.indexOf(i) + 1)), + n.some(e => e.tagName && t.includes(e.tagName.toLowerCase())) + } + function Pr(e, t) { + for (; e && e != _r.document; ) + t(e), e = e.parentNode + } + function Sr(e, t) { + const i = e.parentNode; + return i && i.tagName && t.includes(i.tagName.toLowerCase()) + } + function Mr(e) { + const t = Object.prototype.toString.apply(e); + return "[object Window]" == t || "[object global]" == t + } + var Ir = Le({}, u, { + listenTo(e, ...t) { + if (mr(e) || Mr(e)) { + const i = this._getProxyEmitter(e) || new Nr(e); + i.attach(...t), + e = i + } + u.listenTo.call(this, e, ...t) + }, + stopListening(e, t, i) { + if (mr(e) || Mr(e)) { + const t = this._getProxyEmitter(e); + if (!t) + return; + e = t + } + u.stopListening.call(this, e, t, i), + e instanceof Nr && e.detach(t) + }, + _getProxyEmitter(e) { + return t = this, + i = Rr(e), + t[l] && t[l][i] ? t[l][i].emitter : null; + var t, + i + } + }); + class Nr { + constructor(e) { + h(this, Rr(e)), + this._domNode = e + } + } + function Rr(e) { + return e["data-ck-expando"] || (e["data-ck-expando"] = s()) + } + Le(Nr.prototype, u, { + attach(e, t, i = {}) { + if (this._domListeners && this._domListeners[e]) + return; + const n = { + capture: !!i.useCapture, + passive: !!i.usePassive + }, + o = this._createDomListener(e, n); + this._domNode.addEventListener(e, o, n), + this._domListeners || (this._domListeners = {}), + this._domListeners[e] = o + }, + detach(e) { + let t; + !this._domListeners[e] || (t = this._events[e]) && t.callbacks.length || this._domListeners[e].removeListener() + }, + _createDomListener(e, t) { + const i = t => { + this.fire(e, t) + }; + return i.removeListener = () => { + this._domNode.removeEventListener(e, i, t), + delete this._domListeners[e] + }, + i + } + }); + class Or { + constructor(e) { + this.view = e, + this.document = e.document, + this.isEnabled = !1 + } + enable() { + this.isEnabled = !0 + } + disable() { + this.isEnabled = !1 + } + destroy() { + this.disable(), + this.stopListening() + } + checkShouldIgnoreEventFromTarget(e) { + return e && 3 === e.nodeType && (e = e.parentNode), + !(!e || 1 !== e.nodeType) && e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *") + } + } + Ke(Or, Ir); + var Dr = function (e) { + return this.__data__.set(e, "__lodash_hash_undefined__"), + this + }; + var Lr = function (e) { + return this.__data__.has(e) + }; + function zr(e) { + var t = -1, + i = null == e ? 0 : e.length; + for (this.__data__ = new Ft; ++t < i; ) + this.add(e[t]) + } + zr.prototype.add = zr.prototype.push = Dr, + zr.prototype.has = Lr; + var Vr = zr; + var jr = function (e, t) { + for (var i = -1, n = null == e ? 0 : e.length; ++i < n; ) + if (t(e[i], i, e)) + return !0; + return !1 + }; + var Br = function (e, t) { + return e.has(t) + }; + var Fr = function (e, t, i, n, o, r) { + var s = 1 & i, + a = e.length, + c = t.length; + if (a != c && !(s && c > a)) + return !1; + var l = r.get(e), + d = r.get(t); + if (l && d) + return l == t && d == e; + var u = -1, + h = !0, + f = 2 & i ? new Vr : void 0; + for (r.set(e, t), r.set(t, e); ++u < a; ) { + var g = e[u], + m = t[u]; + if (n) + var p = s ? n(m, g, u, t, e, r) : n(g, m, u, e, t, r); + if (void 0 !== p) { + if (p) + continue; + h = !1; + break + } + if (f) { + if (!jr(t, (function (e, t) { + if (!Br(f, t) && (g === e || o(g, e, i, n, r))) + return f.push(t) + }))) { + h = !1; + break + } + } else if (g !== m && !o(g, m, i, n, r)) { + h = !1; + break + } + } + return r.delete(e), + r.delete(t), + h + }; + var Hr = function (e) { + var t = -1, + i = Array(e.size); + return e.forEach((function (e, n) { + i[++t] = [n, e] + })), + i + }; + var Ur = function (e) { + var t = -1, + i = Array(e.size); + return e.forEach((function (e) { + i[++t] = e + })), + i + }, + Wr = _ ? _.prototype : void 0, + qr = Wr ? Wr.valueOf : void 0; + var $r = function (e, t, i, n, o, r, s) { + switch (i) { + case "[object DataView]": + if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) + return !1; + e = e.buffer, + t = t.buffer; + case "[object ArrayBuffer]": + return !(e.byteLength != t.byteLength || !r(new Ci(e), new Ci(t))); + case "[object Boolean]": + case "[object Date]": + case "[object Number]": + return G(+e, +t); + case "[object Error]": + return e.name == t.name && e.message == t.message; + case "[object RegExp]": + case "[object String]": + return e == t + ""; + case "[object Map]": + var a = Hr; + case "[object Set]": + var c = 1 & n; + if (a || (a = Ur), e.size != t.size && !c) + return !1; + var l = s.get(e); + if (l) + return l == t; + n |= 2, + s.set(e, t); + var d = Fr(a(e), a(t), n, o, r, s); + return s.delete(e), + d; + case "[object Symbol]": + if (qr) + return qr.call(e) == qr.call(t) + } + return !1 + }, + Yr = Object.prototype.hasOwnProperty; + var Gr = function (e, t, i, n, o, r) { + var s = 1 & i, + a = di(e), + c = a.length; + if (c != di(t).length && !s) + return !1; + for (var l = c; l--; ) { + var d = a[l]; + if (!(s ? d in t : Yr.call(t, d))) + return !1 + } + var u = r.get(e), + h = r.get(t); + if (u && h) + return u == t && h == e; + var f = !0; + r.set(e, t), + r.set(t, e); + for (var g = s; ++l < c; ) { + var m = e[d = a[l]], + p = t[d]; + if (n) + var b = s ? n(p, m, d, t, e, r) : n(m, p, d, e, t, r); + if (!(void 0 === b ? m === p || o(m, p, i, n, r) : b)) { + f = !1; + break + } + g || (g = "constructor" == d) + } + if (f && !g) { + var w = e.constructor, + k = t.constructor; + w == k || !("constructor" in e) || !("constructor" in t) || "function" == typeof w && w instanceof w && "function" == typeof k && k instanceof k || (f = !1) + } + return r.delete(e), + r.delete(t), + f + }, + Kr = Object.prototype.hasOwnProperty; + var Qr = function (e, t, i, n, o, r) { + var s = _e(e), + a = _e(t), + c = s ? "[object Array]" : yi(e), + l = a ? "[object Array]" : yi(t), + d = "[object Object]" == (c = "[object Arguments]" == c ? "[object Object]" : c), + u = "[object Object]" == (l = "[object Arguments]" == l ? "[object Object]" : l), + h = c == l; + if (h && Object(ve.a)(e)) { + if (!Object(ve.a)(t)) + return !1; + s = !0, + d = !1 + } + if (h && !d) + return r || (r = new Wt), s || Ee(e) ? Fr(e, t, i, n, o, r) : $r(e, t, c, i, n, o, r); + if (!(1 & i)) { + var f = d && Kr.call(e, "__wrapped__"), + g = u && Kr.call(t, "__wrapped__"); + if (f || g) { + var m = f ? e.value() : e, + p = g ? t.value() : t; + return r || (r = new Wt), + o(m, p, i, n, r) + } + } + return !!h && (r || (r = new Wt), Gr(e, t, i, n, o, r)) + }; + var Jr = function e(t, i, n, o, r) { + return t === i || (null == t || null == i || !ge(t) && !ge(i) ? t != t && i != i : Qr(t, i, n, o, e, r)) + }; + var Zr = function (e, t, i) { + var n = (i = "function" == typeof i ? i : void 0) ? i(e, t) : void 0; + return void 0 === n ? Jr(e, t, void 0, i) : !!n + }; + class Xr extends Or { + constructor(e) { + super(e), + this._config = { + childList: !0, + characterData: !0, + characterDataOldValue: !0, + subtree: !0 + }, + this.domConverter = e.domConverter, + this.renderer = e._renderer, + this._domElements = [], + this._mutationObserver = new window.MutationObserver(this._onMutations.bind(this)) + } + flush() { + this._onMutations(this._mutationObserver.takeRecords()) + } + observe(e) { + this._domElements.push(e), + this.isEnabled && this._mutationObserver.observe(e, this._config) + } + enable() { + super.enable(); + for (const e of this._domElements) + this._mutationObserver.observe(e, this._config) + } + disable() { + super.disable(), + this._mutationObserver.disconnect() + } + destroy() { + super.destroy(), + this._mutationObserver.disconnect() + } + _onMutations(e) { + if (0 === e.length) + return; + const t = this.domConverter, + i = new Map, + n = new Set; + for (const i of e) + if ("childList" === i.type) { + const e = t.mapDomToView(i.target); + if (e && (e.is("uiElement") || e.is("rawElement"))) + continue; + e && !this._isBogusBrMutation(i) && n.add(e) + } + for (const o of e) { + const e = t.mapDomToView(o.target); + if ((!e || !e.is("uiElement") && !e.is("rawElement")) && "characterData" === o.type) { + const e = t.findCorrespondingViewText(o.target); + e && !n.has(e.parent) ? i.set(e, { + type: "text", + oldText: e.data, + newText: ar(o.target), + node: e + }) : !e && rr(o.target) && n.add(t.mapDomToView(o.target.parentNode)) + } + } + const o = []; + for (const e of i.values()) + this.renderer.markToSync("text", e.node), o.push(e); + for (const e of n) { + const i = t.mapViewToDom(e), + n = Array.from(e.getChildren()), + r = Array.from(t.domChildrenToView(i, { + withChildren: !1 + })); + Zr(n, r, a) || (this.renderer.markToSync("children", e), o.push({ + type: "children", + oldChildren: n, + newChildren: r, + node: e + })) + } + const r = e[0].target.ownerDocument.getSelection(); + let s = null; + if (r && r.anchorNode) { + const e = t.domPositionToView(r.anchorNode, r.anchorOffset), + i = t.domPositionToView(r.focusNode, r.focusOffset); + e && i && (s = new ho(e), s.setFocus(i)) + } + function a(e, t) { + if (!Array.isArray(e)) + return e === t || !(!e.is("$text") || !t.is("$text")) && e.data === t.data + } + o.length && (this.document.fire("mutations", o, s), this.view.forceRender()) + } + _isBogusBrMutation(e) { + let t = null; + return null === e.nextSibling && 0 === e.removedNodes.length && 1 == e.addedNodes.length && (t = this.domConverter.domToView(e.addedNodes[0], { + withChildren: !1 + })), + t && t.is("element", "br") + } + } + class es { + constructor(e, t, i) { + this.view = e, + this.document = e.document, + this.domEvent = t, + this.domTarget = t.target, + Le(this, i) + } + get target() { + return this.view.domConverter.mapDomToView(this.domTarget) + } + preventDefault() { + this.domEvent.preventDefault() + } + stopPropagation() { + this.domEvent.stopPropagation() + } + } + class ts extends Or { + constructor(e) { + super(e), + this.useCapture = !1 + } + observe(e) { + ("string" == typeof this.domEventType ? [this.domEventType] : this.domEventType).forEach(t => { + this.listenTo(e, t, (e, t) => { + this.isEnabled && !this.checkShouldIgnoreEventFromTarget(t.target) && this.onDomEvent(t) + }, { + useCapture: this.useCapture + }) + }) + } + fire(e, t, i) { + this.isEnabled && this.document.fire(e, new es(this.view, t, i)) + } + } + class is extends ts { + constructor(e) { + super(e), + this.domEventType = ["keydown", "keyup"] + } + onDomEvent(e) { + this.fire(e.type, e, { + keyCode: e.keyCode, + altKey: e.altKey, + ctrlKey: e.ctrlKey, + shiftKey: e.shiftKey, + metaKey: e.metaKey, + get keystroke() { + return Ro(this) + } + }) + } + } + var ns = function () { + return k.a.Date.now() + }, + os = /\s/; + var rs = function (e) { + for (var t = e.length; t-- && os.test(e.charAt(t)); ); + return t + }, + ss = /^\s+/; + var as = function (e) { + return e ? e.slice(0, rs(e) + 1).replace(ss, "") : e + }, + cs = /^[-+]0x[0-9a-f]+$/i, + ls = /^0b[01]+$/i, + ds = /^0o[0-7]+$/i, + us = parseInt; + var hs = function (e) { + if ("number" == typeof e) + return e; + if (pn(e)) + return NaN; + if (w(e)) { + var t = "function" == typeof e.valueOf ? e.valueOf() : e; + e = w(t) ? t + "" : t + } + if ("string" != typeof e) + return 0 === e ? e : +e; + e = as(e); + var i = ls.test(e); + return i || ds.test(e) ? us(e.slice(2), i ? 2 : 8) : cs.test(e) ? NaN : +e + }, + fs = Math.max, + gs = Math.min; + var ms = function (e, t, i) { + var n, + o, + r, + s, + a, + c, + l = 0, + d = !1, + u = !1, + h = !0; + if ("function" != typeof e) + throw new TypeError("Expected a function"); + function f(t) { + var i = n, + r = o; + return n = o = void 0, + l = t, + s = e.apply(r, i) + } + function g(e) { + return l = e, + a = setTimeout(p, t), + d ? f(e) : s + } + function m(e) { + var i = e - c; + return void 0 === c || i >= t || i < 0 || u && e - l >= r + } + function p() { + var e = ns(); + if (m(e)) + return b(e); + a = setTimeout(p, function (e) { + var i = t - (e - c); + return u ? gs(i, r - (e - l)) : i + } + (e)) + } + function b(e) { + return a = void 0, + h && n ? f(e) : (n = o = void 0, s) + } + function k() { + var e = ns(), + i = m(e); + if (n = arguments, o = this, c = e, i) { + if (void 0 === a) + return g(c); + if (u) + return clearTimeout(a), a = setTimeout(p, t), f(c) + } + return void 0 === a && (a = setTimeout(p, t)), + s + } + return t = hs(t) || 0, + w(i) && (d = !!i.leading, r = (u = "maxWait" in i) ? fs(hs(i.maxWait) || 0, t) : r, h = "trailing" in i ? !!i.trailing : h), + k.cancel = function () { + void 0 !== a && clearTimeout(a), + l = 0, + n = c = o = a = void 0 + }, + k.flush = function () { + return void 0 === a ? s : b(ns()) + }, + k + }; + class ps extends Or { + constructor(e) { + super(e), + this._fireSelectionChangeDoneDebounced = ms(e => this.document.fire("selectionChangeDone", e), 200) + } + observe() { + const e = this.document; + e.on("arrowKey", (t, i) => { + e.selection.isFake && this.isEnabled && i.preventDefault() + }, { + context: "$capture" + }), + e.on("arrowKey", (t, i) => { + e.selection.isFake && this.isEnabled && this._handleSelectionMove(i.keyCode) + }, { + priority: "lowest" + }) + } + destroy() { + super.destroy(), + this._fireSelectionChangeDoneDebounced.cancel() + } + _handleSelectionMove(e) { + const t = this.document.selection, + i = new ho(t.getRanges(), { + backward: t.isBackward, + fake: !1 + }); + e != Io.arrowleft && e != Io.arrowup || i.setTo(i.getFirstPosition()), + e != Io.arrowright && e != Io.arrowdown || i.setTo(i.getLastPosition()); + const n = { + oldSelection: t, + newSelection: i, + domSelection: null + }; + this.document.fire("selectionChange", n), + this._fireSelectionChangeDoneDebounced(n) + } + } + class bs extends Or { + constructor(e) { + super(e), + this.mutationObserver = e.getObserver(Xr), + this.selection = this.document.selection, + this.domConverter = e.domConverter, + this._documents = new WeakSet, + this._fireSelectionChangeDoneDebounced = ms(e => this.document.fire("selectionChangeDone", e), 200), + this._clearInfiniteLoopInterval = setInterval(() => this._clearInfiniteLoop(), 1e3), + this._loopbackCounter = 0 + } + observe(e) { + const t = e.ownerDocument; + this._documents.has(t) || (this.listenTo(t, "selectionchange", (e, i) => { + this._handleSelectionChange(i, t) + }), this._documents.add(t)) + } + destroy() { + super.destroy(), + clearInterval(this._clearInfiniteLoopInterval), + this._fireSelectionChangeDoneDebounced.cancel() + } + _handleSelectionChange(e, t) { + if (!this.isEnabled) + return; + const i = t.defaultView.getSelection(); + if (this.checkShouldIgnoreEventFromTarget(i.anchorNode)) + return; + this.mutationObserver.flush(); + const n = this.domConverter.domSelectionToView(i); + if (0 != n.rangeCount) { + if (this.view.hasDomSelection = !0, !(this.selection.isEqual(n) && this.domConverter.isDomSelectionCorrect(i) || ++this._loopbackCounter > 60)) + if (this.selection.isSimilar(n)) + this.view.forceRender(); + else { + const e = { + oldSelection: this.selection, + newSelection: n, + domSelection: i + }; + this.document.fire("selectionChange", e), + this._fireSelectionChangeDoneDebounced(e) + } + } else + this.view.hasDomSelection = !1 + } + _clearInfiniteLoop() { + this._loopbackCounter = 0 + } + } + class ws extends ts { + constructor(e) { + super(e), + this.domEventType = ["focus", "blur"], + this.useCapture = !0; + const t = this.document; + t.on("focus", () => { + t.isFocused = !0, + this._renderTimeoutId = setTimeout(() => e.forceRender(), 50) + }), + t.on("blur", (i, n) => { + const o = t.selection.editableElement; + null !== o && o !== n.target || (t.isFocused = !1, e.forceRender()) + }) + } + onDomEvent(e) { + this.fire(e.type, e) + } + destroy() { + this._renderTimeoutId && clearTimeout(this._renderTimeoutId), + super.destroy() + } + } + class ks extends ts { + constructor(e) { + super(e), + this.domEventType = ["compositionstart", "compositionupdate", "compositionend"]; + const t = this.document; + t.on("compositionstart", () => { + t.isComposing = !0 + }), + t.on("compositionend", () => { + t.isComposing = !1 + }) + } + onDomEvent(e) { + this.fire(e.type, e) + } + } + class _s extends ts { + constructor(e) { + super(e), + this.domEventType = ["beforeinput"] + } + onDomEvent(e) { + this.fire(e.type, e) + } + } + class vs { + constructor() { + this._replacedElements = [] + } + replace(e, t) { + this._replacedElements.push({ + element: e, + newElement: t + }), + e.style.display = "none", + t && e.parentNode.insertBefore(t, e.nextSibling) + } + restore() { + this._replacedElements.forEach(({ + element: e, + newElement: t + }) => { + e.style.display = "", + t && t.remove() + }), + this._replacedElements = [] + } + } + var ys = function (e) { + return "string" == typeof e || !_e(e) && ge(e) && "[object String]" == S(e) + }; + function xs(e) { + return "[object Range]" == Object.prototype.toString.apply(e) + } + function As(e) { + const t = e.ownerDocument.defaultView.getComputedStyle(e); + return { + top: parseInt(t.borderTopWidth, 10), + right: parseInt(t.borderRightWidth, 10), + bottom: parseInt(t.borderBottomWidth, 10), + left: parseInt(t.borderLeftWidth, 10) + } + } + const Cs = ["top", "right", "bottom", "left", "width", "height"]; + class Ts { + constructor(e) { + const t = xs(e); + if (Object.defineProperty(this, "_source", { + value: e._source || e, + writable: !0, + enumerable: !1 + }), Yi(e) || t) + if (t) { + const t = Ts.getDomRangeRects(e); + Es(this, Ts.getBoundingRect(t)) + } else + Es(this, e.getBoundingClientRect()); + else if (Mr(e)) { + const { + innerWidth: t, + innerHeight: i + } = e; + Es(this, { + top: 0, + right: t, + bottom: i, + left: 0, + width: t, + height: i + }) + } else + Es(this, e) + } + clone() { + return new Ts(this) + } + moveTo(e, t) { + return this.top = t, + this.right = e + this.width, + this.bottom = t + this.height, + this.left = e, + this + } + moveBy(e, t) { + return this.top += t, + this.right += e, + this.left += e, + this.bottom += t, + this + } + getIntersection(e) { + const t = { + top: Math.max(this.top, e.top), + right: Math.min(this.right, e.right), + bottom: Math.min(this.bottom, e.bottom), + left: Math.max(this.left, e.left) + }; + return t.width = t.right - t.left, + t.height = t.bottom - t.top, + t.width < 0 || t.height < 0 ? null : new Ts(t) + } + getIntersectionArea(e) { + const t = this.getIntersection(e); + return t ? t.getArea() : 0 + } + getArea() { + return this.width * this.height + } + getVisible() { + const e = this._source; + let t = this.clone(); + if (!Ps(e)) { + let i = e.parentNode || e.commonAncestorContainer; + for (; i && !Ps(i); ) { + const e = new Ts(i), + n = t.getIntersection(e); + if (!n) + return null; + n.getArea() < t.getArea() && (t = n), + i = i.parentNode + } + } + return t + } + isEqual(e) { + for (const t of Cs) + if (this[t] !== e[t]) + return !1; + return !0 + } + contains(e) { + const t = this.getIntersection(e); + return !(!t || !t.isEqual(e)) + } + excludeScrollbarsAndBorders() { + const e = this._source; + let t, + i, + n; + if (Mr(e)) + t = e.innerWidth - e.document.documentElement.clientWidth, i = e.innerHeight - e.document.documentElement.clientHeight, n = e.getComputedStyle(e.document.documentElement).direction; + else { + const o = As(this._source); + t = e.offsetWidth - e.clientWidth - o.left - o.right, + i = e.offsetHeight - e.clientHeight - o.top - o.bottom, + n = e.ownerDocument.defaultView.getComputedStyle(e).direction, + this.left += o.left, + this.top += o.top, + this.right -= o.right, + this.bottom -= o.bottom, + this.width = this.right - this.left, + this.height = this.bottom - this.top + } + return this.width -= t, + "ltr" === n ? this.right -= t : this.left += t, + this.height -= i, + this.bottom -= i, + this + } + static getDomRangeRects(e) { + const t = [], + i = Array.from(e.getClientRects()); + if (i.length) + for (const e of i) + t.push(new Ts(e)); + else { + let i = e.startContainer; + er(i) && (i = i.parentNode); + const n = new Ts(i.getBoundingClientRect()); + n.right = n.left, + n.width = 0, + t.push(n) + } + return t + } + static getBoundingRect(e) { + const t = { + left: Number.POSITIVE_INFINITY, + top: Number.POSITIVE_INFINITY, + right: Number.NEGATIVE_INFINITY, + bottom: Number.NEGATIVE_INFINITY + }; + let i = 0; + for (const n of e) + i++, t.left = Math.min(t.left, n.left), t.top = Math.min(t.top, n.top), t.right = Math.max(t.right, n.right), t.bottom = Math.max(t.bottom, n.bottom); + return 0 == i ? null : (t.width = t.right - t.left, t.height = t.bottom - t.top, new Ts(t)) + } + } + function Es(e, t) { + for (const i of Cs) + e[i] = t[i] + } + function Ps(e) { + return !!Yi(e) && e === e.ownerDocument.body + } + class Ss { + constructor(e, t) { + Ss._observerInstance || Ss._createObserver(), + this._element = e, + this._callback = t, + Ss._addElementCallback(e, t), + Ss._observerInstance.observe(e) + } + destroy() { + Ss._deleteElementCallback(this._element, this._callback) + } + static _addElementCallback(e, t) { + Ss._elementCallbacks || (Ss._elementCallbacks = new Map); + let i = Ss._elementCallbacks.get(e); + i || (i = new Set, Ss._elementCallbacks.set(e, i)), + i.add(t) + } + static _deleteElementCallback(e, t) { + const i = Ss._getElementCallbacks(e); + i && (i.delete(t), i.size || (Ss._elementCallbacks.delete(e), Ss._observerInstance.unobserve(e))), + Ss._elementCallbacks && !Ss._elementCallbacks.size && (Ss._observerInstance = null, Ss._elementCallbacks = null) + } + static _getElementCallbacks(e) { + return Ss._elementCallbacks ? Ss._elementCallbacks.get(e) : null + } + static _createObserver() { + let e; + e = "function" == typeof _r.window.ResizeObserver ? _r.window.ResizeObserver : Ms, + Ss._observerInstance = new e(e => { + for (const t of e) { + const e = Ss._getElementCallbacks(t.target); + if (e) + for (const i of e) + i(t) + } + }) + } + } + Ss._observerInstance = null, + Ss._elementCallbacks = null; + class Ms { + constructor(e) { + this._callback = e, + this._elements = new Set, + this._previousRects = new Map, + this._periodicCheckTimeout = null + } + observe(e) { + this._elements.add(e), + this._checkElementRectsAndExecuteCallback(), + 1 === this._elements.size && this._startPeriodicCheck() + } + unobserve(e) { + this._elements.delete(e), + this._previousRects.delete(e), + this._elements.size || this._stopPeriodicCheck() + } + _startPeriodicCheck() { + const e = () => { + this._checkElementRectsAndExecuteCallback(), + this._periodicCheckTimeout = setTimeout(e, 100) + }; + this.listenTo(_r.window, "resize", () => { + this._checkElementRectsAndExecuteCallback() + }), + this._periodicCheckTimeout = setTimeout(e, 100) + } + _stopPeriodicCheck() { + clearTimeout(this._periodicCheckTimeout), + this.stopListening(), + this._previousRects.clear() + } + _checkElementRectsAndExecuteCallback() { + const e = []; + for (const t of this._elements) + this._hasRectChanged(t) && e.push({ + target: t, + contentRect: this._previousRects.get(t) + }); + e.length && this._callback(e) + } + _hasRectChanged(e) { + if (!e.ownerDocument.body.contains(e)) + return !1; + const t = new Ts(e), + i = this._previousRects.get(e), + n = !i || !i.isEqual(t); + return this._previousRects.set(e, t), + n + } + } + function Is(e) { + return t => t + e + } + function Ns(e) { + const t = e.next(); + return t.done ? null : t.value + } + Ke(Ms, Ir); + class Rs { + constructor() { + this.set("isFocused", !1), + this.set("focusedElement", null), + this._elements = new Set, + this._nextEventLoopTimeout = null + } + add(e) { + if (this._elements.has(e)) + throw new c.a("focustracker-add-element-already-exist", this); + this.listenTo(e, "focus", () => this._focus(e), { + useCapture: !0 + }), + this.listenTo(e, "blur", () => this._blur(), { + useCapture: !0 + }), + this._elements.add(e) + } + remove(e) { + e === this.focusedElement && this._blur(e), + this._elements.has(e) && (this.stopListening(e), this._elements.delete(e)) + } + destroy() { + this.stopListening() + } + _focus(e) { + clearTimeout(this._nextEventLoopTimeout), + this.focusedElement = e, + this.isFocused = !0 + } + _blur() { + clearTimeout(this._nextEventLoopTimeout), + this._nextEventLoopTimeout = setTimeout(() => { + this.focusedElement = null, + this.isFocused = !1 + }, 0) + } + } + Ke(Rs, Ir), + Ke(Rs, Ue); + class Os { + constructor() { + this._listener = Object.create(Ir) + } + listenTo(e) { + this._listener.listenTo(e, "keydown", (e, t) => { + this._listener.fire("_keydown:" + Ro(t), t) + }) + } + set(e, t, i = {}) { + const n = Oo(e), + o = i.priority; + this._listener.listenTo(this._listener, "_keydown:" + n, (e, i) => { + t(i, () => { + i.preventDefault(), + i.stopPropagation(), + e.stop() + }), + e.return = !0 + }, { + priority: o + }) + } + press(e) { + return !!this._listener.fire("_keydown:" + Ro(e), e) + } + destroy() { + this._listener.stopListening() + } + } + class Ds extends Or { + constructor(e) { + super(e), + this.document.on("keydown", (e, t) => { + if (this.isEnabled && ((i = t.keyCode) == Io.arrowright || i == Io.arrowleft || i == Io.arrowup || i == Io.arrowdown)) { + const i = new go(this.document, "arrowKey", this.document.selection.getFirstRange()); + this.document.fire(i, t), + i.stop.called && e.stop() + } + var i + }) + } + observe() {} + } + function Ls({ + target: e, + viewportOffset: t = 0 + }) { + const i = Us(e); + let n = i, + o = null; + for (; n; ) { + let r; + r = Ws(n == i ? e : o), + Vs(r, () => qs(e, n)); + const s = qs(e, n); + if (zs(n, s, t), n.parent != n) { + if (o = n.frameElement, n = n.parent, !o) + return + } else + n = null + } + } + function zs(e, t, i) { + const n = t.clone().moveBy(0, i), + o = t.clone().moveBy(0, -i), + r = new Ts(e).excludeScrollbarsAndBorders(); + if (![o, n].every(e => r.contains(e))) { + let { + scrollX: s, + scrollY: a + } = e; + Bs(o, r) ? a -= r.top - t.top + i : js(n, r) && (a += t.bottom - r.bottom + i), + Fs(t, r) ? s -= r.left - t.left + i : Hs(t, r) && (s += t.right - r.right + i), + e.scrollTo(s, a) + } + } + function Vs(e, t) { + const i = Us(e); + let n, + o; + for (; e != i.document.body; ) + o = t(), n = new Ts(e).excludeScrollbarsAndBorders(), n.contains(o) || (Bs(o, n) ? e.scrollTop -= n.top - o.top : js(o, n) && (e.scrollTop += o.bottom - n.bottom), Fs(o, n) ? e.scrollLeft -= n.left - o.left : Hs(o, n) && (e.scrollLeft += o.right - n.right)), e = e.parentNode + } + function js(e, t) { + return e.bottom > t.bottom + } + function Bs(e, t) { + return e.top < t.top + } + function Fs(e, t) { + return e.left < t.left + } + function Hs(e, t) { + return e.right > t.right + } + function Us(e) { + return xs(e) ? e.startContainer.ownerDocument.defaultView : e.ownerDocument.defaultView + } + function Ws(e) { + if (xs(e)) { + let t = e.commonAncestorContainer; + return er(t) && (t = t.parentNode), + t + } + return e.parentNode + } + function qs(e, t) { + const i = Us(e), + n = new Ts(e); + if (i === t) + return n; { + let e = i; + for (; e != t; ) { + const t = e.frameElement, + i = new Ts(t).excludeScrollbarsAndBorders(); + n.moveBy(i.left, i.top), + e = e.parent + } + } + return n + } + Object.assign({}, { + scrollViewportToShowTarget: Ls, + scrollAncestorsToShowTarget: function (e) { + Vs(Ws(e), () => new Ts(e)) + } + }); + class $s { + constructor(e) { + this.document = new vo(e), + this.domConverter = new Tr(this.document), + this.domRoots = new Map, + this.set("isRenderingInProgress", !1), + this.set("hasDomSelection", !1), + this._renderer = new pr(this.domConverter, this.document.selection), + this._renderer.bind("isFocused").to(this.document), + this._initialDomRootAttributes = new WeakMap, + this._observers = new Map, + this._ongoingChange = !1, + this._postFixersInProgress = !1, + this._renderingDisabled = !1, + this._hasChangedSinceTheLastRendering = !1, + this._writer = new Wo(this.document), + this.addObserver(Xr), + this.addObserver(bs), + this.addObserver(ws), + this.addObserver(is), + this.addObserver(ps), + this.addObserver(ks), + this.addObserver(Ds), + Po.isAndroid && this.addObserver(_s), + this.document.on("arrowKey", cr, { + priority: "low" + }), + jo(this), + this.on("render", () => { + this._render(), + this.document.fire("layoutChanged"), + this._hasChangedSinceTheLastRendering = !1 + }), + this.listenTo(this.document.selection, "change", () => { + this._hasChangedSinceTheLastRendering = !0 + }) + } + attachDomRoot(e, t = "main") { + const i = this.document.getRoot(t); + i._name = e.tagName.toLowerCase(); + const n = {}; + for (const { + name: t, + value: o + } + of Array.from(e.attributes)) + n[t] = o, "class" === t ? this._writer.addClass(o.split(" "), i) : this._writer.setAttribute(t, o, i); + this._initialDomRootAttributes.set(e, n); + const o = () => { + this._writer.setAttribute("contenteditable", !i.isReadOnly, i), + i.isReadOnly ? this._writer.addClass("ck-read-only", i) : this._writer.removeClass("ck-read-only", i) + }; + o(), + this.domRoots.set(t, e), + this.domConverter.bindElements(e, i), + this._renderer.markToSync("children", i), + this._renderer.markToSync("attributes", i), + this._renderer.domDocuments.add(e.ownerDocument), + i.on("change:children", (e, t) => this._renderer.markToSync("children", t)), + i.on("change:attributes", (e, t) => this._renderer.markToSync("attributes", t)), + i.on("change:text", (e, t) => this._renderer.markToSync("text", t)), + i.on("change:isReadOnly", () => this.change(o)), + i.on("change", () => { + this._hasChangedSinceTheLastRendering = !0 + }); + for (const i of this._observers.values()) + i.observe(e, t) + } + detachDomRoot(e) { + const t = this.domRoots.get(e); + Array.from(t.attributes).forEach(({ + name: e + }) => t.removeAttribute(e)); + const i = this._initialDomRootAttributes.get(t); + for (const e in i) + t.setAttribute(e, i[e]); + this.domRoots.delete(e), + this.domConverter.unbindDomElement(t) + } + getDomRoot(e = "main") { + return this.domRoots.get(e) + } + addObserver(e) { + let t = this._observers.get(e); + if (t) + return t; + t = new e(this), + this._observers.set(e, t); + for (const[e, i]of this.domRoots) + t.observe(i, e); + return t.enable(), + t + } + getObserver(e) { + return this._observers.get(e) + } + disableObservers() { + for (const e of this._observers.values()) + e.disable() + } + enableObservers() { + for (const e of this._observers.values()) + e.enable() + } + scrollToTheSelection() { + const e = this.document.selection.getFirstRange(); + e && Ls({ + target: this.domConverter.viewRangeToDom(e), + viewportOffset: 20 + }) + } + focus() { + if (!this.document.isFocused) { + const e = this.document.selection.editableElement; + e && (this.domConverter.focus(e), this.forceRender()) + } + } + change(e) { + if (this.isRenderingInProgress || this._postFixersInProgress) + throw new c.a("cannot-change-view-tree", this); + try { + if (this._ongoingChange) + return e(this._writer); + this._ongoingChange = !0; + const t = e(this._writer); + return this._ongoingChange = !1, + !this._renderingDisabled && this._hasChangedSinceTheLastRendering && (this._postFixersInProgress = !0, this.document._callPostFixers(this._writer), this._postFixersInProgress = !1, this.fire("render")), + t + } catch (e) { + c.a.rethrowUnexpectedError(e, this) + } + } + forceRender() { + this._hasChangedSinceTheLastRendering = !0, + this.change(() => {}) + } + destroy() { + for (const e of this._observers.values()) + e.destroy(); + this.document.destroy(), + this.stopListening() + } + createPositionAt(e, t) { + return ao._createAt(e, t) + } + createPositionAfter(e) { + return ao._createAfter(e) + } + createPositionBefore(e) { + return ao._createBefore(e) + } + createRange(e, t) { + return new co(e, t) + } + createRangeOn(e) { + return co._createOn(e) + } + createRangeIn(e) { + return co._createIn(e) + } + createSelection(e, t, i) { + return new ho(e, t, i) + } + _disableRendering(e) { + this._renderingDisabled = e, + 0 == e && this.change(() => {}) + } + _render() { + this.isRenderingInProgress = !0, + this.disableObservers(), + this._renderer.render(), + this.enableObservers(), + this.isRenderingInProgress = !1 + } + } + Ke($s, Ue); + class Ys { + constructor(e) { + this.parent = null, + this._attrs = fn(e) + } + get index() { + let e; + if (!this.parent) + return null; + if (null === (e = this.parent.getChildIndex(this))) + throw new c.a("model-node-not-found-in-parent", this); + return e + } + get startOffset() { + let e; + if (!this.parent) + return null; + if (null === (e = this.parent.getChildStartOffset(this))) + throw new c.a("model-node-not-found-in-parent", this); + return e + } + get offsetSize() { + return 1 + } + get endOffset() { + return this.parent ? this.startOffset + this.offsetSize : null + } + get nextSibling() { + const e = this.index; + return null !== e && this.parent.getChild(e + 1) || null + } + get previousSibling() { + const e = this.index; + return null !== e && this.parent.getChild(e - 1) || null + } + get root() { + let e = this; + for (; e.parent; ) + e = e.parent; + return e + } + isAttached() { + return this.root.is("rootElement") + } + getPath() { + const e = []; + let t = this; + for (; t.parent; ) + e.unshift(t.startOffset), t = t.parent; + return e + } + getAncestors(e = { + includeSelf: !1, + parentFirst: !1 + }) { + const t = []; + let i = e.includeSelf ? this : this.parent; + for (; i; ) + t[e.parentFirst ? "push" : "unshift"](i), i = i.parent; + return t + } + getCommonAncestor(e, t = {}) { + const i = this.getAncestors(t), + n = e.getAncestors(t); + let o = 0; + for (; i[o] == n[o] && i[o]; ) + o++; + return 0 === o ? null : i[o - 1] + } + isBefore(e) { + if (this == e) + return !1; + if (this.root !== e.root) + return !1; + const t = this.getPath(), + i = e.getPath(), + n = cn(t, i); + switch (n) { + case "prefix": + return !0; + case "extension": + return !1; + default: + return t[n] < i[n] + } + } + isAfter(e) { + return this != e && (this.root === e.root && !this.isBefore(e)) + } + hasAttribute(e) { + return this._attrs.has(e) + } + getAttribute(e) { + return this._attrs.get(e) + } + getAttributes() { + return this._attrs.entries() + } + getAttributeKeys() { + return this._attrs.keys() + } + toJSON() { + const e = {}; + return this._attrs.size && (e.attributes = Array.from(this._attrs).reduce((e, t) => (e[t[0]] = t[1], e), {})), + e + } + is(e) { + return "node" === e || "model:node" === e + } + _clone() { + return new Ys(this._attrs) + } + _remove() { + this.parent._removeChildren(this.index) + } + _setAttribute(e, t) { + this._attrs.set(e, t) + } + _setAttributesTo(e) { + this._attrs = fn(e) + } + _removeAttribute(e) { + return this._attrs.delete(e) + } + _clearAttributes() { + this._attrs.clear() + } + } + class Gs extends Ys { + constructor(e, t) { + super(t), + this._data = e || "" + } + get offsetSize() { + return this.data.length + } + get data() { + return this._data + } + is(e) { + return "$text" === e || "model:$text" === e || "text" === e || "model:text" === e || "node" === e || "model:node" === e + } + toJSON() { + const e = super.toJSON(); + return e.data = this.data, + e + } + _clone() { + return new Gs(this.data, this.getAttributes()) + } + static fromJSON(e) { + return new Gs(e.data, e.attributes) + } + } + class Ks { + constructor(e, t, i) { + if (this.textNode = e, t < 0 || t > e.offsetSize) + throw new c.a("model-textproxy-wrong-offsetintext", this); + if (i < 0 || t + i > e.offsetSize) + throw new c.a("model-textproxy-wrong-length", this); + this.data = e.data.substring(t, t + i), + this.offsetInText = t + } + get startOffset() { + return null !== this.textNode.startOffset ? this.textNode.startOffset + this.offsetInText : null + } + get offsetSize() { + return this.data.length + } + get endOffset() { + return null !== this.startOffset ? this.startOffset + this.offsetSize : null + } + get isPartial() { + return this.offsetSize !== this.textNode.offsetSize + } + get parent() { + return this.textNode.parent + } + get root() { + return this.textNode.root + } + is(e) { + return "$textProxy" === e || "model:$textProxy" === e || "textProxy" === e || "model:textProxy" === e + } + getPath() { + const e = this.textNode.getPath(); + return e.length > 0 && (e[e.length - 1] += this.offsetInText), + e + } + getAncestors(e = { + includeSelf: !1, + parentFirst: !1 + }) { + const t = []; + let i = e.includeSelf ? this : this.parent; + for (; i; ) + t[e.parentFirst ? "push" : "unshift"](i), i = i.parent; + return t + } + hasAttribute(e) { + return this.textNode.hasAttribute(e) + } + getAttribute(e) { + return this.textNode.getAttribute(e) + } + getAttributes() { + return this.textNode.getAttributes() + } + getAttributeKeys() { + return this.textNode.getAttributeKeys() + } + } + class Qs { + constructor(e) { + this._nodes = [], + e && this._insertNodes(0, e) + } + [Symbol.iterator]() { + return this._nodes[Symbol.iterator]() + } + get length() { + return this._nodes.length + } + get maxOffset() { + return this._nodes.reduce((e, t) => e + t.offsetSize, 0) + } + getNode(e) { + return this._nodes[e] || null + } + getNodeIndex(e) { + const t = this._nodes.indexOf(e); + return -1 == t ? null : t + } + getNodeStartOffset(e) { + const t = this.getNodeIndex(e); + return null === t ? null : this._nodes.slice(0, t).reduce((e, t) => e + t.offsetSize, 0) + } + indexToOffset(e) { + if (e == this._nodes.length) + return this.maxOffset; + const t = this._nodes[e]; + if (!t) + throw new c.a("model-nodelist-index-out-of-bounds", this); + return this.getNodeStartOffset(t) + } + offsetToIndex(e) { + let t = 0; + for (const i of this._nodes) { + if (e >= t && e < t + i.offsetSize) + return this.getNodeIndex(i); + t += i.offsetSize + } + if (t != e) + throw new c.a("model-nodelist-offset-out-of-bounds", this, { + offset: e, + nodeList: this + }); + return this.length + } + _insertNodes(e, t) { + for (const e of t) + if (!(e instanceof Ys)) + throw new c.a("model-nodelist-insertnodes-not-node", this); + this._nodes.splice(e, 0, ...t) + } + _removeNodes(e, t = 1) { + return this._nodes.splice(e, t) + } + toJSON() { + return this._nodes.map(e => e.toJSON()) + } + } + class Js extends Ys { + constructor(e, t, i) { + super(t), + this.name = e, + this._children = new Qs, + i && this._insertChild(0, i) + } + get childCount() { + return this._children.length + } + get maxOffset() { + return this._children.maxOffset + } + get isEmpty() { + return 0 === this.childCount + } + is(e, t = null) { + return t ? t === this.name && ("element" === e || "model:element" === e) : "element" === e || "model:element" === e || "node" === e || "model:node" === e + } + getChild(e) { + return this._children.getNode(e) + } + getChildren() { + return this._children[Symbol.iterator]() + } + getChildIndex(e) { + return this._children.getNodeIndex(e) + } + getChildStartOffset(e) { + return this._children.getNodeStartOffset(e) + } + offsetToIndex(e) { + return this._children.offsetToIndex(e) + } + getNodeByPath(e) { + let t = this; + for (const i of e) + t = t.getChild(t.offsetToIndex(i)); + return t + } + findAncestor(e, t = { + includeSelf: !1 + }) { + let i = t.includeSelf ? this : this.parent; + for (; i; ) { + if (i.name === e) + return i; + i = i.parent + } + return null + } + toJSON() { + const e = super.toJSON(); + if (e.name = this.name, this._children.length > 0) { + e.children = []; + for (const t of this._children) + e.children.push(t.toJSON()) + } + return e + } + _clone(e = !1) { + const t = e ? Array.from(this._children).map(e => e._clone(!0)) : null; + return new Js(this.name, this.getAttributes(), t) + } + _appendChild(e) { + this._insertChild(this.childCount, e) + } + _insertChild(e, t) { + const i = function (e) { + if ("string" == typeof e) + return [new Gs(e)]; + Ji(e) || (e = [e]); + return Array.from(e).map(e => "string" == typeof e ? new Gs(e) : e instanceof Ks ? new Gs(e.data, e.getAttributes()) : e) + } + (t); + for (const e of i) + null !== e.parent && e._remove(), e.parent = this; + this._children._insertNodes(e, i) + } + _removeChildren(e, t = 1) { + const i = this._children._removeNodes(e, t); + for (const e of i) + e.parent = null; + return i + } + static fromJSON(e) { + let t = null; + if (e.children) { + t = []; + for (const i of e.children) + i.name ? t.push(Js.fromJSON(i)) : t.push(Gs.fromJSON(i)) + } + return new Js(e.name, e.attributes, t) + } + } + class Zs { + constructor(e = {}) { + if (!e.boundaries && !e.startPosition) + throw new c.a("model-tree-walker-no-start-position", null); + const t = e.direction || "forward"; + if ("forward" != t && "backward" != t) + throw new c.a("model-tree-walker-unknown-direction", e, { + direction: t + }); + this.direction = t, + this.boundaries = e.boundaries || null, + e.startPosition ? this.position = e.startPosition.clone() : this.position = ea._createAt(this.boundaries["backward" == this.direction ? "end" : "start"]), + this.position.stickiness = "toNone", + this.singleCharacters = !!e.singleCharacters, + this.shallow = !!e.shallow, + this.ignoreElementEnd = !!e.ignoreElementEnd, + this._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null, + this._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null, + this._visitedParent = this.position.parent + } + [Symbol.iterator]() { + return this + } + skip(e) { + let t, + i, + n, + o; + do { + n = this.position, + o = this._visitedParent, + ({ + done: t, + value: i + } = this.next()) + } while (!t && e(i)); + t || (this.position = n, this._visitedParent = o) + } + next() { + return "forward" == this.direction ? this._next() : this._previous() + } + _next() { + const e = this.position, + t = this.position.clone(), + i = this._visitedParent; + if (null === i.parent && t.offset === i.maxOffset) + return { + done: !0 + }; + if (i === this._boundaryEndParent && t.offset == this.boundaries.end.offset) + return { + done: !0 + }; + const n = t.parent, + o = ta(t, n), + r = o || ia(t, n, o); + if (r instanceof Js) + return this.shallow ? t.offset++ : (t.path.push(0), this._visitedParent = r), this.position = t, Xs("elementStart", r, e, t, 1); + if (r instanceof Gs) { + let n; + if (this.singleCharacters) + n = 1; + else { + let e = r.endOffset; + this._boundaryEndParent == i && this.boundaries.end.offset < e && (e = this.boundaries.end.offset), + n = e - t.offset + } + const o = t.offset - r.startOffset, + s = new Ks(r, o, n); + return t.offset += n, + this.position = t, + Xs("text", s, e, t, n) + } + return t.path.pop(), + t.offset++, + this.position = t, + this._visitedParent = i.parent, + this.ignoreElementEnd ? this._next() : Xs("elementEnd", i, e, t) + } + _previous() { + const e = this.position, + t = this.position.clone(), + i = this._visitedParent; + if (null === i.parent && 0 === t.offset) + return { + done: !0 + }; + if (i == this._boundaryStartParent && t.offset == this.boundaries.start.offset) + return { + done: !0 + }; + const n = t.parent, + o = ta(t, n), + r = o || na(t, n, o); + if (r instanceof Js) + return t.offset--, this.shallow ? (this.position = t, Xs("elementStart", r, e, t, 1)) : (t.path.push(r.maxOffset), this.position = t, this._visitedParent = r, this.ignoreElementEnd ? this._previous() : Xs("elementEnd", r, e, t)); + if (r instanceof Gs) { + let n; + if (this.singleCharacters) + n = 1; + else { + let e = r.startOffset; + this._boundaryStartParent == i && this.boundaries.start.offset > e && (e = this.boundaries.start.offset), + n = t.offset - e + } + const o = t.offset - r.startOffset, + s = new Ks(r, o - n, n); + return t.offset -= n, + this.position = t, + Xs("text", s, e, t, n) + } + return t.path.pop(), + this.position = t, + this._visitedParent = i.parent, + Xs("elementStart", i, e, t, 1) + } + } + function Xs(e, t, i, n, o) { + return { + done: !1, + value: { + type: e, + item: t, + previousPosition: i, + nextPosition: n, + length: o + } + } + } + class ea { + constructor(e, t, i = "toNone") { + if (!e.is("element") && !e.is("documentFragment")) + throw new c.a("model-position-root-invalid", e); + if (!(t instanceof Array) || 0 === t.length) + throw new c.a("model-position-path-incorrect-format", e, { + path: t + }); + e.is("rootElement") ? t = t.slice() : (t = [...e.getPath(), ...t], e = e.root), + this.root = e, + this.path = t, + this.stickiness = i + } + get offset() { + return this.path[this.path.length - 1] + } + set offset(e) { + this.path[this.path.length - 1] = e + } + get parent() { + let e = this.root; + for (let t = 0; t < this.path.length - 1; t++) + if (e = e.getChild(e.offsetToIndex(this.path[t])), !e) + throw new c.a("model-position-path-incorrect", this, { + position: this + }); + if (e.is("$text")) + throw new c.a("model-position-path-incorrect", this, { + position: this + }); + return e + } + get index() { + return this.parent.offsetToIndex(this.offset) + } + get textNode() { + return ta(this, this.parent) + } + get nodeAfter() { + const e = this.parent; + return ia(this, e, ta(this, e)) + } + get nodeBefore() { + const e = this.parent; + return na(this, e, ta(this, e)) + } + get isAtStart() { + return 0 === this.offset + } + get isAtEnd() { + return this.offset == this.parent.maxOffset + } + compareWith(e) { + if (this.root != e.root) + return "different"; + const t = cn(this.path, e.path); + switch (t) { + case "same": + return "same"; + case "prefix": + return "before"; + case "extension": + return "after"; + default: + return this.path[t] < e.path[t] ? "before" : "after" + } + } + getLastMatchingPosition(e, t = {}) { + t.startPosition = this; + const i = new Zs(t); + return i.skip(e), + i.position + } + getParentPath() { + return this.path.slice(0, -1) + } + getAncestors() { + const e = this.parent; + return e.is("documentFragment") ? [e] : e.getAncestors({ + includeSelf: !0 + }) + } + findAncestor(e) { + const t = this.parent; + return t.is("element") ? t.findAncestor(e, { + includeSelf: !0 + }) : null + } + getCommonPath(e) { + if (this.root != e.root) + return []; + const t = cn(this.path, e.path), + i = "string" == typeof t ? Math.min(this.path.length, e.path.length) : t; + return this.path.slice(0, i) + } + getCommonAncestor(e) { + const t = this.getAncestors(), + i = e.getAncestors(); + let n = 0; + for (; t[n] == i[n] && t[n]; ) + n++; + return 0 === n ? null : t[n - 1] + } + getShiftedBy(e) { + const t = this.clone(), + i = t.offset + e; + return t.offset = i < 0 ? 0 : i, + t + } + isAfter(e) { + return "after" == this.compareWith(e) + } + isBefore(e) { + return "before" == this.compareWith(e) + } + isEqual(e) { + return "same" == this.compareWith(e) + } + isTouching(e) { + let t = null, + i = null; + switch (this.compareWith(e)) { + case "same": + return !0; + case "before": + t = ea._createAt(this), + i = ea._createAt(e); + break; + case "after": + t = ea._createAt(e), + i = ea._createAt(this); + break; + default: + return !1 + } + let n = t.parent; + for (; t.path.length + i.path.length; ) { + if (t.isEqual(i)) + return !0; + if (t.path.length > i.path.length) { + if (t.offset !== n.maxOffset) + return !1; + t.path = t.path.slice(0, -1), + n = n.parent, + t.offset++ + } else { + if (0 !== i.offset) + return !1; + i.path = i.path.slice(0, -1) + } + } + } + is(e) { + return "position" === e || "model:position" === e + } + hasSameParentAs(e) { + if (this.root !== e.root) + return !1; + return "same" == cn(this.getParentPath(), e.getParentPath()) + } + getTransformedByOperation(e) { + let t; + switch (e.type) { + case "insert": + t = this._getTransformedByInsertOperation(e); + break; + case "move": + case "remove": + case "reinsert": + t = this._getTransformedByMoveOperation(e); + break; + case "split": + t = this._getTransformedBySplitOperation(e); + break; + case "merge": + t = this._getTransformedByMergeOperation(e); + break; + default: + t = ea._createAt(this) + } + return t + } + _getTransformedByInsertOperation(e) { + return this._getTransformedByInsertion(e.position, e.howMany) + } + _getTransformedByMoveOperation(e) { + return this._getTransformedByMove(e.sourcePosition, e.targetPosition, e.howMany) + } + _getTransformedBySplitOperation(e) { + const t = e.movedRange; + return t.containsPosition(this) || t.start.isEqual(this) && "toNext" == this.stickiness ? this._getCombined(e.splitPosition, e.moveTargetPosition) : e.graveyardPosition ? this._getTransformedByMove(e.graveyardPosition, e.insertionPosition, 1) : this._getTransformedByInsertion(e.insertionPosition, 1) + } + _getTransformedByMergeOperation(e) { + const t = e.movedRange; + let i; + return t.containsPosition(this) || t.start.isEqual(this) ? (i = this._getCombined(e.sourcePosition, e.targetPosition), e.sourcePosition.isBefore(e.targetPosition) && (i = i._getTransformedByDeletion(e.deletionPosition, 1))) : i = this.isEqual(e.deletionPosition) ? ea._createAt(e.deletionPosition) : this._getTransformedByMove(e.deletionPosition, e.graveyardPosition, 1), + i + } + _getTransformedByDeletion(e, t) { + const i = ea._createAt(this); + if (this.root != e.root) + return i; + if ("same" == cn(e.getParentPath(), this.getParentPath())) { + if (e.offset < this.offset) { + if (e.offset + t > this.offset) + return null; + i.offset -= t + } + } else if ("prefix" == cn(e.getParentPath(), this.getParentPath())) { + const n = e.path.length - 1; + if (e.offset <= this.path[n]) { + if (e.offset + t > this.path[n]) + return null; + i.path[n] -= t + } + } + return i + } + _getTransformedByInsertion(e, t) { + const i = ea._createAt(this); + if (this.root != e.root) + return i; + if ("same" == cn(e.getParentPath(), this.getParentPath())) + (e.offset < this.offset || e.offset == this.offset && "toPrevious" != this.stickiness) && (i.offset += t); + else if ("prefix" == cn(e.getParentPath(), this.getParentPath())) { + const n = e.path.length - 1; + e.offset <= this.path[n] && (i.path[n] += t) + } + return i + } + _getTransformedByMove(e, t, i) { + if (t = t._getTransformedByDeletion(e, i), e.isEqual(t)) + return ea._createAt(this); + const n = this._getTransformedByDeletion(e, i); + return null === n || e.isEqual(this) && "toNext" == this.stickiness || e.getShiftedBy(i).isEqual(this) && "toPrevious" == this.stickiness ? this._getCombined(e, t) : n._getTransformedByInsertion(t, i) + } + _getCombined(e, t) { + const i = e.path.length - 1, + n = ea._createAt(t); + return n.stickiness = this.stickiness, + n.offset = n.offset + this.path[i] - e.offset, + n.path = [...n.path, ...this.path.slice(i + 1)], + n + } + toJSON() { + return { + root: this.root.toJSON(), + path: Array.from(this.path), + stickiness: this.stickiness + } + } + clone() { + return new this.constructor(this.root, this.path, this.stickiness) + } + static _createAt(e, t, i = "toNone") { + if (e instanceof ea) + return new ea(e.root, e.path, e.stickiness); { + const n = e; + if ("end" == t) + t = n.maxOffset; + else { + if ("before" == t) + return this._createBefore(n, i); + if ("after" == t) + return this._createAfter(n, i); + if (0 !== t && !t) + throw new c.a("model-createpositionat-offset-required", [this, e]) + } + if (!n.is("element") && !n.is("documentFragment")) + throw new c.a("model-position-parent-incorrect", [this, e]); + const o = n.getPath(); + return o.push(t), + new this(n.root, o, i) + } + } + static _createAfter(e, t) { + if (!e.parent) + throw new c.a("model-position-after-root", [this, e], { + root: e + }); + return this._createAt(e.parent, e.endOffset, t) + } + static _createBefore(e, t) { + if (!e.parent) + throw new c.a("model-position-before-root", e, { + root: e + }); + return this._createAt(e.parent, e.startOffset, t) + } + static fromJSON(e, t) { + if ("$graveyard" === e.root) { + const i = new ea(t.graveyard, e.path); + return i.stickiness = e.stickiness, + i + } + if (!t.getRoot(e.root)) + throw new c.a("model-position-fromjson-no-root", t, { + rootName: e.root + }); + return new ea(t.getRoot(e.root), e.path, e.stickiness) + } + } + function ta(e, t) { + const i = t.getChild(t.offsetToIndex(e.offset)); + return i && i.is("$text") && i.startOffset < e.offset ? i : null + } + function ia(e, t, i) { + return null !== i ? null : t.getChild(t.offsetToIndex(e.offset)) + } + function na(e, t, i) { + return null !== i ? null : t.getChild(t.offsetToIndex(e.offset) - 1) + } + class oa { + constructor(e, t = null) { + this.start = ea._createAt(e), + this.end = t ? ea._createAt(t) : ea._createAt(e), + this.start.stickiness = this.isCollapsed ? "toNone" : "toNext", + this.end.stickiness = this.isCollapsed ? "toNone" : "toPrevious" + } + * [Symbol.iterator]() { + yield * new Zs({ + boundaries: this, + ignoreElementEnd: !0 + }) + } + get isCollapsed() { + return this.start.isEqual(this.end) + } + get isFlat() { + return "same" == cn(this.start.getParentPath(), this.end.getParentPath()) + } + get root() { + return this.start.root + } + containsPosition(e) { + return e.isAfter(this.start) && e.isBefore(this.end) + } + containsRange(e, t = !1) { + e.isCollapsed && (t = !1); + const i = this.containsPosition(e.start) || t && this.start.isEqual(e.start), + n = this.containsPosition(e.end) || t && this.end.isEqual(e.end); + return i && n + } + containsItem(e) { + const t = ea._createBefore(e); + return this.containsPosition(t) || this.start.isEqual(t) + } + is(e) { + return "range" === e || "model:range" === e + } + isEqual(e) { + return this.start.isEqual(e.start) && this.end.isEqual(e.end) + } + isIntersecting(e) { + return this.start.isBefore(e.end) && this.end.isAfter(e.start) + } + getDifference(e) { + const t = []; + return this.isIntersecting(e) ? (this.containsPosition(e.start) && t.push(new oa(this.start, e.start)), this.containsPosition(e.end) && t.push(new oa(e.end, this.end))) : t.push(new oa(this.start, this.end)), + t + } + getIntersection(e) { + if (this.isIntersecting(e)) { + let t = this.start, + i = this.end; + return this.containsPosition(e.start) && (t = e.start), + this.containsPosition(e.end) && (i = e.end), + new oa(t, i) + } + return null + } + getJoined(e, t = !1) { + let i = this.isIntersecting(e); + if (i || (i = this.start.isBefore(e.start) ? t ? this.end.isTouching(e.start) : this.end.isEqual(e.start) : t ? e.end.isTouching(this.start) : e.end.isEqual(this.start)), !i) + return null; + let n = this.start, + o = this.end; + return e.start.isBefore(n) && (n = e.start), + e.end.isAfter(o) && (o = e.end), + new oa(n, o) + } + getMinimalFlatRanges() { + const e = [], + t = this.start.getCommonPath(this.end).length, + i = ea._createAt(this.start); + let n = i.parent; + for (; i.path.length > t + 1; ) { + const t = n.maxOffset - i.offset; + 0 !== t && e.push(new oa(i, i.getShiftedBy(t))), + i.path = i.path.slice(0, -1), + i.offset++, + n = n.parent + } + for (; i.path.length <= this.end.path.length; ) { + const t = this.end.path[i.path.length - 1], + n = t - i.offset; + 0 !== n && e.push(new oa(i, i.getShiftedBy(n))), + i.offset = t, + i.path.push(0) + } + return e + } + getWalker(e = {}) { + return e.boundaries = this, + new Zs(e) + } + * getItems(e = {}) { + e.boundaries = this, + e.ignoreElementEnd = !0; + const t = new Zs(e); + for (const e of t) + yield e.item + } + * getPositions(e = {}) { + e.boundaries = this; + const t = new Zs(e); + yield t.position; + for (const e of t) + yield e.nextPosition + } + getTransformedByOperation(e) { + switch (e.type) { + case "insert": + return this._getTransformedByInsertOperation(e); + case "move": + case "remove": + case "reinsert": + return this._getTransformedByMoveOperation(e); + case "split": + return [this._getTransformedBySplitOperation(e)]; + case "merge": + return [this._getTransformedByMergeOperation(e)] + } + return [new oa(this.start, this.end)] + } + getTransformedByOperations(e) { + const t = [new oa(this.start, this.end)]; + for (const i of e) + for (let e = 0; e < t.length; e++) { + const n = t[e].getTransformedByOperation(i); + t.splice(e, 1, ...n), + e += n.length - 1 + } + for (let e = 0; e < t.length; e++) { + const i = t[e]; + for (let n = e + 1; n < t.length; n++) { + const e = t[n]; + (i.containsRange(e) || e.containsRange(i) || i.isEqual(e)) && t.splice(n, 1) + } + } + return t + } + getCommonAncestor() { + return this.start.getCommonAncestor(this.end) + } + getContainedElement() { + if (this.isCollapsed) + return null; + const e = this.start.nodeAfter, + t = this.end.nodeBefore; + return e && e.is("element") && e === t ? e : null + } + toJSON() { + return { + start: this.start.toJSON(), + end: this.end.toJSON() + } + } + clone() { + return new this.constructor(this.start, this.end) + } + _getTransformedByInsertOperation(e, t = !1) { + return this._getTransformedByInsertion(e.position, e.howMany, t) + } + _getTransformedByMoveOperation(e, t = !1) { + const i = e.sourcePosition, + n = e.howMany, + o = e.targetPosition; + return this._getTransformedByMove(i, o, n, t) + } + _getTransformedBySplitOperation(e) { + const t = this.start._getTransformedBySplitOperation(e); + let i = this.end._getTransformedBySplitOperation(e); + return this.end.isEqual(e.insertionPosition) && (i = this.end.getShiftedBy(1)), + t.root != i.root && (i = this.end.getShiftedBy(-1)), + new oa(t, i) + } + _getTransformedByMergeOperation(e) { + if (this.start.isEqual(e.targetPosition) && this.end.isEqual(e.deletionPosition)) + return new oa(this.start); + let t = this.start._getTransformedByMergeOperation(e), + i = this.end._getTransformedByMergeOperation(e); + return t.root != i.root && (i = this.end.getShiftedBy(-1)), + t.isAfter(i) ? (e.sourcePosition.isBefore(e.targetPosition) ? (t = ea._createAt(i), t.offset = 0) : (e.deletionPosition.isEqual(t) || (i = e.deletionPosition), t = e.targetPosition), new oa(t, i)) : new oa(t, i) + } + _getTransformedByInsertion(e, t, i = !1) { + if (i && this.containsPosition(e)) + return [new oa(this.start, e), new oa(e.getShiftedBy(t), this.end._getTransformedByInsertion(e, t))]; { + const i = new oa(this.start, this.end); + return i.start = i.start._getTransformedByInsertion(e, t), + i.end = i.end._getTransformedByInsertion(e, t), + [i] + } + } + _getTransformedByMove(e, t, i, n = !1) { + if (this.isCollapsed) { + const n = this.start._getTransformedByMove(e, t, i); + return [new oa(n)] + } + const o = oa._createFromPositionAndShift(e, i), + r = t._getTransformedByDeletion(e, i); + if (this.containsPosition(t) && !n && (o.containsPosition(this.start) || o.containsPosition(this.end))) { + const n = this.start._getTransformedByMove(e, t, i), + o = this.end._getTransformedByMove(e, t, i); + return [new oa(n, o)] + } + let s; + const a = this.getDifference(o); + let c = null; + const l = this.getIntersection(o); + if (1 == a.length ? c = new oa(a[0].start._getTransformedByDeletion(e, i), a[0].end._getTransformedByDeletion(e, i)) : 2 == a.length && (c = new oa(this.start, this.end._getTransformedByDeletion(e, i))), s = c ? c._getTransformedByInsertion(r, i, null !== l || n) : [], l) { + const e = new oa(l.start._getCombined(o.start, r), l.end._getCombined(o.start, r)); + 2 == s.length ? s.splice(1, 0, e) : s.push(e) + } + return s + } + _getTransformedByDeletion(e, t) { + let i = this.start._getTransformedByDeletion(e, t), + n = this.end._getTransformedByDeletion(e, t); + return null == i && null == n ? null : (null == i && (i = e), null == n && (n = e), new oa(i, n)) + } + static _createFromPositionAndShift(e, t) { + const i = e, + n = e.getShiftedBy(t); + return t > 0 ? new this(i, n) : new this(n, i) + } + static _createIn(e) { + return new this(ea._createAt(e, 0), ea._createAt(e, e.maxOffset)) + } + static _createOn(e) { + return this._createFromPositionAndShift(ea._createBefore(e), e.offsetSize) + } + static _createFromRanges(e) { + if (0 === e.length) + throw new c.a("range-create-from-ranges-empty-array", null); + if (1 == e.length) + return e[0].clone(); + const t = e[0]; + e.sort((e, t) => e.start.isAfter(t.start) ? 1 : -1); + const i = e.indexOf(t), + n = new this(t.start, t.end); + if (i > 0) + for (let t = i - 1; e[t].end.isEqual(n.start); t++) + n.start = ea._createAt(e[t].start); + for (let t = i + 1; t < e.length && e[t].start.isEqual(n.end); t++) + n.end = ea._createAt(e[t].end); + return n + } + static fromJSON(e, t) { + return new this(ea.fromJSON(e.start, t), ea.fromJSON(e.end, t)) + } + } + class ra { + constructor() { + this._modelToViewMapping = new WeakMap, + this._viewToModelMapping = new WeakMap, + this._viewToModelLengthCallbacks = new Map, + this._markerNameToElements = new Map, + this._elementToMarkerNames = new Map, + this._unboundMarkerNames = new Set, + this.on("modelToViewPosition", (e, t) => { + if (t.viewPosition) + return; + const i = this._modelToViewMapping.get(t.modelPosition.parent); + t.viewPosition = this.findPositionIn(i, t.modelPosition.offset) + }, { + priority: "low" + }), + this.on("viewToModelPosition", (e, t) => { + if (t.modelPosition) + return; + const i = this.findMappedViewAncestor(t.viewPosition), + n = this._viewToModelMapping.get(i), + o = this._toModelOffset(t.viewPosition.parent, t.viewPosition.offset, i); + t.modelPosition = ea._createAt(n, o) + }, { + priority: "low" + }) + } + bindElements(e, t) { + this._modelToViewMapping.set(e, t), + this._viewToModelMapping.set(t, e) + } + unbindViewElement(e) { + const t = this.toModelElement(e); + if (this._viewToModelMapping.delete(e), this._elementToMarkerNames.has(e)) + for (const t of this._elementToMarkerNames.get(e)) + this._unboundMarkerNames.add(t); + this._modelToViewMapping.get(t) == e && this._modelToViewMapping.delete(t) + } + unbindModelElement(e) { + const t = this.toViewElement(e); + this._modelToViewMapping.delete(e), + this._viewToModelMapping.get(t) == e && this._viewToModelMapping.delete(t) + } + bindElementToMarker(e, t) { + const i = this._markerNameToElements.get(t) || new Set; + i.add(e); + const n = this._elementToMarkerNames.get(e) || new Set; + n.add(t), + this._markerNameToElements.set(t, i), + this._elementToMarkerNames.set(e, n) + } + unbindElementFromMarkerName(e, t) { + const i = this._markerNameToElements.get(t); + i && (i.delete(e), 0 == i.size && this._markerNameToElements.delete(t)); + const n = this._elementToMarkerNames.get(e); + n && (n.delete(t), 0 == n.size && this._elementToMarkerNames.delete(e)) + } + flushUnboundMarkerNames() { + const e = Array.from(this._unboundMarkerNames); + return this._unboundMarkerNames.clear(), + e + } + clearBindings() { + this._modelToViewMapping = new WeakMap, + this._viewToModelMapping = new WeakMap, + this._markerNameToElements = new Map, + this._elementToMarkerNames = new Map, + this._unboundMarkerNames = new Set + } + toModelElement(e) { + return this._viewToModelMapping.get(e) + } + toViewElement(e) { + return this._modelToViewMapping.get(e) + } + toModelRange(e) { + return new oa(this.toModelPosition(e.start), this.toModelPosition(e.end)) + } + toViewRange(e) { + return new co(this.toViewPosition(e.start), this.toViewPosition(e.end)) + } + toModelPosition(e) { + const t = { + viewPosition: e, + mapper: this + }; + return this.fire("viewToModelPosition", t), + t.modelPosition + } + toViewPosition(e, t = { + isPhantom: !1 + }) { + const i = { + modelPosition: e, + mapper: this, + isPhantom: t.isPhantom + }; + return this.fire("modelToViewPosition", i), + i.viewPosition + } + markerNameToElements(e) { + const t = this._markerNameToElements.get(e); + if (!t) + return null; + const i = new Set; + for (const e of t) + if (e.is("attributeElement")) + for (const t of e.getElementsWithSameId()) + i.add(t); + else + i.add(e); + return i + } + registerViewToModelLength(e, t) { + this._viewToModelLengthCallbacks.set(e, t) + } + findMappedViewAncestor(e) { + let t = e.parent; + for (; !this._viewToModelMapping.has(t); ) + t = t.parent; + return t + } + _toModelOffset(e, t, i) { + if (i != e) { + return this._toModelOffset(e.parent, e.index, i) + this._toModelOffset(e, t, e) + } + if (e.is("$text")) + return t; + let n = 0; + for (let i = 0; i < t; i++) + n += this.getModelLength(e.getChild(i)); + return n + } + getModelLength(e) { + if (this._viewToModelLengthCallbacks.get(e.name)) { + return this._viewToModelLengthCallbacks.get(e.name)(e) + } + if (this._viewToModelMapping.has(e)) + return 1; + if (e.is("$text")) + return e.data.length; + if (e.is("uiElement")) + return 0; { + let t = 0; + for (const i of e.getChildren()) + t += this.getModelLength(i); + return t + } + } + findPositionIn(e, t) { + let i, + n = 0, + o = 0, + r = 0; + if (e.is("$text")) + return new ao(e, t); + for (; o < t; ) + i = e.getChild(r), n = this.getModelLength(i), o += n, r++; + return o == t ? this._moveViewPositionToTextNode(new ao(e, r)) : this.findPositionIn(i, t - (o - n)) + } + _moveViewPositionToTextNode(e) { + const t = e.nodeBefore, + i = e.nodeAfter; + return t instanceof un ? new ao(t, t.data.length) : i instanceof un ? new ao(i, 0) : e + } + } + Ke(ra, u); + class sa { + constructor() { + this._consumable = new Map, + this._textProxyRegistry = new Map + } + add(e, t) { + t = aa(t), + e instanceof Ks && (e = this._getSymbolForTextProxy(e)), + this._consumable.has(e) || this._consumable.set(e, new Map), + this._consumable.get(e).set(t, !0) + } + consume(e, t) { + return t = aa(t), + e instanceof Ks && (e = this._getSymbolForTextProxy(e)), + !!this.test(e, t) && (this._consumable.get(e).set(t, !1), !0) + } + test(e, t) { + t = aa(t), + e instanceof Ks && (e = this._getSymbolForTextProxy(e)); + const i = this._consumable.get(e); + if (void 0 === i) + return null; + const n = i.get(t); + return void 0 === n ? null : n + } + revert(e, t) { + t = aa(t), + e instanceof Ks && (e = this._getSymbolForTextProxy(e)); + const i = this.test(e, t); + return !1 === i ? (this._consumable.get(e).set(t, !0), !0) : !0 !== i && null + } + _getSymbolForTextProxy(e) { + let t = null; + const i = this._textProxyRegistry.get(e.startOffset); + if (i) { + const n = i.get(e.endOffset); + n && (t = n.get(e.parent)) + } + return t || (t = this._addSymbolForTextProxy(e.startOffset, e.endOffset, e.parent)), + t + } + _addSymbolForTextProxy(e, t, i) { + const n = Symbol("textProxySymbol"); + let o, + r; + return o = this._textProxyRegistry.get(e), + o || (o = new Map, this._textProxyRegistry.set(e, o)), + r = o.get(t), + r || (r = new Map, o.set(t, r)), + r.set(i, n), + n + } + } + function aa(e) { + const t = e.split(":"); + return t.length > 1 ? t[0] + ":" + t[1] : t[0] + } + class ca { + constructor(e) { + this.conversionApi = Object.assign({ + dispatcher: this + }, e), + this._reconversionEventsMapping = new Map + } + convertChanges(e, t, i) { + for (const t of e.getMarkersToRemove()) + this.convertMarkerRemove(t.name, t.range, i); + const n = this._mapChangesWithAutomaticReconversion(e); + for (const e of n) + "insert" === e.type ? this.convertInsert(oa._createFromPositionAndShift(e.position, e.length), i) : "remove" === e.type ? this.convertRemove(e.position, e.length, e.name, i) : "reconvert" === e.type ? this.reconvertElement(e.element, i) : this.convertAttribute(e.range, e.attributeKey, e.attributeOldValue, e.attributeNewValue, i); + for (const e of this.conversionApi.mapper.flushUnboundMarkerNames()) { + const n = t.get(e).getRange(); + this.convertMarkerRemove(e, n, i), + this.convertMarkerAdd(e, n, i) + } + for (const t of e.getMarkersToAdd()) + this.convertMarkerAdd(t.name, t.range, i) + } + convertInsert(e, t) { + this.conversionApi.writer = t, + this.conversionApi.consumable = this._createInsertConsumable(e); + for (const t of Array.from(e).map(da)) + this._convertInsertWithAttributes(t); + this._clearConversionApi() + } + convertRemove(e, t, i, n) { + this.conversionApi.writer = n, + this.fire("remove:" + i, { + position: e, + length: t + }, this.conversionApi), + this._clearConversionApi() + } + convertAttribute(e, t, i, n, o) { + this.conversionApi.writer = o, + this.conversionApi.consumable = this._createConsumableForRange(e, "attribute:" + t); + for (const o of e) { + const e = { + item: o.item, + range: oa._createFromPositionAndShift(o.previousPosition, o.length), + attributeKey: t, + attributeOldValue: i, + attributeNewValue: n + }; + this._testAndFire("attribute:" + t, e) + } + this._clearConversionApi() + } + reconvertElement(e, t) { + const i = oa._createOn(e); + this.conversionApi.writer = t, + this.conversionApi.consumable = this._createInsertConsumable(i); + const n = this.conversionApi.mapper, + o = n.toViewElement(e); + t.remove(o), + this._convertInsertWithAttributes({ + item: e, + range: i + }); + const r = n.toViewElement(e); + for (const i of oa._createIn(e)) { + const { + item: e + } = i, + o = ua(e, n); + o ? o.root !== r.root && t.move(t.createRangeOn(o), n.toViewPosition(ea._createBefore(e))) : this._convertInsertWithAttributes(da(i)) + } + n.unbindViewElement(o), + this._clearConversionApi() + } + convertSelection(e, t, i) { + const n = Array.from(t.getMarkersAtPosition(e.getFirstPosition())); + if (this.conversionApi.writer = i, this.conversionApi.consumable = this._createSelectionConsumable(e, n), this.fire("selection", { + selection: e + }, this.conversionApi), e.isCollapsed) { + for (const t of n) { + const i = t.getRange(); + if (!la(e.getFirstPosition(), t, this.conversionApi.mapper)) + continue; + const n = { + item: e, + markerName: t.name, + markerRange: i + }; + this.conversionApi.consumable.test(e, "addMarker:" + t.name) && this.fire("addMarker:" + t.name, n, this.conversionApi) + } + for (const t of e.getAttributeKeys()) { + const i = { + item: e, + range: e.getFirstRange(), + attributeKey: t, + attributeOldValue: null, + attributeNewValue: e.getAttribute(t) + }; + this.conversionApi.consumable.test(e, "attribute:" + i.attributeKey) && this.fire("attribute:" + i.attributeKey + ":$text", i, this.conversionApi) + } + this._clearConversionApi() + } + } + convertMarkerAdd(e, t, i) { + if ("$graveyard" == t.root.rootName) + return; + this.conversionApi.writer = i; + const n = "addMarker:" + e, + o = new sa; + if (o.add(t, n), this.conversionApi.consumable = o, this.fire(n, { + markerName: e, + markerRange: t + }, this.conversionApi), o.test(t, n)) { + this.conversionApi.consumable = this._createConsumableForRange(t, n); + for (const i of t.getItems()) { + if (!this.conversionApi.consumable.test(i, n)) + continue; + const o = { + item: i, + range: oa._createOn(i), + markerName: e, + markerRange: t + }; + this.fire(n, o, this.conversionApi) + } + this._clearConversionApi() + } + } + convertMarkerRemove(e, t, i) { + "$graveyard" != t.root.rootName && (this.conversionApi.writer = i, this.fire("removeMarker:" + e, { + markerName: e, + markerRange: t + }, this.conversionApi), this._clearConversionApi()) + } + _mapReconversionTriggerEvent(e, t) { + this._reconversionEventsMapping.set(t, e) + } + _createInsertConsumable(e) { + const t = new sa; + for (const i of e) { + const e = i.item; + t.add(e, "insert"); + for (const i of e.getAttributeKeys()) + t.add(e, "attribute:" + i) + } + return t + } + _createConsumableForRange(e, t) { + const i = new sa; + for (const n of e.getItems()) + i.add(n, t); + return i + } + _createSelectionConsumable(e, t) { + const i = new sa; + i.add(e, "selection"); + for (const n of t) + i.add(e, "addMarker:" + n.name); + for (const t of e.getAttributeKeys()) + i.add(e, "attribute:" + t); + return i + } + _testAndFire(e, t) { + this.conversionApi.consumable.test(t.item, e) && this.fire(function (e, t) { + const i = t.item.name || "$text"; + return `${e}:${i}` + } + (e, t), t, this.conversionApi) + } + _clearConversionApi() { + delete this.conversionApi.writer, + delete this.conversionApi.consumable + } + _convertInsertWithAttributes(e) { + this._testAndFire("insert", e); + for (const t of e.item.getAttributeKeys()) + e.attributeKey = t, e.attributeOldValue = null, e.attributeNewValue = e.item.getAttribute(t), this._testAndFire("attribute:" + t, e) + } + _mapChangesWithAutomaticReconversion(e) { + const t = new Set, + i = []; + for (const n of e.getChanges()) { + const e = n.position || n.range.start, + o = e.parent; + if (ta(e, o)) { + i.push(n); + continue + } + const r = "attribute" === n.type ? ia(e, o, null) : o; + if (r.is("$text")) { + i.push(n); + continue + } + let s; + if (s = "attribute" === n.type ? `attribute:${n.attributeKey}:${r.name}` : `${n.type}:${n.name}`, this._isReconvertTriggerEvent(s, r.name)) { + if (t.has(r)) + continue; + t.add(r), + i.push({ + type: "reconvert", + element: r + }) + } else + i.push(n) + } + return i + } + _isReconvertTriggerEvent(e, t) { + return this._reconversionEventsMapping.get(e) === t + } + } + function la(e, t, i) { + const n = t.getRange(), + o = Array.from(e.getAncestors()); + o.shift(), + o.reverse(); + return !o.some(e => { + if (n.containsItem(e)) { + return !!i.toViewElement(e).getCustomProperty("addHighlight") + } + }) + } + function da(e) { + return { + item: e.item, + range: oa._createFromPositionAndShift(e.previousPosition, e.length) + } + } + function ua(e, t) { + if (e.is("textProxy")) { + const i = t.toViewPosition(ea._createBefore(e)).parent; + return i.is("$text") ? i : null + } + return t.toViewElement(e) + } + Ke(ca, u); + class ha { + constructor(e, t, i) { + this._lastRangeBackward = !1, + this._ranges = [], + this._attrs = new Map, + e && this.setTo(e, t, i) + } + get anchor() { + if (this._ranges.length > 0) { + const e = this._ranges[this._ranges.length - 1]; + return this._lastRangeBackward ? e.end : e.start + } + return null + } + get focus() { + if (this._ranges.length > 0) { + const e = this._ranges[this._ranges.length - 1]; + return this._lastRangeBackward ? e.start : e.end + } + return null + } + get isCollapsed() { + return 1 === this._ranges.length && this._ranges[0].isCollapsed + } + get rangeCount() { + return this._ranges.length + } + get isBackward() { + return !this.isCollapsed && this._lastRangeBackward + } + isEqual(e) { + if (this.rangeCount != e.rangeCount) + return !1; + if (0 === this.rangeCount) + return !0; + if (!this.anchor.isEqual(e.anchor) || !this.focus.isEqual(e.focus)) + return !1; + for (const t of this._ranges) { + let i = !1; + for (const n of e._ranges) + if (t.isEqual(n)) { + i = !0; + break + } + if (!i) + return !1 + } + return !0 + } + * getRanges() { + for (const e of this._ranges) + yield new oa(e.start, e.end) + } + getFirstRange() { + let e = null; + for (const t of this._ranges) + e && !t.start.isBefore(e.start) || (e = t); + return e ? new oa(e.start, e.end) : null + } + getLastRange() { + let e = null; + for (const t of this._ranges) + e && !t.end.isAfter(e.end) || (e = t); + return e ? new oa(e.start, e.end) : null + } + getFirstPosition() { + const e = this.getFirstRange(); + return e ? e.start.clone() : null + } + getLastPosition() { + const e = this.getLastRange(); + return e ? e.end.clone() : null + } + setTo(e, t, i) { + if (null === e) + this._setRanges([]); + else if (e instanceof ha) + this._setRanges(e.getRanges(), e.isBackward); + else if (e && "function" == typeof e.getRanges) + this._setRanges(e.getRanges(), e.isBackward); + else if (e instanceof oa) + this._setRanges([e], !!t && !!t.backward); + else if (e instanceof ea) + this._setRanges([new oa(e)]); + else if (e instanceof Ys) { + const n = !!i && !!i.backward; + let o; + if ("in" == t) + o = oa._createIn(e); + else if ("on" == t) + o = oa._createOn(e); + else { + if (void 0 === t) + throw new c.a("model-selection-setto-required-second-parameter", [this, e]); + o = new oa(ea._createAt(e, t)) + } + this._setRanges([o], n) + } else { + if (!Ji(e)) + throw new c.a("model-selection-setto-not-selectable", [this, e]); + this._setRanges(e, t && !!t.backward) + } + } + _setRanges(e, t = !1) { + const i = (e = Array.from(e)).some(t => { + if (!(t instanceof oa)) + throw new c.a("model-selection-set-ranges-not-range", [this, e]); + return this._ranges.every(e => !e.isEqual(t)) + }); + if (e.length !== this._ranges.length || i) { + this._removeAllRanges(); + for (const t of e) + this._pushRange(t); + this._lastRangeBackward = !!t, + this.fire("change:range", { + directChange: !0 + }) + } + } + setFocus(e, t) { + if (null === this.anchor) + throw new c.a("model-selection-setfocus-no-ranges", [this, e]); + const i = ea._createAt(e, t); + if ("same" == i.compareWith(this.focus)) + return; + const n = this.anchor; + this._ranges.length && this._popRange(), + "before" == i.compareWith(n) ? (this._pushRange(new oa(i, n)), this._lastRangeBackward = !0) : (this._pushRange(new oa(n, i)), this._lastRangeBackward = !1), + this.fire("change:range", { + directChange: !0 + }) + } + getAttribute(e) { + return this._attrs.get(e) + } + getAttributes() { + return this._attrs.entries() + } + getAttributeKeys() { + return this._attrs.keys() + } + hasAttribute(e) { + return this._attrs.has(e) + } + removeAttribute(e) { + this.hasAttribute(e) && (this._attrs.delete(e), this.fire("change:attribute", { + attributeKeys: [e], + directChange: !0 + })) + } + setAttribute(e, t) { + this.getAttribute(e) !== t && (this._attrs.set(e, t), this.fire("change:attribute", { + attributeKeys: [e], + directChange: !0 + })) + } + getSelectedElement() { + return 1 !== this.rangeCount ? null : this.getFirstRange().getContainedElement() + } + is(e) { + return "selection" === e || "model:selection" === e + } + * getSelectedBlocks() { + const e = new WeakSet; + for (const t of this.getRanges()) { + const i = ma(t.start, e); + i && pa(i, t) && (yield i); + for (const i of t.getWalker()) { + const n = i.item; + "elementEnd" == i.type && ga(n, e, t) && (yield n) + } + const n = ma(t.end, e); + n && !t.end.isTouching(ea._createAt(n, 0)) && pa(n, t) && (yield n) + } + } + containsEntireContent(e = this.anchor.root) { + const t = ea._createAt(e, 0), + i = ea._createAt(e, "end"); + return t.isTouching(this.getFirstPosition()) && i.isTouching(this.getLastPosition()) + } + _pushRange(e) { + this._checkRange(e), + this._ranges.push(new oa(e.start, e.end)) + } + _checkRange(e) { + for (let t = 0; t < this._ranges.length; t++) + if (e.isIntersecting(this._ranges[t])) + throw new c.a("model-selection-range-intersects", [this, e], { + addedRange: e, + intersectingRange: this._ranges[t] + }) + } + _removeAllRanges() { + for (; this._ranges.length > 0; ) + this._popRange() + } + _popRange() { + this._ranges.pop() + } + } + function fa(e, t) { + return !t.has(e) && (t.add(e), e.root.document.model.schema.isBlock(e) && e.parent) + } + function ga(e, t, i) { + return fa(e, t) && pa(e, i) + } + function ma(e, t) { + const i = e.parent.root.document.model.schema, + n = e.parent.getAncestors({ + parentFirst: !0, + includeSelf: !0 + }); + let o = !1; + const r = n.find(e => !o && (o = i.isLimit(e), !o && fa(e, t))); + return n.forEach(e => t.add(e)), + r + } + function pa(e, t) { + const i = function (e) { + const t = e.root.document.model.schema; + let i = e.parent; + for (; i; ) { + if (t.isBlock(i)) + return i; + i = i.parent + } + } + (e); + if (!i) + return !0; + return !t.containsRange(oa._createOn(i), !0) + } + Ke(ha, u); + class ba extends oa { + constructor(e, t) { + super(e, t), + wa.call(this) + } + detach() { + this.stopListening() + } + is(e) { + return "liveRange" === e || "model:liveRange" === e || "range" == e || "model:range" === e + } + toRange() { + return new oa(this.start, this.end) + } + static fromRange(e) { + return new ba(e.start, e.end) + } + } + function wa() { + this.listenTo(this.root.document.model, "applyOperation", (e, t) => { + const i = t[0]; + i.isDocumentOperation && ka.call(this, i) + }, { + priority: "low" + }) + } + function ka(e) { + const t = this.getTransformedByOperation(e), + i = oa._createFromRanges(t), + n = !i.isEqual(this), + o = function (e, t) { + switch (t.type) { + case "insert": + return e.containsPosition(t.position); + case "move": + case "remove": + case "reinsert": + case "merge": + return e.containsPosition(t.sourcePosition) || e.start.isEqual(t.sourcePosition) || e.containsPosition(t.targetPosition); + case "split": + return e.containsPosition(t.splitPosition) || e.containsPosition(t.insertionPosition) + } + return !1 + } + (this, e); + let r = null; + if (n) { + "$graveyard" == i.root.rootName && (r = "remove" == e.type ? e.sourcePosition : e.deletionPosition); + const t = this.toRange(); + this.start = i.start, + this.end = i.end, + this.fire("change:range", t, { + deletionPosition: r + }) + } else + o && this.fire("change:content", this.toRange(), { + deletionPosition: r + }) + } + Ke(ba, u); + class _a { + constructor(e) { + this._selection = new va(e), + this._selection.delegate("change:range").to(this), + this._selection.delegate("change:attribute").to(this), + this._selection.delegate("change:marker").to(this) + } + get isCollapsed() { + return this._selection.isCollapsed + } + get anchor() { + return this._selection.anchor + } + get focus() { + return this._selection.focus + } + get rangeCount() { + return this._selection.rangeCount + } + get hasOwnRange() { + return this._selection.hasOwnRange + } + get isBackward() { + return this._selection.isBackward + } + get isGravityOverridden() { + return this._selection.isGravityOverridden + } + get markers() { + return this._selection.markers + } + get _ranges() { + return this._selection._ranges + } + getRanges() { + return this._selection.getRanges() + } + getFirstPosition() { + return this._selection.getFirstPosition() + } + getLastPosition() { + return this._selection.getLastPosition() + } + getFirstRange() { + return this._selection.getFirstRange() + } + getLastRange() { + return this._selection.getLastRange() + } + getSelectedBlocks() { + return this._selection.getSelectedBlocks() + } + getSelectedElement() { + return this._selection.getSelectedElement() + } + containsEntireContent(e) { + return this._selection.containsEntireContent(e) + } + destroy() { + this._selection.destroy() + } + getAttributeKeys() { + return this._selection.getAttributeKeys() + } + getAttributes() { + return this._selection.getAttributes() + } + getAttribute(e) { + return this._selection.getAttribute(e) + } + hasAttribute(e) { + return this._selection.hasAttribute(e) + } + refresh() { + this._selection._updateMarkers(), + this._selection._updateAttributes(!1) + } + observeMarkers(e) { + this._selection.observeMarkers(e) + } + is(e) { + return "selection" === e || "model:selection" == e || "documentSelection" == e || "model:documentSelection" == e + } + _setFocus(e, t) { + this._selection.setFocus(e, t) + } + _setTo(e, t, i) { + this._selection.setTo(e, t, i) + } + _setAttribute(e, t) { + this._selection.setAttribute(e, t) + } + _removeAttribute(e) { + this._selection.removeAttribute(e) + } + _getStoredAttributes() { + return this._selection._getStoredAttributes() + } + _overrideGravity() { + return this._selection.overrideGravity() + } + _restoreGravity(e) { + this._selection.restoreGravity(e) + } + static _getStoreAttributeKey(e) { + return "selection:" + e + } + static _isStoreAttributeKey(e) { + return e.startsWith("selection:") + } + } + Ke(_a, u); + class va extends ha { + constructor(e) { + super(), + this.markers = new Zi({ + idProperty: "name" + }), + this._model = e.model, + this._document = e, + this._attributePriority = new Map, + this._selectionRestorePosition = null, + this._hasChangedRange = !1, + this._overriddenGravityRegister = new Set, + this._observedMarkers = new Set, + this.listenTo(this._model, "applyOperation", (e, t) => { + const i = t[0]; + i.isDocumentOperation && "marker" != i.type && "rename" != i.type && "noop" != i.type && (0 == this._ranges.length && this._selectionRestorePosition && this._fixGraveyardSelection(this._selectionRestorePosition), this._selectionRestorePosition = null, this._hasChangedRange && (this._hasChangedRange = !1, this.fire("change:range", { + directChange: !1 + }))) + }, { + priority: "lowest" + }), + this.on("change:range", () => { + for (const e of this.getRanges()) + if (!this._document._validateSelectionRange(e)) + throw new c.a("document-selection-wrong-position", this, { + range: e + }) + }), + this.listenTo(this._model.markers, "update", (e, t, i, n) => { + this._updateMarker(t, n) + }), + this.listenTo(this._document, "change", (e, t) => { + !function (e, t) { + const i = e.document.differ; + for (const n of i.getChanges()) { + if ("insert" != n.type) + continue; + const i = n.position.parent; + n.length === i.maxOffset && e.enqueueChange(t, e => { + const t = Array.from(i.getAttributeKeys()).filter(e => e.startsWith("selection:")); + for (const n of t) + e.removeAttribute(n, i) + }) + } + } + (this._model, t) + }) + } + get isCollapsed() { + return 0 === this._ranges.length ? this._document._getDefaultRange().isCollapsed : super.isCollapsed + } + get anchor() { + return super.anchor || this._document._getDefaultRange().start + } + get focus() { + return super.focus || this._document._getDefaultRange().end + } + get rangeCount() { + return this._ranges.length ? this._ranges.length : 1 + } + get hasOwnRange() { + return this._ranges.length > 0 + } + get isGravityOverridden() { + return !!this._overriddenGravityRegister.size + } + destroy() { + for (let e = 0; e < this._ranges.length; e++) + this._ranges[e].detach(); + this.stopListening() + } + * getRanges() { + this._ranges.length ? yield * super.getRanges() : yield this._document._getDefaultRange() + } + getFirstRange() { + return super.getFirstRange() || this._document._getDefaultRange() + } + getLastRange() { + return super.getLastRange() || this._document._getDefaultRange() + } + setTo(e, t, i) { + super.setTo(e, t, i), + this._updateAttributes(!0), + this._updateMarkers() + } + setFocus(e, t) { + super.setFocus(e, t), + this._updateAttributes(!0), + this._updateMarkers() + } + setAttribute(e, t) { + if (this._setAttribute(e, t)) { + const t = [e]; + this.fire("change:attribute", { + attributeKeys: t, + directChange: !0 + }) + } + } + removeAttribute(e) { + if (this._removeAttribute(e)) { + const t = [e]; + this.fire("change:attribute", { + attributeKeys: t, + directChange: !0 + }) + } + } + overrideGravity() { + const e = s(); + return this._overriddenGravityRegister.add(e), + 1 === this._overriddenGravityRegister.size && this._updateAttributes(!0), + e + } + restoreGravity(e) { + if (!this._overriddenGravityRegister.has(e)) + throw new c.a("document-selection-gravity-wrong-restore", this, { + uid: e + }); + this._overriddenGravityRegister.delete(e), + this.isGravityOverridden || this._updateAttributes(!0) + } + observeMarkers(e) { + this._observedMarkers.add(e), + this._updateMarkers() + } + _popRange() { + this._ranges.pop().detach() + } + _pushRange(e) { + const t = this._prepareRange(e); + t && this._ranges.push(t) + } + _prepareRange(e) { + if (this._checkRange(e), e.root == this._document.graveyard) + return; + const t = ba.fromRange(e); + return t.on("change:range", (e, i, n) => { + if (this._hasChangedRange = !0, t.root == this._document.graveyard) { + this._selectionRestorePosition = n.deletionPosition; + const e = this._ranges.indexOf(t); + this._ranges.splice(e, 1), + t.detach() + } + }), + t + } + _updateMarkers() { + if (!this._observedMarkers.size) + return; + const e = []; + let t = !1; + for (const t of this._model.markers) { + const i = t.name.split(":", 1)[0]; + if (!this._observedMarkers.has(i)) + continue; + const n = t.getRange(); + for (const i of this.getRanges()) + n.containsRange(i, !i.isCollapsed) && e.push(t) + } + const i = Array.from(this.markers); + for (const i of e) + this.markers.has(i) || (this.markers.add(i), t = !0); + for (const i of Array.from(this.markers)) + e.includes(i) || (this.markers.remove(i), t = !0); + t && this.fire("change:marker", { + oldMarkers: i, + directChange: !1 + }) + } + _updateMarker(e, t) { + const i = e.name.split(":", 1)[0]; + if (!this._observedMarkers.has(i)) + return; + let n = !1; + const o = Array.from(this.markers), + r = this.markers.has(e); + if (t) { + let i = !1; + for (const e of this.getRanges()) + if (t.containsRange(e, !e.isCollapsed)) { + i = !0; + break + } + i && !r ? (this.markers.add(e), n = !0) : !i && r && (this.markers.remove(e), n = !0) + } else + r && (this.markers.remove(e), n = !0); + n && this.fire("change:marker", { + oldMarkers: o, + directChange: !1 + }) + } + _updateAttributes(e) { + const t = fn(this._getSurroundingAttributes()), + i = fn(this.getAttributes()); + if (e) + this._attributePriority = new Map, this._attrs = new Map; + else + for (const[e, t]of this._attributePriority) + "low" == t && (this._attrs.delete(e), this._attributePriority.delete(e)); + this._setAttributesTo(t); + const n = []; + for (const[e, t]of this.getAttributes()) + i.has(e) && i.get(e) === t || n.push(e); + for (const[e]of i) + this.hasAttribute(e) || n.push(e); + n.length > 0 && this.fire("change:attribute", { + attributeKeys: n, + directChange: !1 + }) + } + _setAttribute(e, t, i = !0) { + const n = i ? "normal" : "low"; + if ("low" == n && "normal" == this._attributePriority.get(e)) + return !1; + return super.getAttribute(e) !== t && (this._attrs.set(e, t), this._attributePriority.set(e, n), !0) + } + _removeAttribute(e, t = !0) { + const i = t ? "normal" : "low"; + return ("low" != i || "normal" != this._attributePriority.get(e)) && (this._attributePriority.set(e, i), !!super.hasAttribute(e) && (this._attrs.delete(e), !0)) + } + _setAttributesTo(e) { + const t = new Set; + for (const[t, i]of this.getAttributes()) + e.get(t) !== i && this._removeAttribute(t, !1); + for (const[i, n]of e) { + this._setAttribute(i, n, !1) && t.add(i) + } + return t + } + * _getStoredAttributes() { + const e = this.getFirstPosition().parent; + if (this.isCollapsed && e.isEmpty) + for (const t of e.getAttributeKeys()) + if (t.startsWith("selection:")) { + const i = t.substr("selection:".length); + yield[i, e.getAttribute(t)] + } + } + _getSurroundingAttributes() { + const e = this.getFirstPosition(), + t = this._model.schema; + let i = null; + if (this.isCollapsed) { + const n = e.textNode ? e.textNode : e.nodeBefore, + o = e.textNode ? e.textNode : e.nodeAfter; + if (this.isGravityOverridden || (i = ya(n)), i || (i = ya(o)), !this.isGravityOverridden && !i) { + let e = n; + for (; e && !t.isInline(e) && !i; ) + e = e.previousSibling, i = ya(e) + } + if (!i) { + let e = o; + for (; e && !t.isInline(e) && !i; ) + e = e.nextSibling, i = ya(e) + } + i || (i = this._getStoredAttributes()) + } else { + const e = this.getFirstRange(); + for (const n of e) { + if (n.item.is("element") && t.isObject(n.item)) + break; + if ("text" == n.type) { + i = n.item.getAttributes(); + break + } + } + } + return i + } + _fixGraveyardSelection(e) { + const t = this._model.schema.getNearestSelectionRange(e); + t && this._pushRange(t) + } + } + function ya(e) { + return e instanceof Ks || e instanceof Gs ? e.getAttributes() : null + } + class xa { + constructor(e) { + this._dispatchers = e + } + add(e) { + for (const t of this._dispatchers) + e(t); + return this + } + } + var Aa = function (e) { + return qi(e, 5) + }; + class Ca extends xa { + elementToElement(e) { + return this.add(function (e) { + return (e = Aa(e)).view = Pa(e.view, "container"), + t => { + var i; + if (t.on("insert:" + e.model, (i = e.view, (e, t, n) => { + const o = i(t.item, n); + if (!o) + return; + if (!n.consumable.consume(t.item, "insert")) + return; + const r = n.mapper.toViewPosition(t.range.start); + n.mapper.bindElements(t.item, o), + n.writer.insert(r, o) + }), { + priority: e.converterPriority || "normal" + }), e.triggerBy) { + if (e.triggerBy.attributes) + for (const i of e.triggerBy.attributes) + t._mapReconversionTriggerEvent(e.model, `attribute:${i}:${e.model}`); + if (e.triggerBy.children) + for (const i of e.triggerBy.children) + t._mapReconversionTriggerEvent(e.model, "insert:" + i), t._mapReconversionTriggerEvent(e.model, "remove:" + i) + } + } + } + (e)) + } + attributeToElement(e) { + return this.add(function (e) { + e = Aa(e); + let t = "attribute:" + (e.model.key ? e.model.key : e.model); + e.model.name && (t += ":" + e.model.name); + if (e.model.values) + for (const t of e.model.values) + e.view[t] = Pa(e.view[t], "attribute"); + else + e.view = Pa(e.view, "attribute"); + const i = Sa(e); + return n => { + n.on(t, function (e) { + return (t, i, n) => { + const o = e(i.attributeOldValue, n), + r = e(i.attributeNewValue, n); + if (!o && !r) + return; + if (!n.consumable.consume(i.item, t.name)) + return; + const s = n.writer, + a = s.document.selection; + if (i.item instanceof ha || i.item instanceof _a) + s.wrap(a.getFirstRange(), r); + else { + let e = n.mapper.toViewRange(i.range); + null !== i.attributeOldValue && o && (e = s.unwrap(e, o)), + null !== i.attributeNewValue && r && s.wrap(e, r) + } + } + } + (i), { + priority: e.converterPriority || "normal" + }) + } + } + (e)) + } + attributeToAttribute(e) { + return this.add(function (e) { + e = Aa(e); + let t = "attribute:" + (e.model.key ? e.model.key : e.model); + e.model.name && (t += ":" + e.model.name); + if (e.model.values) + for (const t of e.model.values) + e.view[t] = Ma(e.view[t]); + else + e.view = Ma(e.view); + const i = Sa(e); + return n => { + var o; + n.on(t, (o = i, (e, t, i) => { + const n = o(t.attributeOldValue, i), + r = o(t.attributeNewValue, i); + if (!n && !r) + return; + if (!i.consumable.consume(t.item, e.name)) + return; + const s = i.mapper.toViewElement(t.item), + a = i.writer; + if (!s) + throw new c.a("conversion-attribute-to-attribute-on-text", [t, i]); + if (null !== t.attributeOldValue && n) + if ("class" == n.key) { + const e = en(n.value); + for (const t of e) + a.removeClass(t, s) + } else if ("style" == n.key) { + const e = Object.keys(n.value); + for (const t of e) + a.removeStyle(t, s) + } else + a.removeAttribute(n.key, s); + if (null !== t.attributeNewValue && r) + if ("class" == r.key) { + const e = en(r.value); + for (const t of e) + a.addClass(t, s) + } else if ("style" == r.key) { + const e = Object.keys(r.value); + for (const t of e) + a.setStyle(t, r.value[t], s) + } else + a.setAttribute(r.key, r.value, s) + }), { + priority: e.converterPriority || "normal" + }) + } + } + (e)) + } + markerToElement(e) { + return this.add(function (e) { + return (e = Aa(e)).view = Pa(e.view, "ui"), + t => { + var i; + t.on("addMarker:" + e.model, (i = e.view, (e, t, n) => { + t.isOpening = !0; + const o = i(t, n); + t.isOpening = !1; + const r = i(t, n); + if (!o || !r) + return; + const s = t.markerRange; + if (s.isCollapsed && !n.consumable.consume(s, e.name)) + return; + for (const t of s) + if (!n.consumable.consume(t.item, e.name)) + return; + const a = n.mapper, + c = n.writer; + c.insert(a.toViewPosition(s.start), o), + n.mapper.bindElementToMarker(o, t.markerName), + s.isCollapsed || (c.insert(a.toViewPosition(s.end), r), n.mapper.bindElementToMarker(r, t.markerName)), + e.stop() + }), { + priority: e.converterPriority || "normal" + }), + t.on("removeMarker:" + e.model, (e.view, (e, t, i) => { + const n = i.mapper.markerNameToElements(t.markerName); + if (n) { + for (const e of n) + i.mapper.unbindElementFromMarkerName(e, t.markerName), i.writer.clear(i.writer.createRangeOn(e), e); + i.writer.clearClonedElementsGroup(t.markerName), + e.stop() + } + }), { + priority: e.converterPriority || "normal" + }) + } + } + (e)) + } + markerToHighlight(e) { + return this.add(function (e) { + return t => { + var i; + t.on("addMarker:" + e.model, (i = e.view, (e, t, n) => { + if (!t.item) + return; + if (!(t.item instanceof ha || t.item instanceof _a || t.item.is("$textProxy"))) + return; + const o = Ia(i, t, n); + if (!o) + return; + if (!n.consumable.consume(t.item, e.name)) + return; + const r = n.writer, + s = Ta(r, o), + a = r.document.selection; + if (t.item instanceof ha || t.item instanceof _a) + r.wrap(a.getFirstRange(), s, a); + else { + const e = n.mapper.toViewRange(t.range), + i = r.wrap(e, s); + for (const e of i.getItems()) + if (e.is("attributeElement") && e.isSimilar(s)) { + n.mapper.bindElementToMarker(e, t.markerName); + break + } + } + }), { + priority: e.converterPriority || "normal" + }), + t.on("addMarker:" + e.model, function (e) { + return (t, i, n) => { + if (!i.item) + return; + if (!(i.item instanceof Js)) + return; + const o = Ia(e, i, n); + if (!o) + return; + if (!n.consumable.test(i.item, t.name)) + return; + const r = n.mapper.toViewElement(i.item); + if (r && r.getCustomProperty("addHighlight")) { + n.consumable.consume(i.item, t.name); + for (const e of oa._createIn(i.item)) + n.consumable.consume(e.item, t.name); + r.getCustomProperty("addHighlight")(r, o, n.writer), + n.mapper.bindElementToMarker(r, i.markerName) + } + } + } + (e.view), { + priority: e.converterPriority || "normal" + }), + t.on("removeMarker:" + e.model, function (e) { + return (t, i, n) => { + if (i.markerRange.isCollapsed) + return; + const o = Ia(e, i, n); + if (!o) + return; + const r = Ta(n.writer, o), + s = n.mapper.markerNameToElements(i.markerName); + if (s) { + for (const e of s) + n.mapper.unbindElementFromMarkerName(e, i.markerName), e.is("attributeElement") ? n.writer.unwrap(n.writer.createRangeOn(e), r) : e.getCustomProperty("removeHighlight")(e, o.id, n.writer); + n.writer.clearClonedElementsGroup(i.markerName), + t.stop() + } + } + } + (e.view), { + priority: e.converterPriority || "normal" + }) + } + } + (e)) + } + markerToData(e) { + return this.add(function (e) { + const t = (e = Aa(e)).model; + e.view || (e.view = i => ({ + group: t, + name: i.substr(e.model.length + 1) + })); + return i => { + var n; + i.on("addMarker:" + t, (n = e.view, (e, t, i) => { + const o = n(t.markerName, i); + if (!o) + return; + const r = t.markerRange; + i.consumable.consume(r, e.name) && (Ea(r, !1, i, t, o), Ea(r, !0, i, t, o), e.stop()) + }), { + priority: e.converterPriority || "normal" + }), + i.on("removeMarker:" + t, function (e) { + return (t, i, n) => { + const o = e(i.markerName, n); + if (!o) + return; + const r = n.mapper.markerNameToElements(i.markerName); + if (r) { + for (const e of r) + n.mapper.unbindElementFromMarkerName(e, i.markerName), e.is("containerElement") ? (s(`data-${o.group}-start-before`, e), s(`data-${o.group}-start-after`, e), s(`data-${o.group}-end-before`, e), s(`data-${o.group}-end-after`, e)) : n.writer.clear(n.writer.createRangeOn(e), e); + n.writer.clearClonedElementsGroup(i.markerName), + t.stop() + } + function s(e, t) { + if (t.hasAttribute(e)) { + const i = new Set(t.getAttribute(e).split(",")); + i.delete(o.name), + 0 == i.size ? n.writer.removeAttribute(e, t) : n.writer.setAttribute(e, Array.from(i).join(","), t) + } + } + } + } + (e.view), { + priority: e.converterPriority || "normal" + }) + } + } + (e)) + } + } + function Ta(e, t) { + const i = e.createAttributeElement("span", t.attributes); + return t.classes && i._addClass(t.classes), + t.priority && (i._priority = t.priority), + i._id = t.id, + i + } + function Ea(e, t, i, n, o) { + const r = t ? e.start : e.end; + if (i.schema.checkChild(r, "$text")) { + !function (e, t, i, n, o) { + const r = `${o.group}-${t?"start":"end"}`, + s = o.name ? { + name: o.name + } + : null, + a = i.writer.createUIElement(r, s); + i.writer.insert(e, a), + i.mapper.bindElementToMarker(a, n.markerName) + } + (i.mapper.toViewPosition(r), t, i, n, o) + } else { + let e, + s; + t && r.nodeAfter || !t && !r.nodeBefore ? (e = r.nodeAfter, s = !0) : (e = r.nodeBefore, s = !1); + !function (e, t, i, n, o, r) { + const s = `data-${r.group}-${t?"start":"end"}-${i?"before":"after"}`, + a = e.hasAttribute(s) ? e.getAttribute(s).split(",") : []; + a.unshift(r.name), + n.writer.setAttribute(s, a.join(","), e), + n.mapper.bindElementToMarker(e, o.markerName) + } + (i.mapper.toViewElement(e), t, s, i, n, o) + } + } + function Pa(e, t) { + return "function" == typeof e ? e : (i, n) => function (e, t, i) { + "string" == typeof e && (e = { + name: e + }); + let n; + const o = t.writer, + r = Object.assign({}, e.attributes); + if ("container" == i) + n = o.createContainerElement(e.name, r); + else if ("attribute" == i) { + const t = { + priority: e.priority || yo.DEFAULT_PRIORITY + }; + n = o.createAttributeElement(e.name, r, t) + } else + n = o.createUIElement(e.name, r); + if (e.styles) { + const t = Object.keys(e.styles); + for (const i of t) + o.setStyle(i, e.styles[i], n) + } + if (e.classes) { + const t = e.classes; + if ("string" == typeof t) + o.addClass(t, n); + else + for (const e of t) + o.addClass(e, n) + } + return n + } + (e, n, t) + } + function Sa(e) { + return e.model.values ? (t, i) => { + const n = e.view[t]; + return n ? n(t, i) : null + } + : e.view + } + function Ma(e) { + return "string" == typeof e ? t => ({ + key: e, + value: t + }) : "object" == typeof e ? e.value ? () => e : t => ({ + key: e.key, + value: t + }) : e + } + function Ia(e, t, i) { + const n = "function" == typeof e ? e(t, i) : e; + return n ? (n.priority || (n.priority = 10), n.id || (n.id = t.markerName), n) : null + } + function Na(e) { + const { + schema: t, + document: i + } = e.model; + for (const n of i.getRootNames()) { + const o = i.getRoot(n); + if (o.isEmpty && !t.checkChild(o, "$text") && t.checkChild(o, "paragraph")) + return e.insertElement("paragraph", o), !0 + } + return !1 + } + function Ra(e, t, i) { + const n = i.createContext(e); + return !!i.checkChild(n, "paragraph") && !!i.checkChild(n.push("paragraph"), t) + } + function Oa(e, t) { + const i = t.createElement("paragraph"); + return t.insert(i, e), + t.createPositionAt(i, 0) + } + class Da extends xa { + elementToElement(e) { + return this.add(La(e)) + } + elementToAttribute(e) { + return this.add(function (e) { + ja(e = Aa(e)); + const t = Ba(e, !1), + i = za(e.view), + n = i ? "element:" + i : "element"; + return i => { + i.on(n, t, { + priority: e.converterPriority || "low" + }) + } + } + (e)) + } + attributeToAttribute(e) { + return this.add(function (e) { + e = Aa(e); + let t = null; + ("string" == typeof e.view || e.view.key) && (t = function (e) { + "string" == typeof e.view && (e.view = { + key: e.view + }); + const t = e.view.key; + let i; + if ("class" == t || "style" == t) { + i = { + ["class" == t ? "classes" : "styles"]: e.view.value + } + } else { + const n = void 0 === e.view.value ? /[\s\S]*/ : e.view.value; + i = { + attributes: { + [t]: n + } + } + } + e.view.name && (i.name = e.view.name); + return e.view = i, + t + } + (e)); + ja(e, t); + const i = Ba(e, !0); + return t => { + t.on("element", i, { + priority: e.converterPriority || "low" + }) + } + } + (e)) + } + elementToMarker(e) { + return Object(c.b)("upcast-helpers-element-to-marker-deprecated"), + this.add(function (e) { + return function (e) { + const t = e.model; + e.model = (e, i) => { + const n = "string" == typeof t ? t : t(e, i); + return i.writer.createElement("$marker", { + "data-name": n + }) + } + } + (e = Aa(e)), + La(e) + } + (e)) + } + dataToMarker(e) { + return this.add(function (e) { + (e = Aa(e)).model || (e.model = t => t ? e.view + ":" + t : e.view); + const t = Va(Fa(e, "start")), + i = Va(Fa(e, "end")); + return n => { + n.on("element:" + e.view + "-start", t, { + priority: e.converterPriority || "normal" + }), + n.on("element:" + e.view + "-end", i, { + priority: e.converterPriority || "normal" + }); + const o = a.get("low"), + r = a.get("highest"), + s = a.get(e.converterPriority) / r; + n.on("element", function (e) { + return (t, i, n) => { + const o = "data-" + e.view; + function r(t, o) { + for (const r of o) { + const o = e.model(r, n), + s = n.writer.createElement("$marker", { + "data-name": o + }); + n.writer.insert(s, t), + i.modelCursor.isEqual(t) ? i.modelCursor = i.modelCursor.getShiftedBy(1) : i.modelCursor = i.modelCursor._getTransformedByInsertion(t, 1), + i.modelRange = i.modelRange._getTransformedByInsertion(t, 1)[0] + } + } + i.modelRange || (i = Object.assign(i, n.convertChildren(i.viewItem, i.modelCursor))), + n.consumable.consume(i.viewItem, { + attributes: o + "-end-after" + }) && r(i.modelRange.end, i.viewItem.getAttribute(o + "-end-after").split(",")), + n.consumable.consume(i.viewItem, { + attributes: o + "-start-after" + }) && r(i.modelRange.end, i.viewItem.getAttribute(o + "-start-after").split(",")), + n.consumable.consume(i.viewItem, { + attributes: o + "-end-before" + }) && r(i.modelRange.start, i.viewItem.getAttribute(o + "-end-before").split(",")), + n.consumable.consume(i.viewItem, { + attributes: o + "-start-before" + }) && r(i.modelRange.start, i.viewItem.getAttribute(o + "-start-before").split(",")) + } + } + (e), { + priority: o + s + }) + } + } + (e)) + } + } + function La(e) { + const t = Va(e = Aa(e)), + i = za(e.view), + n = i ? "element:" + i : "element"; + return i => { + i.on(n, t, { + priority: e.converterPriority || "normal" + }) + } + } + function za(e) { + return "string" == typeof e ? e : "object" == typeof e && "string" == typeof e.name ? e.name : null + } + function Va(e) { + const t = new gn(e.view); + return (i, n, o) => { + const r = t.match(n.viewItem); + if (!r) + return; + const s = r.match; + if (s.name = !0, !o.consumable.test(n.viewItem, s)) + return; + const a = function (e, t, i) { + return e instanceof Function ? e(t, i) : i.writer.createElement(e) + } + (e.model, n.viewItem, o); + a && o.safeInsert(a, n.modelCursor) && (o.consumable.consume(n.viewItem, s), o.convertChildren(n.viewItem, a), o.updateConversionResult(a, n)) + } + } + function ja(e, t = null) { + const i = null === t || (e => e.getAttribute(t)), + n = "object" != typeof e.model ? e.model : e.model.key, + o = "object" != typeof e.model || void 0 === e.model.value ? i : e.model.value; + e.model = { + key: n, + value: o + } + } + function Ba(e, t) { + const i = new gn(e.view); + return (n, o, r) => { + const s = i.match(o.viewItem); + if (!s) + return; + const a = e.model.key, + c = "function" == typeof e.model.value ? e.model.value(o.viewItem, r) : e.model.value; + if (null === c) + return; + if (!function (e, t) { + const i = "function" == typeof e ? e(t) : e; + if ("object" == typeof i && !za(i)) + return !1; + return !i.classes && !i.attributes && !i.styles + } + (e.view, o.viewItem) ? delete s.match.name : s.match.name = !0, !r.consumable.test(o.viewItem, s.match)) + return; + o.modelRange || (o = Object.assign(o, r.convertChildren(o.viewItem, o.modelCursor))); + (function (e, t, i, n) { + let o = !1; + for (const r of Array.from(e.getItems({ + shallow: i + }))) + n.schema.checkAttribute(r, t.key) && (o = !0, r.hasAttribute(t.key) || n.writer.setAttribute(t.key, t.value, r)); + return o + })(o.modelRange, { + key: a, + value: c + }, t, r) && r.consumable.consume(o.viewItem, s.match) + } + } + function Fa(e, t) { + const i = {}; + return i.view = e.view + "-" + t, + i.model = (t, i) => { + const n = t.getAttribute("name"), + o = e.model(n, i); + return i.writer.createElement("$marker", { + "data-name": o + }) + }, + i + } + class Ha { + constructor(e, t) { + this.model = e, + this.view = new $s(t), + this.mapper = new ra, + this.downcastDispatcher = new ca({ + mapper: this.mapper, + schema: e.schema + }); + const i = this.model.document, + n = i.selection, + o = this.model.markers; + this.listenTo(this.model, "_beforeChanges", () => { + this.view._disableRendering(!0) + }, { + priority: "highest" + }), + this.listenTo(this.model, "_afterChanges", () => { + this.view._disableRendering(!1) + }, { + priority: "lowest" + }), + this.listenTo(i, "change", () => { + this.view.change(e => { + this.downcastDispatcher.convertChanges(i.differ, o, e), + this.downcastDispatcher.convertSelection(n, o, e) + }) + }, { + priority: "low" + }), + this.listenTo(this.view.document, "selectionChange", function (e, t) { + return (i, n) => { + const o = n.newSelection, + r = []; + for (const e of o.getRanges()) + r.push(t.toModelRange(e)); + const s = e.createSelection(r, { + backward: o.isBackward + }); + s.isEqual(e.document.selection) || e.change(e => { + e.setSelection(s) + }) + } + } + (this.model, this.mapper)), + this.downcastDispatcher.on("insert:$text", (e, t, i) => { + if (!i.consumable.consume(t.item, "insert")) + return; + const n = i.writer, + o = i.mapper.toViewPosition(t.range.start), + r = n.createText(t.item.data); + n.insert(o, r) + }, { + priority: "lowest" + }), + this.downcastDispatcher.on("remove", (e, t, i) => { + const n = i.mapper.toViewPosition(t.position), + o = t.position.getShiftedBy(t.length), + r = i.mapper.toViewPosition(o, { + isPhantom: !0 + }), + s = i.writer.createRange(n, r), + a = i.writer.remove(s.getTrimmed()); + for (const e of i.writer.createRangeIn(a).getItems()) + i.mapper.unbindViewElement(e) + }, { + priority: "low" + }), + this.downcastDispatcher.on("selection", (e, t, i) => { + const n = i.writer, + o = n.document.selection; + for (const e of o.getRanges()) + e.isCollapsed && e.end.parent.isAttached() && i.writer.mergeAttributes(e.start); + n.setSelection(null) + }, { + priority: "low" + }), + this.downcastDispatcher.on("selection", (e, t, i) => { + const n = t.selection; + if (n.isCollapsed) + return; + if (!i.consumable.consume(n, "selection")) + return; + const o = []; + for (const e of n.getRanges()) { + const t = i.mapper.toViewRange(e); + o.push(t) + } + i.writer.setSelection(o, { + backward: n.isBackward + }) + }, { + priority: "low" + }), + this.downcastDispatcher.on("selection", (e, t, i) => { + const n = t.selection; + if (!n.isCollapsed) + return; + if (!i.consumable.consume(n, "selection")) + return; + const o = i.writer, + r = n.getFirstPosition(), + s = i.mapper.toViewPosition(r), + a = o.breakAttributes(s); + o.setSelection(a) + }, { + priority: "low" + }), + this.view.document.roots.bindTo(this.model.document.roots).using(e => { + if ("$graveyard" == e.rootName) + return null; + const t = new ro(this.view.document, e.name); + return t.rootName = e.rootName, + this.mapper.bindElements(e, t), + t + }) + } + destroy() { + this.view.destroy(), + this.stopListening() + } + } + Ke(Ha, Ue); + class Ua { + constructor() { + this._commands = new Map + } + add(e, t) { + this._commands.set(e, t) + } + get(e) { + return this._commands.get(e) + } + execute(e, ...t) { + const i = this.get(e); + if (!i) + throw new c.a("commandcollection-command-not-found", this, { + commandName: e + }); + return i.execute(...t) + } + * names() { + yield * this._commands.keys() + } + * commands() { + yield * this._commands.values() + } + [Symbol.iterator]() { + return this._commands[Symbol.iterator]() + } + destroy() { + for (const e of this.commands()) + e.destroy() + } + } + class Wa { + constructor() { + this._consumables = new Map + } + add(e, t) { + let i; + e.is("$text") || e.is("documentFragment") ? this._consumables.set(e, !0) : (this._consumables.has(e) ? i = this._consumables.get(e) : (i = new qa(e), this._consumables.set(e, i)), i.add(t)) + } + test(e, t) { + const i = this._consumables.get(e); + return void 0 === i ? null : e.is("$text") || e.is("documentFragment") ? i : i.test(t) + } + consume(e, t) { + return !!this.test(e, t) && (e.is("$text") || e.is("documentFragment") ? this._consumables.set(e, !1) : this._consumables.get(e).consume(t), !0) + } + revert(e, t) { + const i = this._consumables.get(e); + void 0 !== i && (e.is("$text") || e.is("documentFragment") ? this._consumables.set(e, !0) : i.revert(t)) + } + static consumablesFromElement(e) { + const t = { + element: e, + name: !0, + attributes: [], + classes: [], + styles: [] + }, + i = e.getAttributeKeys(); + for (const e of i) + "style" != e && "class" != e && t.attributes.push(e); + const n = e.getClassNames(); + for (const e of n) + t.classes.push(e); + const o = e.getStyleNames(); + for (const e of o) + t.styles.push(e); + return t + } + static createFrom(e, t) { + if (t || (t = new Wa(e)), e.is("$text")) + return t.add(e), t; + e.is("element") && t.add(e, Wa.consumablesFromElement(e)), + e.is("documentFragment") && t.add(e); + for (const i of e.getChildren()) + t = Wa.createFrom(i, t); + return t + } + } + class qa { + constructor(e) { + this.element = e, + this._canConsumeName = null, + this._consumables = { + attributes: new Map, + styles: new Map, + classes: new Map + } + } + add(e) { + e.name && (this._canConsumeName = !0); + for (const t in this._consumables) + t in e && this._add(t, e[t]) + } + test(e) { + if (e.name && !this._canConsumeName) + return this._canConsumeName; + for (const t in this._consumables) + if (t in e) { + const i = this._test(t, e[t]); + if (!0 !== i) + return i + } + return !0 + } + consume(e) { + e.name && (this._canConsumeName = !1); + for (const t in this._consumables) + t in e && this._consume(t, e[t]) + } + revert(e) { + e.name && (this._canConsumeName = !0); + for (const t in this._consumables) + t in e && this._revert(t, e[t]) + } + _add(e, t) { + const i = _e(t) ? t : [t], + n = this._consumables[e]; + for (const t of i) { + if ("attributes" === e && ("class" === t || "style" === t)) + throw new c.a("viewconsumable-invalid-attribute", this); + if (n.set(t, !0), "styles" === e) + for (const e of this.element.document.stylesProcessor.getRelatedStyles(t)) + n.set(e, !0) + } + } + _test(e, t) { + const i = _e(t) ? t : [t], + n = this._consumables[e]; + for (const t of i) + if ("attributes" !== e || "class" !== t && "style" !== t) { + const e = n.get(t); + if (void 0 === e) + return null; + if (!e) + return !1 + } else { + const e = "class" == t ? "classes" : "styles", + i = this._test(e, [...this._consumables[e].keys()]); + if (!0 !== i) + return i + } + return !0 + } + _consume(e, t) { + const i = _e(t) ? t : [t], + n = this._consumables[e]; + for (const t of i) + if ("attributes" !== e || "class" !== t && "style" !== t) { + if (n.set(t, !1), "styles" == e) + for (const e of this.element.document.stylesProcessor.getRelatedStyles(t)) + n.set(e, !1) + } else { + const e = "class" == t ? "classes" : "styles"; + this._consume(e, [...this._consumables[e].keys()]) + } + } + _revert(e, t) { + const i = _e(t) ? t : [t], + n = this._consumables[e]; + for (const t of i) + if ("attributes" !== e || "class" !== t && "style" !== t) { + !1 === n.get(t) && n.set(t, !0) + } else { + const e = "class" == t ? "classes" : "styles"; + this._revert(e, [...this._consumables[e].keys()]) + } + } + } + class $a { + constructor() { + this._sourceDefinitions = {}, + this._attributeProperties = {}, + this.decorate("checkChild"), + this.decorate("checkAttribute"), + this.on("checkAttribute", (e, t) => { + t[0] = new Ya(t[0]) + }, { + priority: "highest" + }), + this.on("checkChild", (e, t) => { + t[0] = new Ya(t[0]), + t[1] = this.getDefinition(t[1]) + }, { + priority: "highest" + }) + } + register(e, t) { + if (this._sourceDefinitions[e]) + throw new c.a("schema-cannot-register-item-twice", this, { + itemName: e + }); + this._sourceDefinitions[e] = [Object.assign({}, t)], + this._clearCache() + } + extend(e, t) { + if (!this._sourceDefinitions[e]) + throw new c.a("schema-cannot-extend-missing-item", this, { + itemName: e + }); + this._sourceDefinitions[e].push(Object.assign({}, t)), + this._clearCache() + } + getDefinitions() { + return this._compiledDefinitions || this._compile(), + this._compiledDefinitions + } + getDefinition(e) { + let t; + return t = "string" == typeof e ? e : e.is && (e.is("$text") || e.is("$textProxy")) ? "$text" : e.name, + this.getDefinitions()[t] + } + isRegistered(e) { + return !!this.getDefinition(e) + } + isBlock(e) { + const t = this.getDefinition(e); + return !(!t || !t.isBlock) + } + isLimit(e) { + const t = this.getDefinition(e); + return !!t && !(!t.isLimit && !t.isObject) + } + isObject(e) { + const t = this.getDefinition(e); + return !!t && !!(t.isObject || t.isLimit && t.isSelectable && t.isContent) + } + isInline(e) { + const t = this.getDefinition(e); + return !(!t || !t.isInline) + } + isSelectable(e) { + const t = this.getDefinition(e); + return !!t && !(!t.isSelectable && !t.isObject) + } + isContent(e) { + const t = this.getDefinition(e); + return !!t && !(!t.isContent && !t.isObject) + } + checkChild(e, t) { + return !!t && this._checkContextMatch(t, e) + } + checkAttribute(e, t) { + const i = this.getDefinition(e.last); + return !!i && i.allowAttributes.includes(t) + } + checkMerge(e, t = null) { + if (e instanceof ea) { + const t = e.nodeBefore, + i = e.nodeAfter; + if (!(t instanceof Js)) + throw new c.a("schema-check-merge-no-element-before", this); + if (!(i instanceof Js)) + throw new c.a("schema-check-merge-no-element-after", this); + return this.checkMerge(t, i) + } + for (const i of t.getChildren()) + if (!this.checkChild(e, i)) + return !1; + return !0 + } + addChildCheck(e) { + this.on("checkChild", (t, [i, n]) => { + if (!n) + return; + const o = e(i, n); + "boolean" == typeof o && (t.stop(), t.return = o) + }, { + priority: "high" + }) + } + addAttributeCheck(e) { + this.on("checkAttribute", (t, [i, n]) => { + const o = e(i, n); + "boolean" == typeof o && (t.stop(), t.return = o) + }, { + priority: "high" + }) + } + setAttributeProperties(e, t) { + this._attributeProperties[e] = Object.assign(this.getAttributeProperties(e), t) + } + getAttributeProperties(e) { + return this._attributeProperties[e] || {} + } + getLimitElement(e) { + let t; + if (e instanceof ea) + t = e.parent; + else { + t = (e instanceof oa ? [e] : Array.from(e.getRanges())).reduce((e, t) => { + const i = t.getCommonAncestor(); + return e ? e.getCommonAncestor(i, { + includeSelf: !0 + }) : i + }, null) + } + for (; !this.isLimit(t) && t.parent; ) + t = t.parent; + return t + } + checkAttributeInSelection(e, t) { + if (e.isCollapsed) { + const i = [...e.getFirstPosition().getAncestors(), new Gs("", e.getAttributes())]; + return this.checkAttribute(i, t) + } { + const i = e.getRanges(); + for (const e of i) + for (const i of e) + if (this.checkAttribute(i.item, t)) + return !0 + } + return !1 + } + * getValidRanges(e, t) { + e = function * (e) { + for (const t of e) + yield * t.getMinimalFlatRanges() + } + (e); + for (const i of e) + yield * this._getValidRangesForRange(i, t) + } + getNearestSelectionRange(e, t = "both") { + if (this.checkChild(e, "$text")) + return new oa(e); + let i, + n; + const o = e.getAncestors().reverse().find(e => this.isLimit(e)) || e.root; + "both" != t && "backward" != t || (i = new Zs({ + boundaries: oa._createIn(o), + startPosition: e, + direction: "backward" + })), + "both" != t && "forward" != t || (n = new Zs({ + boundaries: oa._createIn(o), + startPosition: e + })); + for (const e of function * (e, t) { + let i = !1; + for (; !i; ) { + if (i = !0, e) { + const t = e.next(); + t.done || (i = !1, yield { + walker: e, + value: t.value + }) + } + if (t) { + const e = t.next(); + e.done || (i = !1, yield { + walker: t, + value: e.value + }) + } + } + } + (i, n)) { + const t = e.walker == i ? "elementEnd" : "elementStart", + n = e.value; + if (n.type == t && this.isObject(n.item)) + return oa._createOn(n.item); + if (this.checkChild(n.nextPosition, "$text")) + return new oa(n.nextPosition) + } + return null + } + findAllowedParent(e, t) { + let i = e.parent; + for (; i; ) { + if (this.checkChild(i, t)) + return i; + if (this.isLimit(i)) + return null; + i = i.parent + } + return null + } + removeDisallowedAttributes(e, t) { + for (const i of e) + if (i.is("$text")) + oc(this, i, t); + else { + const e = oa._createIn(i).getPositions(); + for (const i of e) { + oc(this, i.nodeBefore || i.parent, t) + } + } + } + createContext(e) { + return new Ya(e) + } + _clearCache() { + this._compiledDefinitions = null + } + _compile() { + const e = {}, + t = this._sourceDefinitions, + i = Object.keys(t); + for (const n of i) + e[n] = Ga(t[n], n); + for (const t of i) + Ka(e, t); + for (const t of i) + Qa(e, t); + for (const t of i) + Ja(e, t), Za(e, t); + for (const t of i) + Xa(e, t), ec(e, t); + this._compiledDefinitions = e + } + _checkContextMatch(e, t, i = t.length - 1) { + const n = t.getItem(i); + if (e.allowIn.includes(n.name)) { + if (0 == i) + return !0; { + const e = this.getDefinition(n); + return this._checkContextMatch(e, t, i - 1) + } + } + return !1 + } + * _getValidRangesForRange(e, t) { + let i = e.start, + n = e.start; + for (const o of e.getItems({ + shallow: !0 + })) + o.is("element") && (yield * this._getValidRangesForRange(oa._createIn(o), t)), this.checkAttribute(o, t) || (i.isEqual(n) || (yield new oa(i, n)), i = ea._createAfter(o)), n = ea._createAfter(o); + i.isEqual(n) || (yield new oa(i, n)) + } + } + Ke($a, Ue); + class Ya { + constructor(e) { + if (e instanceof Ya) + return e; + "string" == typeof e ? e = [e] : Array.isArray(e) || (e = e.getAncestors({ + includeSelf: !0 + })), + this._items = e.map(nc) + } + get length() { + return this._items.length + } + get last() { + return this._items[this._items.length - 1] + } + [Symbol.iterator]() { + return this._items[Symbol.iterator]() + } + push(e) { + const t = new Ya([e]); + return t._items = [...this._items, ...t._items], + t + } + getItem(e) { + return this._items[e] + } + * getNames() { + yield * this._items.map(e => e.name) + } + endsWith(e) { + return Array.from(this.getNames()).join(" ").endsWith(e) + } + startsWith(e) { + return Array.from(this.getNames()).join(" ").startsWith(e) + } + } + function Ga(e, t) { + const i = { + name: t, + allowIn: [], + allowContentOf: [], + allowWhere: [], + allowAttributes: [], + allowAttributesOf: [], + inheritTypesFrom: [] + }; + return function (e, t) { + for (const i of e) { + const e = Object.keys(i).filter(e => e.startsWith("is")); + for (const n of e) + t[n] = i[n] + } + } + (e, i), + tc(e, i, "allowIn"), + tc(e, i, "allowContentOf"), + tc(e, i, "allowWhere"), + tc(e, i, "allowAttributes"), + tc(e, i, "allowAttributesOf"), + tc(e, i, "inheritTypesFrom"), + function (e, t) { + for (const i of e) { + const e = i.inheritAllFrom; + e && (t.allowContentOf.push(e), t.allowWhere.push(e), t.allowAttributesOf.push(e), t.inheritTypesFrom.push(e)) + } + } + (e, i), + i + } + function Ka(e, t) { + for (const i of e[t].allowContentOf) + if (e[i]) { + ic(e, i).forEach(e => { + e.allowIn.push(t) + }) + } + delete e[t].allowContentOf + } + function Qa(e, t) { + for (const i of e[t].allowWhere) { + const n = e[i]; + if (n) { + const i = n.allowIn; + e[t].allowIn.push(...i) + } + } + delete e[t].allowWhere + } + function Ja(e, t) { + for (const i of e[t].allowAttributesOf) { + const n = e[i]; + if (n) { + const i = n.allowAttributes; + e[t].allowAttributes.push(...i) + } + } + delete e[t].allowAttributesOf + } + function Za(e, t) { + const i = e[t]; + for (const t of i.inheritTypesFrom) { + const n = e[t]; + if (n) { + const e = Object.keys(n).filter(e => e.startsWith("is")); + for (const t of e) + t in i || (i[t] = n[t]) + } + } + delete i.inheritTypesFrom + } + function Xa(e, t) { + const i = e[t], + n = i.allowIn.filter(t => e[t]); + i.allowIn = Array.from(new Set(n)) + } + function ec(e, t) { + const i = e[t]; + i.allowAttributes = Array.from(new Set(i.allowAttributes)) + } + function tc(e, t, i) { + for (const n of e) + "string" == typeof n[i] ? t[i].push(n[i]) : Array.isArray(n[i]) && t[i].push(...n[i]) + } + function ic(e, t) { + const i = e[t]; + return (n = e, Object.keys(n).map(e => n[e])).filter(e => e.allowIn.includes(i.name)); + var n + } + function nc(e) { + return "string" == typeof e || e.is("documentFragment") ? { + name: "string" == typeof e ? e : "$documentFragment", + * getAttributeKeys() {}, + getAttribute() {} + } + : { + name: e.is("element") ? e.name : "$text", + * getAttributeKeys() { + yield * e.getAttributeKeys() + }, + getAttribute: t => e.getAttribute(t) + } + } + function oc(e, t, i) { + for (const n of t.getAttributeKeys()) + e.checkAttribute(t, n) || i.removeAttribute(n, t) + } + class rc { + constructor(e = {}) { + this._splitParts = new Map, + this._cursorParents = new Map, + this._modelCursor = null, + this.conversionApi = Object.assign({}, e), + this.conversionApi.convertItem = this._convertItem.bind(this), + this.conversionApi.convertChildren = this._convertChildren.bind(this), + this.conversionApi.safeInsert = this._safeInsert.bind(this), + this.conversionApi.updateConversionResult = this._updateConversionResult.bind(this), + this.conversionApi.splitToAllowedParent = this._splitToAllowedParent.bind(this), + this.conversionApi.getSplitParts = this._getSplitParts.bind(this) + } + convert(e, t, i = ["$root"]) { + this.fire("viewCleanup", e), + this._modelCursor = function (e, t) { + let i; + for (const n of new Ya(e)) { + const e = {}; + for (const t of n.getAttributeKeys()) + e[t] = n.getAttribute(t); + const o = t.createElement(n.name, e); + i && t.append(o, i), + i = ea._createAt(o, 0) + } + return i + } + (i, t), + this.conversionApi.writer = t, + this.conversionApi.consumable = Wa.createFrom(e), + this.conversionApi.store = {}; + const { + modelRange: n + } = this._convertItem(e, this._modelCursor), + o = t.createDocumentFragment(); + if (n) { + this._removeEmptyElements(); + for (const e of Array.from(this._modelCursor.parent.getChildren())) + t.append(e, o); + o.markers = function (e, t) { + const i = new Set, + n = new Map, + o = oa._createIn(e).getItems(); + for (const e of o) + "$marker" == e.name && i.add(e); + for (const e of i) { + const i = e.getAttribute("data-name"), + o = t.createPositionBefore(e); + n.has(i) ? n.get(i).end = o.clone() : n.set(i, new oa(o.clone())), + t.remove(e) + } + return n + } + (o, t) + } + return this._modelCursor = null, + this._splitParts.clear(), + this._cursorParents.clear(), + this.conversionApi.writer = null, + this.conversionApi.store = null, + o + } + _convertItem(e, t) { + const i = Object.assign({ + viewItem: e, + modelCursor: t, + modelRange: null + }); + if (e.is("element") ? this.fire("element:" + e.name, i, this.conversionApi) : e.is("$text") ? this.fire("text", i, this.conversionApi) : this.fire("documentFragment", i, this.conversionApi), i.modelRange && !(i.modelRange instanceof oa)) + throw new c.a("view-conversion-dispatcher-incorrect-result", this); + return { + modelRange: i.modelRange, + modelCursor: i.modelCursor + } + } + _convertChildren(e, t) { + let i = t.is("position") ? t : ea._createAt(t, 0); + const n = new oa(i); + for (const t of Array.from(e.getChildren())) { + const e = this._convertItem(t, i); + e.modelRange instanceof oa && (n.end = e.modelRange.end, i = e.modelCursor) + } + return { + modelRange: n, + modelCursor: i + } + } + _safeInsert(e, t) { + const i = this._splitToAllowedParent(e, t); + return !!i && (this.conversionApi.writer.insert(e, i.position), !0) + } + _updateConversionResult(e, t) { + const i = this._getSplitParts(e), + n = this.conversionApi.writer; + t.modelRange || (t.modelRange = n.createRange(n.createPositionBefore(e), n.createPositionAfter(i[i.length - 1]))); + const o = this._cursorParents.get(e); + t.modelCursor = o ? n.createPositionAt(o, 0) : t.modelRange.end + } + _splitToAllowedParent(e, t) { + const { + schema: i, + writer: n + } = this.conversionApi; + let o = i.findAllowedParent(t, e); + if (o) { + if (o === t.parent) + return { + position: t + }; + this._modelCursor.parent.getAncestors().includes(o) && (o = null) + } + if (!o) + return Ra(t, e, i) ? { + position: Oa(t, n) + } + : null; + const r = this.conversionApi.writer.split(t, o), + s = []; + for (const e of r.range.getWalker()) + if ("elementEnd" == e.type) + s.push(e.item); + else { + const t = s.pop(), + i = e.item; + this._registerSplitPair(t, i) + } + const a = r.range.end.parent; + return this._cursorParents.set(e, a), { + position: r.position, + cursorParent: a + } + } + _registerSplitPair(e, t) { + this._splitParts.has(e) || this._splitParts.set(e, [e]); + const i = this._splitParts.get(e); + this._splitParts.set(t, i), + i.push(t) + } + _getSplitParts(e) { + let t; + return t = this._splitParts.has(e) ? this._splitParts.get(e) : [e], + t + } + _removeEmptyElements() { + let e = !1; + for (const t of this._splitParts.keys()) + t.isEmpty && (this.conversionApi.writer.remove(t), this._splitParts.delete(t), e = !0); + e && this._removeEmptyElements() + } + } + Ke(rc, u); + class sc { + getHtml(e) { + const t = document.implementation.createHTMLDocument("").createElement("div"); + return t.appendChild(e), + t.innerHTML + } + } + class ac { + constructor(e) { + this._domParser = new DOMParser, + this._domConverter = new Tr(e, { + blockFillerMode: "nbsp" + }), + this._htmlWriter = new sc + } + toData(e) { + const t = this._domConverter.viewToDom(e, document); + return this._htmlWriter.getHtml(t) + } + toView(e) { + const t = this._toDom(e); + return this._domConverter.domToView(t) + } + registerRawContentMatcher(e) { + this._domConverter.registerRawContentMatcher(e) + } + useFillerType(e) { + this._domConverter.blockFillerMode = "marked" == e ? "markedNbsp" : "nbsp" + } + _toDom(e) { + const t = this._domParser.parseFromString(e, "text/html"), + i = t.createDocumentFragment(), + n = t.body.childNodes; + for (; n.length > 0; ) + i.appendChild(n[0]); + return i + } + } + class cc { + constructor(e, t) { + this.model = e, + this.mapper = new ra, + this.downcastDispatcher = new ca({ + mapper: this.mapper, + schema: e.schema + }), + this.downcastDispatcher.on("insert:$text", (e, t, i) => { + if (!i.consumable.consume(t.item, "insert")) + return; + const n = i.writer, + o = i.mapper.toViewPosition(t.range.start), + r = n.createText(t.item.data); + n.insert(o, r) + }, { + priority: "lowest" + }), + this.upcastDispatcher = new rc({ + schema: e.schema + }), + this.viewDocument = new vo(t), + this.stylesProcessor = t, + this.htmlProcessor = new ac(this.viewDocument), + this.processor = this.htmlProcessor, + this._viewWriter = new Wo(this.viewDocument), + this.upcastDispatcher.on("text", (e, t, { + schema: i, + consumable: n, + writer: o + }) => { + let r = t.modelCursor; + if (!n.test(t.viewItem)) + return; + if (!i.checkChild(r, "$text")) { + if (!Ra(r, "$text", i)) + return; + r = Oa(r, o) + } + n.consume(t.viewItem); + const s = o.createText(t.viewItem.data); + o.insert(s, r), + t.modelRange = o.createRange(r, r.getShiftedBy(s.offsetSize)), + t.modelCursor = t.modelRange.end + }, { + priority: "lowest" + }), + this.upcastDispatcher.on("element", (e, t, i) => { + if (!t.modelRange && i.consumable.consume(t.viewItem, { + name: !0 + })) { + const { + modelRange: e, + modelCursor: n + } = i.convertChildren(t.viewItem, t.modelCursor); + t.modelRange = e, + t.modelCursor = n + } + }, { + priority: "lowest" + }), + this.upcastDispatcher.on("documentFragment", (e, t, i) => { + if (!t.modelRange && i.consumable.consume(t.viewItem, { + name: !0 + })) { + const { + modelRange: e, + modelCursor: n + } = i.convertChildren(t.viewItem, t.modelCursor); + t.modelRange = e, + t.modelCursor = n + } + }, { + priority: "lowest" + }), + this.decorate("init"), + this.decorate("set"), + this.on("init", () => { + this.fire("ready") + }, { + priority: "lowest" + }), + this.on("ready", () => { + this.model.enqueueChange("transparent", Na) + }, { + priority: "lowest" + }) + } + get(e = {}) { + const { + rootName: t = "main", + trim: i = "empty" + } = e; + if (!this._checkIfRootsExists([t])) + throw new c.a("datacontroller-get-non-existent-root", this); + const n = this.model.document.getRoot(t); + return "empty" !== i || this.model.hasContent(n, { + ignoreWhitespaces: !0 + }) ? this.stringify(n, e) : "" + } + stringify(e, t = {}) { + const i = this.toView(e, t); + return this.processor.toData(i) + } + toView(e, t = {}) { + const i = this.viewDocument, + n = this._viewWriter; + this.mapper.clearBindings(); + const o = oa._createIn(e), + r = new Uo(i); + this.mapper.bindElements(e, r), + this.downcastDispatcher.conversionApi.options = t, + this.downcastDispatcher.convertInsert(o, n); + const s = e.is("documentFragment") ? Array.from(e.markers) : function (e) { + const t = [], + i = e.root.document; + if (!i) + return []; + const n = oa._createIn(e); + for (const e of i.model.markers) { + const i = n.getIntersection(e.getRange()); + i && t.push([e.name, i]) + } + return t + } + (e); + for (const[e, t]of s) + this.downcastDispatcher.convertMarkerAdd(e, t, n); + return delete this.downcastDispatcher.conversionApi.options, + r + } + init(e) { + if (this.model.document.version) + throw new c.a("datacontroller-init-document-not-empty", this); + let t = {}; + if ("string" == typeof e ? t.main = e : t = e, !this._checkIfRootsExists(Object.keys(t))) + throw new c.a("datacontroller-init-non-existent-root", this); + return this.model.enqueueChange("transparent", e => { + for (const i of Object.keys(t)) { + const n = this.model.document.getRoot(i); + e.insert(this.parse(t[i], n), n, 0) + } + }), + Promise.resolve() + } + set(e) { + let t = {}; + if ("string" == typeof e ? t.main = e : t = e, !this._checkIfRootsExists(Object.keys(t))) + throw new c.a("datacontroller-set-non-existent-root", this); + this.model.enqueueChange("transparent", e => { + e.setSelection(null), + e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys()); + for (const i of Object.keys(t)) { + const n = this.model.document.getRoot(i); + e.remove(e.createRangeIn(n)), + e.insert(this.parse(t[i], n), n, 0) + } + }) + } + parse(e, t = "$root") { + const i = this.processor.toView(e); + return this.toModel(i, t) + } + toModel(e, t = "$root") { + return this.model.change(i => this.upcastDispatcher.convert(e, i, t)) + } + addStyleProcessorRules(e) { + e(this.stylesProcessor) + } + registerRawContentMatcher(e) { + this.processor && this.processor !== this.htmlProcessor && this.processor.registerRawContentMatcher(e), + this.htmlProcessor.registerRawContentMatcher(e) + } + destroy() { + this.stopListening() + } + _checkIfRootsExists(e) { + for (const t of e) + if (!this.model.document.getRootNames().includes(t)) + return !1; + return !0 + } + } + Ke(cc, Ue); + class lc { + constructor(e, t) { + this._helpers = new Map, + this._downcast = en(e), + this._createConversionHelpers({ + name: "downcast", + dispatchers: this._downcast, + isDowncast: !0 + }), + this._upcast = en(t), + this._createConversionHelpers({ + name: "upcast", + dispatchers: this._upcast, + isDowncast: !1 + }) + } + addAlias(e, t) { + const i = this._downcast.includes(t); + if (!this._upcast.includes(t) && !i) + throw new c.a("conversion-add-alias-dispatcher-not-registered", this); + this._createConversionHelpers({ + name: e, + dispatchers: [t], + isDowncast: i + }) + } + for (e) { + if (!this._helpers.has(e)) + throw new c.a("conversion-for-unknown-group", this); + return this._helpers.get(e) + } + elementToElement(e) { + this.for("downcast").elementToElement(e); + for (const { + model: t, + view: i + } + of dc(e)) + this.for("upcast").elementToElement({ + model: t, + view: i, + converterPriority: e.converterPriority + }) + } + attributeToElement(e) { + this.for("downcast").attributeToElement(e); + for (const { + model: t, + view: i + } + of dc(e)) + this.for("upcast").elementToAttribute({ + view: i, + model: t, + converterPriority: e.converterPriority + }) + } + attributeToAttribute(e) { + this.for("downcast").attributeToAttribute(e); + for (const { + model: t, + view: i + } + of dc(e)) + this.for("upcast").attributeToAttribute({ + view: i, + model: t + }) + } + _createConversionHelpers({ + name: e, + dispatchers: t, + isDowncast: i + }) { + if (this._helpers.has(e)) + throw new c.a("conversion-group-exists", this); + const n = i ? new Ca(t) : new Da(t); + this._helpers.set(e, n) + } + } + function * dc(e) { + if (e.model.values) + for (const t of e.model.values) { + const i = { + key: e.model.key, + value: t + }, + n = e.view[t], + o = e.upcastAlso ? e.upcastAlso[t] : void 0; + yield * uc(i, n, o) + } + else + yield * uc(e.model, e.view, e.upcastAlso) + } + function * uc(e, t, i) { + if (yield { + model: e, + view: t + }, i) + for (const t of en(i)) + yield { + model: e, + view: t + } + } + class hc { + constructor(e = "default") { + this.operations = [], + this.type = e + } + get baseVersion() { + for (const e of this.operations) + if (null !== e.baseVersion) + return e.baseVersion; + return null + } + addOperation(e) { + return e.batch = this, + this.operations.push(e), + e + } + } + class fc { + constructor(e) { + this.baseVersion = e, + this.isDocumentOperation = null !== this.baseVersion, + this.batch = null + } + _validate() {} + toJSON() { + const e = Object.assign({}, this); + return e.__className = this.constructor.className, + delete e.batch, + delete e.isDocumentOperation, + e + } + static get className() { + return "Operation" + } + static fromJSON(e) { + return new this(e.baseVersion) + } + } + class gc { + constructor(e) { + this.markers = new Map, + this._children = new Qs, + e && this._insertChild(0, e) + } + [Symbol.iterator]() { + return this.getChildren() + } + get childCount() { + return this._children.length + } + get maxOffset() { + return this._children.maxOffset + } + get isEmpty() { + return 0 === this.childCount + } + get root() { + return this + } + get parent() { + return null + } + is(e) { + return "documentFragment" === e || "model:documentFragment" === e + } + getChild(e) { + return this._children.getNode(e) + } + getChildren() { + return this._children[Symbol.iterator]() + } + getChildIndex(e) { + return this._children.getNodeIndex(e) + } + getChildStartOffset(e) { + return this._children.getNodeStartOffset(e) + } + getPath() { + return [] + } + getNodeByPath(e) { + let t = this; + for (const i of e) + t = t.getChild(t.offsetToIndex(i)); + return t + } + offsetToIndex(e) { + return this._children.offsetToIndex(e) + } + toJSON() { + const e = []; + for (const t of this._children) + e.push(t.toJSON()); + return e + } + static fromJSON(e) { + const t = []; + for (const i of e) + i.name ? t.push(Js.fromJSON(i)) : t.push(Gs.fromJSON(i)); + return new gc(t) + } + _appendChild(e) { + this._insertChild(this.childCount, e) + } + _insertChild(e, t) { + const i = function (e) { + if ("string" == typeof e) + return [new Gs(e)]; + Ji(e) || (e = [e]); + return Array.from(e).map(e => "string" == typeof e ? new Gs(e) : e instanceof Ks ? new Gs(e.data, e.getAttributes()) : e) + } + (t); + for (const e of i) + null !== e.parent && e._remove(), e.parent = this; + this._children._insertNodes(e, i) + } + _removeChildren(e, t = 1) { + const i = this._children._removeNodes(e, t); + for (const e of i) + e.parent = null; + return i + } + } + function mc(e, t) { + const i = (t = wc(t)).reduce((e, t) => e + t.offsetSize, 0), + n = e.parent; + _c(e); + const o = e.index; + return n._insertChild(o, t), + kc(n, o + t.length), + kc(n, o), + new oa(e, e.getShiftedBy(i)) + } + function pc(e) { + if (!e.isFlat) + throw new c.a("operation-utils-remove-range-not-flat", this); + const t = e.start.parent; + _c(e.start), + _c(e.end); + const i = t._removeChildren(e.start.index, e.end.index - e.start.index); + return kc(t, e.start.index), + i + } + function bc(e, t) { + if (!e.isFlat) + throw new c.a("operation-utils-move-range-not-flat", this); + const i = pc(e); + return mc(t = t._getTransformedByDeletion(e.start, e.end.offset - e.start.offset), i) + } + function wc(e) { + const t = []; + e instanceof Array || (e = [e]); + for (let i = 0; i < e.length; i++) + if ("string" == typeof e[i]) + t.push(new Gs(e[i])); + else if (e[i]instanceof Ks) + t.push(new Gs(e[i].data, e[i].getAttributes())); + else if (e[i]instanceof gc || e[i]instanceof Qs) + for (const n of e[i]) + t.push(n); + else + e[i]instanceof Ys && t.push(e[i]); + for (let e = 1; e < t.length; e++) { + const i = t[e], + n = t[e - 1]; + i instanceof Gs && n instanceof Gs && vc(i, n) && (t.splice(e - 1, 2, new Gs(n.data + i.data, n.getAttributes())), e--) + } + return t + } + function kc(e, t) { + const i = e.getChild(t - 1), + n = e.getChild(t); + if (i && n && i.is("$text") && n.is("$text") && vc(i, n)) { + const o = new Gs(i.data + n.data, i.getAttributes()); + e._removeChildren(t - 1, 2), + e._insertChild(t - 1, o) + } + } + function _c(e) { + const t = e.textNode, + i = e.parent; + if (t) { + const n = e.offset - t.startOffset, + o = t.index; + i._removeChildren(o, 1); + const r = new Gs(t.data.substr(0, n), t.getAttributes()), + s = new Gs(t.data.substr(n), t.getAttributes()); + i._insertChild(o, [r, s]) + } + } + function vc(e, t) { + const i = e.getAttributes(), + n = t.getAttributes(); + for (const e of i) { + if (e[1] !== t.getAttribute(e[0])) + return !1; + n.next() + } + return n.next().done + } + var yc = function (e, t) { + return Jr(e, t) + }; + class xc extends fc { + constructor(e, t, i, n, o) { + super(o), + this.range = e.clone(), + this.key = t, + this.oldValue = void 0 === i ? null : i, + this.newValue = void 0 === n ? null : n + } + get type() { + return null === this.oldValue ? "addAttribute" : null === this.newValue ? "removeAttribute" : "changeAttribute" + } + clone() { + return new xc(this.range, this.key, this.oldValue, this.newValue, this.baseVersion) + } + getReversed() { + return new xc(this.range, this.key, this.newValue, this.oldValue, this.baseVersion + 1) + } + toJSON() { + const e = super.toJSON(); + return e.range = this.range.toJSON(), + e + } + _validate() { + if (!this.range.isFlat) + throw new c.a("attribute-operation-range-not-flat", this); + for (const e of this.range.getItems({ + shallow: !0 + })) { + if (null !== this.oldValue && !yc(e.getAttribute(this.key), this.oldValue)) + throw new c.a("attribute-operation-wrong-old-value", this, { + item: e, + key: this.key, + value: this.oldValue + }); + if (null === this.oldValue && null !== this.newValue && e.hasAttribute(this.key)) + throw new c.a("attribute-operation-attribute-exists", this, { + node: e, + key: this.key + }) + } + } + _execute() { + yc(this.oldValue, this.newValue) || function (e, t, i) { + _c(e.start), + _c(e.end); + for (const n of e.getItems({ + shallow: !0 + })) { + const e = n.is("$textProxy") ? n.textNode : n; + null !== i ? e._setAttribute(t, i) : e._removeAttribute(t), + kc(e.parent, e.index) + } + kc(e.end.parent, e.end.index) + } + (this.range, this.key, this.newValue) + } + static get className() { + return "AttributeOperation" + } + static fromJSON(e, t) { + return new xc(oa.fromJSON(e.range, t), e.key, e.oldValue, e.newValue, e.baseVersion) + } + } + class Ac extends fc { + constructor(e, t) { + super(null), + this.sourcePosition = e.clone(), + this.howMany = t + } + get type() { + return "detach" + } + toJSON() { + const e = super.toJSON(); + return e.sourcePosition = this.sourcePosition.toJSON(), + e + } + _validate() { + if (this.sourcePosition.root.document) + throw new c.a("detach-operation-on-document-node", this) + } + _execute() { + pc(oa._createFromPositionAndShift(this.sourcePosition, this.howMany)) + } + static get className() { + return "DetachOperation" + } + } + class Cc extends fc { + constructor(e, t, i, n) { + super(n), + this.sourcePosition = e.clone(), + this.sourcePosition.stickiness = "toNext", + this.howMany = t, + this.targetPosition = i.clone(), + this.targetPosition.stickiness = "toNone" + } + get type() { + return "$graveyard" == this.targetPosition.root.rootName ? "remove" : "$graveyard" == this.sourcePosition.root.rootName ? "reinsert" : "move" + } + clone() { + return new this.constructor(this.sourcePosition, this.howMany, this.targetPosition, this.baseVersion) + } + getMovedRangeStart() { + return this.targetPosition._getTransformedByDeletion(this.sourcePosition, this.howMany) + } + getReversed() { + const e = this.sourcePosition._getTransformedByInsertion(this.targetPosition, this.howMany); + return new this.constructor(this.getMovedRangeStart(), this.howMany, e, this.baseVersion + 1) + } + _validate() { + const e = this.sourcePosition.parent, + t = this.targetPosition.parent, + i = this.sourcePosition.offset, + n = this.targetPosition.offset; + if (i + this.howMany > e.maxOffset) + throw new c.a("move-operation-nodes-do-not-exist", this); + if (e === t && i < n && n < i + this.howMany) + throw new c.a("move-operation-range-into-itself", this); + if (this.sourcePosition.root == this.targetPosition.root && "prefix" == cn(this.sourcePosition.getParentPath(), this.targetPosition.getParentPath())) { + const e = this.sourcePosition.path.length - 1; + if (this.targetPosition.path[e] >= i && this.targetPosition.path[e] < i + this.howMany) + throw new c.a("move-operation-node-into-itself", this) + } + } + _execute() { + bc(oa._createFromPositionAndShift(this.sourcePosition, this.howMany), this.targetPosition) + } + toJSON() { + const e = super.toJSON(); + return e.sourcePosition = this.sourcePosition.toJSON(), + e.targetPosition = this.targetPosition.toJSON(), + e + } + static get className() { + return "MoveOperation" + } + static fromJSON(e, t) { + const i = ea.fromJSON(e.sourcePosition, t), + n = ea.fromJSON(e.targetPosition, t); + return new this(i, e.howMany, n, e.baseVersion) + } + } + class Tc extends fc { + constructor(e, t, i) { + super(i), + this.position = e.clone(), + this.position.stickiness = "toNone", + this.nodes = new Qs(wc(t)), + this.shouldReceiveAttributes = !1 + } + get type() { + return "insert" + } + get howMany() { + return this.nodes.maxOffset + } + clone() { + const e = new Qs([...this.nodes].map(e => e._clone(!0))), + t = new Tc(this.position, e, this.baseVersion); + return t.shouldReceiveAttributes = this.shouldReceiveAttributes, + t + } + getReversed() { + const e = this.position.root.document.graveyard, + t = new ea(e, [0]); + return new Cc(this.position, this.nodes.maxOffset, t, this.baseVersion + 1) + } + _validate() { + const e = this.position.parent; + if (!e || e.maxOffset < this.position.offset) + throw new c.a("insert-operation-position-invalid", this) + } + _execute() { + const e = this.nodes; + this.nodes = new Qs([...e].map(e => e._clone(!0))), + mc(this.position, e) + } + toJSON() { + const e = super.toJSON(); + return e.position = this.position.toJSON(), + e.nodes = this.nodes.toJSON(), + e + } + static get className() { + return "InsertOperation" + } + static fromJSON(e, t) { + const i = []; + for (const t of e.nodes) + t.name ? i.push(Js.fromJSON(t)) : i.push(Gs.fromJSON(t)); + const n = new Tc(ea.fromJSON(e.position, t), i, e.baseVersion); + return n.shouldReceiveAttributes = e.shouldReceiveAttributes, + n + } + } + class Ec extends fc { + constructor(e, t, i, n, o, r) { + super(r), + this.name = e, + this.oldRange = t ? t.clone() : null, + this.newRange = i ? i.clone() : null, + this.affectsData = o, + this._markers = n + } + get type() { + return "marker" + } + clone() { + return new Ec(this.name, this.oldRange, this.newRange, this._markers, this.affectsData, this.baseVersion) + } + getReversed() { + return new Ec(this.name, this.newRange, this.oldRange, this._markers, this.affectsData, this.baseVersion + 1) + } + _execute() { + const e = this.newRange ? "_set" : "_remove"; + this._markers[e](this.name, this.newRange, !0, this.affectsData) + } + toJSON() { + const e = super.toJSON(); + return this.oldRange && (e.oldRange = this.oldRange.toJSON()), + this.newRange && (e.newRange = this.newRange.toJSON()), + delete e._markers, + e + } + static get className() { + return "MarkerOperation" + } + static fromJSON(e, t) { + return new Ec(e.name, e.oldRange ? oa.fromJSON(e.oldRange, t) : null, e.newRange ? oa.fromJSON(e.newRange, t) : null, t.model.markers, e.affectsData, e.baseVersion) + } + } + class Pc extends fc { + constructor(e, t, i, n) { + super(n), + this.position = e, + this.position.stickiness = "toNext", + this.oldName = t, + this.newName = i + } + get type() { + return "rename" + } + clone() { + return new Pc(this.position.clone(), this.oldName, this.newName, this.baseVersion) + } + getReversed() { + return new Pc(this.position.clone(), this.newName, this.oldName, this.baseVersion + 1) + } + _validate() { + const e = this.position.nodeAfter; + if (!(e instanceof Js)) + throw new c.a("rename-operation-wrong-position", this); + if (e.name !== this.oldName) + throw new c.a("rename-operation-wrong-name", this) + } + _execute() { + this.position.nodeAfter.name = this.newName + } + toJSON() { + const e = super.toJSON(); + return e.position = this.position.toJSON(), + e + } + static get className() { + return "RenameOperation" + } + static fromJSON(e, t) { + return new Pc(ea.fromJSON(e.position, t), e.oldName, e.newName, e.baseVersion) + } + } + class Sc extends fc { + constructor(e, t, i, n, o) { + super(o), + this.root = e, + this.key = t, + this.oldValue = i, + this.newValue = n + } + get type() { + return null === this.oldValue ? "addRootAttribute" : null === this.newValue ? "removeRootAttribute" : "changeRootAttribute" + } + clone() { + return new Sc(this.root, this.key, this.oldValue, this.newValue, this.baseVersion) + } + getReversed() { + return new Sc(this.root, this.key, this.newValue, this.oldValue, this.baseVersion + 1) + } + _validate() { + if (this.root != this.root.root || this.root.is("documentFragment")) + throw new c.a("rootattribute-operation-not-a-root", this, { + root: this.root, + key: this.key + }); + if (null !== this.oldValue && this.root.getAttribute(this.key) !== this.oldValue) + throw new c.a("rootattribute-operation-wrong-old-value", this, { + root: this.root, + key: this.key + }); + if (null === this.oldValue && null !== this.newValue && this.root.hasAttribute(this.key)) + throw new c.a("rootattribute-operation-attribute-exists", this, { + root: this.root, + key: this.key + }) + } + _execute() { + null !== this.newValue ? this.root._setAttribute(this.key, this.newValue) : this.root._removeAttribute(this.key) + } + toJSON() { + const e = super.toJSON(); + return e.root = this.root.toJSON(), + e + } + static get className() { + return "RootAttributeOperation" + } + static fromJSON(e, t) { + if (!t.getRoot(e.root)) + throw new c.a("rootattribute-operation-fromjson-no-root", this, { + rootName: e.root + }); + return new Sc(t.getRoot(e.root), e.key, e.oldValue, e.newValue, e.baseVersion) + } + } + class Mc extends fc { + constructor(e, t, i, n, o) { + super(o), + this.sourcePosition = e.clone(), + this.sourcePosition.stickiness = "toPrevious", + this.howMany = t, + this.targetPosition = i.clone(), + this.targetPosition.stickiness = "toNext", + this.graveyardPosition = n.clone() + } + get type() { + return "merge" + } + get deletionPosition() { + return new ea(this.sourcePosition.root, this.sourcePosition.path.slice(0, -1)) + } + get movedRange() { + const e = this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY); + return new oa(this.sourcePosition, e) + } + clone() { + return new this.constructor(this.sourcePosition, this.howMany, this.targetPosition, this.graveyardPosition, this.baseVersion) + } + getReversed() { + const e = this.targetPosition._getTransformedByMergeOperation(this), + t = this.sourcePosition.path.slice(0, -1), + i = new ea(this.sourcePosition.root, t)._getTransformedByMergeOperation(this); + return new Ic(e, this.howMany, i, this.graveyardPosition, this.baseVersion + 1) + } + _validate() { + const e = this.sourcePosition.parent, + t = this.targetPosition.parent; + if (!e.parent) + throw new c.a("merge-operation-source-position-invalid", this); + if (!t.parent) + throw new c.a("merge-operation-target-position-invalid", this); + if (this.howMany != e.maxOffset) + throw new c.a("merge-operation-how-many-invalid", this) + } + _execute() { + const e = this.sourcePosition.parent; + bc(oa._createIn(e), this.targetPosition), + bc(oa._createOn(e), this.graveyardPosition) + } + toJSON() { + const e = super.toJSON(); + return e.sourcePosition = e.sourcePosition.toJSON(), + e.targetPosition = e.targetPosition.toJSON(), + e.graveyardPosition = e.graveyardPosition.toJSON(), + e + } + static get className() { + return "MergeOperation" + } + static fromJSON(e, t) { + const i = ea.fromJSON(e.sourcePosition, t), + n = ea.fromJSON(e.targetPosition, t), + o = ea.fromJSON(e.graveyardPosition, t); + return new this(i, e.howMany, n, o, e.baseVersion) + } + } + class Ic extends fc { + constructor(e, t, i, n, o) { + super(o), + this.splitPosition = e.clone(), + this.splitPosition.stickiness = "toNext", + this.howMany = t, + this.insertionPosition = i, + this.graveyardPosition = n ? n.clone() : null, + this.graveyardPosition && (this.graveyardPosition.stickiness = "toNext") + } + get type() { + return "split" + } + get moveTargetPosition() { + const e = this.insertionPosition.path.slice(); + return e.push(0), + new ea(this.insertionPosition.root, e) + } + get movedRange() { + const e = this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY); + return new oa(this.splitPosition, e) + } + clone() { + return new this.constructor(this.splitPosition, this.howMany, this.insertionPosition, this.graveyardPosition, this.baseVersion) + } + getReversed() { + const e = this.splitPosition.root.document.graveyard, + t = new ea(e, [0]); + return new Mc(this.moveTargetPosition, this.howMany, this.splitPosition, t, this.baseVersion + 1) + } + _validate() { + const e = this.splitPosition.parent, + t = this.splitPosition.offset; + if (!e || e.maxOffset < t) + throw new c.a("split-operation-position-invalid", this); + if (!e.parent) + throw new c.a("split-operation-split-in-root", this); + if (this.howMany != e.maxOffset - this.splitPosition.offset) + throw new c.a("split-operation-how-many-invalid", this); + if (this.graveyardPosition && !this.graveyardPosition.nodeAfter) + throw new c.a("split-operation-graveyard-position-invalid", this) + } + _execute() { + const e = this.splitPosition.parent; + if (this.graveyardPosition) + bc(oa._createFromPositionAndShift(this.graveyardPosition, 1), this.insertionPosition); + else { + const t = e._clone(); + mc(this.insertionPosition, t) + } + bc(new oa(ea._createAt(e, this.splitPosition.offset), ea._createAt(e, e.maxOffset)), this.moveTargetPosition) + } + toJSON() { + const e = super.toJSON(); + return e.splitPosition = this.splitPosition.toJSON(), + e.insertionPosition = this.insertionPosition.toJSON(), + this.graveyardPosition && (e.graveyardPosition = this.graveyardPosition.toJSON()), + e + } + static get className() { + return "SplitOperation" + } + static getInsertionPosition(e) { + const t = e.path.slice(0, -1); + return t[t.length - 1]++, + new ea(e.root, t, "toPrevious") + } + static fromJSON(e, t) { + const i = ea.fromJSON(e.splitPosition, t), + n = ea.fromJSON(e.insertionPosition, t), + o = e.graveyardPosition ? ea.fromJSON(e.graveyardPosition, t) : null; + return new this(i, e.howMany, n, o, e.baseVersion) + } + } + class Nc extends Js { + constructor(e, t, i = "main") { + super(t), + this._document = e, + this.rootName = i + } + get document() { + return this._document + } + is(e, t) { + return t ? t === this.name && ("rootElement" === e || "model:rootElement" === e || "element" === e || "model:element" === e) : "rootElement" === e || "model:rootElement" === e || "element" === e || "model:element" === e || "node" === e || "model:node" === e + } + toJSON() { + return this.rootName + } + } + class Rc { + constructor(e, t) { + this.model = e, + this.batch = t + } + createText(e, t) { + return new Gs(e, t) + } + createElement(e, t) { + return new Js(e, t) + } + createDocumentFragment() { + return new gc + } + cloneElement(e, t = !0) { + return e._clone(t) + } + insert(e, t, i = 0) { + if (this._assertWriterUsedCorrectly(), e instanceof Gs && "" == e.data) + return; + const n = ea._createAt(t, i); + if (e.parent) { + if (Vc(e.root, n.root)) + return void this.move(oa._createOn(e), n); + if (e.root.document) + throw new c.a("model-writer-insert-forbidden-move", this); + this.remove(e) + } + const o = n.root.document ? n.root.document.version : null, + r = new Tc(n, e, o); + if (e instanceof Gs && (r.shouldReceiveAttributes = !0), this.batch.addOperation(r), this.model.applyOperation(r), e instanceof gc) + for (const[t, i]of e.markers) { + const e = ea._createAt(i.root, 0), + o = { + range: new oa(i.start._getCombined(e, n), i.end._getCombined(e, n)), + usingOperation: !0, + affectsData: !0 + }; + this.model.markers.has(t) ? this.updateMarker(t, o) : this.addMarker(t, o) + } + } + insertText(e, t, i, n) { + t instanceof gc || t instanceof Js || t instanceof ea ? this.insert(this.createText(e), t, i) : this.insert(this.createText(e, t), i, n) + } + insertElement(e, t, i, n) { + t instanceof gc || t instanceof Js || t instanceof ea ? this.insert(this.createElement(e), t, i) : this.insert(this.createElement(e, t), i, n) + } + append(e, t) { + this.insert(e, t, "end") + } + appendText(e, t, i) { + t instanceof gc || t instanceof Js ? this.insert(this.createText(e), t, "end") : this.insert(this.createText(e, t), i, "end") + } + appendElement(e, t, i) { + t instanceof gc || t instanceof Js ? this.insert(this.createElement(e), t, "end") : this.insert(this.createElement(e, t), i, "end") + } + setAttribute(e, t, i) { + if (this._assertWriterUsedCorrectly(), i instanceof oa) { + const n = i.getMinimalFlatRanges(); + for (const i of n) + Oc(this, e, t, i) + } else + Dc(this, e, t, i) + } + setAttributes(e, t) { + for (const[i, n]of fn(e)) + this.setAttribute(i, n, t) + } + removeAttribute(e, t) { + if (this._assertWriterUsedCorrectly(), t instanceof oa) { + const i = t.getMinimalFlatRanges(); + for (const t of i) + Oc(this, e, null, t) + } else + Dc(this, e, null, t) + } + clearAttributes(e) { + this._assertWriterUsedCorrectly(); + const t = e => { + for (const t of e.getAttributeKeys()) + this.removeAttribute(t, e) + }; + if (e instanceof oa) + for (const i of e.getItems()) + t(i); + else + t(e) + } + move(e, t, i) { + if (this._assertWriterUsedCorrectly(), !(e instanceof oa)) + throw new c.a("writer-move-invalid-range", this); + if (!e.isFlat) + throw new c.a("writer-move-range-not-flat", this); + const n = ea._createAt(t, i); + if (n.isEqual(e.start)) + return; + if (this._addOperationForAffectedMarkers("move", e), !Vc(e.root, n.root)) + throw new c.a("writer-move-different-document", this); + const o = e.root.document ? e.root.document.version : null, + r = new Cc(e.start, e.end.offset - e.start.offset, n, o); + this.batch.addOperation(r), + this.model.applyOperation(r) + } + remove(e) { + this._assertWriterUsedCorrectly(); + const t = (e instanceof oa ? e : oa._createOn(e)).getMinimalFlatRanges().reverse(); + for (const e of t) + this._addOperationForAffectedMarkers("move", e), zc(e.start, e.end.offset - e.start.offset, this.batch, this.model) + } + merge(e) { + this._assertWriterUsedCorrectly(); + const t = e.nodeBefore, + i = e.nodeAfter; + if (this._addOperationForAffectedMarkers("merge", e), !(t instanceof Js)) + throw new c.a("writer-merge-no-element-before", this); + if (!(i instanceof Js)) + throw new c.a("writer-merge-no-element-after", this); + e.root.document ? this._merge(e) : this._mergeDetached(e) + } + createPositionFromPath(e, t, i) { + return this.model.createPositionFromPath(e, t, i) + } + createPositionAt(e, t) { + return this.model.createPositionAt(e, t) + } + createPositionAfter(e) { + return this.model.createPositionAfter(e) + } + createPositionBefore(e) { + return this.model.createPositionBefore(e) + } + createRange(e, t) { + return this.model.createRange(e, t) + } + createRangeIn(e) { + return this.model.createRangeIn(e) + } + createRangeOn(e) { + return this.model.createRangeOn(e) + } + createSelection(e, t, i) { + return this.model.createSelection(e, t, i) + } + _mergeDetached(e) { + const t = e.nodeBefore, + i = e.nodeAfter; + this.move(oa._createIn(i), ea._createAt(t, "end")), + this.remove(i) + } + _merge(e) { + const t = ea._createAt(e.nodeBefore, "end"), + i = ea._createAt(e.nodeAfter, 0), + n = e.root.document.graveyard, + o = new ea(n, [0]), + r = e.root.document.version, + s = new Mc(i, e.nodeAfter.maxOffset, t, o, r); + this.batch.addOperation(s), + this.model.applyOperation(s) + } + rename(e, t) { + if (this._assertWriterUsedCorrectly(), !(e instanceof Js)) + throw new c.a("writer-rename-not-element-instance", this); + const i = e.root.document ? e.root.document.version : null, + n = new Pc(ea._createBefore(e), e.name, t, i); + this.batch.addOperation(n), + this.model.applyOperation(n) + } + split(e, t) { + this._assertWriterUsedCorrectly(); + let i, + n, + o = e.parent; + if (!o.parent) + throw new c.a("writer-split-element-no-parent", this); + if (t || (t = o.parent), !e.parent.getAncestors({ + includeSelf: !0 + }).includes(t)) + throw new c.a("writer-split-invalid-limit-element", this); + do { + const t = o.root.document ? o.root.document.version : null, + r = o.maxOffset - e.offset, + s = Ic.getInsertionPosition(e), + a = new Ic(e, r, s, null, t); + this.batch.addOperation(a), + this.model.applyOperation(a), + i || n || (i = o, n = e.parent.nextSibling), + o = (e = this.createPositionAfter(e.parent)).parent + } while (o !== t); + return { + position: e, + range: new oa(ea._createAt(i, "end"), ea._createAt(n, 0)) + } + } + wrap(e, t) { + if (this._assertWriterUsedCorrectly(), !e.isFlat) + throw new c.a("writer-wrap-range-not-flat", this); + const i = t instanceof Js ? t : new Js(t); + if (i.childCount > 0) + throw new c.a("writer-wrap-element-not-empty", this); + if (null !== i.parent) + throw new c.a("writer-wrap-element-attached", this); + this.insert(i, e.start); + const n = new oa(e.start.getShiftedBy(1), e.end.getShiftedBy(1)); + this.move(n, ea._createAt(i, 0)) + } + unwrap(e) { + if (this._assertWriterUsedCorrectly(), null === e.parent) + throw new c.a("writer-unwrap-element-no-parent", this); + this.move(oa._createIn(e), this.createPositionAfter(e)), + this.remove(e) + } + addMarker(e, t) { + if (this._assertWriterUsedCorrectly(), !t || "boolean" != typeof t.usingOperation) + throw new c.a("writer-addmarker-no-usingoperation", this); + const i = t.usingOperation, + n = t.range, + o = void 0 !== t.affectsData && t.affectsData; + if (this.model.markers.has(e)) + throw new c.a("writer-addmarker-marker-exists", this); + if (!n) + throw new c.a("writer-addmarker-no-range", this); + return i ? (Lc(this, e, null, n, o), this.model.markers.get(e)) : this.model.markers._set(e, n, i, o) + } + updateMarker(e, t) { + this._assertWriterUsedCorrectly(); + const i = "string" == typeof e ? e : e.name, + n = this.model.markers.get(i); + if (!n) + throw new c.a("writer-updatemarker-marker-not-exists", this); + if (!t) + return void this.model.markers._refresh(n); + const o = "boolean" == typeof t.usingOperation, + r = "boolean" == typeof t.affectsData, + s = r ? t.affectsData : n.affectsData; + if (!o && !t.range && !r) + throw new c.a("writer-updatemarker-wrong-options", this); + const a = n.getRange(), + l = t.range ? t.range : a; + o && t.usingOperation !== n.managedUsingOperations ? t.usingOperation ? Lc(this, i, null, l, s) : (Lc(this, i, a, null, s), this.model.markers._set(i, l, void 0, s)) : n.managedUsingOperations ? Lc(this, i, a, l, s) : this.model.markers._set(i, l, void 0, s) + } + removeMarker(e) { + this._assertWriterUsedCorrectly(); + const t = "string" == typeof e ? e : e.name; + if (!this.model.markers.has(t)) + throw new c.a("writer-removemarker-no-marker", this); + const i = this.model.markers.get(t); + if (!i.managedUsingOperations) + return void this.model.markers._remove(t); + Lc(this, t, i.getRange(), null, i.affectsData) + } + setSelection(e, t, i) { + this._assertWriterUsedCorrectly(), + this.model.document.selection._setTo(e, t, i) + } + setSelectionFocus(e, t) { + this._assertWriterUsedCorrectly(), + this.model.document.selection._setFocus(e, t) + } + setSelectionAttribute(e, t) { + if (this._assertWriterUsedCorrectly(), "string" == typeof e) + this._setSelectionAttribute(e, t); + else + for (const[t, i]of fn(e)) + this._setSelectionAttribute(t, i) + } + removeSelectionAttribute(e) { + if (this._assertWriterUsedCorrectly(), "string" == typeof e) + this._removeSelectionAttribute(e); + else + for (const t of e) + this._removeSelectionAttribute(t) + } + overrideSelectionGravity() { + return this.model.document.selection._overrideGravity() + } + restoreSelectionGravity(e) { + this.model.document.selection._restoreGravity(e) + } + _setSelectionAttribute(e, t) { + const i = this.model.document.selection; + if (i.isCollapsed && i.anchor.parent.isEmpty) { + const n = _a._getStoreAttributeKey(e); + this.setAttribute(n, t, i.anchor.parent) + } + i._setAttribute(e, t) + } + _removeSelectionAttribute(e) { + const t = this.model.document.selection; + if (t.isCollapsed && t.anchor.parent.isEmpty) { + const i = _a._getStoreAttributeKey(e); + this.removeAttribute(i, t.anchor.parent) + } + t._removeAttribute(e) + } + _assertWriterUsedCorrectly() { + if (this.model._currentWriter !== this) + throw new c.a("writer-incorrect-use", this) + } + _addOperationForAffectedMarkers(e, t) { + for (const i of this.model.markers) { + if (!i.managedUsingOperations) + continue; + const n = i.getRange(); + let o = !1; + if ("move" === e) + o = t.containsPosition(n.start) || t.start.isEqual(n.start) || t.containsPosition(n.end) || t.end.isEqual(n.end); + else { + const e = t.nodeBefore, + i = t.nodeAfter, + r = n.start.parent == e && n.start.isAtEnd, + s = n.end.parent == i && 0 == n.end.offset, + a = n.end.nodeAfter == i, + c = n.start.nodeAfter == i; + o = r || s || a || c + } + o && this.updateMarker(i.name, { + range: n + }) + } + } + } + function Oc(e, t, i, n) { + const o = e.model, + r = o.document; + let s, + a, + c, + l = n.start; + for (const e of n.getWalker({ + shallow: !0 + })) + c = e.item.getAttribute(t), s && a != c && (a != i && d(), l = s), s = e.nextPosition, a = c; + function d() { + const n = new oa(l, s), + c = n.root.document ? r.version : null, + d = new xc(n, t, a, i, c); + e.batch.addOperation(d), + o.applyOperation(d) + } + s instanceof ea && s != l && a != i && d() + } + function Dc(e, t, i, n) { + const o = e.model, + r = o.document, + s = n.getAttribute(t); + let a, + c; + if (s != i) { + if (n.root === n) { + const e = n.document ? r.version : null; + c = new Sc(n, t, s, i, e) + } else { + a = new oa(ea._createBefore(n), e.createPositionAfter(n)); + const o = a.root.document ? r.version : null; + c = new xc(a, t, s, i, o) + } + e.batch.addOperation(c), + o.applyOperation(c) + } + } + function Lc(e, t, i, n, o) { + const r = e.model, + s = r.document, + a = new Ec(t, i, n, r.markers, o, s.version); + e.batch.addOperation(a), + r.applyOperation(a) + } + function zc(e, t, i, n) { + let o; + if (e.root.document) { + const i = n.document, + r = new ea(i.graveyard, [0]); + o = new Cc(e, t, r, i.version) + } else + o = new Ac(e, t); + i.addOperation(o), + n.applyOperation(o) + } + function Vc(e, t) { + return e === t || e instanceof Nc && t instanceof Nc + } + class jc { + constructor(e) { + this._markerCollection = e, + this._changesInElement = new Map, + this._elementSnapshots = new Map, + this._changedMarkers = new Map, + this._changeCount = 0, + this._cachedChanges = null, + this._cachedChangesWithGraveyard = null + } + get isEmpty() { + return 0 == this._changesInElement.size && 0 == this._changedMarkers.size + } + refreshItem(e) { + if (this._isInInsertedElement(e.parent)) + return; + this._markRemove(e.parent, e.startOffset, e.offsetSize), + this._markInsert(e.parent, e.startOffset, e.offsetSize); + const t = oa._createOn(e); + for (const e of this._markerCollection.getMarkersIntersectingRange(t)) { + const t = e.getRange(); + this.bufferMarkerChange(e.name, t, t, e.affectsData) + } + this._cachedChanges = null + } + bufferOperation(e) { + switch (e.type) { + case "insert": + if (this._isInInsertedElement(e.position.parent)) + return; + this._markInsert(e.position.parent, e.position.offset, e.nodes.maxOffset); + break; + case "addAttribute": + case "removeAttribute": + case "changeAttribute": + for (const t of e.range.getItems({ + shallow: !0 + })) + this._isInInsertedElement(t.parent) || this._markAttribute(t); + break; + case "remove": + case "move": + case "reinsert": { + if (e.sourcePosition.isEqual(e.targetPosition) || e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition)) + return; + const t = this._isInInsertedElement(e.sourcePosition.parent), + i = this._isInInsertedElement(e.targetPosition.parent); + t || this._markRemove(e.sourcePosition.parent, e.sourcePosition.offset, e.howMany), + i || this._markInsert(e.targetPosition.parent, e.getMovedRangeStart().offset, e.howMany); + break + } + case "rename": { + if (this._isInInsertedElement(e.position.parent)) + return; + this._markRemove(e.position.parent, e.position.offset, 1), + this._markInsert(e.position.parent, e.position.offset, 1); + const t = oa._createFromPositionAndShift(e.position, 1); + for (const e of this._markerCollection.getMarkersIntersectingRange(t)) { + const t = e.getRange(); + this.bufferMarkerChange(e.name, t, t, e.affectsData) + } + break + } + case "split": { + const t = e.splitPosition.parent; + this._isInInsertedElement(t) || this._markRemove(t, e.splitPosition.offset, e.howMany), + this._isInInsertedElement(e.insertionPosition.parent) || this._markInsert(e.insertionPosition.parent, e.insertionPosition.offset, 1), + e.graveyardPosition && this._markRemove(e.graveyardPosition.parent, e.graveyardPosition.offset, 1); + break + } + case "merge": { + const t = e.sourcePosition.parent; + this._isInInsertedElement(t.parent) || this._markRemove(t.parent, t.startOffset, 1); + const i = e.graveyardPosition.parent; + this._markInsert(i, e.graveyardPosition.offset, 1); + const n = e.targetPosition.parent; + this._isInInsertedElement(n) || this._markInsert(n, e.targetPosition.offset, t.maxOffset); + break + } + } + this._cachedChanges = null + } + bufferMarkerChange(e, t, i, n) { + const o = this._changedMarkers.get(e); + o ? (o.newRange = i, o.affectsData = n, null == o.oldRange && null == o.newRange && this._changedMarkers.delete(e)) : this._changedMarkers.set(e, { + oldRange: t, + newRange: i, + affectsData: n + }) + } + getMarkersToRemove() { + const e = []; + for (const[t, i]of this._changedMarkers) + null != i.oldRange && e.push({ + name: t, + range: i.oldRange + }); + return e + } + getMarkersToAdd() { + const e = []; + for (const[t, i]of this._changedMarkers) + null != i.newRange && e.push({ + name: t, + range: i.newRange + }); + return e + } + getChangedMarkers() { + return Array.from(this._changedMarkers).map(e => ({ + name: e[0], + data: { + oldRange: e[1].oldRange, + newRange: e[1].newRange + } + })) + } + hasDataChanges() { + for (const[, e]of this._changedMarkers) + if (e.affectsData) + return !0; + return this._changesInElement.size > 0 + } + getChanges(e = { + includeChangesInGraveyard: !1 + }) { + if (this._cachedChanges) + return e.includeChangesInGraveyard ? this._cachedChangesWithGraveyard.slice() : this._cachedChanges.slice(); + let t = []; + for (const e of this._changesInElement.keys()) { + const i = this._changesInElement.get(e).sort((e, t) => e.offset === t.offset ? e.type != t.type ? "remove" == e.type ? -1 : 1 : 0 : e.offset < t.offset ? -1 : 1), + n = this._elementSnapshots.get(e), + o = Bc(e.getChildren()), + r = Fc(n.length, i); + let s = 0, + a = 0; + for (const i of r) + if ("i" === i) + t.push(this._getInsertDiff(e, s, o[s].name)), s++; + else if ("r" === i) + t.push(this._getRemoveDiff(e, s, n[a].name)), a++; + else if ("a" === i) { + const i = o[s].attributes, + r = n[a].attributes; + let c; + if ("$text" == o[s].name) + c = new oa(ea._createAt(e, s), ea._createAt(e, s + 1)); + else { + const t = e.offsetToIndex(s); + c = new oa(ea._createAt(e, s), ea._createAt(e.getChild(t), 0)) + } + t.push(...this._getAttributesDiff(c, r, i)), + s++, + a++ + } else + s++, a++ + } + t.sort((e, t) => e.position.root != t.position.root ? e.position.root.rootName < t.position.root.rootName ? -1 : 1 : e.position.isEqual(t.position) ? e.changeCount - t.changeCount : e.position.isBefore(t.position) ? -1 : 1); + for (let e = 1, i = 0; e < t.length; e++) { + const n = t[i], + o = t[e], + r = "remove" == n.type && "remove" == o.type && "$text" == n.name && "$text" == o.name && n.position.isEqual(o.position), + s = "insert" == n.type && "insert" == o.type && "$text" == n.name && "$text" == o.name && n.position.parent == o.position.parent && n.position.offset + n.length == o.position.offset, + a = "attribute" == n.type && "attribute" == o.type && n.position.parent == o.position.parent && n.range.isFlat && o.range.isFlat && n.position.offset + n.length == o.position.offset && n.attributeKey == o.attributeKey && n.attributeOldValue == o.attributeOldValue && n.attributeNewValue == o.attributeNewValue; + r || s || a ? (n.length++, a && (n.range.end = n.range.end.getShiftedBy(1)), t[e] = null) : i = e + } + t = t.filter(e => e); + for (const e of t) + delete e.changeCount, "attribute" == e.type && (delete e.position, delete e.length); + return this._changeCount = 0, + this._cachedChangesWithGraveyard = t.slice(), + this._cachedChanges = t.filter(Hc), + e.includeChangesInGraveyard ? this._cachedChangesWithGraveyard : this._cachedChanges + } + reset() { + this._changesInElement.clear(), + this._elementSnapshots.clear(), + this._changedMarkers.clear(), + this._cachedChanges = null + } + _markInsert(e, t, i) { + const n = { + type: "insert", + offset: t, + howMany: i, + count: this._changeCount++ + }; + this._markChange(e, n) + } + _markRemove(e, t, i) { + const n = { + type: "remove", + offset: t, + howMany: i, + count: this._changeCount++ + }; + this._markChange(e, n), + this._removeAllNestedChanges(e, t, i) + } + _markAttribute(e) { + const t = { + type: "attribute", + offset: e.startOffset, + howMany: e.offsetSize, + count: this._changeCount++ + }; + this._markChange(e.parent, t) + } + _markChange(e, t) { + this._makeSnapshot(e); + const i = this._getChangesForElement(e); + this._handleChange(t, i), + i.push(t); + for (let e = 0; e < i.length; e++) + i[e].howMany < 1 && (i.splice(e, 1), e--) + } + _getChangesForElement(e) { + let t; + return this._changesInElement.has(e) ? t = this._changesInElement.get(e) : (t = [], this._changesInElement.set(e, t)), + t + } + _makeSnapshot(e) { + this._elementSnapshots.has(e) || this._elementSnapshots.set(e, Bc(e.getChildren())) + } + _handleChange(e, t) { + e.nodesToHandle = e.howMany; + for (const i of t) { + const n = e.offset + e.howMany, + o = i.offset + i.howMany; + if ("insert" == e.type && ("insert" == i.type && (e.offset <= i.offset ? i.offset += e.howMany : e.offset < o && (i.howMany += e.nodesToHandle, e.nodesToHandle = 0)), "remove" == i.type && e.offset < i.offset && (i.offset += e.howMany), "attribute" == i.type)) + if (e.offset <= i.offset) + i.offset += e.howMany; + else if (e.offset < o) { + const o = i.howMany; + i.howMany = e.offset - i.offset, + t.unshift({ + type: "attribute", + offset: n, + howMany: o - i.howMany, + count: this._changeCount++ + }) + } + if ("remove" == e.type) { + if ("insert" == i.type) + if (n <= i.offset) + i.offset -= e.howMany; + else if (n <= o) + if (e.offset < i.offset) { + const t = n - i.offset; + i.offset = e.offset, + i.howMany -= t, + e.nodesToHandle -= t + } else + i.howMany -= e.nodesToHandle, e.nodesToHandle = 0; + else if (e.offset <= i.offset) + e.nodesToHandle -= i.howMany, i.howMany = 0; + else if (e.offset < o) { + const t = o - e.offset; + i.howMany -= t, + e.nodesToHandle -= t + } + if ("remove" == i.type && (n <= i.offset ? i.offset -= e.howMany : e.offset < i.offset && (e.nodesToHandle += i.howMany, i.howMany = 0)), "attribute" == i.type) + if (n <= i.offset) + i.offset -= e.howMany; + else if (e.offset < i.offset) { + const t = n - i.offset; + i.offset = e.offset, + i.howMany -= t + } else if (e.offset < o) + if (n <= o) { + const n = i.howMany; + i.howMany = e.offset - i.offset; + const o = n - i.howMany - e.nodesToHandle; + t.unshift({ + type: "attribute", + offset: e.offset, + howMany: o, + count: this._changeCount++ + }) + } else + i.howMany -= o - e.offset + } + if ("attribute" == e.type) { + if ("insert" == i.type) + if (e.offset < i.offset && n > i.offset) { + if (n > o) { + const e = { + type: "attribute", + offset: o, + howMany: n - o, + count: this._changeCount++ + }; + this._handleChange(e, t), + t.push(e) + } + e.nodesToHandle = i.offset - e.offset, + e.howMany = e.nodesToHandle + } else + e.offset >= i.offset && e.offset < o && (n > o ? (e.nodesToHandle = n - o, e.offset = o) : e.nodesToHandle = 0); + if ("remove" == i.type && e.offset < i.offset && n > i.offset) { + const o = { + type: "attribute", + offset: i.offset, + howMany: n - i.offset, + count: this._changeCount++ + }; + this._handleChange(o, t), + t.push(o), + e.nodesToHandle = i.offset - e.offset, + e.howMany = e.nodesToHandle + } + "attribute" == i.type && (e.offset >= i.offset && n <= o ? (e.nodesToHandle = 0, e.howMany = 0, e.offset = 0) : e.offset <= i.offset && n >= o && (i.howMany = 0)) + } + } + e.howMany = e.nodesToHandle, + delete e.nodesToHandle + } + _getInsertDiff(e, t, i) { + return { + type: "insert", + position: ea._createAt(e, t), + name: i, + length: 1, + changeCount: this._changeCount++ + } + } + _getRemoveDiff(e, t, i) { + return { + type: "remove", + position: ea._createAt(e, t), + name: i, + length: 1, + changeCount: this._changeCount++ + } + } + _getAttributesDiff(e, t, i) { + const n = []; + i = new Map(i); + for (const[o, r]of t) { + const t = i.has(o) ? i.get(o) : null; + t !== r && n.push({ + type: "attribute", + position: e.start, + range: e.clone(), + length: 1, + attributeKey: o, + attributeOldValue: r, + attributeNewValue: t, + changeCount: this._changeCount++ + }), + i.delete(o) + } + for (const[t, o]of i) + n.push({ + type: "attribute", + position: e.start, + range: e.clone(), + length: 1, + attributeKey: t, + attributeOldValue: null, + attributeNewValue: o, + changeCount: this._changeCount++ + }); + return n + } + _isInInsertedElement(e) { + const t = e.parent; + if (!t) + return !1; + const i = this._changesInElement.get(t), + n = e.startOffset; + if (i) + for (const e of i) + if ("insert" == e.type && n >= e.offset && n < e.offset + e.howMany) + return !0; + return this._isInInsertedElement(t) + } + _removeAllNestedChanges(e, t, i) { + const n = new oa(ea._createAt(e, t), ea._createAt(e, t + i)); + for (const e of n.getItems({ + shallow: !0 + })) + e.is("element") && (this._elementSnapshots.delete(e), this._changesInElement.delete(e), this._removeAllNestedChanges(e, 0, e.maxOffset)) + } + } + function Bc(e) { + const t = []; + for (const i of e) + if (i.is("$text")) + for (let e = 0; e < i.data.length; e++) + t.push({ + name: "$text", + attributes: new Map(i.getAttributes()) + }); + else + t.push({ + name: i.name, + attributes: new Map(i.getAttributes()) + }); + return t + } + function Fc(e, t) { + const i = []; + let n = 0, + o = 0; + for (const e of t) { + if (e.offset > n) { + for (let t = 0; t < e.offset - n; t++) + i.push("e"); + o += e.offset - n + } + if ("insert" == e.type) { + for (let t = 0; t < e.howMany; t++) + i.push("i"); + n = e.offset + e.howMany + } else if ("remove" == e.type) { + for (let t = 0; t < e.howMany; t++) + i.push("r"); + n = e.offset, + o += e.howMany + } else + i.push(..."a".repeat(e.howMany).split("")), n = e.offset + e.howMany, o += e.howMany + } + if (o < e) + for (let t = 0; t < e - o - n; t++) + i.push("e"); + return i + } + function Hc(e) { + const t = e.position && "$graveyard" == e.position.root.rootName, + i = e.range && "$graveyard" == e.range.root.rootName; + return !t && !i + } + class Uc { + constructor() { + this._operations = [], + this._undoPairs = new Map, + this._undoneOperations = new Set + } + addOperation(e) { + this._operations.includes(e) || this._operations.push(e) + } + getOperations(e = Number.NEGATIVE_INFINITY, t = Number.POSITIVE_INFINITY) { + const i = []; + for (const n of this._operations) + n.baseVersion >= e && n.baseVersion < t && i.push(n); + return i + } + getOperation(e) { + for (const t of this._operations) + if (t.baseVersion == e) + return t + } + setOperationAsUndone(e, t) { + this._undoPairs.set(t, e), + this._undoneOperations.add(e) + } + isUndoingOperation(e) { + return this._undoPairs.has(e) + } + isUndoneOperation(e) { + return this._undoneOperations.has(e) + } + getUndoneOperation(e) { + return this._undoPairs.get(e) + } + } + function Wc(e, t) { + return !!(i = e.charAt(t - 1)) && 1 == i.length && /[\ud800-\udbff]/.test(i) && function (e) { + return !!e && 1 == e.length && /[\udc00-\udfff]/.test(e) + } + (e.charAt(t)); + var i + } + function qc(e, t) { + return !!(i = e.charAt(t)) && 1 == i.length && /[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(i); + var i + } + class $c { + constructor(e) { + this.model = e, + this.version = 0, + this.history = new Uc(this), + this.selection = new _a(this), + this.roots = new Zi({ + idProperty: "rootName" + }), + this.differ = new jc(e.markers), + this._postFixers = new Set, + this._hasSelectionChangedFromTheLastChangeBlock = !1, + this.createRoot("$root", "$graveyard"), + this.listenTo(e, "applyOperation", (e, t) => { + const i = t[0]; + if (i.isDocumentOperation && i.baseVersion !== this.version) + throw new c.a("model-document-applyoperation-wrong-version", this, { + operation: i + }) + }, { + priority: "highest" + }), + this.listenTo(e, "applyOperation", (e, t) => { + const i = t[0]; + i.isDocumentOperation && this.differ.bufferOperation(i) + }, { + priority: "high" + }), + this.listenTo(e, "applyOperation", (e, t) => { + const i = t[0]; + i.isDocumentOperation && (this.version++, this.history.addOperation(i)) + }, { + priority: "low" + }), + this.listenTo(this.selection, "change", () => { + this._hasSelectionChangedFromTheLastChangeBlock = !0 + }), + this.listenTo(e.markers, "update", (e, t, i, n) => { + this.differ.bufferMarkerChange(t.name, i, n, t.affectsData), + null === i && t.on("change", (e, i) => { + this.differ.bufferMarkerChange(t.name, i, t.getRange(), t.affectsData) + }) + }) + } + get graveyard() { + return this.getRoot("$graveyard") + } + createRoot(e = "$root", t = "main") { + if (this.roots.get(t)) + throw new c.a("model-document-createroot-name-exists", this, { + name: t + }); + const i = new Nc(this, e, t); + return this.roots.add(i), + i + } + destroy() { + this.selection.destroy(), + this.stopListening() + } + getRoot(e = "main") { + return this.roots.get(e) + } + getRootNames() { + return Array.from(this.roots, e => e.rootName).filter(e => "$graveyard" != e) + } + registerPostFixer(e) { + this._postFixers.add(e) + } + toJSON() { + const e = ln(this); + return e.selection = "[engine.model.DocumentSelection]", + e.model = "[engine.model.Model]", + e + } + _handleChangeBlock(e) { + this._hasDocumentChangedFromTheLastChangeBlock() && (this._callPostFixers(e), this.selection.refresh(), this.differ.hasDataChanges() ? this.fire("change:data", e.batch) : this.fire("change", e.batch), this.selection.refresh(), this.differ.reset()), + this._hasSelectionChangedFromTheLastChangeBlock = !1 + } + _hasDocumentChangedFromTheLastChangeBlock() { + return !this.differ.isEmpty || this._hasSelectionChangedFromTheLastChangeBlock + } + _getDefaultRoot() { + for (const e of this.roots) + if (e !== this.graveyard) + return e; + return this.graveyard + } + _getDefaultRange() { + const e = this._getDefaultRoot(), + t = this.model, + i = t.schema, + n = t.createPositionFromPath(e, [0]); + return i.getNearestSelectionRange(n) || t.createRange(n) + } + _validateSelectionRange(e) { + return Yc(e.start) && Yc(e.end) + } + _callPostFixers(e) { + let t = !1; + do { + for (const i of this._postFixers) + if (this.selection.refresh(), t = i(e), t) + break + } while (t) + } + } + function Yc(e) { + const t = e.textNode; + if (t) { + const i = t.data, + n = e.offset - t.startOffset; + return !Wc(i, n) && !qc(i, n) + } + return !0 + } + Ke($c, u); + class Gc { + constructor() { + this._markers = new Map + } + [Symbol.iterator]() { + return this._markers.values() + } + has(e) { + return this._markers.has(e) + } + get(e) { + return this._markers.get(e) || null + } + _set(e, t, i = !1, n = !1) { + const o = e instanceof Kc ? e.name : e; + if (o.includes(",")) + throw new c.a("markercollection-incorrect-marker-name", this); + const r = this._markers.get(o); + if (r) { + const e = r.getRange(); + let s = !1; + return e.isEqual(t) || (r._attachLiveRange(ba.fromRange(t)), s = !0), + i != r.managedUsingOperations && (r._managedUsingOperations = i, s = !0), + "boolean" == typeof n && n != r.affectsData && (r._affectsData = n, s = !0), + s && this.fire("update:" + o, r, e, t), + r + } + const s = ba.fromRange(t), + a = new Kc(o, s, i, n); + return this._markers.set(o, a), + this.fire("update:" + o, a, null, t), + a + } + _remove(e) { + const t = e instanceof Kc ? e.name : e, + i = this._markers.get(t); + return !!i && (this._markers.delete(t), this.fire("update:" + t, i, i.getRange(), null), this._destroyMarker(i), !0) + } + _refresh(e) { + const t = e instanceof Kc ? e.name : e, + i = this._markers.get(t); + if (!i) + throw new c.a("markercollection-refresh-marker-not-exists", this); + const n = i.getRange(); + this.fire("update:" + t, i, n, n, i.managedUsingOperations, i.affectsData) + } + * getMarkersAtPosition(e) { + for (const t of this) + t.getRange().containsPosition(e) && (yield t) + } + * getMarkersIntersectingRange(e) { + for (const t of this) + null !== t.getRange().getIntersection(e) && (yield t) + } + destroy() { + for (const e of this._markers.values()) + this._destroyMarker(e); + this._markers = null, + this.stopListening() + } + * getMarkersGroup(e) { + for (const t of this._markers.values()) + t.name.startsWith(e + ":") && (yield t) + } + _destroyMarker(e) { + e.stopListening(), + e._detachLiveRange() + } + } + Ke(Gc, u); + class Kc { + constructor(e, t, i, n) { + this.name = e, + this._liveRange = this._attachLiveRange(t), + this._managedUsingOperations = i, + this._affectsData = n + } + get managedUsingOperations() { + if (!this._liveRange) + throw new c.a("marker-destroyed", this); + return this._managedUsingOperations + } + get affectsData() { + if (!this._liveRange) + throw new c.a("marker-destroyed", this); + return this._affectsData + } + getStart() { + if (!this._liveRange) + throw new c.a("marker-destroyed", this); + return this._liveRange.start.clone() + } + getEnd() { + if (!this._liveRange) + throw new c.a("marker-destroyed", this); + return this._liveRange.end.clone() + } + getRange() { + if (!this._liveRange) + throw new c.a("marker-destroyed", this); + return this._liveRange.toRange() + } + is(e) { + return "marker" === e || "model:marker" === e + } + _attachLiveRange(e) { + return this._liveRange && this._detachLiveRange(), + e.delegate("change:range").to(this), + e.delegate("change:content").to(this), + this._liveRange = e, + e + } + _detachLiveRange() { + this._liveRange.stopDelegating("change:range", this), + this._liveRange.stopDelegating("change:content", this), + this._liveRange.detach(), + this._liveRange = null + } + } + Ke(Kc, u); + class Qc extends fc { + get type() { + return "noop" + } + clone() { + return new Qc(this.baseVersion) + } + getReversed() { + return new Qc(this.baseVersion + 1) + } + _execute() {} + static get className() { + return "NoOperation" + } + } + const Jc = {}; + Jc[xc.className] = xc, + Jc[Tc.className] = Tc, + Jc[Ec.className] = Ec, + Jc[Cc.className] = Cc, + Jc[Qc.className] = Qc, + Jc[fc.className] = fc, + Jc[Pc.className] = Pc, + Jc[Sc.className] = Sc, + Jc[Ic.className] = Ic, + Jc[Mc.className] = Mc; + class Zc extends ea { + constructor(e, t, i = "toNone") { + if (super(e, t, i), !this.root.is("rootElement")) + throw new c.a("model-liveposition-root-not-rootelement", e); + Xc.call(this) + } + detach() { + this.stopListening() + } + is(e) { + return "livePosition" === e || "model:livePosition" === e || "position" == e || "model:position" === e + } + toPosition() { + return new ea(this.root, this.path.slice(), this.stickiness) + } + static fromPosition(e, t) { + return new this(e.root, e.path.slice(), t || e.stickiness) + } + } + function Xc() { + this.listenTo(this.root.document.model, "applyOperation", (e, t) => { + const i = t[0]; + i.isDocumentOperation && el.call(this, i) + }, { + priority: "low" + }) + } + function el(e) { + const t = this.getTransformedByOperation(e); + if (!this.isEqual(t)) { + const e = this.toPosition(); + this.path = t.path, + this.root = t.root, + this.fire("change", e) + } + } + Ke(Zc, u); + class tl { + constructor(e, t, i) { + this.model = e, + this.writer = t, + this.position = i, + this.canMergeWith = new Set([this.position.parent]), + this.schema = e.schema, + this._documentFragment = t.createDocumentFragment(), + this._documentFragmentPosition = t.createPositionAt(this._documentFragment, 0), + this._firstNode = null, + this._lastNode = null, + this._lastAutoParagraph = null, + this._filterAttributesOf = [], + this._affectedStart = null, + this._affectedEnd = null + } + handleNodes(e) { + for (const t of Array.from(e)) + this._handleNode(t); + this._insertPartialFragment(), + this._lastAutoParagraph && this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph), + this._mergeOnRight(), + this.schema.removeDisallowedAttributes(this._filterAttributesOf, this.writer), + this._filterAttributesOf = [] + } + _updateLastNodeFromAutoParagraph(e) { + const t = this.writer.createPositionAfter(this._lastNode), + i = this.writer.createPositionAfter(e); + if (i.isAfter(t)) { + if (this._lastNode = e, this.position.parent != e || !this.position.isAtEnd) + throw new c.a("insertcontent-invalid-insertion-position", this); + this.position = i, + this._setAffectedBoundaries(this.position) + } + } + getSelectionRange() { + return this.nodeToSelect ? oa._createOn(this.nodeToSelect) : this.model.schema.getNearestSelectionRange(this.position) + } + getAffectedRange() { + return this._affectedStart ? new oa(this._affectedStart, this._affectedEnd) : null + } + destroy() { + this._affectedStart && this._affectedStart.detach(), + this._affectedEnd && this._affectedEnd.detach() + } + _handleNode(e) { + if (this.schema.isObject(e)) + return void this._handleObject(e); + let t = this._checkAndAutoParagraphToAllowedPosition(e); + t || (t = this._checkAndSplitToAllowedPosition(e), t) ? (this._appendToFragment(e), this._firstNode || (this._firstNode = e), this._lastNode = e) : this._handleDisallowedNode(e) + } + _insertPartialFragment() { + if (this._documentFragment.isEmpty) + return; + const e = Zc.fromPosition(this.position, "toNext"); + this._setAffectedBoundaries(this.position), + this._documentFragment.getChild(0) == this._firstNode && (this.writer.insert(this._firstNode, this.position), this._mergeOnLeft(), this.position = e.toPosition()), + this._documentFragment.isEmpty || this.writer.insert(this._documentFragment, this.position), + this._documentFragmentPosition = this.writer.createPositionAt(this._documentFragment, 0), + this.position = e.toPosition(), + e.detach() + } + _handleObject(e) { + this._checkAndSplitToAllowedPosition(e) ? this._appendToFragment(e) : this._tryAutoparagraphing(e) + } + _handleDisallowedNode(e) { + e.is("element") ? this.handleNodes(e.getChildren()) : this._tryAutoparagraphing(e) + } + _appendToFragment(e) { + if (!this.schema.checkChild(this.position, e)) + throw new c.a("insertcontent-wrong-position", this, { + node: e, + position: this.position + }); + this.writer.insert(e, this._documentFragmentPosition), + this._documentFragmentPosition = this._documentFragmentPosition.getShiftedBy(e.offsetSize), + this.schema.isObject(e) && !this.schema.checkChild(this.position, "$text") ? this.nodeToSelect = e : this.nodeToSelect = null, + this._filterAttributesOf.push(e) + } + _setAffectedBoundaries(e) { + this._affectedStart || (this._affectedStart = Zc.fromPosition(e, "toPrevious")), + this._affectedEnd && !this._affectedEnd.isBefore(e) || (this._affectedEnd && this._affectedEnd.detach(), this._affectedEnd = Zc.fromPosition(e, "toNext")) + } + _mergeOnLeft() { + const e = this._firstNode; + if (!(e instanceof Js)) + return; + if (!this._canMergeLeft(e)) + return; + const t = Zc._createBefore(e); + t.stickiness = "toNext"; + const i = Zc.fromPosition(this.position, "toNext"); + this._affectedStart.isEqual(t) && (this._affectedStart.detach(), this._affectedStart = Zc._createAt(t.nodeBefore, "end", "toPrevious")), + this._firstNode === this._lastNode && (this._firstNode = t.nodeBefore, this._lastNode = t.nodeBefore), + this.writer.merge(t), + t.isEqual(this._affectedEnd) && this._firstNode === this._lastNode && (this._affectedEnd.detach(), this._affectedEnd = Zc._createAt(t.nodeBefore, "end", "toNext")), + this.position = i.toPosition(), + i.detach(), + this._filterAttributesOf.push(this.position.parent), + t.detach() + } + _mergeOnRight() { + const e = this._lastNode; + if (!(e instanceof Js)) + return; + if (!this._canMergeRight(e)) + return; + const t = Zc._createAfter(e); + if (t.stickiness = "toNext", !this.position.isEqual(t)) + throw new c.a("insertcontent-invalid-insertion-position", this); + this.position = ea._createAt(t.nodeBefore, "end"); + const i = Zc.fromPosition(this.position, "toPrevious"); + this._affectedEnd.isEqual(t) && (this._affectedEnd.detach(), this._affectedEnd = Zc._createAt(t.nodeBefore, "end", "toNext")), + this._firstNode === this._lastNode && (this._firstNode = t.nodeBefore, this._lastNode = t.nodeBefore), + this.writer.merge(t), + t.getShiftedBy(-1).isEqual(this._affectedStart) && this._firstNode === this._lastNode && (this._affectedStart.detach(), this._affectedStart = Zc._createAt(t.nodeBefore, 0, "toPrevious")), + this.position = i.toPosition(), + i.detach(), + this._filterAttributesOf.push(this.position.parent), + t.detach() + } + _canMergeLeft(e) { + const t = e.previousSibling; + return t instanceof Js && this.canMergeWith.has(t) && this.model.schema.checkMerge(t, e) + } + _canMergeRight(e) { + const t = e.nextSibling; + return t instanceof Js && this.canMergeWith.has(t) && this.model.schema.checkMerge(e, t) + } + _tryAutoparagraphing(e) { + const t = this.writer.createElement("paragraph"); + this._getAllowedIn(t, this.position.parent) && this.schema.checkChild(t, e) && (t._appendChild(e), this._handleNode(t)) + } + _checkAndAutoParagraphToAllowedPosition(e) { + if (this.schema.checkChild(this.position.parent, e)) + return !0; + if (!this.schema.checkChild(this.position.parent, "paragraph") || !this.schema.checkChild("paragraph", e)) + return !1; + this._insertPartialFragment(); + const t = this.writer.createElement("paragraph"); + return this.writer.insert(t, this.position), + this._setAffectedBoundaries(this.position), + this._lastAutoParagraph = t, + this.position = this.writer.createPositionAt(t, 0), + !0 + } + _checkAndSplitToAllowedPosition(e) { + const t = this._getAllowedIn(e, this.position.parent); + if (!t) + return !1; + for (t != this.position.parent && this._insertPartialFragment(); t != this.position.parent; ) { + if (this.schema.isLimit(this.position.parent)) + return !1; + if (this.position.isAtStart) { + const e = this.position.parent; + this.position = this.writer.createPositionBefore(e), + e.isEmpty && e.parent === t && this.writer.remove(e) + } else if (this.position.isAtEnd) + this.position = this.writer.createPositionAfter(this.position.parent); + else { + const e = this.writer.createPositionAfter(this.position.parent); + this._setAffectedBoundaries(this.position), + this.writer.split(this.position), + this.position = e, + this.canMergeWith.add(this.position.nodeAfter) + } + } + return !0 + } + _getAllowedIn(e, t) { + return this.schema.checkChild(t, e) ? t : t.parent ? this._getAllowedIn(e, t.parent) : null + } + } + function il(e, t, i = {}) { + if (t.isCollapsed) + return; + const n = t.getFirstRange(); + if ("$graveyard" == n.root.rootName) + return; + const o = e.schema; + e.change(e => { + if (!i.doNotResetEntireContent && function (e, t) { + const i = e.getLimitElement(t); + if (!t.containsEntireContent(i)) + return !1; + const n = t.getFirstRange(); + if (n.start.parent == n.end.parent) + return !1; + return e.checkChild(i, "paragraph") + } + (o, t)) + return void function (e, t) { + const i = e.model.schema.getLimitElement(t); + e.remove(e.createRangeIn(i)), + ol(e, e.createPositionAt(i, 0), t) + } + (e, t); + const[r, s] = function (e) { + const t = e.root.document.model, + i = e.start; + let n = e.end; + if (t.hasContent(e, { + ignoreMarkers: !0 + })) { + const i = function (e) { + const t = e.parent, + i = t.root.document.model.schema, + n = t.getAncestors({ + parentFirst: !0, + includeSelf: !0 + }); + for (const e of n) { + if (i.isLimit(e)) + return null; + if (i.isBlock(e)) + return e + } + } + (n); + if (i && n.isTouching(t.createPositionAt(i, 0))) { + const i = t.createSelection(e); + t.modifySelection(i, { + direction: "backward" + }), + n = i.getLastPosition() + } + } + return [Zc.fromPosition(i, "toPrevious"), Zc.fromPosition(n, "toNext")] + } + (n); + r.isTouching(s) || e.remove(e.createRange(r, s)), + i.leaveUnmerged || (!function (e, t, i) { + const n = e.model; + if (!nl(e.model.schema, t, i)) + return; + const[o, r] = function (e, t) { + const i = e.getAncestors(), + n = t.getAncestors(); + let o = 0; + for (; i[o] && i[o] == n[o]; ) + o++; + return [i[o], n[o]] + } + (t, i); + if (!o || !r) + return; + !n.hasContent(o, { + ignoreMarkers: !0 + }) && n.hasContent(r, { + ignoreMarkers: !0 + }) ? function e(t, i, n, o) { + const r = i.parent, + s = n.parent; + if (r == o || s == o) + return; + i = t.createPositionAfter(r), + (n = t.createPositionBefore(s)).isEqual(i) || t.insert(r, n); + for (; i.parent.isEmpty; ) { + const e = i.parent; + i = t.createPositionBefore(e), + t.remove(e) + } + if (n = t.createPositionBefore(s), function (e, t) { + const i = t.nodeBefore, + n = t.nodeAfter; + i.name != n.name && e.rename(i, n.name); + e.clearAttributes(i), + e.setAttributes(Object.fromEntries(n.getAttributes()), i), + e.merge(t) + } + (t, n), !nl(t.model.schema, i, n)) + return; + e(t, i, n, o) + } + (e, t, i, o.parent) : function e(t, i, n, o) { + const r = i.parent, + s = n.parent; + if (r == o || s == o) + return; + i = t.createPositionAfter(r), + (n = t.createPositionBefore(s)).isEqual(i) || t.insert(s, i); + t.merge(i); + for (; n.parent.isEmpty; ) { + const e = n.parent; + n = t.createPositionBefore(e), + t.remove(e) + } + if (!nl(t.model.schema, i, n)) + return; + e(t, i, n, o) + } + (e, t, i, o.parent) + } + (e, r, s), o.removeDisallowedAttributes(r.parent.getChildren(), e)), + rl(e, t, r), + !i.doNotAutoparagraph && function (e, t) { + const i = e.checkChild(t, "$text"), + n = e.checkChild(t, "paragraph"); + return !i && n + } + (o, r) && ol(e, r, t), + r.detach(), + s.detach() + }) + } + function nl(e, t, i) { + const n = t.parent, + o = i.parent; + return n != o && (!e.isLimit(n) && !e.isLimit(o) && function (e, t, i) { + const n = new oa(e, t); + for (const e of n.getWalker()) + if (i.isLimit(e.item)) + return !1; + return !0 + } + (t, i, e)) + } + function ol(e, t, i) { + const n = e.createElement("paragraph"); + e.insert(n, t), + rl(e, i, e.createPositionAt(n, 0)) + } + function rl(e, t, i) { + t instanceof _a ? e.setSelection(i) : t.setTo(i) + } + function sl(e, t) { + const { + isForward: i, + walker: n, + unit: o, + schema: r + } = e, { + type: s, + item: a, + nextPosition: c + } = t; + if ("text" == s) + return "word" === e.unit ? function (e, t) { + let i = e.position.textNode; + if (i) { + let n = e.position.offset - i.startOffset; + for (; !cl(i.data, n, t) && !ll(i, n, t); ) { + e.next(); + const o = t ? e.position.nodeAfter : e.position.nodeBefore; + if (o && o.is("$text")) { + const n = o.data.charAt(t ? 0 : o.data.length - 1); + ' ,.?!:;"-()'.includes(n) || (e.next(), i = e.position.textNode) + } + n = e.position.offset - i.startOffset + } + } + return e.position + } + (n, i) : function (e, t) { + const i = e.position.textNode; + if (i) { + const n = i.data; + let o = e.position.offset - i.startOffset; + for (; Wc(n, o) || "character" == t && qc(n, o); ) + e.next(), o = e.position.offset - i.startOffset + } + return e.position + } + (n, o); + if (s == (i ? "elementStart" : "elementEnd")) { + if (r.isSelectable(a)) + return ea._createAt(a, i ? "after" : "before"); + if (r.checkChild(c, "$text")) + return c + } else { + if (r.isLimit(a)) + return void n.skip(() => !0); + if (r.checkChild(c, "$text")) + return c + } + } + function al(e, t) { + const i = e.root, + n = ea._createAt(i, t ? "end" : 0); + return t ? new oa(e, n) : new oa(n, e) + } + function cl(e, t, i) { + const n = t + (i ? 0 : -1); + return ' ,.?!:;"-()'.includes(e.charAt(n)) + } + function ll(e, t, i) { + return t === (i ? e.endOffset : 0) + } + function dl(e, t) { + const i = []; + Array.from(e.getItems({ + direction: "backward" + })).map(e => t.createRangeOn(e)).filter(t => (t.start.isAfter(e.start) || t.start.isEqual(e.start)) && (t.end.isBefore(e.end) || t.end.isEqual(e.end))).forEach(e => { + i.push(e.start.parent), + t.remove(e) + }), + i.forEach(e => { + let i = e; + for (; i.parent && i.isEmpty; ) { + const e = t.createRangeOn(i); + i = i.parent, + t.remove(e) + } + }) + } + function ul(e) { + e.document.registerPostFixer(t => function (e, t) { + const i = t.document.selection, + n = t.schema, + o = []; + let r = !1; + for (const e of i.getRanges()) { + const t = hl(e, n); + t && !t.isEqual(e) ? (o.push(t), r = !0) : o.push(e) + } + r && e.setSelection(function (e) { + const t = []; + t.push(e.shift()); + for (const i of e) { + const e = t.pop(); + if (i.isEqual(e)) + t.push(e); + else if (i.isIntersecting(e)) { + const n = e.start.isAfter(i.start) ? i.start : e.start, + o = e.end.isAfter(i.end) ? e.end : i.end, + r = new oa(n, o); + t.push(r) + } else + t.push(e), t.push(i) + } + return t + } + (o), { + backward: i.isBackward + }) + } + (t, e)) + } + function hl(e, t) { + return e.isCollapsed ? function (e, t) { + const i = e.start, + n = t.getNearestSelectionRange(i); + if (!n) + return null; + if (!n.isCollapsed) + return n; + const o = n.start; + if (i.isEqual(o)) + return null; + return new oa(o) + } + (e, t) : function (e, t) { + const { + start: i, + end: n + } = e, + o = t.checkChild(i, "$text"), + r = t.checkChild(n, "$text"), + s = t.getLimitElement(i), + a = t.getLimitElement(n); + if (s === a) { + if (o && r) + return null; + if (function (e, t, i) { + const n = e.nodeAfter && !i.isLimit(e.nodeAfter) || i.checkChild(e, "$text"), + o = t.nodeBefore && !i.isLimit(t.nodeBefore) || i.checkChild(t, "$text"); + return n || o + } + (i, n, t)) { + const e = i.nodeAfter && t.isSelectable(i.nodeAfter) ? null : t.getNearestSelectionRange(i, "forward"), + o = n.nodeBefore && t.isSelectable(n.nodeBefore) ? null : t.getNearestSelectionRange(n, "backward"), + r = e ? e.start : i, + s = o ? o.end : n; + return new oa(r, s) + } + } + const c = s && !s.is("rootElement"), + l = a && !a.is("rootElement"); + if (c || l) { + const e = i.nodeAfter && n.nodeBefore && i.nodeAfter.parent === n.nodeBefore.parent, + o = c && (!e || !gl(i.nodeAfter, t)), + r = l && (!e || !gl(n.nodeBefore, t)); + let d = i, + u = n; + return o && (d = ea._createBefore(fl(s, t))), + r && (u = ea._createAfter(fl(a, t))), + new oa(d, u) + } + return null + } + (e, t) + } + function fl(e, t) { + let i = e, + n = i; + for (; t.isLimit(n) && n.parent; ) + i = n, n = n.parent; + return i + } + function gl(e, t) { + return e && t.isSelectable(e) + } + class ml { + constructor() { + this.markers = new Gc, + this.document = new $c(this), + this.schema = new $a, + this._pendingChanges = [], + this._currentWriter = null, + ["insertContent", "deleteContent", "modifySelection", "getSelectedContent", "applyOperation"].forEach(e => this.decorate(e)), + this.on("applyOperation", (e, t) => { + t[0]._validate() + }, { + priority: "highest" + }), + this.schema.register("$root", { + isLimit: !0 + }), + this.schema.register("$block", { + allowIn: "$root", + isBlock: !0 + }), + this.schema.register("$text", { + allowIn: "$block", + isInline: !0, + isContent: !0 + }), + this.schema.register("$clipboardHolder", { + allowContentOf: "$root", + isLimit: !0 + }), + this.schema.extend("$text", { + allowIn: "$clipboardHolder" + }), + this.schema.register("$documentFragment", { + allowContentOf: "$root", + isLimit: !0 + }), + this.schema.extend("$text", { + allowIn: "$documentFragment" + }), + this.schema.register("$marker"), + this.schema.addChildCheck((e, t) => { + if ("$marker" === t.name) + return !0 + }), + ul(this), + this.document.registerPostFixer(Na) + } + change(e) { + try { + return 0 === this._pendingChanges.length ? (this._pendingChanges.push({ + batch: new hc, + callback: e + }), this._runPendingChanges()[0]) : e(this._currentWriter) + } catch (e) { + c.a.rethrowUnexpectedError(e, this) + } + } + enqueueChange(e, t) { + try { + "string" == typeof e ? e = new hc(e) : "function" == typeof e && (t = e, e = new hc), + this._pendingChanges.push({ + batch: e, + callback: t + }), + 1 == this._pendingChanges.length && this._runPendingChanges() + } catch (e) { + c.a.rethrowUnexpectedError(e, this) + } + } + applyOperation(e) { + e._execute() + } + insertContent(e, t, i) { + return function (e, t, i, n) { + return e.change(o => { + let r; + r = i ? i instanceof ha || i instanceof _a ? i : o.createSelection(i, n) : e.document.selection, + r.isCollapsed || e.deleteContent(r, { + doNotAutoparagraph: !0 + }); + const s = new tl(e, o, r.anchor); + let a; + a = t.is("documentFragment") ? t.getChildren() : [t], + s.handleNodes(a); + const c = s.getSelectionRange(); + c && (r instanceof _a ? o.setSelection(c) : r.setTo(c)); + const l = s.getAffectedRange() || e.createRange(r.anchor); + return s.destroy(), + l + }) + } + (this, e, t, i) + } + deleteContent(e, t) { + il(this, e, t) + } + modifySelection(e, t) { + !function (e, t, i = {}) { + const n = e.schema, + o = "backward" != i.direction, + r = i.unit ? i.unit : "character", + s = t.focus, + a = new Zs({ + boundaries: al(s, o), + singleCharacters: !0, + direction: o ? "forward" : "backward" + }), + c = { + walker: a, + schema: n, + isForward: o, + unit: r + }; + let l; + for (; l = a.next(); ) { + if (l.done) + return; + const i = sl(c, l.value); + if (i) + return void(t instanceof _a ? e.change(e => { + e.setSelectionFocus(i) + }) : t.setFocus(i)) + } + } + (this, e, t) + } + getSelectedContent(e) { + return function (e, t) { + return e.change(e => { + const i = e.createDocumentFragment(), + n = t.getFirstRange(); + if (!n || n.isCollapsed) + return i; + const o = n.start.root, + r = n.start.getCommonPath(n.end), + s = o.getNodeByPath(r); + let a; + a = n.start.parent == n.end.parent ? n : e.createRange(e.createPositionAt(s, n.start.path[r.length]), e.createPositionAt(s, n.end.path[r.length] + 1)); + const c = a.end.offset - a.start.offset; + for (const t of a.getItems({ + shallow: !0 + })) + t.is("$textProxy") ? e.appendText(t.data, t.getAttributes(), i) : e.append(e.cloneElement(t, !0), i); + if (a != n) { + const t = n._getTransformedByMove(a.start, e.createPositionAt(i, 0), c)[0], + o = e.createRange(e.createPositionAt(i, 0), t.start); + dl(e.createRange(t.end, e.createPositionAt(i, "end")), e), + dl(o, e) + } + return i + }) + } + (this, e) + } + hasContent(e, t = {}) { + const i = e instanceof Js ? oa._createIn(e) : e; + if (i.isCollapsed) + return !1; + const { + ignoreWhitespaces: n = !1, + ignoreMarkers: o = !1 + } = t; + if (!o) + for (const e of this.markers.getMarkersIntersectingRange(i)) + if (e.affectsData) + return !0; + for (const e of i.getItems()) + if (this.schema.isContent(e)) { + if (!e.is("$textProxy")) + return !0; + if (!n) + return !0; + if (-1 !== e.data.search(/\S/)) + return !0 + } + return !1 + } + createPositionFromPath(e, t, i) { + return new ea(e, t, i) + } + createPositionAt(e, t) { + return ea._createAt(e, t) + } + createPositionAfter(e) { + return ea._createAfter(e) + } + createPositionBefore(e) { + return ea._createBefore(e) + } + createRange(e, t) { + return new oa(e, t) + } + createRangeIn(e) { + return oa._createIn(e) + } + createRangeOn(e) { + return oa._createOn(e) + } + createSelection(e, t, i) { + return new ha(e, t, i) + } + createBatch(e) { + return new hc(e) + } + createOperationFromJSON(e) { + return class { + static fromJSON(e, t) { + return Jc[e.__className].fromJSON(e, t) + } + } + .fromJSON(e, this.document) + } + destroy() { + this.document.destroy(), + this.stopListening() + } + _runPendingChanges() { + const e = []; + for (this.fire("_beforeChanges"); this._pendingChanges.length; ) { + const t = this._pendingChanges[0].batch; + this._currentWriter = new Rc(this, t); + const i = this._pendingChanges[0].callback(this._currentWriter); + e.push(i), + this.document._handleChangeBlock(this._currentWriter), + this._pendingChanges.shift(), + this._currentWriter = null + } + return this.fire("_afterChanges"), + e + } + } + Ke(ml, Ue); + class pl extends Os { + constructor(e) { + super(), + this.editor = e + } + set(e, t, i = {}) { + if ("string" == typeof t) { + const e = t; + t = (t, i) => { + this.editor.execute(e), + i() + } + } + super.set(e, t, i) + } + } + class bl { + constructor(e = {}) { + this._context = e.context || new sn({ + language: e.language + }), + this._context._addEditor(this, !e.context); + const t = Array.from(this.constructor.builtinPlugins || []); + this.config = new Gi(e, this.constructor.defaultConfig), + this.config.define("plugins", t), + this.config.define(this._context._getEditorConfig()), + this.plugins = new Xi(this, t, this._context.plugins), + this.locale = this._context.locale, + this.t = this.locale.t, + this.commands = new Ua, + this.set("state", "initializing"), + this.once("ready", () => this.state = "ready", { + priority: "high" + }), + this.once("destroy", () => this.state = "destroyed", { + priority: "high" + }), + this.set("isReadOnly", !1), + this.model = new ml; + const i = new Qn; + this.data = new cc(this.model, i), + this.editing = new Ha(this.model, i), + this.editing.view.document.bind("isReadOnly").to(this), + this.conversion = new lc([this.editing.downcastDispatcher, this.data.downcastDispatcher], this.data.upcastDispatcher), + this.conversion.addAlias("dataDowncast", this.data.downcastDispatcher), + this.conversion.addAlias("editingDowncast", this.editing.downcastDispatcher), + this.keystrokes = new pl(this), + this.keystrokes.listenTo(this.editing.view.document) + } + initPlugins() { + const e = this.config, + t = e.get("plugins"), + i = e.get("removePlugins") || [], + n = e.get("extraPlugins") || [], + o = e.get("substitutePlugins") || []; + return this.plugins.init(t.concat(n), i, o) + } + destroy() { + let e = Promise.resolve(); + return "initializing" == this.state && (e = new Promise(e => this.once("ready", e))), + e.then(() => { + this.fire("destroy"), + this.stopListening(), + this.commands.destroy() + }).then(() => this.plugins.destroy()).then(() => { + this.model.destroy(), + this.data.destroy(), + this.editing.destroy(), + this.keystrokes.destroy() + }).then(() => this._context._removeEditor(this)) + } + execute(...e) { + try { + return this.commands.execute(...e) + } catch (e) { + c.a.rethrowUnexpectedError(e, this) + } + } + focus() { + this.editing.view.focus() + } + } + Ke(bl, Ue); + class wl { + constructor(e) { + this.editor = e, + this._components = new Map + } + * names() { + for (const e of this._components.values()) + yield e.originalName + } + add(e, t) { + this._components.set(kl(e), { + callback: t, + originalName: e + }) + } + create(e) { + if (!this.has(e)) + throw new c.a("componentfactory-item-missing", this, { + name: e + }); + return this._components.get(kl(e)).callback(this.editor.locale) + } + has(e) { + return this._components.has(kl(e)) + } + } + function kl(e) { + return String(e).toLowerCase() + } + class _l { + constructor(e) { + this.editor = e, + this.componentFactory = new wl(e), + this.focusTracker = new Rs, + this._editableElementsMap = new Map, + this.listenTo(e.editing.view.document, "layoutChanged", () => this.update()) + } + get element() { + return null + } + update() { + this.fire("update") + } + destroy() { + this.stopListening(), + this.focusTracker.destroy(); + for (const e of this._editableElementsMap.values()) + e.ckeditorInstance = null; + this._editableElementsMap = new Map + } + setEditableElement(e, t) { + this._editableElementsMap.set(e, t), + t.ckeditorInstance || (t.ckeditorInstance = this.editor) + } + getEditableElement(e = "main") { + return this._editableElementsMap.get(e) + } + getEditableElementsNames() { + return this._editableElementsMap.keys() + } + get _editableElements() { + return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.", { + editorUI: this + }), + this._editableElementsMap + } + } + Ke(_l, u); + var vl = { + setData(e) { + this.data.set(e) + }, + getData(e) { + return this.data.get(e) + } + }; + var yl = { + updateSourceElement() { + if (!this.sourceElement) + throw new c.a("editor-missing-sourceelement", this); + var e, + t; + e = this.sourceElement, + t = this.data.get(), + e instanceof HTMLTextAreaElement && (e.value = t), + e.innerHTML = t + } + }; + class xl extends an { + static get pluginName() { + return "PendingActions" + } + init() { + this.set("hasAny", !1), + this._actions = new Zi({ + idProperty: "_id" + }), + this._actions.delegate("add", "remove").to(this) + } + add(e) { + if ("string" != typeof e) + throw new c.a("pendingactions-add-invalid-message", this); + const t = Object.create(Ue); + return t.set("message", e), + this._actions.add(t), + this.hasAny = !0, + t + } + remove(e) { + this._actions.remove(e), + this.hasAny = !!this._actions.length + } + get first() { + return this._actions.get(0) + } + [Symbol.iterator]() { + return this._actions[Symbol.iterator]() + } + } + const Al = '', + Cl = '', + Tl = '', + El = '', + Pl = '', + Sl = '', + Ml = '', + Il = '', + Nl = '', + Rl = '', + Ol = ''; + function Dl({ + emitter: e, + activator: t, + callback: i, + contextElements: n + }) { + e.listenTo(document, "mousedown", (e, o) => { + if (!t()) + return; + const r = "function" == typeof o.composedPath ? o.composedPath() : []; + for (const e of n) + if (e.contains(o.target) || r.includes(e)) + return; + i() + }) + } + function Ll(e) { + e.set("_isCssTransitionsDisabled", !1), + e.disableCssTransitions = () => { + e._isCssTransitionsDisabled = !0 + }, + e.enableCssTransitions = () => { + e._isCssTransitionsDisabled = !1 + }, + e.extendTemplate({ + attributes: { + class: [e.bindTemplate.if("_isCssTransitionsDisabled", "ck-transitions-disabled")] + } + }) + } + function zl({ + view: e + }) { + e.listenTo(e.element, "submit", (t, i) => { + i.preventDefault(), + e.fire("submit") + }, { + useCapture: !0 + }) + } + class Vl extends Zi { + constructor(e = []) { + super(e, { + idProperty: "viewUid" + }), + this.on("add", (e, t, i) => { + this._renderViewIntoCollectionParent(t, i) + }), + this.on("remove", (e, t) => { + t.element && this._parentElement && t.element.remove() + }), + this._parentElement = null + } + destroy() { + this.map(e => e.destroy()) + } + setParent(e) { + this._parentElement = e; + for (const e of this) + this._renderViewIntoCollectionParent(e) + } + delegate(...e) { + if (!e.length || !e.every(e => "string" == typeof e)) + throw new c.a("ui-viewcollection-delegate-wrong-events", this); + return { + to: t => { + for (const i of this) + for (const n of e) + i.delegate(n).to(t); + this.on("add", (i, n) => { + for (const i of e) + n.delegate(i).to(t) + }), + this.on("remove", (i, n) => { + for (const i of e) + n.stopDelegating(i, t) + }) + } + } + } + _renderViewIntoCollectionParent(e, t) { + e.isRendered || e.render(), + e.element && this._parentElement && this._parentElement.insertBefore(e.element, this._parentElement.children[t]) + } + } + i(14); + class jl { + constructor(e) { + this.element = null, + this.isRendered = !1, + this.locale = e, + this.t = e && e.t, + this._viewCollections = new Zi, + this._unboundChildren = this.createCollection(), + this._viewCollections.on("add", (t, i) => { + i.locale = e + }), + this.decorate("render") + } + get bindTemplate() { + return this._bindTemplate ? this._bindTemplate : this._bindTemplate = Bl.bind(this, this) + } + createCollection(e) { + const t = new Vl(e); + return this._viewCollections.add(t), + t + } + registerChild(e) { + Ji(e) || (e = [e]); + for (const t of e) + this._unboundChildren.add(t) + } + deregisterChild(e) { + Ji(e) || (e = [e]); + for (const t of e) + this._unboundChildren.remove(t) + } + setTemplate(e) { + this.template = new Bl(e) + } + extendTemplate(e) { + Bl.extend(this.template, e) + } + render() { + if (this.isRendered) + throw new c.a("ui-view-render-already-rendered", this); + this.template && (this.element = this.template.render(), this.registerChild(this.template.getViews())), + this.isRendered = !0 + } + destroy() { + this.stopListening(), + this._viewCollections.map(e => e.destroy()), + this.template && this.template._revertData && this.template.revert(this.element) + } + } + Ke(jl, Ir), + Ke(jl, Ue); + class Bl { + constructor(e) { + Object.assign(this, Ql(Kl(e))), + this._isRendered = !1, + this._revertData = null + } + render() { + const e = this._renderNode({ + intoFragment: !0 + }); + return this._isRendered = !0, + e + } + apply(e) { + return this._revertData = { + children: [], + bindings: [], + attributes: {} + }, + this._renderNode({ + node: e, + isApplying: !0, + revertData: this._revertData + }), + e + } + revert(e) { + if (!this._revertData) + throw new c.a("ui-template-revert-not-applied", [this, e]); + this._revertTemplateFromNode(e, this._revertData) + } + * getViews() { + yield * function * e(t) { + if (t.children) + for (const i of t.children) + td(i) ? yield i : id(i) && (yield * e(i)) + } + (this) + } + static bind(e, t) { + return { + to: (i, n) => new Hl({ + eventNameOrFunction: i, + attribute: i, + observable: e, + emitter: t, + callback: n + }), + if : (i, n, o)=> new Ul({ + observable: e, + emitter: t, + attribute: i, + valueIfTrue: n, + callback: o + }) + } + } + static extend(e, t) { + if (e._isRendered) + throw new c.a("template-extend-render", [this, e]); + !function e(t, i) { + i.attributes && (t.attributes || (t.attributes = {}), Xl(t.attributes, i.attributes)); + i.eventListeners && (t.eventListeners || (t.eventListeners = {}), Xl(t.eventListeners, i.eventListeners)); + i.text && t.text.push(...i.text); + if (i.children && i.children.length) { + if (t.children.length != i.children.length) + throw new c.a("ui-template-extend-children-mismatch", t); + let n = 0; + for (const o of i.children) + e(t.children[n++], o) + } + } + (e, Ql(Kl(t))) + } + _renderNode(e) { + let t; + if (t = e.node ? this.tag && this.text : this.tag ? this.text : !this.text, t) + throw new c.a("ui-template-wrong-syntax", this); + return this.text ? this._renderText(e) : this._renderElement(e) + } + _renderElement(e) { + let t = e.node; + return t || (t = e.node = document.createElementNS(this.ns || "http://www.w3.org/1999/xhtml", this.tag)), + this._renderAttributes(e), + this._renderElementChildren(e), + this._setUpListeners(e), + t + } + _renderText(e) { + let t = e.node; + return t ? e.revertData.text = t.textContent : t = e.node = document.createTextNode(""), + Wl(this.text) ? this._bindToObservable({ + schema: this.text, + updater: $l(t), + data: e + }) : t.textContent = this.text.join(""), + t + } + _renderAttributes(e) { + let t, + i, + n, + o; + if (!this.attributes) + return; + const r = e.node, + s = e.revertData; + for (t in this.attributes) + if (n = r.getAttribute(t), i = this.attributes[t], s && (s.attributes[t] = n), o = w(i[0]) && i[0].ns ? i[0].ns : null, Wl(i)) { + const a = o ? i[0].value : i; + s && od(t) && a.unshift(n), + this._bindToObservable({ + schema: a, + updater: Yl(r, t, o), + data: e + }) + } else + "style" == t && "string" != typeof i[0] ? this._renderStyleAttribute(i[0], e) : (s && n && od(t) && i.unshift(n), i = i.map(e => e && e.value || e).reduce((e, t) => e.concat(t), []).reduce(Zl, ""), ed(i) || r.setAttributeNS(o, t, i)) + } + _renderStyleAttribute(e, t) { + const i = t.node; + for (const n in e) { + const o = e[n]; + Wl(o) ? this._bindToObservable({ + schema: [o], + updater: Gl(i, n), + data: t + }) : i.style[n] = o + } + } + _renderElementChildren(e) { + const t = e.node, + i = e.intoFragment ? document.createDocumentFragment() : t, + n = e.isApplying; + let o = 0; + for (const r of this.children) + if (nd(r)) { + if (!n) { + r.setParent(t); + for (const e of r) + i.appendChild(e.element) + } + } else if (td(r)) + n || (r.isRendered || r.render(), i.appendChild(r.element)); + else if (mr(r)) + i.appendChild(r); + else if (n) { + const t = { + children: [], + bindings: [], + attributes: {} + }; + e.revertData.children.push(t), + r._renderNode({ + node: i.childNodes[o++], + isApplying: !0, + revertData: t + }) + } else + i.appendChild(r.render()); + e.intoFragment && t.appendChild(i) + } + _setUpListeners(e) { + if (this.eventListeners) + for (const t in this.eventListeners) { + const i = this.eventListeners[t].map(i => { + const[n, o] = t.split("@"); + return i.activateDomEventListener(n, o, e) + }); + e.revertData && e.revertData.bindings.push(i) + } + } + _bindToObservable({ + schema: e, + updater: t, + data: i + }) { + const n = i.revertData; + ql(e, t, i); + const o = e.filter(e => !ed(e)).filter(e => e.observable).map(n => n.activateAttributeListener(e, t, i)); + n && n.bindings.push(o) + } + _revertTemplateFromNode(e, t) { + for (const e of t.bindings) + for (const t of e) + t(); + if (t.text) + e.textContent = t.text; + else { + for (const i in t.attributes) { + const n = t.attributes[i]; + null === n ? e.removeAttribute(i) : e.setAttribute(i, n) + } + for (let i = 0; i < t.children.length; ++i) + this._revertTemplateFromNode(e.childNodes[i], t.children[i]) + } + } + } + Ke(Bl, u); + class Fl { + constructor(e) { + Object.assign(this, e) + } + getValue(e) { + const t = this.observable[this.attribute]; + return this.callback ? this.callback(t, e) : t + } + activateAttributeListener(e, t, i) { + const n = () => ql(e, t, i); + return this.emitter.listenTo(this.observable, "change:" + this.attribute, n), + () => { + this.emitter.stopListening(this.observable, "change:" + this.attribute, n) + } + } + } + class Hl extends Fl { + activateDomEventListener(e, t, i) { + const n = (e, i) => { + t && !i.target.matches(t) || ("function" == typeof this.eventNameOrFunction ? this.eventNameOrFunction(i) : this.observable.fire(this.eventNameOrFunction, i)) + }; + return this.emitter.listenTo(i.node, e, n), + () => { + this.emitter.stopListening(i.node, e, n) + } + } + } + class Ul extends Fl { + getValue(e) { + return !ed(super.getValue(e)) && (this.valueIfTrue || !0) + } + } + function Wl(e) { + return !!e && (e.value && (e = e.value), Array.isArray(e) ? e.some(Wl) : e instanceof Fl) + } + function ql(e, t, { + node: i + }) { + let n = function (e, t) { + return e.map(e => e instanceof Fl ? e.getValue(t) : e) + } + (e, i); + n = 1 == e.length && e[0]instanceof Ul ? n[0] : n.reduce(Zl, ""), + ed(n) ? t.remove() : t.set(n) + } + function $l(e) { + return { + set(t) { + e.textContent = t + }, + remove() { + e.textContent = "" + } + } + } + function Yl(e, t, i) { + return { + set(n) { + e.setAttributeNS(i, t, n) + }, + remove() { + e.removeAttributeNS(i, t) + } + } + } + function Gl(e, t) { + return { + set(i) { + e.style[t] = i + }, + remove() { + e.style[t] = null + } + } + } + function Kl(e) { + return $i(e, e => { + if (e && (e instanceof Fl || id(e) || td(e) || nd(e))) + return e + }) + } + function Ql(e) { + if ("string" == typeof e ? e = function (e) { + return { + text: [e] + } + } + (e) : e.text && function (e) { + e.text = en(e.text) + } + (e), e.on && (e.eventListeners = function (e) { + for (const t in e) + Jl(e, t); + return e + } + (e.on), delete e.on), !e.text) { + e.attributes && function (e) { + for (const t in e) + e[t].value && (e[t].value = en(e[t].value)), Jl(e, t) + } + (e.attributes); + const t = []; + if (e.children) + if (nd(e.children)) + t.push(e.children); + else + for (const i of e.children) + id(i) || td(i) || mr(i) ? t.push(i) : t.push(new Bl(i)); + e.children = t + } + return e + } + function Jl(e, t) { + e[t] = en(e[t]) + } + function Zl(e, t) { + return ed(t) ? e : ed(e) ? t : `${e} ${t}` + } + function Xl(e, t) { + for (const i in t) + e[i] ? e[i].push(...t[i]) : e[i] = t[i] + } + function ed(e) { + return !e && 0 !== e + } + function td(e) { + return e instanceof jl + } + function id(e) { + return e instanceof Bl + } + function nd(e) { + return e instanceof Vl + } + function od(e) { + return "class" == e || "style" == e + } + class rd extends Vl { + constructor(e, t = []) { + super(t), + this.locale = e + } + attachToDom() { + this._bodyCollectionContainer = new Bl({ + tag: "div", + attributes: { + class: ["ck", "ck-reset_all", "ck-body", "ck-rounded-corners"], + dir: this.locale.uiLanguageDirection + }, + children: this + }).render(); + let e = document.querySelector(".ck-body-wrapper"); + e || (e = function (e, t, i = {}, n = []) { + const o = i && i.xmlns, + r = o ? e.createElementNS(o, t) : e.createElement(t); + for (const e in i) + r.setAttribute(e, i[e]); + !ys(n) && Ji(n) || (n = [n]); + for (let t of n) + ys(t) && (t = e.createTextNode(t)), r.appendChild(t); + return r + } + (document, "div", { + class: "ck-body-wrapper" + }), document.body.appendChild(e)), + e.appendChild(this._bodyCollectionContainer) + } + detachFromDom() { + super.destroy(), + this._bodyCollectionContainer && this._bodyCollectionContainer.remove(); + const e = document.querySelector(".ck-body-wrapper"); + e && 0 == e.childElementCount && e.remove() + } + } + i(16); + class sd extends jl { + constructor() { + super(); + const e = this.bindTemplate; + this.set("content", ""), + this.set("viewBox", "0 0 20 20"), + this.set("fillColor", ""), + this.setTemplate({ + tag: "svg", + ns: "http://www.w3.org/2000/svg", + attributes: { + class: ["ck", "ck-icon"], + viewBox: e.to("viewBox") + } + }) + } + render() { + super.render(), + this._updateXMLContent(), + this._colorFillPaths(), + this.on("change:content", () => { + this._updateXMLContent(), + this._colorFillPaths() + }), + this.on("change:fillColor", () => { + this._colorFillPaths() + }) + } + _updateXMLContent() { + if (this.content) { + const e = (new DOMParser).parseFromString(this.content.trim(), "image/svg+xml").querySelector("svg"), + t = e.getAttribute("viewBox"); + for (t && (this.viewBox = t), this.element.innerHTML = ""; e.childNodes.length > 0; ) + this.element.appendChild(e.childNodes[0]) + } + } + _colorFillPaths() { + this.fillColor && this.element.querySelectorAll(".ck-icon__fill").forEach(e => { + e.style.fill = this.fillColor + }) + } + } + i(18); + class ad extends jl { + constructor(e) { + super(e), + this.set("text", ""), + this.set("position", "s"); + const t = this.bindTemplate; + this.setTemplate({ + tag: "span", + attributes: { + class: ["ck", "ck-tooltip", t.to("position", e => "ck-tooltip_" + e), t.if("text", "ck-hidden", e => !e.trim())] + }, + children: [{ + tag: "span", + attributes: { + class: ["ck", "ck-tooltip__text"] + }, + children: [{ + text: t.to("text") + } + ] + } + ] + }) + } + } + i(20); + class cd extends jl { + constructor(e) { + super(e); + const t = this.bindTemplate, + i = s(); + this.set("class"), + this.set("labelStyle"), + this.set("icon"), + this.set("isEnabled", !0), + this.set("isOn", !1), + this.set("isVisible", !0), + this.set("isToggleable", !1), + this.set("keystroke"), + this.set("label"), + this.set("tabindex", -1), + this.set("tooltip"), + this.set("tooltipPosition", "s"), + this.set("type", "button"), + this.set("withText", !1), + this.set("withKeystroke", !1), + this.children = this.createCollection(), + this.tooltipView = this._createTooltipView(), + this.labelView = this._createLabelView(i), + this.iconView = new sd, + this.iconView.extendTemplate({ + attributes: { + class: "ck-button__icon" + } + }), + this.keystrokeView = this._createKeystrokeView(), + this.bind("_tooltipString").to(this, "tooltip", this, "label", this, "keystroke", this._getTooltipString.bind(this)), + this.setTemplate({ + tag: "button", + attributes: { + class: ["ck", "ck-button", t.to("class"), t.if("isEnabled", "ck-disabled", e => !e), t.if("isVisible", "ck-hidden", e => !e), t.to("isOn", e => e ? "ck-on" : "ck-off"), t.if("withText", "ck-button_with-text"), t.if("withKeystroke", "ck-button_with-keystroke")], + type: t.to("type", e => e || "button"), + tabindex: t.to("tabindex"), + "aria-labelledby": "ck-editor__aria-label_" + i, + "aria-disabled": t.if("isEnabled", !0, e => !e), + "aria-pressed": t.to("isOn", e => !!this.isToggleable && String(e)) + }, + children: this.children, + on: { + mousedown: t.to(e => { + e.preventDefault() + }), + click: t.to(e => { + this.isEnabled ? this.fire("execute") : e.preventDefault() + }) + } + }) + } + render() { + super.render(), + this.icon && (this.iconView.bind("content").to(this, "icon"), this.children.add(this.iconView)), + this.children.add(this.tooltipView), + this.children.add(this.labelView), + this.withKeystroke && this.children.add(this.keystrokeView) + } + focus() { + this.element.focus() + } + _createTooltipView() { + const e = new ad; + return e.bind("text").to(this, "_tooltipString"), + e.bind("position").to(this, "tooltipPosition"), + e + } + _createLabelView(e) { + const t = new jl, + i = this.bindTemplate; + return t.setTemplate({ + tag: "span", + attributes: { + class: ["ck", "ck-button__label"], + style: i.to("labelStyle"), + id: "ck-editor__aria-label_" + e + }, + children: [{ + text: this.bindTemplate.to("label") + } + ] + }), + t + } + _createKeystrokeView() { + const e = new jl; + return e.setTemplate({ + tag: "span", + attributes: { + class: ["ck", "ck-button__keystroke"] + }, + children: [{ + text: this.bindTemplate.to("keystroke", e => Do(e)) + } + ] + }), + e + } + _getTooltipString(e, t, i) { + return e ? "string" == typeof e ? e : (i && (i = Do(i)), e instanceof Function ? e(t, i) : `${t}${i?`($ { + i + })`:""}`) : "" + } + } + i(22); + class ld extends cd { + constructor(e) { + super(e), + this.isToggleable = !0, + this.toggleSwitchView = this._createToggleView(), + this.extendTemplate({ + attributes: { + class: "ck-switchbutton" + } + }) + } + render() { + super.render(), + this.children.add(this.toggleSwitchView) + } + _createToggleView() { + const e = new jl; + return e.setTemplate({ + tag: "span", + attributes: { + class: ["ck", "ck-button__toggle"] + }, + children: [{ + tag: "span", + attributes: { + class: ["ck", "ck-button__toggle__inner"] + } + } + ] + }), + e + } + } + class dd { + constructor(e) { + if (Object.assign(this, e), e.actions && e.keystrokeHandler) + for (const t in e.actions) { + let i = e.actions[t]; + "string" == typeof i && (i = [i]); + for (const n of i) + e.keystrokeHandler.set(n, (e, i) => { + this[t](), + i() + }) + } + } + get first() { + return this.focusables.find(ud) || null + } + get last() { + return this.focusables.filter(ud).slice(-1)[0] || null + } + get next() { + return this._getFocusableItem(1) + } + get previous() { + return this._getFocusableItem(-1) + } + get current() { + let e = null; + return null === this.focusTracker.focusedElement ? null : (this.focusables.find((t, i) => { + const n = t.element === this.focusTracker.focusedElement; + return n && (e = i), + n + }), e) + } + focusFirst() { + this._focus(this.first) + } + focusLast() { + this._focus(this.last) + } + focusNext() { + this._focus(this.next) + } + focusPrevious() { + this._focus(this.previous) + } + _focus(e) { + e && e.focus() + } + _getFocusableItem(e) { + const t = this.current, + i = this.focusables.length; + if (!i) + return null; + if (null === t) + return this[1 === e ? "first" : "last"]; + let n = (t + i + e) % i; + do { + const t = this.focusables.get(n); + if (ud(t)) + return t; + n = (n + i + e) % i + } while (n !== t); + return null + } + } + function ud(e) { + return !(!e.focus || "none" == _r.window.getComputedStyle(e.element).display) + } + i(24); + var hd = ''; + class fd extends cd { + constructor(e) { + super(e), + this.arrowView = this._createArrowView(), + this.extendTemplate({ + attributes: { + "aria-haspopup": !0 + } + }), + this.delegate("execute").to(this, "open") + } + render() { + super.render(), + this.children.add(this.arrowView) + } + _createArrowView() { + const e = new sd; + return e.content = hd, + e.extendTemplate({ + attributes: { + class: "ck-dropdown__arrow" + } + }), + e + } + } + i(26); + class gd extends jl { + constructor(e) { + super(e); + const t = this.bindTemplate; + this.set("icon"), + this.set("isEnabled", !0), + this.set("isOn", !1), + this.set("isToggleable", !1), + this.set("isVisible", !0), + this.set("keystroke"), + this.set("label"), + this.set("tabindex", -1), + this.set("tooltip"), + this.set("tooltipPosition", "s"), + this.set("type", "button"), + this.set("withText", !1), + this.children = this.createCollection(), + this.actionView = this._createActionView(), + this.arrowView = this._createArrowView(), + this.keystrokes = new Os, + this.focusTracker = new Rs, + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-splitbutton", t.if("isVisible", "ck-hidden", e => !e), this.arrowView.bindTemplate.if("isOn", "ck-splitbutton_open")] + }, + children: this.children + }) + } + render() { + super.render(), + this.children.add(this.actionView), + this.children.add(this.arrowView), + this.focusTracker.add(this.actionView.element), + this.focusTracker.add(this.arrowView.element), + this.keystrokes.listenTo(this.element), + this.keystrokes.set("arrowright", (e, t) => { + this.focusTracker.focusedElement === this.actionView.element && (this.arrowView.focus(), t()) + }), + this.keystrokes.set("arrowleft", (e, t) => { + this.focusTracker.focusedElement === this.arrowView.element && (this.actionView.focus(), t()) + }) + } + focus() { + this.actionView.focus() + } + _createActionView() { + const e = new cd; + return e.bind("icon", "isEnabled", "isOn", "isToggleable", "keystroke", "label", "tabindex", "tooltip", "tooltipPosition", "type", "withText").to(this), + e.extendTemplate({ + attributes: { + class: "ck-splitbutton__action" + } + }), + e.delegate("execute").to(this), + e + } + _createArrowView() { + const e = new cd, + t = e.bindTemplate; + return e.icon = hd, + e.extendTemplate({ + attributes: { + class: "ck-splitbutton__arrow", + "aria-haspopup": !0, + "aria-expanded": t.to("isOn", e => String(e)) + } + }), + e.bind("isEnabled").to(this), + e.delegate("execute").to(this, "open"), + e + } + } + class md extends jl { + constructor(e) { + super(e); + const t = this.bindTemplate; + this.set("isVisible", !1), + this.set("position", "se"), + this.children = this.createCollection(), + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-reset", "ck-dropdown__panel", t.to("position", e => "ck-dropdown__panel_" + e), t.if("isVisible", "ck-dropdown__panel-visible")] + }, + children: this.children, + on: { + selectstart: t.to(e => e.preventDefault()) + } + }) + } + focus() { + this.children.length && this.children.first.focus() + } + focusLast() { + if (this.children.length) { + const e = this.children.last; + "function" == typeof e.focusLast ? e.focusLast() : e.focus() + } + } + } + i(28); + function pd({ + element: e, + target: t, + positions: i, + limiter: n, + fitInViewport: o + }) { + I(t) && (t = t()), + I(n) && (n = n()); + const r = function (e) { + return e && e.parentNode ? e.offsetParent === _r.document.body ? null : e.offsetParent : null + } + (e), + s = new Ts(e), + a = new Ts(t); + let c, + l; + if (n || o) { + const e = function (e, t) { + const { + elementRect: i, + viewportRect: n + } = t, + o = i.getArea(), + r = function (e, { + targetRect: t, + elementRect: i, + limiterRect: n, + viewportRect: o + }) { + const r = [], + s = i.getArea(); + for (const a of e) { + const e = bd(a, t, i); + if (!e) + continue; + const[c, l] = e; + let d = 0, + u = 0; + if (n) + if (o) { + const e = n.getIntersection(o); + e && (d = e.getIntersectionArea(l)) + } else + d = n.getIntersectionArea(l); + o && (u = o.getIntersectionArea(l)); + const h = { + positionName: c, + positionRect: l, + limiterIntersectArea: d, + viewportIntersectArea: u + }; + if (d === s) + return [h]; + r.push(h) + } + return r + } + (e, t); + if (n) { + const e = wd(r.filter(({ + viewportIntersectArea: e + }) => e === o), o); + if (e) + return e + } + return wd(r, o) + } + (i, { + targetRect: a, + elementRect: s, + limiterRect: n && new Ts(n).getVisible(), + viewportRect: o && new Ts(_r.window) + }); + [l, c] = e || bd(i[0], a, s) + } else [l, c] = bd(i[0], a, s); + let d = kd(c); + return r && (d = function ({ + left: e, + top: t + }, i) { + const n = kd(new Ts(i)), + o = As(i); + return e -= n.left, + t -= n.top, + e += i.scrollLeft, + t += i.scrollTop, + e -= o.left, + t -= o.top, { + left: e, + top: t + } + } + (d, r)), { + left: d.left, + top: d.top, + name: l + } + } + function bd(e, t, i) { + const n = e(t, i); + if (!n) + return null; + const { + left: o, + top: r, + name: s + } = n; + return [s, i.clone().moveTo(o, r)] + } + function wd(e, t) { + let i, + n, + o = 0; + for (const { + positionName: r, + positionRect: s, + limiterIntersectArea: a, + viewportIntersectArea: c + } + of e) { + if (a === t) + return [r, s]; + const e = c ** 2 + a ** 2; + e > o && (o = e, i = s, n = r) + } + return i ? [n, i] : null + } + function kd({ + left: e, + top: t + }) { + const { + scrollX: i, + scrollY: n + } = _r.window; + return { + left: e + i, + top: t + n + } + } + class _d extends jl { + constructor(e, t, i) { + super(e); + const n = this.bindTemplate; + this.buttonView = t, + this.panelView = i, + this.set("isOpen", !1), + this.set("isEnabled", !0), + this.set("class"), + this.set("id"), + this.set("panelPosition", "auto"), + this.keystrokes = new Os, + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-dropdown", n.to("class"), n.if("isEnabled", "ck-disabled", e => !e)], + id: n.to("id"), + "aria-describedby": n.to("ariaDescribedById") + }, + children: [t, i] + }), + t.extendTemplate({ + attributes: { + class: ["ck-dropdown__button"] + } + }) + } + render() { + super.render(), + this.listenTo(this.buttonView, "open", () => { + this.isOpen = !this.isOpen + }), + this.panelView.bind("isVisible").to(this, "isOpen"), + this.on("change:isOpen", () => { + this.isOpen && ("auto" === this.panelPosition ? this.panelView.position = _d._getOptimalPosition({ + element: this.panelView.element, + target: this.buttonView.element, + fitInViewport: !0, + positions: this._panelPositions + }).name : this.panelView.position = this.panelPosition) + }), + this.keystrokes.listenTo(this.element); + const e = (e, t) => { + this.isOpen && (this.buttonView.focus(), this.isOpen = !1, t()) + }; + this.keystrokes.set("arrowdown", (e, t) => { + this.buttonView.isEnabled && !this.isOpen && (this.isOpen = !0, t()) + }), + this.keystrokes.set("arrowright", (e, t) => { + this.isOpen && t() + }), + this.keystrokes.set("arrowleft", e), + this.keystrokes.set("esc", e) + } + focus() { + this.buttonView.focus() + } + get _panelPositions() { + const { + south: e, + north: t, + southEast: i, + southWest: n, + northEast: o, + northWest: r, + southMiddleEast: s, + southMiddleWest: a, + northMiddleEast: c, + northMiddleWest: l + } = _d.defaultPanelPositions; + return "rtl" !== this.locale.uiLanguageDirection ? [i, n, s, a, e, o, r, c, l, t] : [n, i, a, s, e, r, o, l, c, t] + } + } + _d.defaultPanelPositions = { + south: (e, t) => ({ + top: e.bottom, + left: e.left - (t.width - e.width) / 2, + name: "s" + }), + southEast: e => ({ + top: e.bottom, + left: e.left, + name: "se" + }), + southWest: (e, t) => ({ + top: e.bottom, + left: e.left - t.width + e.width, + name: "sw" + }), + southMiddleEast: (e, t) => ({ + top: e.bottom, + left: e.left - (t.width - e.width) / 4, + name: "sme" + }), + southMiddleWest: (e, t) => ({ + top: e.bottom, + left: e.left - 3 * (t.width - e.width) / 4, + name: "smw" + }), + north: (e, t) => ({ + top: e.top - t.height, + left: e.left - (t.width - e.width) / 2, + name: "n" + }), + northEast: (e, t) => ({ + top: e.top - t.height, + left: e.left, + name: "ne" + }), + northWest: (e, t) => ({ + top: e.top - t.height, + left: e.left - t.width + e.width, + name: "nw" + }), + northMiddleEast: (e, t) => ({ + top: e.top - t.height, + left: e.left - (t.width - e.width) / 4, + name: "nme" + }), + northMiddleWest: (e, t) => ({ + top: e.top - t.height, + left: e.left - 3 * (t.width - e.width) / 4, + name: "nmw" + }) + }, + _d._getOptimalPosition = pd; + class vd extends jl { + constructor(e) { + super(e), + this.setTemplate({ + tag: "span", + attributes: { + class: ["ck", "ck-toolbar__separator"] + } + }) + } + } + class yd extends jl { + constructor(e) { + super(e), + this.setTemplate({ + tag: "span", + attributes: { + class: ["ck", "ck-toolbar__line-break"] + } + }) + } + } + function xd(e) { + return Array.isArray(e) ? { + items: e, + removeItems: [] + } + : e ? Object.assign({ + items: [], + removeItems: [] + }, e) : { + items: [], + removeItems: [] + } + } + i(30); + class Ad extends jl { + constructor(e, t) { + super(e); + const i = this.bindTemplate, + n = this.t; + this.options = t || {}, + this.set("ariaLabel", n("Editor toolbar")), + this.set("maxWidth", "auto"), + this.items = this.createCollection(), + this.focusTracker = new Rs, + this.keystrokes = new Os, + this.set("class"), + this.set("isCompact", !1), + this.itemsView = new Cd(e), + this.children = this.createCollection(), + this.children.add(this.itemsView), + this.focusables = this.createCollection(), + this._focusCycler = new dd({ + focusables: this.focusables, + focusTracker: this.focusTracker, + keystrokeHandler: this.keystrokes, + actions: { + focusPrevious: ["arrowleft", "arrowup"], + focusNext: ["arrowright", "arrowdown"] + } + }); + const o = ["ck", "ck-toolbar", i.to("class"), i.if("isCompact", "ck-toolbar_compact")]; + var r; + this.options.shouldGroupWhenFull && this.options.isFloating && o.push("ck-toolbar_floating"), + this.setTemplate({ + tag: "div", + attributes: { + class: o, + role: "toolbar", + "aria-label": i.to("ariaLabel"), + style: { + maxWidth: i.to("maxWidth") + } + }, + children: this.children, + on: { + mousedown: (r = this, r.bindTemplate.to(e => { + e.target === r.element && e.preventDefault() + })) + } + }), + this._behavior = this.options.shouldGroupWhenFull ? new Ed(this) : new Td(this) + } + render() { + super.render(); + for (const e of this.items) + this.focusTracker.add(e.element); + this.items.on("add", (e, t) => { + this.focusTracker.add(t.element) + }), + this.items.on("remove", (e, t) => { + this.focusTracker.remove(t.element) + }), + this.keystrokes.listenTo(this.element), + this._behavior.render(this) + } + destroy() { + return this._behavior.destroy(), + super.destroy() + } + focus() { + this._focusCycler.focusFirst() + } + focusLast() { + this._focusCycler.focusLast() + } + fillFromConfig(e, t) { + const i = xd(e), + n = i.items.filter((e, n, o) => "|" === e || -1 === i.removeItems.indexOf(e) && ("-" === e ? !this.options.shouldGroupWhenFull || (Object(c.b)("toolbarview-line-break-ignored-when-grouping-items", o), !1) : !!t.has(e) || (Object(c.b)("toolbarview-item-unavailable", { + name: e + }), !1))), + o = this._cleanSeparators(n).map(e => "|" === e ? new vd : "-" === e ? new yd : t.create(e)); + this.items.addMany(o) + } + _cleanSeparators(e) { + const t = e => "-" !== e && "|" !== e, + i = e.length, + n = e.findIndex(t), + o = i - e.slice().reverse().findIndex(t); + return e.slice(n, o).filter((e, i, n) => { + if (t(e)) + return !0; + return !(i > 0 && n[i - 1] === e) + }) + } + } + class Cd extends jl { + constructor(e) { + super(e), + this.children = this.createCollection(), + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-toolbar__items"] + }, + children: this.children + }) + } + } + class Td { + constructor(e) { + const t = e.bindTemplate; + e.set("isVertical", !1), + e.itemsView.children.bindTo(e.items).using(e => e), + e.focusables.bindTo(e.items).using(e => e), + e.extendTemplate({ + attributes: { + class: [t.if("isVertical", "ck-toolbar_vertical")] + } + }) + } + render() {} + destroy() {} + } + class Ed { + constructor(e) { + this.view = e, + this.viewChildren = e.children, + this.viewFocusables = e.focusables, + this.viewItemsView = e.itemsView, + this.viewFocusTracker = e.focusTracker, + this.viewLocale = e.locale, + this.ungroupedItems = e.createCollection(), + this.groupedItems = e.createCollection(), + this.groupedItemsDropdown = this._createGroupedItemsDropdown(), + this.resizeObserver = null, + this.cachedPadding = null, + this.shouldUpdateGroupingOnNextResize = !1, + e.itemsView.children.bindTo(this.ungroupedItems).using(e => e), + this.ungroupedItems.on("add", this._updateFocusCycleableItems.bind(this)), + this.ungroupedItems.on("remove", this._updateFocusCycleableItems.bind(this)), + e.children.on("add", this._updateFocusCycleableItems.bind(this)), + e.children.on("remove", this._updateFocusCycleableItems.bind(this)), + e.items.on("change", (e, t) => { + const i = t.index; + for (const e of t.removed) + i >= this.ungroupedItems.length ? this.groupedItems.remove(e) : this.ungroupedItems.remove(e); + for (let e = i; e < i + t.added.length; e++) { + const n = t.added[e - i]; + e > this.ungroupedItems.length ? this.groupedItems.add(n, e - this.ungroupedItems.length) : this.ungroupedItems.add(n, e) + } + this._updateGrouping() + }), + e.extendTemplate({ + attributes: { + class: ["ck-toolbar_grouping"] + } + }) + } + render(e) { + this.viewElement = e.element, + this._enableGroupingOnResize(), + this._enableGroupingOnMaxWidthChange(e) + } + destroy() { + this.groupedItemsDropdown.destroy(), + this.resizeObserver.destroy() + } + _updateGrouping() { + if (!this.viewElement.ownerDocument.body.contains(this.viewElement)) + return; + if (!this.viewElement.offsetParent) + return void(this.shouldUpdateGroupingOnNextResize = !0); + const e = this.groupedItems.length; + let t; + for (; this._areItemsOverflowing; ) + this._groupLastItem(), t = !0; + if (!t && this.groupedItems.length) { + for (; this.groupedItems.length && !this._areItemsOverflowing; ) + this._ungroupFirstItem(); + this._areItemsOverflowing && this._groupLastItem() + } + this.groupedItems.length !== e && this.view.fire("groupedItemsUpdate") + } + get _areItemsOverflowing() { + if (!this.ungroupedItems.length) + return !1; + const e = this.viewElement, + t = this.viewLocale.uiLanguageDirection, + i = new Ts(e.lastChild), + n = new Ts(e); + if (!this.cachedPadding) { + const i = _r.window.getComputedStyle(e), + n = "ltr" === t ? "paddingRight" : "paddingLeft"; + this.cachedPadding = Number.parseInt(i[n]) + } + return "ltr" === t ? i.right > n.right - this.cachedPadding : i.left < n.left + this.cachedPadding + } + _enableGroupingOnResize() { + let e; + this.resizeObserver = new Ss(this.viewElement, t => { + e && e === t.contentRect.width && !this.shouldUpdateGroupingOnNextResize || (this.shouldUpdateGroupingOnNextResize = !1, this._updateGrouping(), e = t.contentRect.width) + }), + this._updateGrouping() + } + _enableGroupingOnMaxWidthChange(e) { + e.on("change:maxWidth", () => { + this._updateGrouping() + }) + } + _groupLastItem() { + this.groupedItems.length || (this.viewChildren.add(new vd), this.viewChildren.add(this.groupedItemsDropdown), this.viewFocusTracker.add(this.groupedItemsDropdown.element)), + this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last), 0) + } + _ungroupFirstItem() { + this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)), + this.groupedItems.length || (this.viewChildren.remove(this.groupedItemsDropdown), this.viewChildren.remove(this.viewChildren.last), this.viewFocusTracker.remove(this.groupedItemsDropdown.element)) + } + _createGroupedItemsDropdown() { + const e = this.viewLocale, + t = e.t, + i = Id(e); + return i.class = "ck-toolbar__grouped-dropdown", + i.panelPosition = "ltr" === e.uiLanguageDirection ? "sw" : "se", + function (e, t) { + const i = e.locale, + n = i.t, + o = e.toolbarView = new Ad(i); + o.set("ariaLabel", n("Dropdown toolbar")), + e.extendTemplate({ + attributes: { + class: ["ck-toolbar-dropdown"] + } + }), + t.map(e => o.items.add(e)), + e.panelView.children.add(o), + o.items.delegate("execute").to(e) + } + (i, []), + i.buttonView.set({ + label: t("Show more items"), + tooltip: !0, + tooltipPosition: "rtl" === e.uiLanguageDirection ? "se" : "sw", + icon: Ol + }), + i.toolbarView.items.bindTo(this.groupedItems).using(e => e), + i + } + _updateFocusCycleableItems() { + this.viewFocusables.clear(), + this.ungroupedItems.map(e => { + this.viewFocusables.add(e) + }), + this.groupedItems.length && this.viewFocusables.add(this.groupedItemsDropdown) + } + } + i(32); + class Pd extends jl { + constructor() { + super(), + this.items = this.createCollection(), + this.focusTracker = new Rs, + this.keystrokes = new Os, + this._focusCycler = new dd({ + focusables: this.items, + focusTracker: this.focusTracker, + keystrokeHandler: this.keystrokes, + actions: { + focusPrevious: "arrowup", + focusNext: "arrowdown" + } + }), + this.setTemplate({ + tag: "ul", + attributes: { + class: ["ck", "ck-reset", "ck-list"] + }, + children: this.items + }) + } + render() { + super.render(); + for (const e of this.items) + this.focusTracker.add(e.element); + this.items.on("add", (e, t) => { + this.focusTracker.add(t.element) + }), + this.items.on("remove", (e, t) => { + this.focusTracker.remove(t.element) + }), + this.keystrokes.listenTo(this.element) + } + focus() { + this._focusCycler.focusFirst() + } + focusLast() { + this._focusCycler.focusLast() + } + } + class Sd extends jl { + constructor(e) { + super(e), + this.children = this.createCollection(), + this.setTemplate({ + tag: "li", + attributes: { + class: ["ck", "ck-list__item"] + }, + children: this.children + }) + } + focus() { + this.children.first.focus() + } + } + class Md extends jl { + constructor(e) { + super(e), + this.setTemplate({ + tag: "li", + attributes: { + class: ["ck", "ck-list__separator"] + } + }) + } + } + i(34), + i(36); + function Id(e, t = fd) { + const i = new t(e), + n = new md(e), + o = new _d(e, i, n); + return i.bind("isEnabled").to(o), + i instanceof fd ? i.bind("isOn").to(o, "isOpen") : i.arrowView.bind("isOn").to(o, "isOpen"), + function (e) { + (function (e) { + e.on("render", () => { + Dl({ + emitter: e, + activator: () => e.isOpen, + callback: () => { + e.isOpen = !1 + }, + contextElements: [e.element] + }) + }) + })(e), + function (e) { + e.on("execute", t => { + t.source instanceof ld || (e.isOpen = !1) + }) + } + (e), + function (e) { + e.keystrokes.set("arrowdown", (t, i) => { + e.isOpen && (e.panelView.focus(), i()) + }), + e.keystrokes.set("arrowup", (t, i) => { + e.isOpen && (e.panelView.focusLast(), i()) + }) + } + (e) + } + (o), + o + } + function Nd(e, t) { + const i = e.locale, + n = e.listView = new Pd(i); + n.items.bindTo(t).using(({ + type: e, + model: t + }) => { + if ("separator" === e) + return new Md(i); + if ("button" === e || "switchbutton" === e) { + const n = new Sd(i); + let o; + return o = "button" === e ? new cd(i) : new ld(i), + o.bind(...Object.keys(t)).to(t), + o.delegate("execute").to(n), + n.children.add(o), + n + } + }), + e.panelView.children.add(n), + n.items.delegate("execute").to(e) + } + i(38); + class Rd extends jl { + constructor(e) { + super(e), + this.body = new rd(e) + } + render() { + super.render(), + this.body.attachToDom() + } + destroy() { + return this.body.detachFromDom(), + super.destroy() + } + } + i(40); + class Od extends jl { + constructor(e) { + super(e), + this.set("text"), + this.set("for"), + this.id = "ck-editor__label_" + s(); + const t = this.bindTemplate; + this.setTemplate({ + tag: "label", + attributes: { + class: ["ck", "ck-label"], + id: this.id, + for : t.to("for") + }, + children: [{ + text: t.to("text") + } + ] + }) + } + } + class Dd extends Rd { + constructor(e) { + super(e), + this.top = this.createCollection(), + this.main = this.createCollection(), + this._voiceLabelView = this._createVoiceLabel(), + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-reset", "ck-editor", "ck-rounded-corners"], + role: "application", + dir: e.uiLanguageDirection, + lang: e.uiLanguage, + "aria-labelledby": this._voiceLabelView.id + }, + children: [this._voiceLabelView, { + tag: "div", + attributes: { + class: ["ck", "ck-editor__top", "ck-reset_all"], + role: "presentation" + }, + children: this.top + }, { + tag: "div", + attributes: { + class: ["ck", "ck-editor__main"], + role: "presentation" + }, + children: this.main + } + ] + }) + } + _createVoiceLabel() { + const e = this.t, + t = new Od; + return t.text = e("Rich Text Editor"), + t.extendTemplate({ + attributes: { + class: "ck-voice-label" + } + }), + t + } + } + class Ld extends jl { + constructor(e, t, i) { + super(e), + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-content", "ck-editor__editable", "ck-rounded-corners"], + lang: e.contentLanguage, + dir: e.contentLanguageDirection + } + }), + this.name = null, + this.set("isFocused", !1), + this._editableElement = i, + this._hasExternalElement = !!this._editableElement, + this._editingView = t + } + render() { + super.render(), + this._hasExternalElement ? this.template.apply(this.element = this._editableElement) : this._editableElement = this.element, + this.on("change:isFocused", () => this._updateIsFocusedClasses()), + this._updateIsFocusedClasses() + } + destroy() { + this._hasExternalElement && this.template.revert(this._editableElement), + super.destroy() + } + _updateIsFocusedClasses() { + const e = this._editingView; + function t(t) { + e.change(i => { + const n = e.document.getRoot(t.name); + i.addClass(t.isFocused ? "ck-focused" : "ck-blurred", n), + i.removeClass(t.isFocused ? "ck-blurred" : "ck-focused", n) + }) + } + e.isRenderingInProgress ? function i(n) { + e.once("change:isRenderingInProgress", (e, o, r) => { + r ? i(n) : t(n) + }) + } + (this) : t(this) + } + } + class zd extends Ld { + constructor(e, t, i) { + super(e, t, i), + this.extendTemplate({ + attributes: { + role: "textbox", + class: "ck-editor__editable_inline" + } + }) + } + render() { + super.render(); + const e = this._editingView, + t = this.t; + e.change(i => { + const n = e.document.getRoot(this.name); + i.setAttribute("aria-label", t("Rich Text Editor, %0", this.name), n) + }) + } + } + i(42); + i(44); + class Vd extends jl { + constructor(e) { + super(e), + this.set("value"), + this.set("id"), + this.set("placeholder"), + this.set("isReadOnly", !1), + this.set("hasError", !1), + this.set("ariaDescribedById"), + this.focusTracker = new Rs, + this.bind("isFocused").to(this.focusTracker), + this.set("isEmpty", !0); + const t = this.bindTemplate; + this.setTemplate({ + tag: "input", + attributes: { + type: "text", + class: ["ck", "ck-input", "ck-input-text", t.if("isFocused", "ck-input_focused"), t.if("isEmpty", "ck-input-text_empty"), t.if("hasError", "ck-error")], + id: t.to("id"), + placeholder: t.to("placeholder"), + readonly: t.to("isReadOnly"), + "aria-invalid": t.if("hasError", !0), + "aria-describedby": t.to("ariaDescribedById") + }, + on: { + input: t.to("input"), + change: t.to(this._updateIsEmpty.bind(this)) + } + }) + } + render() { + super.render(), + this.focusTracker.add(this.element), + this._setDomElementValue(this.value), + this._updateIsEmpty(), + this.on("change:value", (e, t, i) => { + this._setDomElementValue(i), + this._updateIsEmpty() + }) + } + select() { + this.element.select() + } + focus() { + this.element.focus() + } + _updateIsEmpty() { + this.isEmpty = !this.element.value + } + _setDomElementValue(e) { + this.element.value = e || 0 === e ? e : "" + } + } + i(46); + class jd extends jl { + constructor(e, t) { + super(e); + const i = "ck-labeled-field-view-" + s(), + n = "ck-labeled-field-view-status-" + s(); + this.fieldView = t(this, i, n), + this.set("label"), + this.set("isEnabled", !0), + this.set("isEmpty", !0), + this.set("isFocused", !1), + this.set("errorText", null), + this.set("infoText", null), + this.set("class"), + this.set("placeholder"), + this.labelView = this._createLabelView(i), + this.statusView = this._createStatusView(n), + this.bind("_statusText").to(this, "errorText", this, "infoText", (e, t) => e || t); + const o = this.bindTemplate; + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-labeled-field-view", o.to("class"), o.if("isEnabled", "ck-disabled", e => !e), o.if("isEmpty", "ck-labeled-field-view_empty"), o.if("isFocused", "ck-labeled-field-view_focused"), o.if("placeholder", "ck-labeled-field-view_placeholder"), o.if("errorText", "ck-error")] + }, + children: [{ + tag: "div", + attributes: { + class: ["ck", "ck-labeled-field-view__input-wrapper"] + }, + children: [this.fieldView, this.labelView] + }, this.statusView] + }) + } + _createLabelView(e) { + const t = new Od(this.locale); + return t.for = e, + t.bind("text").to(this, "label"), + t + } + _createStatusView(e) { + const t = new jl(this.locale), + i = this.bindTemplate; + return t.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-labeled-field-view__status", i.if("errorText", "ck-labeled-field-view__status_error"), i.if("_statusText", "ck-hidden", e => !e)], + id: e, + role: i.if("errorText", "alert") + }, + children: [{ + text: i.to("_statusText") + } + ] + }), + t + } + focus() { + this.fieldView.focus() + } + } + function Bd(e, t, i) { + const n = new Vd(e.locale); + return n.set({ + id: t, + ariaDescribedById: i + }), + n.bind("isReadOnly").to(e, "isEnabled", e => !e), + n.bind("hasError").to(e, "errorText", e => !!e), + n.on("input", () => { + e.errorText = null + }), + e.bind("isEmpty", "isFocused", "placeholder").to(n), + n + } + class Fd extends an { + static get pluginName() { + return "Notification" + } + init() { + this.on("show:warning", (e, t) => { + window.alert(t.message) + }, { + priority: "lowest" + }) + } + showSuccess(e, t = {}) { + this._showNotification({ + message: e, + type: "success", + namespace: t.namespace, + title: t.title + }) + } + showInfo(e, t = {}) { + this._showNotification({ + message: e, + type: "info", + namespace: t.namespace, + title: t.title + }) + } + showWarning(e, t = {}) { + this._showNotification({ + message: e, + type: "warning", + namespace: t.namespace, + title: t.title + }) + } + _showNotification(e) { + const t = "show:" + e.type + (e.namespace ? ":" + e.namespace : ""); + this.fire(t, { + message: e.message, + type: e.type, + title: e.title || "" + }) + } + } + class Hd { + constructor(e, t) { + t && Le(this, t), + e && this.set(e) + } + } + Ke(Hd, Ue); + i(48); + const Ud = Is("px"), + Wd = _r.document.body; + class qd extends jl { + constructor(e) { + super(e); + const t = this.bindTemplate; + this.set("top", 0), + this.set("left", 0), + this.set("position", "arrow_nw"), + this.set("isVisible", !1), + this.set("withArrow", !0), + this.set("class"), + this.content = this.createCollection(), + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-balloon-panel", t.to("position", e => "ck-balloon-panel_" + e), t.if("isVisible", "ck-balloon-panel_visible"), t.if("withArrow", "ck-balloon-panel_with-arrow"), t.to("class")], + style: { + top: t.to("top", Ud), + left: t.to("left", Ud) + } + }, + children: this.content + }) + } + show() { + this.isVisible = !0 + } + hide() { + this.isVisible = !1 + } + attachTo(e) { + this.show(); + const t = qd.defaultPositions, + i = Object.assign({}, { + element: this.element, + positions: [t.southArrowNorth, t.southArrowNorthMiddleWest, t.southArrowNorthMiddleEast, t.southArrowNorthWest, t.southArrowNorthEast, t.northArrowSouth, t.northArrowSouthMiddleWest, t.northArrowSouthMiddleEast, t.northArrowSouthWest, t.northArrowSouthEast], + limiter: Wd, + fitInViewport: !0 + }, e), + n = qd._getOptimalPosition(i), + o = parseInt(n.left), + r = parseInt(n.top), + s = n.name; + Object.assign(this, { + top: r, + left: o, + position: s + }) + } + pin(e) { + this.unpin(), + this._pinWhenIsVisibleCallback = () => { + this.isVisible ? this._startPinning(e) : this._stopPinning() + }, + this._startPinning(e), + this.listenTo(this, "change:isVisible", this._pinWhenIsVisibleCallback) + } + unpin() { + this._pinWhenIsVisibleCallback && (this._stopPinning(), this.stopListening(this, "change:isVisible", this._pinWhenIsVisibleCallback), this._pinWhenIsVisibleCallback = null, this.hide()) + } + _startPinning(e) { + this.attachTo(e); + const t = $d(e.target), + i = e.limiter ? $d(e.limiter) : Wd; + this.listenTo(_r.document, "scroll", (n, o) => { + const r = o.target, + s = t && r.contains(t), + a = i && r.contains(i); + !s && !a && t && i || this.attachTo(e) + }, { + useCapture: !0 + }), + this.listenTo(_r.window, "resize", () => { + this.attachTo(e) + }) + } + _stopPinning() { + this.stopListening(_r.document, "scroll"), + this.stopListening(_r.window, "resize") + } + } + function $d(e) { + return Yi(e) ? e : xs(e) ? e.commonAncestorContainer : "function" == typeof e ? $d(e()) : null + } + function Yd(e, t) { + return e.top - t.height - qd.arrowVerticalOffset + } + function Gd(e) { + return e.bottom + qd.arrowVerticalOffset + } + qd.arrowHorizontalOffset = 25, + qd.arrowVerticalOffset = 10, + qd._getOptimalPosition = pd, + qd.defaultPositions = { + northWestArrowSouthWest: (e, t) => ({ + top: Yd(e, t), + left: e.left - qd.arrowHorizontalOffset, + name: "arrow_sw" + }), + northWestArrowSouthMiddleWest: (e, t) => ({ + top: Yd(e, t), + left: e.left - .25 * t.width - qd.arrowHorizontalOffset, + name: "arrow_smw" + }), + northWestArrowSouth: (e, t) => ({ + top: Yd(e, t), + left: e.left - t.width / 2, + name: "arrow_s" + }), + northWestArrowSouthMiddleEast: (e, t) => ({ + top: Yd(e, t), + left: e.left - .75 * t.width + qd.arrowHorizontalOffset, + name: "arrow_sme" + }), + northWestArrowSouthEast: (e, t) => ({ + top: Yd(e, t), + left: e.left - t.width + qd.arrowHorizontalOffset, + name: "arrow_se" + }), + northArrowSouthWest: (e, t) => ({ + top: Yd(e, t), + left: e.left + e.width / 2 - qd.arrowHorizontalOffset, + name: "arrow_sw" + }), + northArrowSouthMiddleWest: (e, t) => ({ + top: Yd(e, t), + left: e.left + e.width / 2 - .25 * t.width - qd.arrowHorizontalOffset, + name: "arrow_smw" + }), + northArrowSouth: (e, t) => ({ + top: Yd(e, t), + left: e.left + e.width / 2 - t.width / 2, + name: "arrow_s" + }), + northArrowSouthMiddleEast: (e, t) => ({ + top: Yd(e, t), + left: e.left + e.width / 2 - .75 * t.width + qd.arrowHorizontalOffset, + name: "arrow_sme" + }), + northArrowSouthEast: (e, t) => ({ + top: Yd(e, t), + left: e.left + e.width / 2 - t.width + qd.arrowHorizontalOffset, + name: "arrow_se" + }), + northEastArrowSouthWest: (e, t) => ({ + top: Yd(e, t), + left: e.right - qd.arrowHorizontalOffset, + name: "arrow_sw" + }), + northEastArrowSouthMiddleWest: (e, t) => ({ + top: Yd(e, t), + left: e.right - .25 * t.width - qd.arrowHorizontalOffset, + name: "arrow_smw" + }), + northEastArrowSouth: (e, t) => ({ + top: Yd(e, t), + left: e.right - t.width / 2, + name: "arrow_s" + }), + northEastArrowSouthMiddleEast: (e, t) => ({ + top: Yd(e, t), + left: e.right - .75 * t.width + qd.arrowHorizontalOffset, + name: "arrow_sme" + }), + northEastArrowSouthEast: (e, t) => ({ + top: Yd(e, t), + left: e.right - t.width + qd.arrowHorizontalOffset, + name: "arrow_se" + }), + southWestArrowNorthWest: (e, t) => ({ + top: Gd(e), + left: e.left - qd.arrowHorizontalOffset, + name: "arrow_nw" + }), + southWestArrowNorthMiddleWest: (e, t) => ({ + top: Gd(e), + left: e.left - .25 * t.width - qd.arrowHorizontalOffset, + name: "arrow_nmw" + }), + southWestArrowNorth: (e, t) => ({ + top: Gd(e), + left: e.left - t.width / 2, + name: "arrow_n" + }), + southWestArrowNorthMiddleEast: (e, t) => ({ + top: Gd(e), + left: e.left - .75 * t.width + qd.arrowHorizontalOffset, + name: "arrow_nme" + }), + southWestArrowNorthEast: (e, t) => ({ + top: Gd(e), + left: e.left - t.width + qd.arrowHorizontalOffset, + name: "arrow_ne" + }), + southArrowNorthWest: (e, t) => ({ + top: Gd(e), + left: e.left + e.width / 2 - qd.arrowHorizontalOffset, + name: "arrow_nw" + }), + southArrowNorthMiddleWest: (e, t) => ({ + top: Gd(e), + left: e.left + e.width / 2 - .25 * t.width - qd.arrowHorizontalOffset, + name: "arrow_nmw" + }), + southArrowNorth: (e, t) => ({ + top: Gd(e), + left: e.left + e.width / 2 - t.width / 2, + name: "arrow_n" + }), + southArrowNorthMiddleEast: (e, t) => ({ + top: Gd(e), + left: e.left + e.width / 2 - .75 * t.width + qd.arrowHorizontalOffset, + name: "arrow_nme" + }), + southArrowNorthEast: (e, t) => ({ + top: Gd(e), + left: e.left + e.width / 2 - t.width + qd.arrowHorizontalOffset, + name: "arrow_ne" + }), + southEastArrowNorthWest: (e, t) => ({ + top: Gd(e), + left: e.right - qd.arrowHorizontalOffset, + name: "arrow_nw" + }), + southEastArrowNorthMiddleWest: (e, t) => ({ + top: Gd(e), + left: e.right - .25 * t.width - qd.arrowHorizontalOffset, + name: "arrow_nmw" + }), + southEastArrowNorth: (e, t) => ({ + top: Gd(e), + left: e.right - t.width / 2, + name: "arrow_n" + }), + southEastArrowNorthMiddleEast: (e, t) => ({ + top: Gd(e), + left: e.right - .75 * t.width + qd.arrowHorizontalOffset, + name: "arrow_nme" + }), + southEastArrowNorthEast: (e, t) => ({ + top: Gd(e), + left: e.right - t.width + qd.arrowHorizontalOffset, + name: "arrow_ne" + }) + }; + i(50), + i(52); + const Kd = Is("px"); + class Qd extends Qe { + static get pluginName() { + return "ContextualBalloon" + } + constructor(e) { + super(e), + this.positionLimiter = () => { + const e = this.editor.editing.view, + t = e.document.selection.editableElement; + return t ? e.domConverter.mapViewToDom(t.root) : null + }, + this.set("visibleView", null), + this.view = new qd(e.locale), + e.ui.view.body.add(this.view), + e.ui.focusTracker.add(this.view.element), + this._viewToStack = new Map, + this._idToStack = new Map, + this.set("_numberOfStacks", 0), + this.set("_singleViewMode", !1), + this._rotatorView = this._createRotatorView(), + this._fakePanelsView = this._createFakePanelsView() + } + hasView(e) { + return Array.from(this._viewToStack.keys()).includes(e) + } + add(e) { + if (this.hasView(e.view)) + throw new c.a("contextualballoon-add-view-exist", [this, e]); + const t = e.stackId || "main"; + if (!this._idToStack.has(t)) + return this._idToStack.set(t, new Map([[e.view, e]])), this._viewToStack.set(e.view, this._idToStack.get(t)), this._numberOfStacks = this._idToStack.size, void(this._visibleStack && !e.singleViewMode || this.showStack(t)); + const i = this._idToStack.get(t); + e.singleViewMode && this.showStack(t), + i.set(e.view, e), + this._viewToStack.set(e.view, i), + i === this._visibleStack && this._showView(e) + } + remove(e) { + if (!this.hasView(e)) + throw new c.a("contextualballoon-remove-view-not-exist", [this, e]); + const t = this._viewToStack.get(e); + this._singleViewMode && this.visibleView === e && (this._singleViewMode = !1), + this.visibleView === e && (1 === t.size ? this._idToStack.size > 1 ? this._showNextStack() : (this.view.hide(), this.visibleView = null, this._rotatorView.hideView()) : this._showView(Array.from(t.values())[t.size - 2])), + 1 === t.size ? (this._idToStack.delete(this._getStackId(t)), this._numberOfStacks = this._idToStack.size) : t.delete(e), + this._viewToStack.delete(e) + } + updatePosition(e) { + e && (this._visibleStack.get(this.visibleView).position = e), + this.view.pin(this._getBalloonPosition()), + this._fakePanelsView.updatePosition() + } + showStack(e) { + this.visibleStack = e; + const t = this._idToStack.get(e); + if (!t) + throw new c.a("contextualballoon-showstack-stack-not-exist", this); + this._visibleStack !== t && this._showView(Array.from(t.values()).pop()) + } + get _visibleStack() { + return this._viewToStack.get(this.visibleView) + } + _getStackId(e) { + return Array.from(this._idToStack.entries()).find(t => t[1] === e)[0] + } + _showNextStack() { + const e = Array.from(this._idToStack.values()); + let t = e.indexOf(this._visibleStack) + 1; + e[t] || (t = 0), + this.showStack(this._getStackId(e[t])) + } + _showPrevStack() { + const e = Array.from(this._idToStack.values()); + let t = e.indexOf(this._visibleStack) - 1; + e[t] || (t = e.length - 1), + this.showStack(this._getStackId(e[t])) + } + _createRotatorView() { + const e = new Jd(this.editor.locale), + t = this.editor.locale.t; + return this.view.content.add(e), + e.bind("isNavigationVisible").to(this, "_numberOfStacks", this, "_singleViewMode", (e, t) => !t && e > 1), + e.on("change:isNavigationVisible", () => this.updatePosition(), { + priority: "low" + }), + e.bind("counter").to(this, "visibleView", this, "_numberOfStacks", (e, i) => { + if (i < 2) + return ""; + const n = Array.from(this._idToStack.values()).indexOf(this._visibleStack) + 1; + return t("%0 of %1", [n, i]) + }), + e.buttonNextView.on("execute", () => { + e.focusTracker.isFocused && this.editor.editing.view.focus(), + this._showNextStack() + }), + e.buttonPrevView.on("execute", () => { + e.focusTracker.isFocused && this.editor.editing.view.focus(), + this._showPrevStack() + }), + e + } + _createFakePanelsView() { + const e = new Zd(this.editor.locale, this.view); + return e.bind("numberOfPanels").to(this, "_numberOfStacks", this, "_singleViewMode", (e, t) => !t && e >= 2 ? Math.min(e - 1, 2) : 0), + e.listenTo(this.view, "change:top", () => e.updatePosition()), + e.listenTo(this.view, "change:left", () => e.updatePosition()), + this.editor.ui.view.body.add(e), + e + } + _showView({ + view: e, + balloonClassName: t = "", + withArrow: i = !0, + singleViewMode: n = !1 + }) { + this.view.class = t, + this.view.withArrow = i, + this._rotatorView.showView(e), + this.visibleView = e, + this.view.pin(this._getBalloonPosition()), + this._fakePanelsView.updatePosition(), + n && (this._singleViewMode = !0) + } + _getBalloonPosition() { + let e = Array.from(this._visibleStack.values()).pop().position; + return e && !e.limiter && (e = Object.assign({}, e, { + limiter: this.positionLimiter + })), + e + } + } + class Jd extends jl { + constructor(e) { + super(e); + const t = e.t, + i = this.bindTemplate; + this.set("isNavigationVisible", !0), + this.focusTracker = new Rs, + this.buttonPrevView = this._createButtonView(t("Previous"), ''), + this.buttonNextView = this._createButtonView(t("Next"), ''), + this.content = this.createCollection(), + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-balloon-rotator"], + "z-index": "-1" + }, + children: [{ + tag: "div", + attributes: { + class: ["ck-balloon-rotator__navigation", i.to("isNavigationVisible", e => e ? "" : "ck-hidden")] + }, + children: [this.buttonPrevView, { + tag: "span", + attributes: { + class: ["ck-balloon-rotator__counter"] + }, + children: [{ + text: i.to("counter") + } + ] + }, this.buttonNextView] + }, { + tag: "div", + attributes: { + class: "ck-balloon-rotator__content" + }, + children: this.content + } + ] + }) + } + render() { + super.render(), + this.focusTracker.add(this.element) + } + showView(e) { + this.hideView(), + this.content.add(e) + } + hideView() { + this.content.clear() + } + _createButtonView(e, t) { + const i = new cd(this.locale); + return i.set({ + label: e, + icon: t, + tooltip: !0 + }), + i + } + } + class Zd extends jl { + constructor(e, t) { + super(e); + const i = this.bindTemplate; + this.set("top", 0), + this.set("left", 0), + this.set("height", 0), + this.set("width", 0), + this.set("numberOfPanels", 0), + this.content = this.createCollection(), + this._balloonPanelView = t, + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck-fake-panel", i.to("numberOfPanels", e => e ? "" : "ck-hidden")], + style: { + top: i.to("top", Kd), + left: i.to("left", Kd), + width: i.to("width", Kd), + height: i.to("height", Kd) + } + }, + children: this.content + }), + this.on("change:numberOfPanels", (e, t, i, n) => { + i > n ? this._addPanels(i - n) : this._removePanels(n - i), + this.updatePosition() + }) + } + _addPanels(e) { + for (; e--; ) { + const e = new jl; + e.setTemplate({ + tag: "div" + }), + this.content.add(e), + this.registerChild(e) + } + } + _removePanels(e) { + for (; e--; ) { + const e = this.content.last; + this.content.remove(e), + this.deregisterChild(e), + e.destroy() + } + } + updatePosition() { + if (this.numberOfPanels) { + const { + top: e, + left: t + } = this._balloonPanelView, { + width: i, + height: n + } = new Ts(this._balloonPanelView.element); + Object.assign(this, { + top: e, + left: t, + width: i, + height: n + }) + } + } + } + i(54); + const Xd = Is("px"); + class eu extends jl { + constructor(e) { + super(e); + const t = this.bindTemplate; + this.set("isActive", !1), + this.set("isSticky", !1), + this.set("limiterElement", null), + this.set("limiterBottomOffset", 50), + this.set("viewportTopOffset", 0), + this.set("_marginLeft", null), + this.set("_isStickyToTheLimiter", !1), + this.set("_hasViewportTopOffset", !1), + this.content = this.createCollection(), + this._contentPanelPlaceholder = new Bl({ + tag: "div", + attributes: { + class: ["ck", "ck-sticky-panel__placeholder"], + style: { + display: t.to("isSticky", e => e ? "block" : "none"), + height: t.to("isSticky", e => e ? Xd(this._panelRect.height) : null) + } + } + }).render(), + this._contentPanel = new Bl({ + tag: "div", + attributes: { + class: ["ck", "ck-sticky-panel__content", t.if("isSticky", "ck-sticky-panel__content_sticky"), t.if("_isStickyToTheLimiter", "ck-sticky-panel__content_sticky_bottom-limit")], + style: { + width: t.to("isSticky", e => e ? Xd(this._contentPanelPlaceholder.getBoundingClientRect().width) : null), + top: t.to("_hasViewportTopOffset", e => e ? Xd(this.viewportTopOffset) : null), + bottom: t.to("_isStickyToTheLimiter", e => e ? Xd(this.limiterBottomOffset) : null), + marginLeft: t.to("_marginLeft") + } + }, + children: this.content + }).render(), + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-sticky-panel"] + }, + children: [this._contentPanelPlaceholder, this._contentPanel] + }) + } + render() { + super.render(), + this._checkIfShouldBeSticky(), + this.listenTo(_r.window, "scroll", () => { + this._checkIfShouldBeSticky() + }), + this.listenTo(this, "change:isActive", () => { + this._checkIfShouldBeSticky() + }) + } + _checkIfShouldBeSticky() { + const e = this._panelRect = this._contentPanel.getBoundingClientRect(); + let t; + this.limiterElement ? (t = this._limiterRect = this.limiterElement.getBoundingClientRect(), this.isSticky = this.isActive && t.top < this.viewportTopOffset && this._panelRect.height + this.limiterBottomOffset < t.height) : this.isSticky = !1, + this.isSticky ? (this._isStickyToTheLimiter = t.bottom < e.height + this.limiterBottomOffset + this.viewportTopOffset, this._hasViewportTopOffset = !this._isStickyToTheLimiter && !!this.viewportTopOffset, this._marginLeft = this._isStickyToTheLimiter ? null : Xd(-_r.window.scrollX)) : (this._isStickyToTheLimiter = !1, this._hasViewportTopOffset = !1, this._marginLeft = null) + } + } + Is("px"); + i(56); + Is("px"); + Is("px"); + i(58); + const tu = new WeakMap; + function iu(e) { + const { + view: t, + element: i, + text: n, + isDirectHost: o = !0, + keepOnFocus: r = !1 + } = e, + s = t.document; + tu.has(s) || (tu.set(s, new Map), s.registerPostFixer(e => ou(s, e))), + tu.get(s).set(i, { + text: n, + isDirectHost: o, + keepOnFocus: r, + hostElement: o ? i : null + }), + t.change(e => ou(s, e)) + } + function nu(e, t) { + return !!t.hasClass("ck-placeholder") && (e.removeClass("ck-placeholder", t), !0) + } + function ou(e, t) { + const i = tu.get(e), + n = []; + let o = !1; + for (const[e, r]of i) + r.isDirectHost && (n.push(e), ru(t, e, r) && (o = !0)); + for (const[e, r]of i) { + if (r.isDirectHost) + continue; + const i = su(e); + i && (n.includes(i) || (r.hostElement = i, ru(t, e, r) && (o = !0))) + } + return o + } + function ru(e, t, i) { + const { + text: n, + isDirectHost: o, + hostElement: r + } = i; + let s = !1; + r.getAttribute("data-placeholder") !== n && (e.setAttribute("data-placeholder", n, r), s = !0); + return (o || 1 == t.childCount) && function (e, t) { + if (!e.isAttached()) + return !1; + if (Array.from(e.getChildren()).some(e => !e.is("uiElement"))) + return !1; + if (t) + return !0; + const i = e.document; + if (!i.isFocused) + return !0; + const n = i.selection.anchor; + return n && n.parent !== e + } + (r, i.keepOnFocus) ? function (e, t) { + return !t.hasClass("ck-placeholder") && (e.addClass("ck-placeholder", t), !0) + } + (e, r) && (s = !0) : nu(e, r) && (s = !0), + s + } + function su(e) { + if (e.childCount) { + const t = e.getChild(0); + if (t.is("element") && !t.is("uiElement")) + return t + } + return null + } + const au = new Map; + function cu(e, t, i) { + let n = au.get(e); + n || (n = new Map, au.set(e, n)), + n.set(t, i) + } + function lu(e) { + return [e] + } + function du(e, t, i = {}) { + const n = function (e, t) { + const i = au.get(e); + return i && i.has(t) ? i.get(t) : lu + } + (e.constructor, t.constructor); + try { + return n(e = e.clone(), t, i) + } catch (e) { + throw e + } + } + function uu(e, t, i) { + e = e.slice(), + t = t.slice(); + const n = new hu(i.document, i.useRelations, i.forceWeakRemove); + n.setOriginalOperations(e), + n.setOriginalOperations(t); + const o = n.originalOperations; + if (0 == e.length || 0 == t.length) + return { + operationsA: e, + operationsB: t, + originalOperations: o + }; + const r = new WeakMap; + for (const t of e) + r.set(t, 0); + const s = { + nextBaseVersionA: e[e.length - 1].baseVersion + 1, + nextBaseVersionB: t[t.length - 1].baseVersion + 1, + originalOperationsACount: e.length, + originalOperationsBCount: t.length + }; + let a = 0; + for (; a < e.length; ) { + const i = e[a], + o = r.get(i); + if (o == t.length) { + a++; + continue + } + const s = t[o], + c = du(i, s, n.getContext(i, s, !0)), + l = du(s, i, n.getContext(s, i, !1)); + n.updateRelation(i, s), + n.setOriginalOperations(c, i), + n.setOriginalOperations(l, s); + for (const e of c) + r.set(e, o + l.length); + e.splice(a, 1, ...c), + t.splice(o, 1, ...l) + } + if (i.padWithNoOps) { + const i = e.length - s.originalOperationsACount, + n = t.length - s.originalOperationsBCount; + gu(e, n - i), + gu(t, i - n) + } + return fu(e, s.nextBaseVersionB), + fu(t, s.nextBaseVersionA), { + operationsA: e, + operationsB: t, + originalOperations: o + } + } + class hu { + constructor(e, t, i = !1) { + this.originalOperations = new Map, + this._history = e.history, + this._useRelations = t, + this._forceWeakRemove = !!i, + this._relations = new Map + } + setOriginalOperations(e, t = null) { + const i = t ? this.originalOperations.get(t) : null; + for (const t of e) + this.originalOperations.set(t, i || t) + } + updateRelation(e, t) { + switch (e.constructor) { + case Cc: + switch (t.constructor) { + case Mc: + e.targetPosition.isEqual(t.sourcePosition) || t.movedRange.containsPosition(e.targetPosition) ? this._setRelation(e, t, "insertAtSource") : e.targetPosition.isEqual(t.deletionPosition) ? this._setRelation(e, t, "insertBetween") : e.targetPosition.isAfter(t.sourcePosition) && this._setRelation(e, t, "moveTargetAfter"); + break; + case Cc: + e.targetPosition.isEqual(t.sourcePosition) || e.targetPosition.isBefore(t.sourcePosition) ? this._setRelation(e, t, "insertBefore") : this._setRelation(e, t, "insertAfter") + } + break; + case Ic: + switch (t.constructor) { + case Mc: + e.splitPosition.isBefore(t.sourcePosition) && this._setRelation(e, t, "splitBefore"); + break; + case Cc: + if (e.splitPosition.isEqual(t.sourcePosition) || e.splitPosition.isBefore(t.sourcePosition)) + this._setRelation(e, t, "splitBefore"); + else { + const i = oa._createFromPositionAndShift(t.sourcePosition, t.howMany); + if (e.splitPosition.hasSameParentAs(t.sourcePosition) && i.containsPosition(e.splitPosition)) { + const n = i.end.offset - e.splitPosition.offset, + o = e.splitPosition.offset - i.start.offset; + this._setRelation(e, t, { + howMany: n, + offset: o + }) + } + } + } + break; + case Mc: + switch (t.constructor) { + case Mc: + e.targetPosition.isEqual(t.sourcePosition) || this._setRelation(e, t, "mergeTargetNotMoved"), + e.sourcePosition.isEqual(t.targetPosition) && this._setRelation(e, t, "mergeSourceNotMoved"), + e.sourcePosition.isEqual(t.sourcePosition) && this._setRelation(e, t, "mergeSameElement"); + break; + case Ic: + e.sourcePosition.isEqual(t.splitPosition) && this._setRelation(e, t, "splitAtSource") + } + break; + case Ec: { + const i = e.newRange; + if (!i) + return; + switch (t.constructor) { + case Cc: { + const n = oa._createFromPositionAndShift(t.sourcePosition, t.howMany), + o = n.containsPosition(i.start) || n.start.isEqual(i.start), + r = n.containsPosition(i.end) || n.end.isEqual(i.end); + !o && !r || n.containsRange(i) || this._setRelation(e, t, { + side: o ? "left" : "right", + path: o ? i.start.path.slice() : i.end.path.slice() + }); + break + } + case Mc: { + const n = i.start.isEqual(t.targetPosition), + o = i.start.isEqual(t.deletionPosition), + r = i.end.isEqual(t.deletionPosition), + s = i.end.isEqual(t.sourcePosition); + (n || o || r || s) && this._setRelation(e, t, { + wasInLeftElement: n, + wasStartBeforeMergedElement: o, + wasEndBeforeMergedElement: r, + wasInRightElement: s + }); + break + } + } + break + } + } + } + getContext(e, t, i) { + return { + aIsStrong: i, + aWasUndone: this._wasUndone(e), + bWasUndone: this._wasUndone(t), + abRelation: this._useRelations ? this._getRelation(e, t) : null, + baRelation: this._useRelations ? this._getRelation(t, e) : null, + forceWeakRemove: this._forceWeakRemove + } + } + _wasUndone(e) { + const t = this.originalOperations.get(e); + return t.wasUndone || this._history.isUndoneOperation(t) + } + _getRelation(e, t) { + const i = this.originalOperations.get(t), + n = this._history.getUndoneOperation(i); + if (!n) + return null; + const o = this.originalOperations.get(e), + r = this._relations.get(o); + return r && r.get(n) || null + } + _setRelation(e, t, i) { + const n = this.originalOperations.get(e), + o = this.originalOperations.get(t); + let r = this._relations.get(n); + r || (r = new Map, this._relations.set(n, r)), + r.set(o, i) + } + } + function fu(e, t) { + for (const i of e) + i.baseVersion = t++ + } + function gu(e, t) { + for (let i = 0; i < t; i++) + e.push(new Qc(0)) + } + function mu(e, t, i) { + const n = e.nodes.getNode(0).getAttribute(t); + if (n == i) + return null; + const o = new oa(e.position, e.position.getShiftedBy(e.howMany)); + return new xc(o, t, n, i, 0) + } + function pu(e, t) { + return null === e.targetPosition._getTransformedByDeletion(t.sourcePosition, t.howMany) + } + function bu(e, t) { + const i = []; + for (let n = 0; n < e.length; n++) { + const o = e[n], + r = new Cc(o.start, o.end.offset - o.start.offset, t, 0); + i.push(r); + for (let t = n + 1; t < e.length; t++) + e[t] = e[t]._getTransformedByMove(r.sourcePosition, r.targetPosition, r.howMany)[0]; + t = t._getTransformedByMove(r.sourcePosition, r.targetPosition, r.howMany) + } + return i + } + cu(xc, xc, (e, t, i) => { + if (e.key === t.key && e.range.start.hasSameParentAs(t.range.start)) { + const n = e.range.getDifference(t.range).map(t => new xc(t, e.key, e.oldValue, e.newValue, 0)), + o = e.range.getIntersection(t.range); + return o && i.aIsStrong && n.push(new xc(o, t.key, t.newValue, e.newValue, 0)), + 0 == n.length ? [new Qc(0)] : n + } + return [e] + }), + cu(xc, Tc, (e, t) => { + if (e.range.start.hasSameParentAs(t.position) && e.range.containsPosition(t.position)) { + const i = e.range._getTransformedByInsertion(t.position, t.howMany, !t.shouldReceiveAttributes).map(t => new xc(t, e.key, e.oldValue, e.newValue, e.baseVersion)); + if (t.shouldReceiveAttributes) { + const n = mu(t, e.key, e.oldValue); + n && i.unshift(n) + } + return i + } + return e.range = e.range._getTransformedByInsertion(t.position, t.howMany, !1)[0], + [e] + }), + cu(xc, Mc, (e, t) => { + const i = []; + e.range.start.hasSameParentAs(t.deletionPosition) && (e.range.containsPosition(t.deletionPosition) || e.range.start.isEqual(t.deletionPosition)) && i.push(oa._createFromPositionAndShift(t.graveyardPosition, 1)); + const n = e.range._getTransformedByMergeOperation(t); + return n.isCollapsed || i.push(n), + i.map(t => new xc(t, e.key, e.oldValue, e.newValue, e.baseVersion)) + }), + cu(xc, Cc, (e, t) => function (e, t) { + const i = oa._createFromPositionAndShift(t.sourcePosition, t.howMany); + let n = null, + o = []; + i.containsRange(e, !0) ? n = e : e.start.hasSameParentAs(i.start) ? (o = e.getDifference(i), n = e.getIntersection(i)) : o = [e]; + const r = []; + for (let e of o) { + e = e._getTransformedByDeletion(t.sourcePosition, t.howMany); + const i = t.getMovedRangeStart(), + n = e.start.hasSameParentAs(i); + e = e._getTransformedByInsertion(i, t.howMany, n), + r.push(...e) + } + n && r.push(n._getTransformedByMove(t.sourcePosition, t.targetPosition, t.howMany, !1)[0]); + return r + } + (e.range, t).map(t => new xc(t, e.key, e.oldValue, e.newValue, e.baseVersion))), + cu(xc, Ic, (e, t) => { + if (e.range.end.isEqual(t.insertionPosition)) + return t.graveyardPosition || e.range.end.offset++, [e]; + if (e.range.start.hasSameParentAs(t.splitPosition) && e.range.containsPosition(t.splitPosition)) { + const i = e.clone(); + return i.range = new oa(t.moveTargetPosition.clone(), e.range.end._getCombined(t.splitPosition, t.moveTargetPosition)), + e.range.end = t.splitPosition.clone(), + e.range.end.stickiness = "toPrevious", + [e, i] + } + return e.range = e.range._getTransformedBySplitOperation(t), + [e] + }), + cu(Tc, xc, (e, t) => { + const i = [e]; + if (e.shouldReceiveAttributes && e.position.hasSameParentAs(t.range.start) && t.range.containsPosition(e.position)) { + const n = mu(e, t.key, t.newValue); + n && i.push(n) + } + return i + }), + cu(Tc, Tc, (e, t, i) => (e.position.isEqual(t.position) && i.aIsStrong || (e.position = e.position._getTransformedByInsertOperation(t)), [e])), + cu(Tc, Cc, (e, t) => (e.position = e.position._getTransformedByMoveOperation(t), [e])), + cu(Tc, Ic, (e, t) => (e.position = e.position._getTransformedBySplitOperation(t), [e])), + cu(Tc, Mc, (e, t) => (e.position = e.position._getTransformedByMergeOperation(t), [e])), + cu(Ec, Tc, (e, t) => (e.oldRange && (e.oldRange = e.oldRange._getTransformedByInsertOperation(t)[0]), e.newRange && (e.newRange = e.newRange._getTransformedByInsertOperation(t)[0]), [e])), + cu(Ec, Ec, (e, t, i) => { + if (e.name == t.name) { + if (!i.aIsStrong) + return [new Qc(0)]; + e.oldRange = t.newRange ? t.newRange.clone() : null + } + return [e] + }), + cu(Ec, Mc, (e, t) => (e.oldRange && (e.oldRange = e.oldRange._getTransformedByMergeOperation(t)), e.newRange && (e.newRange = e.newRange._getTransformedByMergeOperation(t)), [e])), + cu(Ec, Cc, (e, t, i) => { + if (e.oldRange && (e.oldRange = oa._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))), e.newRange) { + if (i.abRelation) { + const n = oa._createFromRanges(e.newRange._getTransformedByMoveOperation(t)); + if ("left" == i.abRelation.side && t.targetPosition.isEqual(e.newRange.start)) + return e.newRange.start.path = i.abRelation.path, e.newRange.end = n.end, [e]; + if ("right" == i.abRelation.side && t.targetPosition.isEqual(e.newRange.end)) + return e.newRange.start = n.start, e.newRange.end.path = i.abRelation.path, [e] + } + e.newRange = oa._createFromRanges(e.newRange._getTransformedByMoveOperation(t)) + } + return [e] + }), + cu(Ec, Ic, (e, t, i) => { + if (e.oldRange && (e.oldRange = e.oldRange._getTransformedBySplitOperation(t)), e.newRange) { + if (i.abRelation) { + const n = e.newRange._getTransformedBySplitOperation(t); + return e.newRange.start.isEqual(t.splitPosition) && i.abRelation.wasStartBeforeMergedElement ? e.newRange.start = ea._createAt(t.insertionPosition) : e.newRange.start.isEqual(t.splitPosition) && !i.abRelation.wasInLeftElement && (e.newRange.start = ea._createAt(t.moveTargetPosition)), + e.newRange.end.isEqual(t.splitPosition) && i.abRelation.wasInRightElement ? e.newRange.end = ea._createAt(t.moveTargetPosition) : e.newRange.end.isEqual(t.splitPosition) && i.abRelation.wasEndBeforeMergedElement ? e.newRange.end = ea._createAt(t.insertionPosition) : e.newRange.end = n.end, + [e] + } + e.newRange = e.newRange._getTransformedBySplitOperation(t) + } + return [e] + }), + cu(Mc, Tc, (e, t) => (e.sourcePosition.hasSameParentAs(t.position) && (e.howMany += t.howMany), e.sourcePosition = e.sourcePosition._getTransformedByInsertOperation(t), e.targetPosition = e.targetPosition._getTransformedByInsertOperation(t), [e])), + cu(Mc, Mc, (e, t, i) => { + if (e.sourcePosition.isEqual(t.sourcePosition) && e.targetPosition.isEqual(t.targetPosition)) { + if (i.bWasUndone) { + const i = t.graveyardPosition.path.slice(); + return i.push(0), + e.sourcePosition = new ea(t.graveyardPosition.root, i), + e.howMany = 0, + [e] + } + return [new Qc(0)] + } + if (e.sourcePosition.isEqual(t.sourcePosition) && !e.targetPosition.isEqual(t.targetPosition) && !i.bWasUndone && "splitAtSource" != i.abRelation) { + const n = "$graveyard" == e.targetPosition.root.rootName, + o = "$graveyard" == t.targetPosition.root.rootName, + r = n && !o; + if (o && !n || !r && i.aIsStrong) { + const i = t.targetPosition._getTransformedByMergeOperation(t), + n = e.targetPosition._getTransformedByMergeOperation(t); + return [new Cc(i, e.howMany, n, 0)] + } + return [new Qc(0)] + } + return e.sourcePosition.hasSameParentAs(t.targetPosition) && (e.howMany += t.howMany), + e.sourcePosition = e.sourcePosition._getTransformedByMergeOperation(t), + e.targetPosition = e.targetPosition._getTransformedByMergeOperation(t), + e.graveyardPosition.isEqual(t.graveyardPosition) && i.aIsStrong || (e.graveyardPosition = e.graveyardPosition._getTransformedByMergeOperation(t)), + [e] + }), + cu(Mc, Cc, (e, t, i) => { + const n = oa._createFromPositionAndShift(t.sourcePosition, t.howMany); + return "remove" == t.type && !i.bWasUndone && !i.forceWeakRemove && e.deletionPosition.hasSameParentAs(t.sourcePosition) && n.containsPosition(e.sourcePosition) ? [new Qc(0)] : (e.sourcePosition.hasSameParentAs(t.targetPosition) && (e.howMany += t.howMany), e.sourcePosition.hasSameParentAs(t.sourcePosition) && (e.howMany -= t.howMany), e.sourcePosition = e.sourcePosition._getTransformedByMoveOperation(t), e.targetPosition = e.targetPosition._getTransformedByMoveOperation(t), e.graveyardPosition.isEqual(t.targetPosition) || (e.graveyardPosition = e.graveyardPosition._getTransformedByMoveOperation(t)), [e]) + }), + cu(Mc, Ic, (e, t, i) => { + if (t.graveyardPosition && (e.graveyardPosition = e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition, 1), e.deletionPosition.isEqual(t.graveyardPosition) && (e.howMany = t.howMany)), e.targetPosition.isEqual(t.splitPosition)) { + const n = 0 != t.howMany, + o = t.graveyardPosition && e.deletionPosition.isEqual(t.graveyardPosition); + if (n || o || "mergeTargetNotMoved" == i.abRelation) + return e.sourcePosition = e.sourcePosition._getTransformedBySplitOperation(t), [e] + } + if (e.sourcePosition.isEqual(t.splitPosition)) { + if ("mergeSourceNotMoved" == i.abRelation) + return e.howMany = 0, e.targetPosition = e.targetPosition._getTransformedBySplitOperation(t), [e]; + if ("mergeSameElement" == i.abRelation || e.sourcePosition.offset > 0) + return e.sourcePosition = t.moveTargetPosition.clone(), e.targetPosition = e.targetPosition._getTransformedBySplitOperation(t), [e] + } + return e.sourcePosition.hasSameParentAs(t.splitPosition) && (e.howMany = t.splitPosition.offset), + e.sourcePosition = e.sourcePosition._getTransformedBySplitOperation(t), + e.targetPosition = e.targetPosition._getTransformedBySplitOperation(t), + [e] + }), + cu(Cc, Tc, (e, t) => { + const i = oa._createFromPositionAndShift(e.sourcePosition, e.howMany)._getTransformedByInsertOperation(t, !1)[0]; + return e.sourcePosition = i.start, + e.howMany = i.end.offset - i.start.offset, + e.targetPosition.isEqual(t.position) || (e.targetPosition = e.targetPosition._getTransformedByInsertOperation(t)), + [e] + }), + cu(Cc, Cc, (e, t, i) => { + const n = oa._createFromPositionAndShift(e.sourcePosition, e.howMany), + o = oa._createFromPositionAndShift(t.sourcePosition, t.howMany); + let r, + s = i.aIsStrong, + a = !i.aIsStrong; + if ("insertBefore" == i.abRelation || "insertAfter" == i.baRelation ? a = !0 : "insertAfter" != i.abRelation && "insertBefore" != i.baRelation || (a = !1), r = e.targetPosition.isEqual(t.targetPosition) && a ? e.targetPosition._getTransformedByDeletion(t.sourcePosition, t.howMany) : e.targetPosition._getTransformedByMove(t.sourcePosition, t.targetPosition, t.howMany), pu(e, t) && pu(t, e)) + return [t.getReversed()]; + if (n.containsPosition(t.targetPosition) && n.containsRange(o, !0)) + return n.start = n.start._getTransformedByMove(t.sourcePosition, t.targetPosition, t.howMany), n.end = n.end._getTransformedByMove(t.sourcePosition, t.targetPosition, t.howMany), bu([n], r); + if (o.containsPosition(e.targetPosition) && o.containsRange(n, !0)) + return n.start = n.start._getCombined(t.sourcePosition, t.getMovedRangeStart()), n.end = n.end._getCombined(t.sourcePosition, t.getMovedRangeStart()), bu([n], r); + const c = cn(e.sourcePosition.getParentPath(), t.sourcePosition.getParentPath()); + if ("prefix" == c || "extension" == c) + return n.start = n.start._getTransformedByMove(t.sourcePosition, t.targetPosition, t.howMany), n.end = n.end._getTransformedByMove(t.sourcePosition, t.targetPosition, t.howMany), bu([n], r); + "remove" != e.type || "remove" == t.type || i.aWasUndone || i.forceWeakRemove ? "remove" == e.type || "remove" != t.type || i.bWasUndone || i.forceWeakRemove || (s = !1) : s = !0; + const l = [], + d = n.getDifference(o); + for (const e of d) { + e.start = e.start._getTransformedByDeletion(t.sourcePosition, t.howMany), + e.end = e.end._getTransformedByDeletion(t.sourcePosition, t.howMany); + const i = "same" == cn(e.start.getParentPath(), t.getMovedRangeStart().getParentPath()), + n = e._getTransformedByInsertion(t.getMovedRangeStart(), t.howMany, i); + l.push(...n) + } + const u = n.getIntersection(o); + return null !== u && s && (u.start = u.start._getCombined(t.sourcePosition, t.getMovedRangeStart()), u.end = u.end._getCombined(t.sourcePosition, t.getMovedRangeStart()), 0 === l.length ? l.push(u) : 1 == l.length ? o.start.isBefore(n.start) || o.start.isEqual(n.start) ? l.unshift(u) : l.push(u) : l.splice(1, 0, u)), + 0 === l.length ? [new Qc(e.baseVersion)] : bu(l, r) + }), + cu(Cc, Ic, (e, t, i) => { + let n = e.targetPosition.clone(); + e.targetPosition.isEqual(t.insertionPosition) && t.graveyardPosition && "moveTargetAfter" != i.abRelation || (n = e.targetPosition._getTransformedBySplitOperation(t)); + const o = oa._createFromPositionAndShift(e.sourcePosition, e.howMany); + if (o.end.isEqual(t.insertionPosition)) + return t.graveyardPosition || e.howMany++, e.targetPosition = n, [e]; + if (o.start.hasSameParentAs(t.splitPosition) && o.containsPosition(t.splitPosition)) { + let e = new oa(t.splitPosition, o.end); + e = e._getTransformedBySplitOperation(t); + return bu([new oa(o.start, t.splitPosition), e], n) + } + e.targetPosition.isEqual(t.splitPosition) && "insertAtSource" == i.abRelation && (n = t.moveTargetPosition), + e.targetPosition.isEqual(t.insertionPosition) && "insertBetween" == i.abRelation && (n = e.targetPosition); + const r = [o._getTransformedBySplitOperation(t)]; + if (t.graveyardPosition) { + const n = o.start.isEqual(t.graveyardPosition) || o.containsPosition(t.graveyardPosition); + e.howMany > 1 && n && !i.aWasUndone && r.push(oa._createFromPositionAndShift(t.insertionPosition, 1)) + } + return bu(r, n) + }), + cu(Cc, Mc, (e, t, i) => { + const n = oa._createFromPositionAndShift(e.sourcePosition, e.howMany); + if (t.deletionPosition.hasSameParentAs(e.sourcePosition) && n.containsPosition(t.sourcePosition)) + if ("remove" != e.type || i.forceWeakRemove) { + if (1 == e.howMany) + return i.bWasUndone ? (e.sourcePosition = t.graveyardPosition.clone(), e.targetPosition = e.targetPosition._getTransformedByMergeOperation(t), [e]) : [new Qc(0)] + } else if (!i.aWasUndone) { + const i = []; + let n = t.graveyardPosition.clone(), + o = t.targetPosition._getTransformedByMergeOperation(t); + e.howMany > 1 && (i.push(new Cc(e.sourcePosition, e.howMany - 1, e.targetPosition, 0)), n = n._getTransformedByMove(e.sourcePosition, e.targetPosition, e.howMany - 1), o = o._getTransformedByMove(e.sourcePosition, e.targetPosition, e.howMany - 1)); + const r = t.deletionPosition._getCombined(e.sourcePosition, e.targetPosition), + s = new Cc(n, 1, r, 0), + a = s.getMovedRangeStart().path.slice(); + a.push(0); + const c = new ea(s.targetPosition.root, a); + o = o._getTransformedByMove(n, r, 1); + const l = new Cc(o, t.howMany, c, 0); + return i.push(s), + i.push(l), + i + } + const o = oa._createFromPositionAndShift(e.sourcePosition, e.howMany)._getTransformedByMergeOperation(t); + return e.sourcePosition = o.start, + e.howMany = o.end.offset - o.start.offset, + e.targetPosition = e.targetPosition._getTransformedByMergeOperation(t), + [e] + }), + cu(Pc, Tc, (e, t) => (e.position = e.position._getTransformedByInsertOperation(t), [e])), + cu(Pc, Mc, (e, t) => e.position.isEqual(t.deletionPosition) ? (e.position = t.graveyardPosition.clone(), e.position.stickiness = "toNext", [e]) : (e.position = e.position._getTransformedByMergeOperation(t), [e])), + cu(Pc, Cc, (e, t) => (e.position = e.position._getTransformedByMoveOperation(t), [e])), + cu(Pc, Pc, (e, t, i) => { + if (e.position.isEqual(t.position)) { + if (!i.aIsStrong) + return [new Qc(0)]; + e.oldName = t.newName + } + return [e] + }), + cu(Pc, Ic, (e, t) => { + if ("same" == cn(e.position.path, t.splitPosition.getParentPath()) && !t.graveyardPosition) { + const t = new Pc(e.position.getShiftedBy(1), e.oldName, e.newName, 0); + return [e, t] + } + return e.position = e.position._getTransformedBySplitOperation(t), + [e] + }), + cu(Sc, Sc, (e, t, i) => { + if (e.root === t.root && e.key === t.key) { + if (!i.aIsStrong || e.newValue === t.newValue) + return [new Qc(0)]; + e.oldValue = t.newValue + } + return [e] + }), + cu(Ic, Tc, (e, t) => (e.splitPosition.hasSameParentAs(t.position) && e.splitPosition.offset < t.position.offset && (e.howMany += t.howMany), e.splitPosition = e.splitPosition._getTransformedByInsertOperation(t), e.insertionPosition = e.insertionPosition._getTransformedByInsertOperation(t), [e])), + cu(Ic, Mc, (e, t, i) => { + if (!e.graveyardPosition && !i.bWasUndone && e.splitPosition.hasSameParentAs(t.sourcePosition)) { + const i = t.graveyardPosition.path.slice(); + i.push(0); + const n = new ea(t.graveyardPosition.root, i), + o = Ic.getInsertionPosition(new ea(t.graveyardPosition.root, i)), + r = new Ic(n, 0, o, null, 0); + return e.splitPosition = e.splitPosition._getTransformedByMergeOperation(t), + e.insertionPosition = Ic.getInsertionPosition(e.splitPosition), + e.graveyardPosition = r.insertionPosition.clone(), + e.graveyardPosition.stickiness = "toNext", + [r, e] + } + return e.splitPosition.hasSameParentAs(t.deletionPosition) && !e.splitPosition.isAfter(t.deletionPosition) && e.howMany--, + e.splitPosition.hasSameParentAs(t.targetPosition) && (e.howMany += t.howMany), + e.splitPosition = e.splitPosition._getTransformedByMergeOperation(t), + e.insertionPosition = Ic.getInsertionPosition(e.splitPosition), + e.graveyardPosition && (e.graveyardPosition = e.graveyardPosition._getTransformedByMergeOperation(t)), + [e] + }), + cu(Ic, Cc, (e, t, i) => { + const n = oa._createFromPositionAndShift(t.sourcePosition, t.howMany); + if (e.graveyardPosition) { + const o = n.start.isEqual(e.graveyardPosition) || n.containsPosition(e.graveyardPosition); + if (!i.bWasUndone && o) { + const i = e.splitPosition._getTransformedByMoveOperation(t), + n = e.graveyardPosition._getTransformedByMoveOperation(t), + o = n.path.slice(); + o.push(0); + const r = new ea(n.root, o); + return [new Cc(i, e.howMany, r, 0)] + } + e.graveyardPosition = e.graveyardPosition._getTransformedByMoveOperation(t) + } + const o = e.splitPosition.isEqual(t.targetPosition); + if (o && ("insertAtSource" == i.baRelation || "splitBefore" == i.abRelation)) + return e.howMany += t.howMany, e.splitPosition = e.splitPosition._getTransformedByDeletion(t.sourcePosition, t.howMany), e.insertionPosition = Ic.getInsertionPosition(e.splitPosition), [e]; + if (o && i.abRelation && i.abRelation.howMany) { + const { + howMany: t, + offset: n + } = i.abRelation; + return e.howMany += t, + e.splitPosition = e.splitPosition.getShiftedBy(n), + [e] + } + if (e.splitPosition.hasSameParentAs(t.sourcePosition) && n.containsPosition(e.splitPosition)) { + const i = t.howMany - (e.splitPosition.offset - t.sourcePosition.offset); + return e.howMany -= i, + e.splitPosition.hasSameParentAs(t.targetPosition) && e.splitPosition.offset < t.targetPosition.offset && (e.howMany += t.howMany), + e.splitPosition = t.sourcePosition.clone(), + e.insertionPosition = Ic.getInsertionPosition(e.splitPosition), + [e] + } + return t.sourcePosition.isEqual(t.targetPosition) || (e.splitPosition.hasSameParentAs(t.sourcePosition) && e.splitPosition.offset <= t.sourcePosition.offset && (e.howMany -= t.howMany), e.splitPosition.hasSameParentAs(t.targetPosition) && e.splitPosition.offset < t.targetPosition.offset && (e.howMany += t.howMany)), + e.splitPosition.stickiness = "toNone", + e.splitPosition = e.splitPosition._getTransformedByMoveOperation(t), + e.splitPosition.stickiness = "toNext", + e.graveyardPosition ? e.insertionPosition = e.insertionPosition._getTransformedByMoveOperation(t) : e.insertionPosition = Ic.getInsertionPosition(e.splitPosition), + [e] + }), + cu(Ic, Ic, (e, t, i) => { + if (e.splitPosition.isEqual(t.splitPosition)) { + if (!e.graveyardPosition && !t.graveyardPosition) + return [new Qc(0)]; + if (e.graveyardPosition && t.graveyardPosition && e.graveyardPosition.isEqual(t.graveyardPosition)) + return [new Qc(0)]; + if ("splitBefore" == i.abRelation) + return e.howMany = 0, e.graveyardPosition = e.graveyardPosition._getTransformedBySplitOperation(t), [e] + } + if (e.graveyardPosition && t.graveyardPosition && e.graveyardPosition.isEqual(t.graveyardPosition)) { + const n = "$graveyard" == e.splitPosition.root.rootName, + o = "$graveyard" == t.splitPosition.root.rootName, + r = n && !o; + if (o && !n || !r && i.aIsStrong) { + const i = []; + return t.howMany && i.push(new Cc(t.moveTargetPosition, t.howMany, t.splitPosition, 0)), + e.howMany && i.push(new Cc(e.splitPosition, e.howMany, e.moveTargetPosition, 0)), + i + } + return [new Qc(0)] + } + if (e.graveyardPosition && (e.graveyardPosition = e.graveyardPosition._getTransformedBySplitOperation(t)), e.splitPosition.isEqual(t.insertionPosition) && "splitBefore" == i.abRelation) + return e.howMany++, [e]; + if (t.splitPosition.isEqual(e.insertionPosition) && "splitBefore" == i.baRelation) { + const i = t.insertionPosition.path.slice(); + i.push(0); + const n = new ea(t.insertionPosition.root, i); + return [e, new Cc(e.insertionPosition, 1, n, 0)] + } + return e.splitPosition.hasSameParentAs(t.splitPosition) && e.splitPosition.offset < t.splitPosition.offset && (e.howMany -= t.howMany), + e.splitPosition = e.splitPosition._getTransformedBySplitOperation(t), + e.insertionPosition = Ic.getInsertionPosition(e.splitPosition), + [e] + }); + class wu extends ts { + constructor(e) { + super(e), + this.domEventType = "click" + } + onDomEvent(e) { + this.fire(e.type, e) + } + } + class ku extends ts { + constructor(e) { + super(e), + this.domEventType = ["mousedown", "mouseup"] + } + onDomEvent(e) { + this.fire(e.type, e) + } + } + class _u { + constructor(e) { + this.document = e + } + createDocumentFragment(e) { + return new Uo(this.document, e) + } + createElement(e, t, i) { + return new Xn(this.document, e, t, i) + } + createText(e) { + return new un(this.document, e) + } + clone(e, t = !1) { + return e._clone(t) + } + appendChild(e, t) { + return t._appendChild(e) + } + insertChild(e, t, i) { + return i._insertChild(e, t) + } + removeChildren(e, t, i) { + return i._removeChildren(e, t) + } + remove(e) { + const t = e.parent; + return t ? this.removeChildren(t.getChildIndex(e), 1, t) : [] + } + replace(e, t) { + const i = e.parent; + if (i) { + const n = i.getChildIndex(e); + return this.removeChildren(n, 1, i), + this.insertChild(n, t, i), + !0 + } + return !1 + } + unwrapElement(e) { + const t = e.parent; + if (t) { + const i = t.getChildIndex(e); + this.remove(e), + this.insertChild(i, e.getChildren(), t) + } + } + rename(e, t) { + const i = new Xn(this.document, e, t.getAttributes(), t.getChildren()); + return this.replace(t, i) ? i : null + } + setAttribute(e, t, i) { + i._setAttribute(e, t) + } + removeAttribute(e, t) { + t._removeAttribute(e) + } + addClass(e, t) { + t._addClass(e) + } + removeClass(e, t) { + t._removeClass(e) + } + setStyle(e, t, i) { + ct(e) && void 0 === i && (i = t), + i._setStyle(e, t) + } + removeStyle(e, t) { + t._removeStyle(e) + } + setCustomProperty(e, t, i) { + i._setCustomProperty(e, t) + } + removeCustomProperty(e, t) { + return t._removeCustomProperty(e) + } + createPositionAt(e, t) { + return ao._createAt(e, t) + } + createPositionAfter(e) { + return ao._createAfter(e) + } + createPositionBefore(e) { + return ao._createBefore(e) + } + createRange(e, t) { + return new co(e, t) + } + createRangeOn(e) { + return co._createOn(e) + } + createRangeIn(e) { + return co._createIn(e) + } + createSelection(e, t, i) { + return new ho(e, t, i) + } + } + new Set(["black", "silver", "gray", "white", "maroon", "red", "purple", "fuchsia", "green", "lime", "olive", "yellow", "navy", "blue", "teal", "aqua", "orange", "aliceblue", "antiquewhite", "aquamarine", "azure", "beige", "bisque", "blanchedalmond", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "gainsboro", "ghostwhite", "gold", "goldenrod", "greenyellow", "grey", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "limegreen", "linen", "magenta", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "oldlace", "olivedrab", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "thistle", "tomato", "turquoise", "violet", "wheat", "whitesmoke", "yellowgreen", "rebeccapurple", "currentcolor", "transparent"]); + class vu extends _l { + constructor(e, t) { + super(e), + this.view = t, + this._toolbarConfig = xd(e.config.get("toolbar")), + this._elementReplacer = new vs + } + get element() { + return this.view.element + } + init(e) { + const t = this.editor, + i = this.view, + n = t.editing.view, + o = i.editable, + r = n.document.getRoot(); + o.name = r.rootName, + i.render(); + const s = o.element; + this.setEditableElement(o.name, s), + this.focusTracker.add(s), + i.editable.bind("isFocused").to(this.focusTracker), + n.attachDomRoot(s), + e && this._elementReplacer.replace(e, this.element), + this._initPlaceholder(), + this._initToolbar(), + this.fire("ready") + } + destroy() { + const e = this.view, + t = this.editor.editing.view; + this._elementReplacer.restore(), + t.detachDomRoot(e.editable.name), + e.destroy(), + super.destroy() + } + _initToolbar() { + const e = this.editor, + t = this.view, + i = e.editing.view; + t.stickyPanel.bind("isActive").to(this.focusTracker, "isFocused"), + t.stickyPanel.limiterElement = t.element, + this._toolbarConfig.viewportTopOffset && (t.stickyPanel.viewportTopOffset = this._toolbarConfig.viewportTopOffset), + t.toolbar.fillFromConfig(this._toolbarConfig, this.componentFactory), + function ({ + origin: e, + originKeystrokeHandler: t, + originFocusTracker: i, + toolbar: n, + beforeFocus: o, + afterBlur: r + }) { + i.add(n.element), + t.set("Alt+F10", (e, t) => { + i.isFocused && !n.focusTracker.isFocused && (o && o(), n.focus(), t()) + }), + n.keystrokes.set("Esc", (t, i) => { + n.focusTracker.isFocused && (e.focus(), r && r(), i()) + }) + } + ({ + origin: i, + originFocusTracker: this.focusTracker, + originKeystrokeHandler: e.keystrokes, + toolbar: t.toolbar + }) + } + _initPlaceholder() { + const e = this.editor, + t = e.editing.view, + i = t.document.getRoot(), + n = e.sourceElement, + o = e.config.get("placeholder") || n && "textarea" === n.tagName.toLowerCase() && n.getAttribute("placeholder"); + o && iu({ + view: t, + element: i, + text: o, + isDirectHost: !1, + keepOnFocus: !0 + }) + } + } + i(60); + class yu extends Dd { + constructor(e, t, i = {}) { + super(e), + this.stickyPanel = new eu(e), + this.toolbar = new Ad(e, { + shouldGroupWhenFull: i.shouldToolbarGroupWhenFull + }), + this.editable = new zd(e, t) + } + render() { + super.render(), + this.stickyPanel.content.add(this.toolbar), + this.top.add(this.stickyPanel), + this.main.add(this.editable) + } + } + class xu extends bl { + constructor(e, t) { + super(t), + Yi(e) && (this.sourceElement = e), + this.model.document.createRoot(); + const i = !this.config.get("toolbar.shouldNotGroupWhenFull"), + n = new yu(this.locale, this.editing.view, { + shouldToolbarGroupWhenFull: i + }); + this.ui = new vu(this, n), + function (e) { + if (!I(e.updateSourceElement)) + throw new c.a("attachtoform-missing-elementapi-interface", e); + const t = e.sourceElement; + if (t && "textarea" === t.tagName.toLowerCase() && t.form) { + let i; + const n = t.form, + o = () => e.updateSourceElement(); + I(n.submit) && (i = n.submit, n.submit = () => { + o(), + i.apply(n) + }), + n.addEventListener("submit", o), + e.on("destroy", () => { + n.removeEventListener("submit", o), + i && (n.submit = i) + }) + } + } + (this) + } + destroy() { + return this.sourceElement && this.updateSourceElement(), + this.ui.destroy(), + super.destroy() + } + static create(e, t = {}) { + return new Promise(i => { + const n = new this(e, t); + i(n.initPlugins().then(() => n.ui.init(Yi(e) ? e : null)).then(() => { + if (!Yi(e) && t.initialData) + throw new c.a("editor-create-initial-data", null); + const i = void 0 !== t.initialData ? t.initialData : function (e) { + return Yi(e) ? (t = e, t instanceof HTMLTextAreaElement ? t.value : t.innerHTML) : e; + var t + } + (e); + return n.data.init(i) + }).then(() => n.fire("ready")).then(() => n)) + }) + } + } + Ke(xu, vl), + Ke(xu, yl); + class Au { + constructor(e) { + this.files = function (e) { + const t = e.files ? Array.from(e.files) : [], + i = e.items ? Array.from(e.items) : []; + if (t.length) + return t; + return i.filter(e => "file" === e.kind).map(e => e.getAsFile()) + } + (e), + this._native = e + } + get types() { + return this._native.types + } + getData(e) { + return this._native.getData(e) + } + setData(e, t) { + this._native.setData(e, t) + } + set effectAllowed(e) { + this._native.effectAllowed = e + } + get effectAllowed() { + return this._native.effectAllowed + } + set dropEffect(e) { + this._native.dropEffect = e + } + get dropEffect() { + return this._native.dropEffect + } + get isCanceled() { + return "none" == this._native.dropEffect || !!this._native.mozUserCancelled + } + } + class Cu extends ts { + constructor(e) { + super(e); + const t = this.document; + function i(e) { + return (i, n) => { + n.preventDefault(); + const r = n.dropRange ? [n.dropRange] : null, + s = new o(t, e); + t.fire(s, { + dataTransfer: n.dataTransfer, + method: i.name, + targetRanges: r, + target: n.target + }), + s.stop.called && n.stopPropagation() + } + } + this.domEventType = ["paste", "copy", "cut", "drop", "dragover", "dragstart", "dragend", "dragenter", "dragleave"], + this.listenTo(t, "paste", i("clipboardInput"), { + priority: "low" + }), + this.listenTo(t, "drop", i("clipboardInput"), { + priority: "low" + }), + this.listenTo(t, "dragover", i("dragging"), { + priority: "low" + }) + } + onDomEvent(e) { + const t = { + dataTransfer: new Au(e.clipboardData ? e.clipboardData : e.dataTransfer) + }; + "drop" != e.type && "dragover" != e.type || (t.dropRange = function (e, t) { + const i = t.target.ownerDocument, + n = t.clientX, + o = t.clientY; + let r; + i.caretRangeFromPoint && i.caretRangeFromPoint(n, o) ? r = i.caretRangeFromPoint(n, o) : t.rangeParent && (r = i.createRange(), r.setStart(t.rangeParent, t.rangeOffset), r.collapse(!0)); + if (r) + return e.domConverter.domRangeToView(r); + return null + } + (this.view, e)), + this.fire(e.type, e, t) + } + } + const Tu = ["figcaption", "li"]; + class Eu extends Qe { + static get pluginName() { + return "ClipboardPipeline" + } + init() { + this.editor.editing.view.addObserver(Cu), + this._setupPasteDrop(), + this._setupCopyCut() + } + _setupPasteDrop() { + const e = this.editor, + t = e.model, + i = e.editing.view, + n = i.document; + this.listenTo(n, "clipboardInput", t => { + e.isReadOnly && t.stop() + }, { + priority: "highest" + }), + this.listenTo(n, "clipboardInput", (e, t) => { + const n = t.dataTransfer; + let r = t.content || ""; + var s; + r || (n.getData("text/html") ? r = function (e) { + return e.replace(/(\s+)<\/span>/g, (e, t) => 1 == t.length ? " " : t) + } + (n.getData("text/html")) : n.getData("text/plain") && (((s = (s = n.getData("text/plain")).replace(//g, ">").replace(/\r?\n\r?\n/g, "

").replace(/\r?\n/g, "
").replace(/^\s/, " ").replace(/\s$/, " ").replace(/\s\s/g, "  ")).includes("

") || s.includes("
")) && (s = `

${s}

`), r = s), r = this.editor.data.htmlProcessor.toView(r)); + const a = new o(this, "inputTransformation"); + this.fire(a, { + content: r, + dataTransfer: n, + targetRanges: t.targetRanges, + method: t.method + }), + a.stop.called && e.stop(), + i.scrollToTheSelection() + }, { + priority: "low" + }), + this.listenTo(this, "inputTransformation", (e, i) => { + if (i.content.isEmpty) + return; + const n = this.editor.data.toModel(i.content, "$clipboardHolder"); + 0 != n.childCount && (e.stop(), t.change(() => { + this.fire("contentInsertion", { + content: n, + method: i.method, + dataTransfer: i.dataTransfer, + targetRanges: i.targetRanges + }) + })) + }, { + priority: "low" + }), + this.listenTo(this, "contentInsertion", (e, i) => { + i.resultRange = t.insertContent(i.content) + }, { + priority: "low" + }) + } + _setupCopyCut() { + const e = this.editor, + t = e.model.document, + i = e.editing.view.document; + function n(n, o) { + const r = o.dataTransfer; + o.preventDefault(); + const s = e.data.toView(e.model.getSelectedContent(t.selection)); + i.fire("clipboardOutput", { + dataTransfer: r, + content: s, + method: n.name + }) + } + this.listenTo(i, "copy", n, { + priority: "low" + }), + this.listenTo(i, "cut", (t, i) => { + e.isReadOnly ? i.preventDefault() : n(t, i) + }, { + priority: "low" + }), + this.listenTo(i, "clipboardOutput", (i, n) => { + n.content.isEmpty || (n.dataTransfer.setData("text/html", this.editor.data.htmlProcessor.toData(n.content)), n.dataTransfer.setData("text/plain", function e(t) { + let i = ""; + if (t.is("$text") || t.is("$textProxy")) + i = t.data; + else if (t.is("element", "img") && t.hasAttribute("alt")) + i = t.getAttribute("alt"); + else if (t.is("element", "br")) + i = "\n"; + else { + let n = null; + for (const o of t.getChildren()) { + const t = e(o); + n && (n.is("containerElement") || o.is("containerElement")) && (Tu.includes(n.name) || Tu.includes(o.name) ? i += "\n" : i += "\n\n"), + i += t, + n = o + } + } + return i + } + (n.content))), + "cut" == n.method && e.model.deleteContent(t.selection) + }, { + priority: "low" + }) + } + } + function * Pu(e, t) { + for (const i of t) + i && e.getAttributeProperties(i[0]).copyOnEnter && (yield i) + } + class Su extends Ze { + execute() { + const e = this.editor.model, + t = e.document; + e.change(i => { + !function (e, t, i, n) { + const o = i.isCollapsed, + r = i.getFirstRange(), + s = r.start.parent, + a = r.end.parent; + if (n.isLimit(s) || n.isLimit(a)) + return void(o || s != a || e.deleteContent(i)); + if (o) { + const e = Pu(t.model.schema, i.getAttributes()); + Mu(t, r.start), + t.setSelectionAttribute(e) + } else { + const n = !(r.start.isAtStart && r.end.isAtEnd), + o = s == a; + e.deleteContent(i, { + leaveUnmerged: n + }), + n && (o ? Mu(t, i.focus) : t.setSelection(a, 0)) + } + } + (this.editor.model, i, t.selection, e.schema), + this.fire("afterExecute", { + writer: i + }) + }) + } + } + function Mu(e, t) { + e.split(t), + e.setSelection(t.parent.nextSibling, 0) + } + class Iu extends Or { + constructor(e) { + super(e); + const t = this.document; + t.on("keydown", (e, i) => { + if (this.isEnabled && i.keyCode == Io.enter) { + const n = new go(t, "enter", t.selection.getFirstRange()); + t.fire(n, new es(t, i.domEvent, { + isSoft: i.shiftKey + })), + n.stop.called && e.stop() + } + }) + } + observe() {} + } + class Nu extends Qe { + static get pluginName() { + return "Enter" + } + init() { + const e = this.editor, + t = e.editing.view, + i = t.document; + t.addObserver(Iu), + e.commands.add("enter", new Su(e)), + this.listenTo(i, "enter", (i, n) => { + n.preventDefault(), + n.isSoft || (e.execute("enter"), t.scrollToTheSelection()) + }, { + priority: "low" + }) + } + } + class Ru { + constructor(e, t = 20) { + this.model = e, + this.size = 0, + this.limit = t, + this.isLocked = !1, + this._changeCallback = (e, t) => { + "transparent" != t.type && t !== this._batch && this._reset(!0) + }, + this._selectionChangeCallback = () => { + this._reset() + }, + this.model.document.on("change", this._changeCallback), + this.model.document.selection.on("change:range", this._selectionChangeCallback), + this.model.document.selection.on("change:attribute", this._selectionChangeCallback) + } + get batch() { + return this._batch || (this._batch = this.model.createBatch()), + this._batch + } + input(e) { + this.size += e, + this.size >= this.limit && this._reset(!0) + } + lock() { + this.isLocked = !0 + } + unlock() { + this.isLocked = !1 + } + destroy() { + this.model.document.off("change", this._changeCallback), + this.model.document.selection.off("change:range", this._selectionChangeCallback), + this.model.document.selection.off("change:attribute", this._selectionChangeCallback) + } + _reset(e) { + this.isLocked && !e || (this._batch = null, this.size = 0) + } + } + class Ou extends Ze { + constructor(e, t) { + super(e), + this.direction = t, + this._buffer = new Ru(e.model, e.config.get("typing.undoStep")) + } + get buffer() { + return this._buffer + } + execute(e = {}) { + const t = this.editor.model, + i = t.document; + t.enqueueChange(this._buffer.batch, n => { + this._buffer.lock(); + const o = n.createSelection(e.selection || i.selection), + r = e.sequence || 1, + s = o.isCollapsed; + if (o.isCollapsed && t.modifySelection(o, { + direction: this.direction, + unit: e.unit + }), this._shouldEntireContentBeReplacedWithParagraph(r)) + return void this._replaceEntireContentWithParagraph(n); + if (this._shouldReplaceFirstBlockWithParagraph(o, r)) + return void this.editor.execute("paragraph", { + selection: o + }); + if (o.isCollapsed) + return; + let a = 0; + o.getFirstRange().getMinimalFlatRanges().forEach(e => { + a += uo(e.getWalker({ + singleCharacters: !0, + ignoreElementEnd: !0, + shallow: !0 + })) + }), + t.deleteContent(o, { + doNotResetEntireContent: s, + direction: this.direction + }), + this._buffer.input(a), + n.setSelection(o), + this._buffer.unlock() + }) + } + _shouldEntireContentBeReplacedWithParagraph(e) { + if (e > 1) + return !1; + const t = this.editor.model, + i = t.document.selection, + n = t.schema.getLimitElement(i); + if (!(i.isCollapsed && i.containsEntireContent(n))) + return !1; + if (!t.schema.checkChild(n, "paragraph")) + return !1; + const o = n.getChild(0); + return !o || "paragraph" !== o.name + } + _replaceEntireContentWithParagraph(e) { + const t = this.editor.model, + i = t.document.selection, + n = t.schema.getLimitElement(i), + o = e.createElement("paragraph"); + e.remove(e.createRangeIn(n)), + e.insert(o, n), + e.setSelection(o, 0) + } + _shouldReplaceFirstBlockWithParagraph(e, t) { + const i = this.editor.model; + if (t > 1 || "backward" != this.direction) + return !1; + if (!e.isCollapsed) + return !1; + const n = e.getFirstPosition(), + o = i.schema.getLimitElement(n), + r = o.getChild(0); + return n.parent == r && (!!e.containsEntireContent(r) && (!!i.schema.checkChild(o, "paragraph") && "paragraph" != r.name)) + } + } + class Du extends Or { + constructor(e) { + super(e); + const t = e.document; + let i = 0; + function n(e, i, n) { + const o = new go(t, "delete", t.selection.getFirstRange()); + t.fire(o, new es(t, i, n)), + o.stop.called && e.stop() + } + t.on("keyup", (e, t) => { + t.keyCode != Io.delete && t.keyCode != Io.backspace || (i = 0) + }), + t.on("keydown", (e, t) => { + const o = {}; + if (t.keyCode == Io.delete) + o.direction = "forward", o.unit = "character"; + else { + if (t.keyCode != Io.backspace) + return; + o.direction = "backward", + o.unit = "codePoint" + } + const r = Po.isMac ? t.altKey : t.ctrlKey; + o.unit = r ? "word" : o.unit, + o.sequence = ++i, + n(e, t.domEvent, o) + }), + Po.isAndroid && t.on("beforeinput", (t, i) => { + if ("deleteContentBackward" != i.domEvent.inputType) + return; + const o = { + unit: "codepoint", + direction: "backward", + sequence: 1 + }, + r = i.domTarget.ownerDocument.defaultView.getSelection(); + r.anchorNode == r.focusNode && r.anchorOffset + 1 != r.focusOffset && (o.selectionToRemove = e.domConverter.domSelectionToView(r)), + n(t, i.domEvent, o) + }) + } + observe() {} + } + class Lu extends Qe { + static get pluginName() { + return "Delete" + } + init() { + const e = this.editor, + t = e.editing.view, + i = t.document; + t.addObserver(Du); + const n = new Ou(e, "forward"); + if (e.commands.add("deleteForward", n), e.commands.add("forwardDelete", n), e.commands.add("delete", new Ou(e, "backward")), this.listenTo(i, "delete", (i, n) => { + const o = { + unit: n.unit, + sequence: n.sequence + }; + if (n.selectionToRemove) { + const t = e.model.createSelection(), + i = []; + for (const t of n.selectionToRemove.getRanges()) + i.push(e.editing.mapper.toModelRange(t)); + t.setTo(i), + o.selection = t + } + e.execute("forward" == n.direction ? "deleteForward" : "delete", o), + n.preventDefault(), + t.scrollToTheSelection() + }, { + priority: "low" + }), Po.isAndroid) { + let e = null; + this.listenTo(i, "delete", (t, i) => { + const n = i.domTarget.ownerDocument.defaultView.getSelection(); + e = { + anchorNode: n.anchorNode, + anchorOffset: n.anchorOffset, + focusNode: n.focusNode, + focusOffset: n.focusOffset + } + }, { + priority: "lowest" + }), + this.listenTo(i, "keyup", (t, i) => { + if (e) { + const t = i.domTarget.ownerDocument.defaultView.getSelection(); + t.collapse(e.anchorNode, e.anchorOffset), + t.extend(e.focusNode, e.focusOffset), + e = null + } + }) + } + } + } + class zu { + constructor() { + this._stack = [] + } + add(e, t) { + const i = this._stack, + n = i[0]; + this._insertDescriptor(e); + const o = i[0]; + n === o || Vu(n, o) || this.fire("change:top", { + oldDescriptor: n, + newDescriptor: o, + writer: t + }) + } + remove(e, t) { + const i = this._stack, + n = i[0]; + this._removeDescriptor(e); + const o = i[0]; + n === o || Vu(n, o) || this.fire("change:top", { + oldDescriptor: n, + newDescriptor: o, + writer: t + }) + } + _insertDescriptor(e) { + const t = this._stack, + i = t.findIndex(t => t.id === e.id); + if (Vu(e, t[i])) + return; + i > -1 && t.splice(i, 1); + let n = 0; + for (; t[n] && ju(t[n], e); ) + n++; + t.splice(n, 0, e) + } + _removeDescriptor(e) { + const t = this._stack, + i = t.findIndex(t => t.id === e); + i > -1 && t.splice(i, 1) + } + } + function Vu(e, t) { + return e && t && e.priority == t.priority && Bu(e.classes) == Bu(t.classes) + } + function ju(e, t) { + return e.priority > t.priority || !(e.priority < t.priority) && Bu(e.classes) > Bu(t.classes) + } + function Bu(e) { + return Array.isArray(e) ? e.sort().join(",") : e + } + Ke(zu, u); + function Fu(e) { + return !!e.is("element") && !!e.getCustomProperty("widget") + } + function Hu(e, t, i = {}) { + if (!e.is("containerElement")) + throw new c.a("widget-to-widget-wrong-element-type", null, { + element: e + }); + return t.setAttribute("contenteditable", "false", e), + t.addClass("ck-widget", e), + t.setCustomProperty("widget", !0, e), + e.getFillerOffset = Ju, + i.label && function (e, t, i) { + i.setCustomProperty("widgetLabel", t, e) + } + (e, i.label, t), + i.hasSelectionHandle && function (e, t) { + const i = t.createUIElement("div", { + class: "ck ck-widget__selection-handle" + }, (function (e) { + const t = this.toDomElement(e), + i = new sd; + return i.set("content", ''), + i.render(), + t.appendChild(i.element), + t + })); + t.insert(t.createPositionAt(e, 0), i), + t.addClass(["ck-widget_with-selection-handle"], e) + } + (e, t), + qu(e, t, Uu, Wu), + e + } + function Uu(e, t, i) { + if (t.classes && i.addClass(en(t.classes), e), t.attributes) + for (const n in t.attributes) + i.setAttribute(n, t.attributes[n], e) + } + function Wu(e, t, i) { + if (t.classes && i.removeClass(en(t.classes), e), t.attributes) + for (const n in t.attributes) + i.removeAttribute(n, e) + } + function qu(e, t, i, n) { + const o = new zu; + o.on("change:top", (t, o) => { + o.oldDescriptor && n(e, o.oldDescriptor, o.writer), + o.newDescriptor && i(e, o.newDescriptor, o.writer) + }), + t.setCustomProperty("addHighlight", (e, t, i) => o.add(t, i), e), + t.setCustomProperty("removeHighlight", (e, t, i) => o.remove(t, i), e) + } + function $u(e) { + const t = e.getCustomProperty("widgetLabel"); + return t ? "function" == typeof t ? t() : t : "" + } + function Yu(e, t) { + return t.addClass(["ck-editor__editable", "ck-editor__nested-editable"], e), + t.setAttribute("contenteditable", e.isReadOnly ? "false" : "true", e), + e.on("change:isReadOnly", (i, n, o) => { + t.setAttribute("contenteditable", o ? "false" : "true", e) + }), + e.on("change:isFocused", (i, n, o) => { + o ? t.addClass("ck-editor__nested-editable_focused", e) : t.removeClass("ck-editor__nested-editable_focused", e) + }), + e + } + function Gu(e, t) { + const i = e.getSelectedElement(); + if (i) { + const n = Xu(e); + if (n) + return t.createPositionAt(i, n); + if (t.schema.isBlock(i)) + return t.createPositionAfter(i) + } + const n = e.getSelectedBlocks().next().value; + if (n) { + if (n.isEmpty) + return t.createPositionAt(n, 0); + const i = t.createPositionAfter(n); + return e.focus.isTouching(i) ? i : t.createPositionBefore(n) + } + return e.focus + } + function Ku(e, t) { + const i = e.getSelectedElement(); + return !!i && t.isObject(i) + } + function Qu(e, t) { + const i = new Ts(_r.window), + n = i.getIntersection(e), + o = t.height + qd.arrowVerticalOffset; + if (e.top - o > i.top || e.bottom + o < i.bottom) + return null; + const r = n || e, + s = r.left + r.width / 2 - t.width / 2; + return { + top: Math.max(e.top, 0) + qd.arrowVerticalOffset, + left: s, + name: "arrow_n" + } + } + function Ju() { + return null + } + function Zu(e, t, i) { + return e && Fu(e) && !i.isInline(t) + } + function Xu(e) { + return e.getAttribute("widget-type-around") + } + const eh = [Ro("arrowUp"), Ro("arrowRight"), Ro("arrowDown"), Ro("arrowLeft"), 9, 16, 17, 18, 19, 20, 27, 33, 34, 35, 36, 45, 91, 93, 144, 145, 173, 174, 175, 176, 177, 178, 179, 255]; + for (let e = 112; e <= 135; e++) + eh.push(e); + function th(e) { + return !(!e.ctrlKey && !e.metaKey) || eh.includes(e.keyCode) + } + i(62); + const ih = ["before", "after"], + nh = (new DOMParser).parseFromString('', "image/svg+xml").firstChild; + class oh extends Qe { + static get pluginName() { + return "WidgetTypeAround" + } + static get requires() { + return [Nu, Lu] + } + constructor(e) { + super(e), + this._currentFakeCaretModelElement = null + } + init() { + const e = this.editor, + t = e.editing.view; + this.on("change:isEnabled", (i, n, o) => { + t.change(e => { + for (const i of t.document.roots) + o ? e.removeClass("ck-widget__type-around_disabled", i) : e.addClass("ck-widget__type-around_disabled", i) + }), + o || e.model.change(e => { + e.removeSelectionAttribute("widget-type-around") + }) + }), + this._enableTypeAroundUIInjection(), + this._enableInsertingParagraphsOnButtonClick(), + this._enableInsertingParagraphsOnEnterKeypress(), + this._enableInsertingParagraphsOnTypingKeystroke(), + this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(), + this._enableDeleteIntegration(), + this._enableInsertContentIntegration() + } + destroy() { + this._currentFakeCaretModelElement = null + } + _insertParagraph(e, t) { + const i = this.editor, + n = i.editing.view; + i.execute("insertParagraph", { + position: i.model.createPositionAt(e, t) + }), + n.focus(), + n.scrollToTheSelection() + } + _listenToIfEnabled(e, t, i, n) { + this.listenTo(e, t, (...e) => { + this.isEnabled && i(...e) + }, n) + } + _insertParagraphAccordingToFakeCaretPosition() { + const e = this.editor.model.document.selection, + t = Xu(e); + if (!t) + return !1; + const i = e.getSelectedElement(); + return this._insertParagraph(i, t), + !0 + } + _enableTypeAroundUIInjection() { + const e = this.editor, + t = e.model.schema, + i = e.locale.t, + n = { + before: i("Insert paragraph before block"), + after: i("Insert paragraph after block") + }; + e.editing.downcastDispatcher.on("insert", (e, i, o) => { + const r = o.mapper.toViewElement(i.item); + Zu(r, i.item, t) && function (e, t, i) { + const n = e.createUIElement("div", { + class: "ck ck-reset_all ck-widget__type-around" + }, (function (e) { + const i = this.toDomElement(e); + return function (e, t) { + for (const i of ih) { + const n = new Bl({ + tag: "div", + attributes: { + class: ["ck", "ck-widget__type-around__button", "ck-widget__type-around__button_" + i], + title: t[i] + }, + children: [e.ownerDocument.importNode(nh, !0)] + }); + e.appendChild(n.render()) + } + } + (i, t), + function (e) { + const t = new Bl({ + tag: "div", + attributes: { + class: ["ck", "ck-widget__type-around__fake-caret"] + } + }); + e.appendChild(t.render()) + } + (i), + i + })); + e.insert(e.createPositionAt(i, "end"), n) + } + (o.writer, n, r) + }, { + priority: "low" + }) + } + _enableTypeAroundFakeCaretActivationUsingKeyboardArrows() { + const e = this.editor, + t = e.model, + i = t.document.selection, + n = t.schema, + o = e.editing.view; + function r(e) { + return "ck-widget_type-around_show-fake-caret_" + e + } + this._listenToIfEnabled(o.document, "arrowKey", (e, t) => { + this._handleArrowKeyPress(e, t) + }, { + context: [Fu, "$text"], + priority: "high" + }), + this._listenToIfEnabled(i, "change:range", (t, i) => { + i.directChange && e.model.change(e => { + e.removeSelectionAttribute("widget-type-around") + }) + }), + this._listenToIfEnabled(t.document, "change:data", () => { + const t = i.getSelectedElement(); + if (t) { + if (Zu(e.editing.mapper.toViewElement(t), t, n)) + return + } + e.model.change(e => { + e.removeSelectionAttribute("widget-type-around") + }) + }), + this._listenToIfEnabled(e.editing.downcastDispatcher, "selection", (e, t, i) => { + const o = i.writer; + if (this._currentFakeCaretModelElement) { + const e = i.mapper.toViewElement(this._currentFakeCaretModelElement); + e && (o.removeClass(ih.map(r), e), this._currentFakeCaretModelElement = null) + } + const s = t.selection.getSelectedElement(); + if (!s) + return; + const a = i.mapper.toViewElement(s); + if (!Zu(a, s, n)) + return; + const c = Xu(t.selection); + c && (o.addClass(r(c), a), this._currentFakeCaretModelElement = s) + }), + this._listenToIfEnabled(e.ui.focusTracker, "change:isFocused", (t, i, n) => { + n || e.model.change(e => { + e.removeSelectionAttribute("widget-type-around") + }) + }) + } + _handleArrowKeyPress(e, t) { + const i = this.editor, + n = i.model, + o = n.document.selection, + r = n.schema, + s = i.editing.view, + a = zo(t.keyCode, i.locale.contentLanguageDirection), + c = s.document.selection.getSelectedElement(); + let l; + Zu(c, i.editing.mapper.toModelElement(c), r) ? l = this._handleArrowKeyPressOnSelectedWidget(a) : o.isCollapsed && (l = this._handleArrowKeyPressWhenSelectionNextToAWidget(a)), + l && (t.preventDefault(), e.stop()) + } + _handleArrowKeyPressOnSelectedWidget(e) { + const t = this.editor.model, + i = Xu(t.document.selection); + return t.change(t => { + if (!i) + return t.setSelectionAttribute("widget-type-around", e ? "after" : "before"), !0; + if (!(i === (e ? "after" : "before"))) + return t.removeSelectionAttribute("widget-type-around"), !0; + return !1 + }) + } + _handleArrowKeyPressWhenSelectionNextToAWidget(e) { + const t = this.editor, + i = t.model, + n = i.schema, + o = t.plugins.get("Widget"), + r = o._getObjectElementNextToSelection(e); + return !!Zu(t.editing.mapper.toViewElement(r), r, n) && (i.change(t => { + o._setSelectionOverElement(r), + t.setSelectionAttribute("widget-type-around", e ? "before" : "after") + }), !0) + } + _enableInsertingParagraphsOnButtonClick() { + const e = this.editor, + t = e.editing.view; + this._listenToIfEnabled(t.document, "mousedown", (i, n) => { + const o = n.domTarget.closest(".ck-widget__type-around__button"); + if (!o) + return; + const r = function (e) { + return e.classList.contains("ck-widget__type-around__button_before") ? "before" : "after" + } + (o), + s = function (e, t) { + const i = e.closest(".ck-widget"); + return t.mapDomToView(i) + } + (o, t.domConverter), + a = e.editing.mapper.toModelElement(s); + this._insertParagraph(a, r), + n.preventDefault(), + i.stop() + }) + } + _enableInsertingParagraphsOnEnterKeypress() { + const e = this.editor, + t = e.model.document.selection, + i = e.editing.view; + this._listenToIfEnabled(i.document, "enter", (i, n) => { + if ("atTarget" != i.eventPhase) + return; + const o = t.getSelectedElement(), + r = e.editing.mapper.toViewElement(o), + s = e.model.schema; + let a; + this._insertParagraphAccordingToFakeCaretPosition() ? a = !0 : Zu(r, o, s) && (this._insertParagraph(o, n.isSoft ? "before" : "after"), a = !0), + a && (n.preventDefault(), i.stop()) + }, { + context: Fu + }) + } + _enableInsertingParagraphsOnTypingKeystroke() { + const e = this.editor.editing.view, + t = [Io.enter, Io.delete, Io.backspace]; + this._listenToIfEnabled(e.document, "keydown", (e, i) => { + t.includes(i.keyCode) || th(i) || this._insertParagraphAccordingToFakeCaretPosition() + }, { + priority: "high" + }) + } + _enableDeleteIntegration() { + const e = this.editor, + t = e.editing.view, + i = e.model, + n = i.schema; + this._listenToIfEnabled(t.document, "delete", (t, o) => { + if ("atTarget" != t.eventPhase) + return; + const r = Xu(i.document.selection); + if (!r) + return; + const s = o.direction, + a = i.document.selection.getSelectedElement(), + c = "forward" == s; + if ("before" === r === c) + e.execute("delete", { + selection: i.createSelection(a, "on") + }); + else { + const t = n.getNearestSelectionRange(i.createPositionAt(a, r), s); + if (t) + if (t.isCollapsed) { + const o = i.createSelection(t.start); + if (i.modifySelection(o, { + direction: s + }), o.focus.isEqual(t.start)) { + const e = function (e, t) { + let i = t; + for (const n of t.getAncestors({ + parentFirst: !0 + })) { + if (n.childCount > 1 || e.isLimit(n)) + break; + i = n + } + return i + } + (n, t.start.parent); + i.deleteContent(i.createSelection(e, "on"), { + doNotAutoparagraph: !0 + }) + } else + i.change(i => { + i.setSelection(t), + e.execute(c ? "deleteForward" : "delete") + }) + } else + i.change(i => { + i.setSelection(t), + e.execute(c ? "deleteForward" : "delete") + }) + } + o.preventDefault(), + t.stop() + }, { + context: Fu + }) + } + _enableInsertContentIntegration() { + const e = this.editor, + t = this.editor.model, + i = t.document.selection; + this._listenToIfEnabled(e.model, "insertContent", (e, [n, o]) => { + if (o && !o.is("documentSelection")) + return; + const r = Xu(i); + return r ? (e.stop(), t.change(e => { + const o = i.getSelectedElement(), + s = t.createPositionAt(o, r), + a = e.createSelection(s), + c = t.insertContent(n, a); + return e.setSelection(a), + c + })) : void 0 + }, { + priority: "high" + }) + } + } + i(64); + function rh(e) { + const t = e.model; + return (i, n) => { + const o = n.keyCode == Io.arrowup, + r = n.keyCode == Io.arrowdown, + s = n.shiftKey, + a = t.document.selection; + if (!o && !r) + return; + const c = r; + if (s && function (e, t) { + return !e.isCollapsed && e.isBackward == t + } + (a, c)) + return; + const l = function (e, t, i) { + const n = e.model; + if (i) { + const e = t.isCollapsed ? t.focus : t.getLastPosition(), + i = sh(n, e, "forward"); + if (!i) + return null; + const o = n.createRange(e, i), + r = ah(n.schema, o, "backward"); + return r && e.isBefore(r) ? n.createRange(e, r) : null + } { + const e = t.isCollapsed ? t.focus : t.getFirstPosition(), + i = sh(n, e, "backward"); + if (!i) + return null; + const o = n.createRange(i, e), + r = ah(n.schema, o, "forward"); + return r && e.isAfter(r) ? n.createRange(r, e) : null + } + } + (e, a, c); + l && !l.isCollapsed && function (e, t, i) { + const n = e.model, + o = e.view.domConverter; + if (i) { + const e = n.createSelection(t.start); + n.modifySelection(e), + e.focus.isAtEnd || t.start.isEqual(e.focus) || (t = n.createRange(e.focus, t.end)) + } + const r = e.mapper.toViewRange(t), + s = o.viewRangeToDom(r), + a = Ts.getDomRangeRects(s); + let c; + for (const e of a) + if (void 0 !== c) { + if (Math.round(e.top) >= c) + return !1; + c = Math.max(c, Math.round(e.bottom)) + } else + c = Math.round(e.bottom); + return !0 + } + (e, l, c) && (t.change(e => { + const i = c ? l.end : l.start; + if (s) { + const n = t.createSelection(a.anchor); + n.setFocus(i), + e.setSelection(n) + } else + e.setSelection(i) + }), i.stop(), n.preventDefault(), n.stopPropagation()) + } + } + function sh(e, t, i) { + const n = e.schema, + o = e.createRangeIn(t.root), + r = "forward" == i ? "elementStart" : "elementEnd"; + for (const { + previousPosition: e, + item: s, + type: a + } + of o.getWalker({ + startPosition: t, + direction: i + })) { + if (n.isLimit(s) && !n.isInline(s)) + return e; + if (a == r && n.isBlock(s)) + return null + } + return null + } + function ah(e, t, i) { + const n = "backward" == i ? t.end : t.start; + if (e.checkChild(n, "$text")) + return n; + for (const { + nextPosition: n + } + of t.getWalker({ + direction: i + })) + if (e.checkChild(n, "$text")) + return n + } + class ch extends Qe { + static get pluginName() { + return "Widget" + } + static get requires() { + return [oh, Lu] + } + init() { + const e = this.editor.editing.view, + t = e.document; + this._previouslySelected = new Set, + this.editor.editing.downcastDispatcher.on("selection", (e, t, i) => { + this._clearPreviouslySelectedWidgets(i.writer); + const n = i.writer, + o = n.document.selection, + r = o.getSelectedElement(); + let s = null; + for (const e of o.getRanges()) + for (const t of e) { + const e = t.item; + Fu(e) && !lh(e, s) && (n.addClass("ck-widget_selected", e), this._previouslySelected.add(e), s = e, e == r && n.setSelection(o.getRanges(), { + fake: !0, + label: $u(r) + })) + } + }, { + priority: "low" + }), + e.addObserver(ku), + this.listenTo(t, "mousedown", (...e) => this._onMousedown(...e)), + this.listenTo(t, "arrowKey", (...e) => { + this._handleSelectionChangeOnArrowKeyPress(...e) + }, { + context: [Fu, "$text"] + }), + this.listenTo(t, "arrowKey", (...e) => { + this._preventDefaultOnArrowKeyPress(...e) + }, { + context: "$root" + }), + this.listenTo(t, "arrowKey", rh(this.editor.editing), { + context: "$text" + }), + this.listenTo(t, "delete", (e, t) => { + this._handleDelete("forward" == t.direction) && (t.preventDefault(), e.stop()) + }, { + context: "$root" + }) + } + _onMousedown(e, t) { + const i = this.editor, + n = i.editing.view, + o = n.document; + let r = t.target; + if (function (e) { + for (; e; ) { + if (e.is("editableElement") && !e.is("rootElement")) + return !0; + if (Fu(e)) + return !1; + e = e.parent + } + return !1 + } + (r)) { + if ((Po.isSafari || Po.isGecko) && t.domEvent.detail >= 3) { + const e = i.editing.mapper, + n = r.is("attributeElement") ? r.findAncestor(e => !e.is("attributeElement")) : r, + o = e.toModelElement(n); + t.preventDefault(), + this.editor.model.change(e => { + e.setSelection(o, "in") + }) + } + return + } + if (!Fu(r) && (r = r.findAncestor(Fu), !r)) + return; + Po.isAndroid && t.preventDefault(), + o.isFocused || n.focus(); + const s = i.editing.mapper.toModelElement(r); + this._setSelectionOverElement(s) + } + _handleSelectionChangeOnArrowKeyPress(e, t) { + const i = t.keyCode, + n = this.editor.model, + o = n.schema, + r = n.document.selection, + s = r.getSelectedElement(), + a = zo(i, this.editor.locale.contentLanguageDirection); + if (s && o.isObject(s)) { + const i = a ? r.getLastPosition() : r.getFirstPosition(), + s = o.getNearestSelectionRange(i, a ? "forward" : "backward"); + return void(s && (n.change(e => { + e.setSelection(s) + }), t.preventDefault(), e.stop())) + } + if (!r.isCollapsed) + return; + const c = this._getObjectElementNextToSelection(a); + c && o.isObject(c) && (this._setSelectionOverElement(c), t.preventDefault(), e.stop()) + } + _preventDefaultOnArrowKeyPress(e, t) { + const i = this.editor.model, + n = i.schema, + o = i.document.selection.getSelectedElement(); + o && n.isObject(o) && (t.preventDefault(), e.stop()) + } + _handleDelete(e) { + if (this.editor.isReadOnly) + return; + const t = this.editor.model.document.selection; + if (!t.isCollapsed) + return; + const i = this._getObjectElementNextToSelection(e); + return i ? (this.editor.model.change(e => { + let n = t.anchor.parent; + for (; n.isEmpty; ) { + const t = n; + n = t.parent, + e.remove(t) + } + this._setSelectionOverElement(i) + }), !0) : void 0 + } + _setSelectionOverElement(e) { + this.editor.model.change(t => { + t.setSelection(t.createRangeOn(e)) + }) + } + _getObjectElementNextToSelection(e) { + const t = this.editor.model, + i = t.schema, + n = t.document.selection, + o = t.createSelection(n); + t.modifySelection(o, { + direction: e ? "forward" : "backward" + }); + const r = e ? o.focus.nodeBefore : o.focus.nodeAfter; + return r && i.isObject(r) ? r : null + } + _clearPreviouslySelectedWidgets(e) { + for (const t of this._previouslySelected) + e.removeClass("ck-widget_selected", t); + this._previouslySelected.clear() + } + } + function lh(e, t) { + return !!t && Array.from(e.getAncestors()).includes(t) + } + var dh = function (e, t, i) { + var n = !0, + o = !0; + if ("function" != typeof e) + throw new TypeError("Expected a function"); + return w(i) && (n = "leading" in i ? !!i.leading : n, o = "trailing" in i ? !!i.trailing : o), + ms(e, t, { + leading: n, + maxWait: t, + trailing: o + }) + }; + i(66); + class uh extends Qe { + static get pluginName() { + return "DragDrop" + } + static get requires() { + return [Eu, ch] + } + init() { + const e = this.editor, + t = e.editing.view; + this._draggedRange = null, + this._draggingUid = "", + this._draggableElement = null, + this._updateDropMarkerThrottled = dh(e => this._updateDropMarker(e), 40), + this._removeDropMarkerDelayed = gh(() => this._removeDropMarker(), 40), + this._clearDraggableAttributesDelayed = gh(() => this._clearDraggableAttributes(), 40), + t.addObserver(Cu), + t.addObserver(ku), + this._setupDragging(), + this._setupContentInsertionIntegration(), + this._setupClipboardInputIntegration(), + this._setupDropMarker(), + this._setupDraggableAttributeHandling(), + this.listenTo(e, "change:isReadOnly", (e, t, i) => { + i ? this.forceDisabled("readOnlyMode") : this.clearForceDisabled("readOnlyMode") + }), + this.on("change:isEnabled", (e, t, i) => { + i || this._finalizeDragging(!1) + }), + Po.isAndroid && this.forceDisabled("noAndroidSupport") + } + destroy() { + return this._draggedRange && (this._draggedRange.detach(), this._draggedRange = null), + this._updateDropMarkerThrottled.cancel(), + this._removeDropMarkerDelayed.cancel(), + this._clearDraggableAttributesDelayed.cancel(), + super.destroy() + } + _setupDragging() { + const e = this.editor, + t = e.model, + i = t.document, + n = e.editing.view, + o = n.document; + this.listenTo(o, "dragstart", (n, r) => { + const a = i.selection; + if (r.target && r.target.is("editableElement")) + return void r.preventDefault(); + const c = r.target ? mh(r.target) : null; + if (c) { + const i = e.editing.mapper.toModelElement(c); + this._draggedRange = ba.fromRange(t.createRangeOn(i)) + } else if (!o.selection.isCollapsed) { + const e = o.selection.getSelectedElement(); + e && Fu(e) || (this._draggedRange = ba.fromRange(a.getFirstRange())) + } + if (!this._draggedRange) + return void r.preventDefault(); + this._draggingUid = s(), + r.dataTransfer.effectAllowed = this.isEnabled ? "copyMove" : "copy", + r.dataTransfer.setData("application/ckeditor5-dragging-uid", this._draggingUid); + const l = t.createSelection(this._draggedRange.toRange()), + d = e.data.toView(t.getSelectedContent(l)); + o.fire("clipboardOutput", { + dataTransfer: r.dataTransfer, + content: d, + method: n.name + }), + this.isEnabled || (this._draggedRange.detach(), this._draggedRange = null, this._draggingUid = "") + }, { + priority: "low" + }), + this.listenTo(o, "dragend", (e, t) => { + this._finalizeDragging(!t.dataTransfer.isCanceled && "move" == t.dataTransfer.dropEffect) + }, { + priority: "low" + }), + this.listenTo(o, "dragenter", () => { + this.isEnabled && n.focus() + }), + this.listenTo(o, "dragleave", () => { + this._removeDropMarkerDelayed() + }), + this.listenTo(o, "dragging", (t, i) => { + if (!this.isEnabled) + return void(i.dataTransfer.dropEffect = "none"); + this._removeDropMarkerDelayed.cancel(); + const n = hh(e, i.targetRanges, i.target); + this._draggedRange || (i.dataTransfer.dropEffect = "copy"), + Po.isGecko || ("copy" == i.dataTransfer.effectAllowed ? i.dataTransfer.dropEffect = "copy" : ["all", "copyMove"].includes(i.dataTransfer.effectAllowed) && (i.dataTransfer.dropEffect = "move")), + n && this._updateDropMarkerThrottled(n) + }, { + priority: "low" + }) + } + _setupClipboardInputIntegration() { + const e = this.editor, + t = e.editing.view.document; + this.listenTo(t, "clipboardInput", (t, i) => { + if ("drop" != i.method) + return; + const n = hh(e, i.targetRanges, i.target); + if (this._removeDropMarker(), !n) + return this._finalizeDragging(!1), void t.stop(); + this._draggedRange && this._draggingUid != i.dataTransfer.getData("application/ckeditor5-dragging-uid") && (this._draggedRange.detach(), this._draggedRange = null, this._draggingUid = ""); + if ("move" == fh(i.dataTransfer) && this._draggedRange && this._draggedRange.containsRange(n, !0)) + return this._finalizeDragging(!1), void t.stop(); + i.targetRanges = [e.editing.mapper.toViewRange(n)] + }, { + priority: "high" + }) + } + _setupContentInsertionIntegration() { + const e = this.editor.plugins.get(Eu); + e.on("contentInsertion", (e, t) => { + if (!this.isEnabled || "drop" !== t.method) + return; + const i = t.targetRanges.map(e => this.editor.editing.mapper.toModelRange(e)); + this.editor.model.change(e => e.setSelection(i)) + }, { + priority: "high" + }), + e.on("contentInsertion", (e, t) => { + if (!this.isEnabled || "drop" !== t.method) + return; + const i = "move" == fh(t.dataTransfer), + n = !t.resultRange || !t.resultRange.isCollapsed; + this._finalizeDragging(n && i) + }, { + priority: "lowest" + }) + } + _setupDraggableAttributeHandling() { + const e = this.editor, + t = e.editing.view, + i = t.document; + this.listenTo(i, "mousedown", (n, o) => { + if (Po.isAndroid || !o) + return; + this._clearDraggableAttributesDelayed.cancel(); + let r = mh(o.target); + if (Po.isBlink && !e.isReadOnly && !r && !i.selection.isCollapsed) { + const e = i.selection.getSelectedElement(); + e && Fu(e) || (r = i.selection.editableElement) + } + r && (t.change(e => { + e.setAttribute("draggable", "true", r) + }), this._draggableElement = e.editing.mapper.toModelElement(r)) + }), + this.listenTo(i, "mouseup", () => { + Po.isAndroid || this._clearDraggableAttributesDelayed() + }) + } + _clearDraggableAttributes() { + const e = this.editor.editing; + e.view.change(t => { + this._draggableElement && "$graveyard" != this._draggableElement.root.rootName && t.removeAttribute("draggable", e.mapper.toViewElement(this._draggableElement)), + this._draggableElement = null + }) + } + _setupDropMarker() { + const e = this.editor; + e.conversion.for("editingDowncast").markerToHighlight({ + model: "drop-target", + view: { + classes: ["ck-clipboard-drop-target-range"] + } + }), + e.conversion.for("editingDowncast").markerToElement({ + model: "drop-target", + view: (t, { + writer: i + }) => { + if (e.model.schema.checkChild(t.markerRange.start, "$text")) + return i.createUIElement("span", { + class: "ck ck-clipboard-drop-target-position" + }, (function (e) { + const t = this.toDomElement(e); + return t.innerHTML = "⁠⁠", + t + })) + } + }) + } + _updateDropMarker(e) { + const t = this.editor, + i = t.model.markers; + t.model.change(t => { + i.has("drop-target") ? i.get("drop-target").getRange().isEqual(e) || t.updateMarker("drop-target", { + range: e + }) : t.addMarker("drop-target", { + range: e, + usingOperation: !1, + affectsData: !1 + }) + }) + } + _removeDropMarker() { + const e = this.editor.model; + this._removeDropMarkerDelayed.cancel(), + this._updateDropMarkerThrottled.cancel(), + e.markers.has("drop-target") && e.change(e => { + e.removeMarker("drop-target") + }) + } + _finalizeDragging(e) { + const t = this.editor.model; + this._removeDropMarker(), + this._clearDraggableAttributes(), + this._draggingUid = "", + this._draggedRange && (e && this.isEnabled && t.deleteContent(t.createSelection(this._draggedRange), { + doNotAutoparagraph: !0 + }), this._draggedRange.detach(), this._draggedRange = null) + } + } + function hh(e, t, i) { + const n = e.model, + o = e.editing.mapper; + let r = null; + const s = t ? t[0].start : null; + if (i.is("uiElement") && (i = i.parent), r = function (e, t) { + const i = e.model, + n = e.editing.mapper; + if (Fu(t)) + return i.createRangeOn(n.toModelElement(t)); + if (!t.is("editableElement")) { + const e = t.findAncestor(e => Fu(e) || e.is("editableElement")); + if (Fu(e)) + return i.createRangeOn(n.toModelElement(e)) + } + return null + } + (e, i), r)return r; + const a = function (e, t) { + const i = e.editing.mapper, + n = e.editing.view, + o = i.toModelElement(t); + if (o) + return o; + const r = n.createPositionBefore(t), + s = i.findMappedViewAncestor(r); + return i.toModelElement(s) + } + (e, i), + c = s ? o.toModelPosition(s) : null; + return c ? (r = function (e, t, i) { + const n = e.model; + if (!n.schema.checkChild(i, "$block")) + return null; + const o = n.createPositionAt(i, 0), + r = t.path.slice(0, o.path.length), + s = n.createPositionFromPath(t.root, r).nodeAfter; + if (s && n.schema.isObject(s)) + return n.createRangeOn(s); + return null + } + (e, c, a), r || (r = n.schema.getNearestSelectionRange(c, Po.isGecko ? "forward" : "backward"), r || function (e, t) { + const i = e.model; + for (; t; ) { + if (i.schema.isObject(t)) + return i.createRangeOn(t); + t = t.parent + } + } + (e, c.parent))) : function (e, t) { + const i = e.model, + n = i.schema, + o = i.createPositionAt(t, 0); + return n.getNearestSelectionRange(o, "forward") + } + (e, a) + } + function fh(e) { + return Po.isGecko ? e.dropEffect : ["all", "copyMove"].includes(e.effectAllowed) ? "move" : "copy" + } + function gh(e, t) { + let i; + function n(...o) { + n.cancel(), + i = setTimeout(() => e(...o), t) + } + return n.cancel = () => { + clearTimeout(i) + }, + n + } + function mh(e) { + if (e.is("editableElement")) + return null; + if (e.hasClass("ck-widget__selection-handle")) + return e.findAncestor(Fu); + if (Fu(e)) + return e; + const t = e.findAncestor(e => Fu(e) || e.is("editableElement")); + return Fu(t) ? t : null + } + class ph extends Qe { + static get pluginName() { + return "PastePlainText" + } + static get requires() { + return [Eu] + } + init() { + const e = this.editor, + t = e.model, + i = e.editing.view, + n = i.document, + o = t.document.selection; + let r = !1; + i.addObserver(Cu), + this.listenTo(n, "keydown", (e, t) => { + r = t.shiftKey + }), + e.plugins.get(Eu).on("contentInsertion", (e, i) => { + (r || function (e, t) { + if (e.childCount > 1) + return !1; + const i = e.getChild(0); + if (t.isObject(i)) + return !1; + return 0 == [...i.getAttributeKeys()].length + } + (i.content, t.schema)) && t.change(e => { + const n = Array.from(o.getAttributes()).filter(([e]) => t.schema.getAttributeProperties(e).isFormatting); + o.isCollapsed || t.deleteContent(o, { + doNotAutoparagraph: !0 + }), + n.push(...o.getAttributes()); + const r = e.createRangeIn(i.content); + for (const t of r.getItems()) + t.is("$textProxy") && e.setAttributes(n, t) + }) + }) + } + } + class bh extends Qe { + static get pluginName() { + return "Clipboard" + } + static get requires() { + return [Eu, uh, ph] + } + } + class wh extends Ze { + execute() { + const e = this.editor.model, + t = e.document; + e.change(i => { + !function (e, t, i) { + const n = i.isCollapsed, + o = i.getFirstRange(), + r = o.start.parent, + s = o.end.parent, + a = r == s; + if (n) { + const n = Pu(e.schema, i.getAttributes()); + kh(e, t, o.end), + t.removeSelectionAttribute(i.getAttributeKeys()), + t.setSelectionAttribute(n) + } else { + const n = !(o.start.isAtStart && o.end.isAtEnd); + e.deleteContent(i, { + leaveUnmerged: n + }), + a ? kh(e, t, i.focus) : n && t.setSelection(s, 0) + } + } + (e, i, t.selection), + this.fire("afterExecute", { + writer: i + }) + }) + } + refresh() { + const e = this.editor.model, + t = e.document; + this.isEnabled = function (e, t) { + if (t.rangeCount > 1) + return !1; + const i = t.anchor; + if (!i || !e.checkChild(i, "softBreak")) + return !1; + const n = t.getFirstRange(), + o = n.start.parent, + r = n.end.parent; + if ((_h(o, e) || _h(r, e)) && o !== r) + return !1; + return !0 + } + (e.schema, t.selection) + } + } + function kh(e, t, i) { + const n = t.createElement("softBreak"); + e.insertContent(n, i), + t.setSelection(n, "after") + } + function _h(e, t) { + return !e.is("rootElement") && (t.isLimit(e) || _h(e.parent, t)) + } + class vh extends Qe { + static get pluginName() { + return "ShiftEnter" + } + init() { + const e = this.editor, + t = e.model.schema, + i = e.conversion, + n = e.editing.view, + o = n.document; + t.register("softBreak", { + allowWhere: "$text", + isInline: !0 + }), + i.for("upcast").elementToElement({ + model: "softBreak", + view: "br" + }), + i.for("downcast").elementToElement({ + model: "softBreak", + view: (e, { + writer: t + }) => t.createEmptyElement("br") + }), + n.addObserver(Iu), + e.commands.add("shiftEnter", new wh(e)), + this.listenTo(o, "enter", (t, i) => { + i.preventDefault(), + i.isSoft && (e.execute("shiftEnter"), n.scrollToTheSelection()) + }, { + priority: "low" + }) + } + } + class yh extends Ze { + execute() { + const e = this.editor.model, + t = e.document.selection; + let i = e.schema.getLimitElement(t); + if (t.containsEntireContent(i) || !xh(e.schema, i)) + do { + if (i = i.parent, !i) + return + } while (!xh(e.schema, i)); + e.change(e => { + e.setSelection(i, "in") + }) + } + } + function xh(e, t) { + return e.isLimit(t) && (e.checkChild(t, "$text") || e.checkChild(t, "paragraph")) + } + const Ah = Oo("Ctrl+A"); + class Ch extends Qe { + static get pluginName() { + return "SelectAllEditing" + } + init() { + const e = this.editor, + t = e.editing.view.document; + e.commands.add("selectAll", new yh(e)), + this.listenTo(t, "keydown", (t, i) => { + Ro(i) === Ah && (e.execute("selectAll"), i.preventDefault()) + }) + } + } + class Th extends Qe { + static get pluginName() { + return "SelectAllUI" + } + init() { + const e = this.editor; + e.ui.componentFactory.add("selectAll", t => { + const i = e.commands.get("selectAll"), + n = new cd(t), + o = t.t; + return n.set({ + label: o("Select all"), + icon: '', + keystroke: "Ctrl+A", + tooltip: !0 + }), + n.bind("isOn", "isEnabled").to(i, "value", "isEnabled"), + this.listenTo(n, "execute", () => { + e.execute("selectAll"), + e.editing.view.focus() + }), + n + }) + } + } + class Eh extends Qe { + static get requires() { + return [Ch, Th] + } + static get pluginName() { + return "SelectAll" + } + } + class Ph extends Ze { + constructor(e, t) { + super(e), + this._buffer = new Ru(e.model, t), + this._batches = new WeakSet + } + get buffer() { + return this._buffer + } + destroy() { + super.destroy(), + this._buffer.destroy() + } + execute(e = {}) { + const t = this.editor.model, + i = t.document, + n = e.text || "", + o = n.length, + r = e.range ? t.createSelection(e.range) : i.selection, + s = e.resultRange; + t.enqueueChange(this._buffer.batch, e => { + this._buffer.lock(), + this._batches.add(this._buffer.batch), + t.deleteContent(r), + n && t.insertContent(e.createText(n, i.selection.getAttributes()), r), + s ? e.setSelection(s) : r.is("documentSelection") || e.setSelection(r), + this._buffer.unlock(), + this._buffer.input(o) + }) + } + } + function Sh(e) { + if (e.newChildren.length - e.oldChildren.length != 1) + return; + const t = function (e, t) { + const i = []; + let n, + o = 0; + return e.forEach(e => { + "equal" == e ? (r(), o++) : "insert" == e ? (s("insert") ? n.values.push(t[o]) : (r(), n = { + type: "insert", + index: o, + values: [t[o]] + }), o++) : s("delete") ? n.howMany++ : (r(), n = { + type: "delete", + index: o, + howMany: 1 + }) + }), + r(), + i; + function r() { + n && (i.push(n), n = null) + } + function s(e) { + return n && n.type == e + } + } + (hr(e.oldChildren, e.newChildren, Mh), e.newChildren); + if (t.length > 1) + return; + const i = t[0]; + return i.values[0] && i.values[0].is("$text") ? i : void 0 + } + function Mh(e, t) { + return e && e.is("$text") && t && t.is("$text") ? e.data === t.data : e === t + } + class Ih { + constructor(e) { + this.editor = e, + this.editing = this.editor.editing + } + handle(e, t) { + if (function (e) { + if (0 == e.length) + return !1; + for (const t of e) + if ("children" === t.type && !Sh(t)) + return !0; + return !1 + } + (e)) + this._handleContainerChildrenMutations(e, t); + else + for (const i of e) + this._handleTextMutation(i, t), this._handleTextNodeInsertion(i) + } + _handleContainerChildrenMutations(e, t) { + const i = function (e) { + const t = e.map(e => e.node).reduce((e, t) => e.getCommonAncestor(t, { + includeSelf: !0 + })); + if (!t) + return; + return t.getAncestors({ + includeSelf: !0, + parentFirst: !0 + }).find(e => e.is("containerElement") || e.is("rootElement")) + } + (e); + if (!i) + return; + const n = this.editor.editing.view.domConverter.mapViewToDom(i), + o = new Tr(this.editor.editing.view.document), + r = this.editor.data.toModel(o.domToView(n)).getChild(0), + s = this.editor.editing.mapper.toModelElement(i); + if (!s) + return; + const a = Array.from(r.getChildren()), + c = Array.from(s.getChildren()), + l = a[a.length - 1], + d = c[c.length - 1], + u = l && l.is("element", "softBreak"), + h = d && !d.is("element", "softBreak"); + u && h && a.pop(); + const f = this.editor.model.schema; + if (!Nh(a, f) || !Nh(c, f)) + return; + const g = a.map(e => e.is("$text") ? e.data : "@").join("").replace(/\u00A0/g, " "), + m = c.map(e => e.is("$text") ? e.data : "@").join("").replace(/\u00A0/g, " "); + if (m === g) + return; + const p = hr(m, g), { + firstChangeAt: b, + insertions: w, + deletions: k + } = Rh(p); + let _ = null; + t && (_ = this.editing.mapper.toModelRange(t.getFirstRange())); + const v = g.substr(b, w), + y = this.editor.model.createRange(this.editor.model.createPositionAt(s, b), this.editor.model.createPositionAt(s, b + k)); + this.editor.execute("input", { + text: v, + range: y, + resultRange: _ + }) + } + _handleTextMutation(e, t) { + if ("text" != e.type) + return; + const i = e.newText.replace(/\u00A0/g, " "), + n = e.oldText.replace(/\u00A0/g, " "); + if (n === i) + return; + const o = hr(n, i), { + firstChangeAt: r, + insertions: s, + deletions: a + } = Rh(o); + let c = null; + t && (c = this.editing.mapper.toModelRange(t.getFirstRange())); + const l = this.editing.view.createPositionAt(e.node, r), + d = this.editing.mapper.toModelPosition(l), + u = this.editor.model.createRange(d, d.getShiftedBy(a)), + h = i.substr(r, s); + this.editor.execute("input", { + text: h, + range: u, + resultRange: c + }) + } + _handleTextNodeInsertion(e) { + if ("children" != e.type) + return; + const t = Sh(e), + i = this.editing.view.createPositionAt(e.node, t.index), + n = this.editing.mapper.toModelPosition(i), + o = t.values[0].data; + this.editor.execute("input", { + text: o.replace(/\u00A0/g, " "), + range: this.editor.model.createRange(n) + }) + } + } + function Nh(e, t) { + return e.every(e => t.isInline(e)) + } + function Rh(e) { + let t = null, + i = null; + for (let n = 0; n < e.length; n++) { + "equal" != e[n] && (t = null === t ? n : t, i = n) + } + let n = 0, + o = 0; + for (let r = t; r <= i; r++) + "insert" != e[r] && n++, "delete" != e[r] && o++; + return { + insertions: o, + deletions: n, + firstChangeAt: t + } + } + class Oh extends Qe { + static get pluginName() { + return "Input" + } + init() { + const e = this.editor, + t = new Ph(e, e.config.get("typing.undoStep") || 20); + e.commands.add("input", t), + function (e) { + let t = null; + const i = e.model, + n = e.editing.view, + o = e.commands.get("input"); + function r(e) { + const r = i.document, + a = n.document.isComposing, + c = t && t.isEqual(r.selection); + t = null, + o.isEnabled && (th(e) || r.selection.isCollapsed || a && 229 === e.keyCode || !a && 229 === e.keyCode && c || s()) + } + function s() { + const e = o.buffer; + e.lock(); + const t = e.batch; + o._batches.add(t), + i.enqueueChange(t, () => { + i.deleteContent(i.document.selection) + }), + e.unlock() + } + Po.isAndroid ? n.document.on("beforeinput", (e, t) => r(t), { + priority: "lowest" + }) : n.document.on("keydown", (e, t) => r(t), { + priority: "lowest" + }), + n.document.on("compositionstart", (function () { + const e = i.document, + t = 1 !== e.selection.rangeCount || e.selection.getFirstRange().isFlat; + if (e.selection.isCollapsed || t) + return; + s() + }), { + priority: "lowest" + }), + n.document.on("compositionend", () => { + t = i.createSelection(i.document.selection) + }, { + priority: "lowest" + }) + } + (e), + function (e) { + e.editing.view.document.on("mutations", (t, i, n) => { + new Ih(e).handle(i, n) + }) + } + (e) + } + isInput(e) { + return this.editor.commands.get("input")._batches.has(e) + } + } + class Dh extends Qe { + static get requires() { + return [Oh, Lu] + } + static get pluginName() { + return "Typing" + } + } + function Lh(e, t) { + let i = e.start; + return { + text: Array.from(e.getItems()).reduce((e, n) => n.is("$text") || n.is("$textProxy") ? e + n.data : (i = t.createPositionAfter(n), ""), ""), + range: t.createRange(i, e.end) + } + } + class zh { + constructor(e, t) { + this.model = e, + this.testCallback = t, + this.hasMatch = !1, + this.set("isEnabled", !0), + this.on("change:isEnabled", () => { + this.isEnabled ? this._startListening() : (this.stopListening(e.document.selection), this.stopListening(e.document)) + }), + this._startListening() + } + _startListening() { + const e = this.model.document; + this.listenTo(e.selection, "change:range", (t, { + directChange: i + }) => { + i && (e.selection.isCollapsed ? this._evaluateTextBeforeSelection("selection") : this.hasMatch && (this.fire("unmatched"), this.hasMatch = !1)) + }), + this.listenTo(e, "change:data", (e, t) => { + "transparent" != t.type && this._evaluateTextBeforeSelection("data", { + batch: t + }) + }) + } + _evaluateTextBeforeSelection(e, t = {}) { + const i = this.model, + n = i.document.selection, + o = i.createRange(i.createPositionAt(n.focus.parent, 0), n.focus), { + text: r, + range: s + } = Lh(o, i), + a = this.testCallback(r); + if (!a && this.hasMatch && this.fire("unmatched"), this.hasMatch = !!a, a) { + const i = Object.assign(t, { + text: r, + range: s + }); + "object" == typeof a && Object.assign(i, a), + this.fire("matched:" + e, i) + } + } + } + Ke(zh, Ue); + class Vh extends Qe { + static get pluginName() { + return "TwoStepCaretMovement" + } + constructor(e) { + super(e), + this.attributes = new Set, + this._overrideUid = null + } + init() { + const e = this.editor, + t = e.model, + i = e.editing.view, + n = e.locale, + o = t.document.selection; + this.listenTo(i.document, "arrowKey", (e, t) => { + if (!o.isCollapsed) + return; + if (t.shiftKey || t.altKey || t.ctrlKey) + return; + const i = t.keyCode == Io.arrowright, + r = t.keyCode == Io.arrowleft; + if (!i && !r) + return; + const s = n.contentLanguageDirection; + let a = !1; + a = "ltr" === s && i || "rtl" === s && r ? this._handleForwardMovement(t) : this._handleBackwardMovement(t), + !0 === a && e.stop() + }, { + context: "$text", + priority: "highest" + }), + this._isNextGravityRestorationSkipped = !1, + this.listenTo(o, "change:range", (e, t) => { + this._isNextGravityRestorationSkipped ? this._isNextGravityRestorationSkipped = !1 : this._isGravityOverridden && (!t.directChange && Hh(o.getFirstPosition(), this.attributes) || this._restoreGravity()) + }) + } + registerAttribute(e) { + this.attributes.add(e) + } + _handleForwardMovement(e) { + const t = this.attributes, + i = this.editor.model.document.selection, + n = i.getFirstPosition(); + return !this._isGravityOverridden && ((!n.isAtStart || !jh(i, t)) && (Hh(n, t) ? (Fh(e), this._overrideGravity(), !0) : void 0)) + } + _handleBackwardMovement(e) { + const t = this.attributes, + i = this.editor.model, + n = i.document.selection, + o = n.getFirstPosition(); + return this._isGravityOverridden ? (Fh(e), this._restoreGravity(), Bh(i, t, o), !0) : o.isAtStart ? !!jh(n, t) && (Fh(e), Bh(i, t, o), !0) : function (e, t) { + return Hh(e.getShiftedBy(-1), t) + } + (o, t) ? o.isAtEnd && !jh(n, t) && Hh(o, t) ? (Fh(e), Bh(i, t, o), !0) : (this._isNextGravityRestorationSkipped = !0, this._overrideGravity(), !1) : void 0 + } + get _isGravityOverridden() { + return !!this._overrideUid + } + _overrideGravity() { + this._overrideUid = this.editor.model.change(e => e.overrideSelectionGravity()) + } + _restoreGravity() { + this.editor.model.change(e => { + e.restoreSelectionGravity(this._overrideUid), + this._overrideUid = null + }) + } + } + function jh(e, t) { + for (const i of t) + if (e.hasAttribute(i)) + return !0; + return !1 + } + function Bh(e, t, i) { + const n = i.nodeBefore; + e.change(e => { + n ? e.setSelectionAttribute(n.getAttributes()) : e.removeSelectionAttribute(t) + }) + } + function Fh(e) { + e.preventDefault() + } + function Hh(e, t) { + const { + nodeBefore: i, + nodeAfter: n + } = e; + for (const e of t) { + const t = i ? i.getAttribute(e) : void 0; + if ((n ? n.getAttribute(e) : void 0) !== t) + return !0 + } + return !1 + } + var Uh = /[\\^$.*+?()[\]{}|]/g, + Wh = RegExp(Uh.source); + var qh = function (e) { + return (e = Sn(e)) && Wh.test(e) ? e.replace(Uh, "\\$&") : e + }; + const $h = { + copyright: { + from: "(c)", + to: "©" + }, + registeredTrademark: { + from: "(r)", + to: "®" + }, + trademark: { + from: "(tm)", + to: "™" + }, + oneHalf: { + from: "1/2", + to: "½" + }, + oneThird: { + from: "1/3", + to: "⅓" + }, + twoThirds: { + from: "2/3", + to: "⅔" + }, + oneForth: { + from: "1/4", + to: "¼" + }, + threeQuarters: { + from: "3/4", + to: "¾" + }, + lessThanOrEqual: { + from: "<=", + to: "≤" + }, + greaterThanOrEqual: { + from: ">=", + to: "≥" + }, + notEqual: { + from: "!=", + to: "≠" + }, + arrowLeft: { + from: "<-", + to: "←" + }, + arrowRight: { + from: "->", + to: "→" + }, + horizontalEllipsis: { + from: "...", + to: "…" + }, + enDash: { + from: /(^| )(--)( )$/, + to: [null, "–", null] + }, + emDash: { + from: /(^| )(---)( )$/, + to: [null, "—", null] + }, + quotesPrimary: { + from: Zh('"'), + to: [null, "“", null, "”"] + }, + quotesSecondary: { + from: Zh("'"), + to: [null, "‘", null, "’"] + }, + quotesPrimaryEnGb: { + from: Zh("'"), + to: [null, "‘", null, "’"] + }, + quotesSecondaryEnGb: { + from: Zh('"'), + to: [null, "“", null, "”"] + }, + quotesPrimaryPl: { + from: Zh('"'), + to: [null, "„", null, "”"] + }, + quotesSecondaryPl: { + from: Zh("'"), + to: [null, "‚", null, "’"] + } + }, + Yh = { + symbols: ["copyright", "registeredTrademark", "trademark"], + mathematical: ["oneHalf", "oneThird", "twoThirds", "oneForth", "threeQuarters", "lessThanOrEqual", "greaterThanOrEqual", "notEqual", "arrowLeft", "arrowRight"], + typography: ["horizontalEllipsis", "enDash", "emDash"], + quotes: ["quotesPrimary", "quotesSecondary"] + }, + Gh = ["symbols", "mathematical", "typography", "quotes"]; + function Kh(e) { + return "string" == typeof e ? new RegExp(`(${qh(e)})$`) : e + } + function Qh(e) { + return "string" == typeof e ? () => [e] : e instanceof Array ? () => e : e + } + function Jh(e) { + return (e.textNode ? e.textNode : e.nodeAfter).getAttributes() + } + function Zh(e) { + return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`) + } + function Xh(e, t, i, n) { + return n.createRange(ef(e, t, i, !0, n), ef(e, t, i, !1, n)) + } + function ef(e, t, i, n, o) { + let r = e.textNode || (n ? e.nodeBefore : e.nodeAfter), + s = null; + for (; r && r.getAttribute(t) == i; ) + s = r, r = n ? r.previousSibling : r.nextSibling; + return s ? o.createPositionAt(s, n ? "before" : "after") : e + } + class tf extends Ze { + constructor(e) { + super(e), + this._stack = [], + this._createdBatches = new WeakSet, + this.refresh(), + this.listenTo(e.data, "set", () => this.clearStack()) + } + refresh() { + this.isEnabled = this._stack.length > 0 + } + addBatch(e) { + const t = this.editor.model.document.selection, + i = { + ranges: t.hasOwnRange ? Array.from(t.getRanges()) : [], + isBackward: t.isBackward + }; + this._stack.push({ + batch: e, + selection: i + }), + this.refresh() + } + clearStack() { + this._stack = [], + this.refresh() + } + _restoreSelection(e, t, i) { + const n = this.editor.model, + o = n.document, + r = [], + s = e.map(e => e.getTransformedByOperations(i)), + a = s.flat(); + for (const e of s) { + const t = e.filter(e => e.root != o.graveyard).filter(e => !of(e, a)); + t.length && (nf(t), r.push(t[0])) + } + r.length && n.change(e => { + e.setSelection(r, { + backward: t + }) + }) + } + _undo(e, t) { + const i = this.editor.model, + n = i.document; + this._createdBatches.add(t); + const o = e.operations.slice().filter(e => e.isDocumentOperation); + o.reverse(); + for (const e of o) { + const o = e.baseVersion + 1, + r = Array.from(n.history.getOperations(o)), + s = uu([e.getReversed()], r, { + useRelations: !0, + document: this.editor.model.document, + padWithNoOps: !1, + forceWeakRemove: !0 + }).operationsA; + for (const o of s) + t.addOperation(o), i.applyOperation(o), n.history.setOperationAsUndone(e, o) + } + } + } + function nf(e) { + e.sort((e, t) => e.start.isBefore(t.start) ? -1 : 1); + for (let t = 1; t < e.length; t++) { + const i = e[t - 1].getJoined(e[t], !0); + i && (t--, e.splice(t, 2, i)) + } + } + function of(e, t) { + return t.some(t => t !== e && t.containsRange(e, !0)) + } + class rf extends tf { + execute(e = null) { + const t = e ? this._stack.findIndex(t => t.batch == e) : this._stack.length - 1, + i = this._stack.splice(t, 1)[0], + n = this.editor.model.createBatch("transparent"); + this.editor.model.enqueueChange(n, () => { + this._undo(i.batch, n); + const e = this.editor.model.document.history.getOperations(i.batch.baseVersion); + this._restoreSelection(i.selection.ranges, i.selection.isBackward, e), + this.fire("revert", i.batch, n) + }), + this.refresh() + } + } + class sf extends tf { + execute() { + const e = this._stack.pop(), + t = this.editor.model.createBatch("transparent"); + this.editor.model.enqueueChange(t, () => { + const i = e.batch.operations[e.batch.operations.length - 1].baseVersion + 1, + n = this.editor.model.document.history.getOperations(i); + this._restoreSelection(e.selection.ranges, e.selection.isBackward, n), + this._undo(e.batch, t) + }), + this.refresh() + } + } + class af extends Qe { + static get pluginName() { + return "UndoEditing" + } + constructor(e) { + super(e), + this._batchRegistry = new WeakSet + } + init() { + const e = this.editor; + this._undoCommand = new rf(e), + this._redoCommand = new sf(e), + e.commands.add("undo", this._undoCommand), + e.commands.add("redo", this._redoCommand), + this.listenTo(e.model, "applyOperation", (e, t) => { + const i = t[0]; + if (!i.isDocumentOperation) + return; + const n = i.batch, + o = this._redoCommand._createdBatches.has(n), + r = this._undoCommand._createdBatches.has(n); + this._batchRegistry.has(n) || "transparent" == n.type && !o && !r || (o ? this._undoCommand.addBatch(n) : r || (this._undoCommand.addBatch(n), this._redoCommand.clearStack()), this._batchRegistry.add(n)) + }, { + priority: "highest" + }), + this.listenTo(this._undoCommand, "revert", (e, t, i) => { + this._redoCommand.addBatch(i) + }), + e.keystrokes.set("CTRL+Z", "undo"), + e.keystrokes.set("CTRL+Y", "redo"), + e.keystrokes.set("CTRL+SHIFT+Z", "redo") + } + } + var cf = '', + lf = ''; + class df extends Qe { + static get pluginName() { + return "UndoUI" + } + init() { + const e = this.editor, + t = e.locale, + i = e.t, + n = "ltr" == t.uiLanguageDirection ? cf : lf, + o = "ltr" == t.uiLanguageDirection ? lf : cf; + this._addButton("undo", i("Undo"), "CTRL+Z", n), + this._addButton("redo", i("Redo"), "CTRL+Y", o) + } + _addButton(e, t, i, n) { + const o = this.editor; + o.ui.componentFactory.add(e, r => { + const s = o.commands.get(e), + a = new cd(r); + return a.set({ + label: t, + icon: n, + keystroke: i, + tooltip: !0 + }), + a.bind("isEnabled").to(s, "isEnabled"), + this.listenTo(a, "execute", () => { + o.execute(e), + o.editing.view.focus() + }), + a + }) + } + } + class uf extends Qe { + static get requires() { + return [af, df] + } + static get pluginName() { + return "Undo" + } + } + class hf { + constructor() { + const e = new window.FileReader; + this._reader = e, + this._data = void 0, + this.set("loaded", 0), + e.onprogress = e => { + this.loaded = e.loaded + } + } + get error() { + return this._reader.error + } + get data() { + return this._data + } + read(e) { + const t = this._reader; + return this.total = e.size, + new Promise((i, n) => { + t.onload = () => { + const e = t.result; + this._data = e, + i(e) + }, + t.onerror = () => { + n("error") + }, + t.onabort = () => { + n("aborted") + }, + this._reader.readAsDataURL(e) + }) + } + abort() { + this._reader.abort() + } + } + Ke(hf, Ue); + class ff extends Qe { + static get pluginName() { + return "FileRepository" + } + static get requires() { + return [xl] + } + init() { + this.loaders = new Zi, + this.loaders.on("add", () => this._updatePendingAction()), + this.loaders.on("remove", () => this._updatePendingAction()), + this._loadersMap = new Map, + this._pendingAction = null, + this.set("uploaded", 0), + this.set("uploadTotal", null), + this.bind("uploadedPercent").to(this, "uploaded", this, "uploadTotal", (e, t) => t ? e / t * 100 : 0) + } + getLoader(e) { + return this._loadersMap.get(e) || null + } + createLoader(e) { + if (!this.createUploadAdapter) + return Object(c.b)("filerepository-no-upload-adapter"), null; + const t = new gf(Promise.resolve(e), this.createUploadAdapter); + return this.loaders.add(t), + this._loadersMap.set(e, t), + e instanceof Promise && t.file.then(e => { + this._loadersMap.set(e, t) + }).catch(() => {}), + t.on("change:uploaded", () => { + let e = 0; + for (const t of this.loaders) + e += t.uploaded; + this.uploaded = e + }), + t.on("change:uploadTotal", () => { + let e = 0; + for (const t of this.loaders) + t.uploadTotal && (e += t.uploadTotal); + this.uploadTotal = e + }), + t + } + destroyLoader(e) { + const t = e instanceof gf ? e : this.getLoader(e); + t._destroy(), + this.loaders.remove(t), + this._loadersMap.forEach((e, i) => { + e === t && this._loadersMap.delete(i) + }) + } + _updatePendingAction() { + const e = this.editor.plugins.get(xl); + if (this.loaders.length) { + if (!this._pendingAction) { + const t = this.editor.t, + i = e => `${t("Upload in progress")} ${parseInt(e)}%.`; + this._pendingAction = e.add(i(this.uploadedPercent)), + this._pendingAction.bind("message").to(this, "uploadedPercent", i) + } + } else + e.remove(this._pendingAction), this._pendingAction = null + } + } + Ke(ff, Ue); + class gf { + constructor(e, t) { + this.id = s(), + this._filePromiseWrapper = this._createFilePromiseWrapper(e), + this._adapter = t(this), + this._reader = new hf, + this.set("status", "idle"), + this.set("uploaded", 0), + this.set("uploadTotal", null), + this.bind("uploadedPercent").to(this, "uploaded", this, "uploadTotal", (e, t) => t ? e / t * 100 : 0), + this.set("uploadResponse", null) + } + get file() { + return this._filePromiseWrapper ? this._filePromiseWrapper.promise.then(e => this._filePromiseWrapper ? e : null) : Promise.resolve(null) + } + get data() { + return this._reader.data + } + read() { + if ("idle" != this.status) + throw new c.a("filerepository-read-wrong-status", this); + return this.status = "reading", + this.file.then(e => this._reader.read(e)).then(e => { + if ("reading" !== this.status) + throw this.status; + return this.status = "idle", + e + }).catch(e => { + if ("aborted" === e) + throw this.status = "aborted", "aborted"; + throw this.status = "error", + this._reader.error ? this._reader.error : e + }) + } + upload() { + if ("idle" != this.status) + throw new c.a("filerepository-upload-wrong-status", this); + return this.status = "uploading", + this.file.then(() => this._adapter.upload()).then(e => (this.uploadResponse = e, this.status = "idle", e)).catch(e => { + if ("aborted" === this.status) + throw "aborted"; + throw this.status = "error", + e + }) + } + abort() { + const e = this.status; + this.status = "aborted", + this._filePromiseWrapper.isFulfilled ? "reading" == e ? this._reader.abort() : "uploading" == e && this._adapter.abort && this._adapter.abort() : (this._filePromiseWrapper.promise.catch(() => {}), this._filePromiseWrapper.rejecter("aborted")), + this._destroy() + } + _destroy() { + this._filePromiseWrapper = void 0, + this._reader = void 0, + this._adapter = void 0, + this.uploadResponse = void 0 + } + _createFilePromiseWrapper(e) { + const t = {}; + return t.promise = new Promise((i, n) => { + t.rejecter = n, + t.isFulfilled = !1, + e.then(e => { + t.isFulfilled = !0, + i(e) + }).catch(e => { + t.isFulfilled = !0, + n(e) + }) + }), + t + } + } + Ke(gf, Ue); + class mf extends jl { + constructor(e) { + super(e), + this.buttonView = new cd(e), + this._fileInputView = new pf(e), + this._fileInputView.bind("acceptedType").to(this), + this._fileInputView.bind("allowMultipleFiles").to(this), + this._fileInputView.delegate("done").to(this), + this.setTemplate({ + tag: "span", + attributes: { + class: "ck-file-dialog-button" + }, + children: [this.buttonView, this._fileInputView] + }), + this.buttonView.on("execute", () => { + this._fileInputView.open() + }) + } + focus() { + this.buttonView.focus() + } + } + class pf extends jl { + constructor(e) { + super(e), + this.set("acceptedType"), + this.set("allowMultipleFiles", !1); + const t = this.bindTemplate; + this.setTemplate({ + tag: "input", + attributes: { + class: ["ck-hidden"], + type: "file", + tabindex: "-1", + accept: t.to("acceptedType"), + multiple: t.to("allowMultipleFiles") + }, + on: { + change: t.to(() => { + this.element && this.element.files && this.element.files.length && this.fire("done", this.element.files), + this.element.value = "" + }) + } + }) + } + open() { + this.element.click() + } + } + function bf() { + let e = function (e) { + e = e.toLowerCase(); + const t = document.cookie.split(";"); + for (const i of t) { + const t = i.split("="); + if (decodeURIComponent(t[0].trim().toLowerCase()) === e) + return decodeURIComponent(t[1]) + } + return null + } + ("ckCsrfToken"); + var t, + i; + return e && 40 == e.length || (e = function (e) { + let t = ""; + const i = new Uint8Array(e); + window.crypto.getRandomValues(i); + for (let e = 0; e < i.length; e++) { + const n = "abcdefghijklmnopqrstuvwxyz0123456789".charAt(i[e] % "abcdefghijklmnopqrstuvwxyz0123456789".length); + t += Math.random() > .5 ? n.toUpperCase() : n + } + return t + } + (40), t = "ckCsrfToken", i = e, document.cookie = encodeURIComponent(t) + "=" + encodeURIComponent(i) + ";path=/"), + e + } + class wf { + constructor(e, t, i) { + this.loader = e, + this.url = t, + this.t = i + } + upload() { + return this.loader.file.then(e => new Promise((t, i) => { + this._initRequest(), + this._initListeners(t, i, e), + this._sendRequest(e) + })) + } + abort() { + this.xhr && this.xhr.abort() + } + _initRequest() { + const e = this.xhr = new XMLHttpRequest; + e.open("POST", this.url, !0), + e.responseType = "json" + } + _initListeners(e, t, i) { + const n = this.xhr, + o = this.loader, + r = (0, this.t)("Cannot upload file:") + ` ${i.name}.`; + n.addEventListener("error", () => t(r)), + n.addEventListener("abort", () => t()), + n.addEventListener("load", () => { + const i = n.response; + if (!i || !i.uploaded) + return t(i && i.error && i.error.message ? i.error.message : r); + e({ + default: + i.url + }) + }), + n.upload && n.upload.addEventListener("progress", e => { + e.lengthComputable && (o.uploadTotal = e.total, o.uploaded = e.loaded) + }) + } + _sendRequest(e) { + const t = new FormData; + t.append("upload", e), + t.append("ckCsrfToken", bf()), + this.xhr.send(t) + } + } + function kf(e, t, i, n) { + let o, + r = null; + "function" == typeof n ? o = n : (r = e.commands.get(n), o = () => { + e.execute(n) + }), + e.model.document.on("change:data", (s, a) => { + if (r && !r.isEnabled || !t.isEnabled) + return; + const c = Ns(e.model.document.selection.getRanges()); + if (!c.isCollapsed) + return; + if ("transparent" == a.type) + return; + const l = Array.from(e.model.document.differ.getChanges()), + d = l[0]; + if (1 != l.length || "insert" !== d.type || "$text" != d.name || 1 != d.length) + return; + const u = d.position.parent; + if (u.is("element", "codeBlock")) + return; + if (u.is("element", "listItem") && "function" != typeof n && !["numberedList", "bulletedList", "todoList"].includes(n)) + return; + if (r && !0 === r.value) + return; + const h = u.getChild(0), + f = e.model.createRangeOn(h); + if (!f.containsRange(c) && !c.end.isEqual(f.end)) + return; + const g = i.exec(h.data.substr(0, c.end.offset)); + g && e.model.enqueueChange(t => { + const i = t.createPositionAt(u, 0), + n = t.createPositionAt(u, g[0].length), + r = new ba(i, n); + if (!1 !== o({ + match: g + })) { + t.remove(r); + const i = e.model.document.selection.getFirstRange(), + n = t.createRangeIn(u); + !u.isEmpty || n.isEqual(i) || n.containsRange(i, !0) || t.remove(u) + } + r.detach() + }) + }) + } + function _f(e, t, i, n) { + let o, + r; + i instanceof RegExp ? o = i : r = i, + r = r || (e => { + let t; + const i = [], + n = []; + for (; null !== (t = o.exec(e)) && !(t && t.length < 4); ) { + let { + index: e, + 1: o, + 2: r, + 3: s + } = t; + const a = o + r + s; + e += t[0].length - a.length; + const c = [e, e + o.length], + l = [e + o.length + r.length, e + o.length + r.length + s.length]; + i.push(c), + i.push(l), + n.push([e + o.length, e + o.length + r.length]) + } + return { + remove: i, + format: n + } + }), + e.model.document.on("change:data", (i, o) => { + if ("transparent" == o.type || !t.isEnabled) + return; + const s = e.model, + a = s.document.selection; + if (!a.isCollapsed) + return; + const c = Array.from(s.document.differ.getChanges()), + l = c[0]; + if (1 != c.length || "insert" !== l.type || "$text" != l.name || 1 != l.length) + return; + const d = a.focus, + u = d.parent, { + text: h, + range: f + } = function (e, t) { + let i = e.start; + return { + text: Array.from(e.getItems()).reduce((e, n) => !n.is("$text") && !n.is("$textProxy") || n.getAttribute("code") ? (i = t.createPositionAfter(n), "") : e + n.data, ""), + range: t.createRange(i, e.end) + } + } + (s.createRange(s.createPositionAt(u, 0), d), s), + g = r(h), + m = vf(f.start, g.format, s), + p = vf(f.start, g.remove, s); + m.length && p.length && s.enqueueChange(e => { + if (!1 !== n(e, m)) + for (const t of p.reverse()) + e.remove(t) + }) + }) + } + function vf(e, t, i) { + return t.filter(e => void 0 !== e[0] && void 0 !== e[1]).map(t => i.createRange(e.getShiftedBy(t[0]), e.getShiftedBy(t[1]))) + } + function yf(e, t) { + return (i, n) => { + if (!e.commands.get(t).isEnabled) + return !1; + const o = e.model.schema.getValidRanges(n, t); + for (const e of o) + i.setAttribute(t, !0, e); + i.removeSelectionAttribute(t) + } + } + class xf extends Ze { + constructor(e, t) { + super(e), + this.attributeKey = t + } + refresh() { + const e = this.editor.model, + t = e.document; + this.value = this._getValueFromFirstAllowedNode(), + this.isEnabled = e.schema.checkAttributeInSelection(t.selection, this.attributeKey) + } + execute(e = {}) { + const t = this.editor.model, + i = t.document.selection, + n = void 0 === e.forceValue ? !this.value : e.forceValue; + t.change(e => { + if (i.isCollapsed) + n ? e.setSelectionAttribute(this.attributeKey, !0) : e.removeSelectionAttribute(this.attributeKey); + else { + const o = t.schema.getValidRanges(i.getRanges(), this.attributeKey); + for (const t of o) + n ? e.setAttribute(this.attributeKey, n, t) : e.removeAttribute(this.attributeKey, t) + } + }) + } + _getValueFromFirstAllowedNode() { + const e = this.editor.model, + t = e.schema, + i = e.document.selection; + if (i.isCollapsed) + return i.hasAttribute(this.attributeKey); + for (const e of i.getRanges()) + for (const i of e.getItems()) + if (t.checkAttribute(i, this.attributeKey)) + return i.hasAttribute(this.attributeKey); + return !1 + } + } + class Af extends Qe { + static get pluginName() { + return "BoldEditing" + } + init() { + const e = this.editor; + e.model.schema.extend("$text", { + allowAttributes: "bold" + }), + e.model.schema.setAttributeProperties("bold", { + isFormatting: !0, + copyOnEnter: !0 + }), + e.conversion.attributeToElement({ + model: "bold", + view: "strong", + upcastAlso: ["b", e => { + const t = e.getStyle("font-weight"); + return t ? "bold" == t || Number(t) >= 600 ? { + name: !0, + styles: ["font-weight"] + } + : void 0 : null + } + ] + }), + e.commands.add("bold", new xf(e, "bold")), + e.keystrokes.set("CTRL+B", "bold") + } + } + class Cf extends Qe { + static get pluginName() { + return "BoldUI" + } + init() { + const e = this.editor, + t = e.t; + e.ui.componentFactory.add("bold", i => { + const n = e.commands.get("bold"), + o = new cd(i); + return o.set({ + label: t("Bold"), + icon: '', + keystroke: "CTRL+B", + tooltip: !0, + isToggleable: !0 + }), + o.bind("isOn", "isEnabled").to(n, "value", "isEnabled"), + this.listenTo(o, "execute", () => { + e.execute("bold"), + e.editing.view.focus() + }), + o + }) + } + } + class Tf extends Qe { + static get pluginName() { + return "ItalicEditing" + } + init() { + const e = this.editor; + e.model.schema.extend("$text", { + allowAttributes: "italic" + }), + e.model.schema.setAttributeProperties("italic", { + isFormatting: !0, + copyOnEnter: !0 + }), + e.conversion.attributeToElement({ + model: "italic", + view: "i", + upcastAlso: ["em", { + styles: { + "font-style": "italic" + } + } + ] + }), + e.commands.add("italic", new xf(e, "italic")), + e.keystrokes.set("CTRL+I", "italic") + } + } + class Ef extends Qe { + static get pluginName() { + return "ItalicUI" + } + init() { + const e = this.editor, + t = e.t; + e.ui.componentFactory.add("italic", i => { + const n = e.commands.get("italic"), + o = new cd(i); + return o.set({ + label: t("Italic"), + icon: '', + keystroke: "CTRL+I", + tooltip: !0, + isToggleable: !0 + }), + o.bind("isOn", "isEnabled").to(n, "value", "isEnabled"), + this.listenTo(o, "execute", () => { + e.execute("italic"), + e.editing.view.focus() + }), + o + }) + } + } + class Pf extends Ze { + refresh() { + this.value = this._getValue(), + this.isEnabled = this._checkEnabled() + } + execute(e = {}) { + const t = this.editor.model, + i = t.schema, + n = t.document.selection, + o = Array.from(n.getSelectedBlocks()), + r = void 0 === e.forceValue ? !this.value : e.forceValue; + t.change(e => { + if (r) { + const t = o.filter(e => Sf(e) || If(i, e)); + this._applyQuote(e, t) + } else + this._removeQuote(e, o.filter(Sf)) + }) + } + _getValue() { + const e = Ns(this.editor.model.document.selection.getSelectedBlocks()); + return !(!e || !Sf(e)) + } + _checkEnabled() { + if (this.value) + return !0; + const e = this.editor.model.document.selection, + t = this.editor.model.schema, + i = Ns(e.getSelectedBlocks()); + return !!i && If(t, i) + } + _removeQuote(e, t) { + Mf(e, t).reverse().forEach(t => { + if (t.start.isAtStart && t.end.isAtEnd) + return void e.unwrap(t.start.parent); + if (t.start.isAtStart) { + const i = e.createPositionBefore(t.start.parent); + return void e.move(t, i) + } + t.end.isAtEnd || e.split(t.end); + const i = e.createPositionAfter(t.end.parent); + e.move(t, i) + }) + } + _applyQuote(e, t) { + const i = []; + Mf(e, t).reverse().forEach(t => { + let n = Sf(t.start); + n || (n = e.createElement("blockQuote"), e.wrap(t, n)), + i.push(n) + }), + i.reverse().reduce((t, i) => t.nextSibling == i ? (e.merge(e.createPositionAfter(t)), t) : i) + } + } + function Sf(e) { + return "blockQuote" == e.parent.name ? e.parent : null + } + function Mf(e, t) { + let i, + n = 0; + const o = []; + for (; n < t.length; ) { + const r = t[n], + s = t[n + 1]; + i || (i = e.createPositionBefore(r)), + s && r.nextSibling == s || (o.push(e.createRange(i, e.createPositionAfter(r))), i = null), + n++ + } + return o + } + function If(e, t) { + const i = e.checkChild(t.parent, "blockQuote"), + n = e.checkChild(["$root", "blockQuote"], t); + return i && n + } + class Nf extends Qe { + static get pluginName() { + return "BlockQuoteEditing" + } + static get requires() { + return [Nu, Lu] + } + init() { + const e = this.editor, + t = e.model.schema; + e.commands.add("blockQuote", new Pf(e)), + t.register("blockQuote", { + allowWhere: "$block", + allowContentOf: "$root" + }), + e.conversion.elementToElement({ + model: "blockQuote", + view: "blockquote" + }), + e.model.document.registerPostFixer(i => { + const n = e.model.document.differ.getChanges(); + for (const e of n) + if ("insert" == e.type) { + const n = e.position.nodeAfter; + if (!n) + continue; + if (n.is("element", "blockQuote") && n.isEmpty) + return i.remove(n), !0; + if (n.is("element", "blockQuote") && !t.checkChild(e.position, n)) + return i.unwrap(n), !0; + if (n.is("element")) { + const e = i.createRangeIn(n); + for (const n of e.getItems()) + if (n.is("element", "blockQuote") && !t.checkChild(i.createPositionBefore(n), n)) + return i.unwrap(n), !0 + } + } else if ("remove" == e.type) { + const t = e.position.parent; + if (t.is("element", "blockQuote") && t.isEmpty) + return i.remove(t), !0 + } + return !1 + }); + const i = this.editor.editing.view.document, + n = e.model.document.selection, + o = e.commands.get("blockQuote"); + this.listenTo(i, "enter", (t, i) => { + if (!n.isCollapsed || !o.value) + return; + n.getLastPosition().parent.isEmpty && (e.execute("blockQuote"), e.editing.view.scrollToTheSelection(), i.preventDefault(), t.stop()) + }, { + context: "blockquote" + }), + this.listenTo(i, "delete", (t, i) => { + if ("backward" != i.direction || !n.isCollapsed || !o.value) + return; + const r = n.getLastPosition().parent; + r.isEmpty && !r.previousSibling && (e.execute("blockQuote"), e.editing.view.scrollToTheSelection(), i.preventDefault(), t.stop()) + }, { + context: "blockquote" + }) + } + } + i(68); + class Rf extends Qe { + static get pluginName() { + return "BlockQuoteUI" + } + init() { + const e = this.editor, + t = e.t; + e.ui.componentFactory.add("blockQuote", i => { + const n = e.commands.get("blockQuote"), + o = new cd(i); + return o.set({ + label: t("Block quote"), + icon: Rl, + tooltip: !0, + isToggleable: !0 + }), + o.bind("isOn", "isEnabled").to(n, "value", "isEnabled"), + this.listenTo(o, "execute", () => { + e.execute("blockQuote"), + e.editing.view.focus() + }), + o + }) + } + } + class Of extends Qe { + static get pluginName() { + return "CKFinderUI" + } + init() { + const e = this.editor, + t = e.ui.componentFactory, + i = e.t; + t.add("ckfinder", t => { + const n = e.commands.get("ckfinder"), + o = new cd(t); + return o.set({ + label: i("Insert image or file"), + icon: '', + tooltip: !0 + }), + o.bind("isEnabled").to(n), + o.on("execute", () => { + e.execute("ckfinder"), + e.editing.view.focus() + }), + o + }) + } + } + class Df extends Ze { + constructor(e) { + super(e), + this.stopListening(this.editor.model.document, "change"), + this.listenTo(this.editor.model.document, "change", () => this.refresh(), { + priority: "low" + }) + } + refresh() { + const e = this.editor.commands.get("insertImage"), + t = this.editor.commands.get("link"); + this.isEnabled = e.isEnabled || t.isEnabled + } + execute() { + const e = this.editor, + t = this.editor.config.get("ckfinder.openerMethod") || "modal"; + if ("popup" != t && "modal" != t) + throw new c.a("ckfinder-unknown-openermethod", e); + const i = this.editor.config.get("ckfinder.options") || {}; + i.chooseFiles = !0; + const n = i.onInit; + i.language || (i.language = e.locale.uiLanguage), + i.onInit = t => { + n && n(t), + t.on("files:choose", i => { + const n = i.data.files.toArray(), + o = n.filter(e => !e.isImage()), + r = n.filter(e => e.isImage()); + for (const t of o) + e.execute("link", t.getUrl()); + const s = []; + for (const e of r) { + const i = e.getUrl(); + s.push(i || t.request("file:getProxyUrl", { + file: e + })) + } + s.length && Lf(e, s) + }), + t.on("file:choose:resizedImage", t => { + const i = t.data.resizedUrl; + if (i) + Lf(e, [i]); + else { + const t = e.plugins.get("Notification"), + i = e.locale.t; + t.showWarning(i("Could not obtain resized image URL."), { + title: i("Selecting resized image failed"), + namespace: "ckfinder" + }) + } + }) + }, + window.CKFinder[t](i) + } + } + function Lf(e, t) { + if (e.commands.get("insertImage").isEnabled) + e.execute("insertImage", { + source: t + }); + else { + const t = e.plugins.get("Notification"), + i = e.locale.t; + t.showWarning(i("Could not insert image at the current position."), { + title: i("Inserting image failed"), + namespace: "ckfinder" + }) + } + } + class zf extends Qe { + static get pluginName() { + return "CKFinderEditing" + } + static get requires() { + return [Fd, "ImageEditing", "LinkEditing"] + } + init() { + const e = this.editor; + e.commands.add("ckfinder", new Df(e)) + } + } + class Vf extends Qe { + static get pluginName() { + return "CloudServicesUploadAdapter" + } + static get requires() { + return ["CloudServices", ff] + } + init() { + const e = this.editor, + t = e.plugins.get("CloudServices"), + i = t.token, + n = t.uploadUrl; + i && (this._uploadGateway = e.plugins.get("CloudServicesCore").createUploadGateway(i, n), e.plugins.get(ff).createUploadAdapter = e => new jf(this._uploadGateway, e)) + } + } + class jf { + constructor(e, t) { + this.uploadGateway = e, + this.loader = t + } + upload() { + return this.loader.file.then(e => (this.fileUploader = this.uploadGateway.upload(e), this.fileUploader.on("progress", (e, t) => { + this.loader.uploadTotal = t.total, + this.loader.uploaded = t.uploaded + }), this.fileUploader.send())) + } + abort() { + this.fileUploader.abort() + } + } + class Bf extends Ze { + refresh() { + const e = this.editor.model, + t = Ns(e.document.selection.getSelectedBlocks()); + this.value = !!t && t.is("element", "paragraph"), + this.isEnabled = !!t && Ff(t, e.schema) + } + execute(e = {}) { + const t = this.editor.model, + i = t.document; + t.change(n => { + const o = (e.selection || i.selection).getSelectedBlocks(); + for (const e of o) + !e.is("element", "paragraph") && Ff(e, t.schema) && n.rename(e, "paragraph") + }) + } + } + function Ff(e, t) { + return t.checkChild(e.parent, "paragraph") && !t.isObject(e) + } + class Hf extends Ze { + execute(e) { + const t = this.editor.model; + let i = e.position; + t.change(e => { + const n = e.createElement("paragraph"); + if (!t.schema.checkChild(i.parent, n)) { + const o = t.schema.findAllowedParent(i, n); + if (!o) + return; + i = e.split(i, o).position + } + t.insertContent(n, i), + e.setSelection(n, "in") + }) + } + } + class Uf extends Qe { + static get pluginName() { + return "Paragraph" + } + init() { + const e = this.editor, + t = e.model; + e.commands.add("paragraph", new Bf(e)), + e.commands.add("insertParagraph", new Hf(e)), + t.schema.register("paragraph", { + inheritAllFrom: "$block" + }), + e.conversion.elementToElement({ + model: "paragraph", + view: "p" + }), + e.conversion.for("upcast").elementToElement({ + model: (e, { + writer: t + }) => Uf.paragraphLikeElements.has(e.name) ? e.isEmpty ? null : t.createElement("paragraph") : null, + view: /.+/, + converterPriority: "low" + }) + } + } + Uf.paragraphLikeElements = new Set(["blockquote", "dd", "div", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "li", "p", "td", "th"]); + class Wf extends Ze { + constructor(e, t) { + super(e), + this.modelElements = t + } + refresh() { + const e = Ns(this.editor.model.document.selection.getSelectedBlocks()); + this.value = !!e && this.modelElements.includes(e.name) && e.name, + this.isEnabled = !!e && this.modelElements.some(t => qf(e, t, this.editor.model.schema)) + } + execute(e) { + const t = this.editor.model, + i = t.document, + n = e.value; + t.change(e => { + const o = Array.from(i.selection.getSelectedBlocks()).filter(e => qf(e, n, t.schema)); + for (const t of o) + t.is("element", n) || e.rename(t, n) + }) + } + } + function qf(e, t, i) { + return i.checkChild(e.parent, t) && !i.isObject(e) + } + class $f extends Qe { + static get pluginName() { + return "HeadingEditing" + } + constructor(e) { + super(e), + e.config.define("heading", { + options: [{ + model: "paragraph", + title: "Paragraph", + class: "ck-heading_paragraph" + }, { + model: "heading1", + view: "h2", + title: "Heading 1", + class: "ck-heading_heading1" + }, { + model: "heading2", + view: "h3", + title: "Heading 2", + class: "ck-heading_heading2" + }, { + model: "heading3", + view: "h4", + title: "Heading 3", + class: "ck-heading_heading3" + } + ] + }) + } + static get requires() { + return [Uf] + } + init() { + const e = this.editor, + t = e.config.get("heading.options"), + i = []; + for (const n of t) + "paragraph" !== n.model && (e.model.schema.register(n.model, { + inheritAllFrom: "$block" + }), e.conversion.elementToElement(n), i.push(n.model)); + this._addDefaultH1Conversion(e), + e.commands.add("heading", new Wf(e, i)) + } + afterInit() { + const e = this.editor, + t = e.commands.get("enter"), + i = e.config.get("heading.options"); + t && this.listenTo(t, "afterExecute", (t, n) => { + const o = e.model.document.selection.getFirstPosition().parent; + i.some(e => o.is("element", e.model)) && !o.is("element", "paragraph") && 0 === o.childCount && n.writer.rename(o, "paragraph") + }) + } + _addDefaultH1Conversion(e) { + e.conversion.for("upcast").elementToElement({ + model: "heading1", + view: "h1", + converterPriority: a.get("low") + 1 + }) + } + } + i(12); + class Yf extends Qe { + static get pluginName() { + return "HeadingUI" + } + init() { + const e = this.editor, + t = e.t, + i = function (e) { + const t = e.t, + i = { + Paragraph: t("Paragraph"), + "Heading 1": t("Heading 1"), + "Heading 2": t("Heading 2"), + "Heading 3": t("Heading 3"), + "Heading 4": t("Heading 4"), + "Heading 5": t("Heading 5"), + "Heading 6": t("Heading 6") + }; + return e.config.get("heading.options").map(e => { + const t = i[e.title]; + return t && t != e.title && (e.title = t), + e + }) + } + (e), + n = t("Choose heading"), + o = t("Heading"); + e.ui.componentFactory.add("heading", t => { + const r = {}, + s = new Zi, + a = e.commands.get("heading"), + c = e.commands.get("paragraph"), + l = [a]; + for (const e of i) { + const t = { + type: "button", + model: new Hd({ + label: e.title, + class: e.class, + withText: !0 + }) + }; + "paragraph" === e.model ? (t.model.bind("isOn").to(c, "value"), t.model.set("commandName", "paragraph"), l.push(c)) : (t.model.bind("isOn").to(a, "value", t => t === e.model), t.model.set({ + commandName: "heading", + commandValue: e.model + })), + s.add(t), + r[e.model] = e.title + } + const d = Id(t); + return Nd(d, s), + d.buttonView.set({ + isOn: !1, + withText: !0, + tooltip: o + }), + d.extendTemplate({ + attributes: { + class: ["ck-heading-dropdown"] + } + }), + d.bind("isEnabled").toMany(l, "isEnabled", (...e) => e.some(e => e)), + d.buttonView.bind("label").to(a, "value", c, "value", (e, t) => { + const i = e || t && "paragraph"; + return r[i] ? r[i] : n + }), + this.listenTo(d, "execute", t => { + e.execute(t.source.commandName, t.source.commandValue ? { + value: t.source.commandValue + } + : void 0), + e.editing.view.focus() + }), + d + }) + } + } + class Gf extends Qe { + static get requires() { + return [Qd] + } + static get pluginName() { + return "WidgetToolbarRepository" + } + init() { + const e = this.editor; + if (e.plugins.has("BalloonToolbar")) { + const t = e.plugins.get("BalloonToolbar"); + this.listenTo(t, "show", t => { + (function (e) { + const t = e.getSelectedElement(); + return !(!t || !Fu(t)) + })(e.editing.view.document.selection) && t.stop() + }, { + priority: "high" + }) + } + this._toolbarDefinitions = new Map, + this._balloon = this.editor.plugins.get("ContextualBalloon"), + this.on("change:isEnabled", () => { + this._updateToolbarsVisibility() + }), + this.listenTo(e.ui, "update", () => { + this._updateToolbarsVisibility() + }), + this.listenTo(e.ui.focusTracker, "change:isFocused", () => { + this._updateToolbarsVisibility() + }, { + priority: "low" + }) + } + destroy() { + super.destroy(); + for (const e of this._toolbarDefinitions.values()) + e.view.destroy() + } + register(e, { + ariaLabel: t, + items: i, + getRelatedElement: n, + balloonClassName: o = "ck-toolbar-container" + }) { + if (!i.length) + return void Object(c.b)("widget-toolbar-no-items", { + toolbarId: e + }); + const r = this.editor, + s = r.t, + a = new Ad(r.locale); + if (a.ariaLabel = t || s("Widget toolbar"), this._toolbarDefinitions.has(e)) + throw new c.a("widget-toolbar-duplicated", this, { + toolbarId: e + }); + a.fillFromConfig(i, r.ui.componentFactory), + this._toolbarDefinitions.set(e, { + view: a, + getRelatedElement: n, + balloonClassName: o + }) + } + _updateToolbarsVisibility() { + let e = 0, + t = null, + i = null; + for (const n of this._toolbarDefinitions.values()) { + const o = n.getRelatedElement(this.editor.editing.view.document.selection); + if (this.isEnabled && o) + if (this.editor.ui.focusTracker.isFocused) { + const r = o.getAncestors().length; + r > e && (e = r, t = o, i = n) + } else + this._isToolbarVisible(n) && this._hideToolbar(n); + else + this._isToolbarInBalloon(n) && this._hideToolbar(n) + } + i && this._showToolbar(i, t) + } + _hideToolbar(e) { + this._balloon.remove(e.view), + this.stopListening(this._balloon, "change:visibleView") + } + _showToolbar(e, t) { + this._isToolbarVisible(e) ? Kf(this.editor, t) : this._isToolbarInBalloon(e) || (this._balloon.add({ + view: e.view, + position: Qf(this.editor, t), + balloonClassName: e.balloonClassName + }), this.listenTo(this._balloon, "change:visibleView", () => { + for (const e of this._toolbarDefinitions.values()) + if (this._isToolbarVisible(e)) { + const t = e.getRelatedElement(this.editor.editing.view.document.selection); + Kf(this.editor, t) + } + })) + } + _isToolbarVisible(e) { + return this._balloon.visibleView === e.view + } + _isToolbarInBalloon(e) { + return this._balloon.hasView(e.view) + } + } + function Kf(e, t) { + const i = e.plugins.get("ContextualBalloon"), + n = Qf(e, t); + i.updatePosition(n) + } + function Qf(e, t) { + const i = e.editing.view, + n = qd.defaultPositions; + return { + target: i.domConverter.mapViewToDom(t), + positions: [n.northArrowSouth, n.northArrowSouthWest, n.northArrowSouthEast, n.southArrowNorth, n.southArrowNorthWest, n.southArrowNorthEast, Qu] + } + } + class Jf { + constructor(e) { + this.set("activeHandlePosition", null), + this.set("proposedWidthPercents", null), + this.set("proposedWidth", null), + this.set("proposedHeight", null), + this.set("proposedHandleHostWidth", null), + this.set("proposedHandleHostHeight", null), + this._options = e, + this._referenceCoordinates = null + } + begin(e, t, i) { + const n = new Ts(t); + this.activeHandlePosition = function (e) { + const t = ["top-left", "top-right", "bottom-right", "bottom-left"]; + for (const i of t) + if (e.classList.contains("ck-widget__resizer__handle-" + i)) + return i + } + (e), + this._referenceCoordinates = function (e, t) { + const i = new Ts(e), + n = t.split("-"), + o = { + x: "right" == n[1] ? i.right : i.left, + y: "bottom" == n[0] ? i.bottom : i.top + }; + return o.x += e.ownerDocument.defaultView.scrollX, + o.y += e.ownerDocument.defaultView.scrollY, + o + } + (t, function (e) { + const t = e.split("-"), + i = { + top: "bottom", + bottom: "top", + left: "right", + right: "left" + }; + return `${i[t[0]]}-${i[t[1]]}` + } + (this.activeHandlePosition)), + this.originalWidth = n.width, + this.originalHeight = n.height, + this.aspectRatio = n.width / n.height; + const o = i.style.width; + o && o.match(/^\d+(\.\d*)?%$/) ? this.originalWidthPercents = parseFloat(o) : this.originalWidthPercents = function (e, t) { + const i = e.parentElement, + n = parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).width); + return t.width / n * 100 + } + (i, n) + } + update(e) { + this.proposedWidth = e.width, + this.proposedHeight = e.height, + this.proposedWidthPercents = e.widthPercents, + this.proposedHandleHostWidth = e.handleHostWidth, + this.proposedHandleHostHeight = e.handleHostHeight + } + } + Ke(Jf, Ue); + class Zf { + constructor(e) { + this._options = e, + this._domResizerWrapper = null, + this._viewResizerWrapper = null, + this.set("isEnabled", !0), + this.decorate("begin"), + this.decorate("cancel"), + this.decorate("commit"), + this.decorate("updateSize"), + this.on("commit", e => { + this.state.proposedWidth || this.state.proposedWidthPercents || (this._cleanup(), e.stop()) + }, { + priority: "high" + }), + this.on("change:isEnabled", () => { + this.isEnabled && this.redraw() + }) + } + attach() { + const e = this, + t = this._options.viewElement; + this._options.editor.editing.view.change(i => { + const n = i.createUIElement("div", { + class: "ck ck-reset_all ck-widget__resizer" + }, (function (t) { + const i = this.toDomElement(t); + return e._appendHandles(i), + e._appendSizeUI(i), + e._domResizerWrapper = i, + e.on("change:isEnabled", (e, t, n) => { + i.style.display = n ? "" : "none" + }), + i.style.display = e.isEnabled ? "" : "none", + i + })); + i.insert(i.createPositionAt(t, "end"), n), + i.addClass("ck-widget_with-resizer", t), + this._viewResizerWrapper = n + }) + } + begin(e) { + this.state = new Jf(this._options), + this._sizeUI.bindToState(this._options, this.state), + this._initialViewWidth = this._options.viewElement.getStyle("width"), + this.state.begin(e, this._getHandleHost(), this._getResizeHost()) + } + updateSize(e) { + const t = this._proposeNewSize(e); + this._options.editor.editing.view.change(e => { + const i = this._options.unit || "%", + n = ("%" === i ? t.widthPercents : t.width) + i; + e.setStyle("width", n, this._options.viewElement) + }); + const i = this._getHandleHost(), + n = new Ts(i); + t.handleHostWidth = Math.round(n.width), + t.handleHostHeight = Math.round(n.height); + const o = new Ts(i); + t.width = Math.round(o.width), + t.height = Math.round(o.height), + this.redraw(n), + this.state.update(t) + } + commit() { + const e = this._options.unit || "%", + t = ("%" === e ? this.state.proposedWidthPercents : this.state.proposedWidth) + e; + this._options.editor.editing.view.change(() => { + this._cleanup(), + this._options.onCommit(t) + }) + } + cancel() { + this._cleanup() + } + destroy() { + this.cancel() + } + redraw(e) { + const t = this._domResizerWrapper; + if (!((i = t) && i.ownerDocument && i.ownerDocument.contains(i))) + return; + var i; + const n = t.parentElement, + o = this._getHandleHost(), + r = this._viewResizerWrapper, + s = [r.getStyle("width"), r.getStyle("height"), r.getStyle("left"), r.getStyle("top")]; + let a; + if (n.isSameNode(o)) { + const t = e || new Ts(o); + a = [t.width + "px", t.height + "px", void 0, void 0] + } else + a = [o.offsetWidth + "px", o.offsetHeight + "px", o.offsetLeft + "px", o.offsetTop + "px"]; + "same" !== cn(s, a) && this._options.editor.editing.view.change(e => { + e.setStyle({ + width: a[0], + height: a[1], + left: a[2], + top: a[3] + }, r) + }) + } + containsHandle(e) { + return this._domResizerWrapper.contains(e) + } + static isResizeHandle(e) { + return e.classList.contains("ck-widget__resizer__handle") + } + _cleanup() { + this._sizeUI.dismiss(), + this._sizeUI.isVisible = !1; + this._options.editor.editing.view.change(e => { + e.setStyle("width", this._initialViewWidth, this._options.viewElement) + }) + } + _proposeNewSize(e) { + const t = this.state, + i = { + x: (n = e).pageX, + y: n.pageY + }; + var n; + const o = !this._options.isCentered || this._options.isCentered(this), + r = { + x: t._referenceCoordinates.x - (i.x + t.originalWidth), + y: i.y - t.originalHeight - t._referenceCoordinates.y + }; + o && t.activeHandlePosition.endsWith("-right") && (r.x = i.x - (t._referenceCoordinates.x + t.originalWidth)), + o && (r.x *= 2); + const s = { + width: Math.abs(t.originalWidth + r.x), + height: Math.abs(t.originalHeight + r.y) + }; + s.dominant = s.width / t.aspectRatio > s.height ? "width" : "height", + s.max = s[s.dominant]; + const a = { + width: s.width, + height: s.height + }; + return "width" == s.dominant ? a.height = a.width / t.aspectRatio : a.width = a.height * t.aspectRatio, { + width: Math.round(a.width), + height: Math.round(a.height), + widthPercents: Math.min(Math.round(t.originalWidthPercents / t.originalWidth * a.width * 100) / 100, 100) + } + } + _getResizeHost() { + const e = this._domResizerWrapper.parentElement; + return this._options.getResizeHost(e) + } + _getHandleHost() { + const e = this._domResizerWrapper.parentElement; + return this._options.getHandleHost(e) + } + _appendHandles(e) { + const t = ["top-left", "top-right", "bottom-right", "bottom-left"]; + for (const n of t) + e.appendChild(new Bl({ + tag: "div", + attributes: { + class: "ck-widget__resizer__handle " + (i = n, "ck-widget__resizer__handle-" + i) + } + }).render()); + var i + } + _appendSizeUI(e) { + const t = new Xf; + t.render(), + this._sizeUI = t, + e.appendChild(t.element) + } + } + Ke(Zf, Ue); + class Xf extends jl { + constructor() { + super(); + const e = this.bindTemplate; + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-size-view", e.to("activeHandlePosition", e => e ? "ck-orientation-" + e : "")], + style: { + display: e.if("isVisible", "none", e => !e) + } + }, + children: [{ + text: e.to("label") + } + ] + }) + } + bindToState(e, t) { + this.bind("isVisible").to(t, "proposedWidth", t, "proposedHeight", (e, t) => null !== e && null !== t), + this.bind("label").to(t, "proposedHandleHostWidth", t, "proposedHandleHostHeight", t, "proposedWidthPercents", (t, i, n) => "px" === e.unit ? `${t}×${i}` : n + "%"), + this.bind("activeHandlePosition").to(t) + } + dismiss() { + this.unbind(), + this.isVisible = !1 + } + } + i(71); + Ke(class extends Qe { + static get pluginName() { + return "WidgetResize" + } + init() { + this.set("visibleResizer", null), + this.set("_activeResizer", null), + this._resizers = new Map; + const e = _r.window.document; + this.editor.model.schema.setAttributeProperties("width", { + isFormatting: !0 + }), + this.editor.editing.view.addObserver(ku), + this._observer = Object.create(Ir), + this.listenTo(this.editor.editing.view.document, "mousedown", this._mouseDownListener.bind(this), { + priority: "high" + }), + this._observer.listenTo(e, "mousemove", this._mouseMoveListener.bind(this)), + this._observer.listenTo(e, "mouseup", this._mouseUpListener.bind(this)); + const t = () => { + this.visibleResizer && this.visibleResizer.redraw() + }, + i = dh(t, 200); + this.on("change:visibleResizer", t), + this.editor.ui.on("update", i), + this._observer.listenTo(_r.window, "resize", i); + const n = this.editor.editing.view.document.selection; + n.on("change", () => { + const e = n.getSelectedElement(); + this.visibleResizer = this.getResizerByViewElement(e) || null + }) + } + destroy() { + this._observer.stopListening(); + for (const e of this._resizers.values()) + e.destroy() + } + attachTo(e) { + const t = new Zf(e), + i = this.editor.plugins; + if (t.attach(), i.has("WidgetToolbarRepository")) { + const e = i.get("WidgetToolbarRepository"); + t.on("begin", () => { + e.forceDisabled("resize") + }, { + priority: "lowest" + }), + t.on("cancel", () => { + e.clearForceDisabled("resize") + }, { + priority: "highest" + }), + t.on("commit", () => { + e.clearForceDisabled("resize") + }, { + priority: "highest" + }) + } + this._resizers.set(e.viewElement, t); + const n = this.editor.editing.view.document.selection.getSelectedElement(); + return this.getResizerByViewElement(n) == t && (this.visibleResizer = t), + t + } + getResizerByViewElement(e) { + return this._resizers.get(e) + } + _getResizerByHandle(e) { + for (const t of this._resizers.values()) + if (t.containsHandle(e)) + return t + } + _mouseDownListener(e, t) { + const i = t.domTarget; + Zf.isResizeHandle(i) && (this._activeResizer = this._getResizerByHandle(i), this._activeResizer && (this._activeResizer.begin(i), e.stop(), t.preventDefault())) + } + _mouseMoveListener(e, t) { + this._activeResizer && this._activeResizer.updateSize(t) + } + _mouseUpListener() { + this._activeResizer && (this._activeResizer.commit(), this._activeResizer = null) + } + }, Ue); + class eg extends Or { + observe(e) { + this.listenTo(e, "load", (e, t) => { + const i = t.target; + this.checkShouldIgnoreEventFromTarget(i) || "IMG" == i.tagName && this._fireEvents(t) + }, { + useCapture: !0 + }) + } + _fireEvents(e) { + this.isEnabled && (this.document.fire("layoutChanged"), this.document.fire("imageLoaded", e)) + } + } + function tg(e) { + return !!e.getCustomProperty("image") && Fu(e) + } + function ig(e) { + const t = e.getSelectedElement(); + return t && tg(t) ? t : null + } + function ng(e) { + return !!e && e.is("element", "image") + } + function og(e, t = {}, i = null) { + e.change(n => { + const o = n.createElement("image", t), + r = i || Gu(e.document.selection, e); + e.insertContent(o, r), + o.parent && n.setSelection(o, "on") + }) + } + function rg(e) { + const t = e.schema, + i = e.document.selection; + return function (e, t, i) { + const n = function (e, t) { + const i = Gu(e, t).parent; + if (i.isEmpty && !i.is("element", "$root")) + return i.parent; + return i + } + (e, i); + return t.checkChild(n, "image") + } + (i, t, e) && !Ku(i, t) && function (e) { + return [...e.focus.getAncestors()].every(e => !e.is("element", "image")) + } + (i) + } + function sg(e) { + const t = []; + for (const i of e.getChildren()) + t.push(i), i.is("element") && t.push(...i.getChildren()); + return t.find(e => e.is("element", "img")) + } + function ag(e) { + return i => { + i.on(`attribute:${e}:image`, t) + }; + function t(e, t, i) { + if (!i.consumable.consume(t.item, e.name)) + return; + const n = i.writer, + o = sg(i.mapper.toViewElement(t.item)); + n.setAttribute(t.attributeKey, t.attributeNewValue || "", o) + } + } + class cg extends Ze { + refresh() { + this.isEnabled = rg(this.editor.model) + } + execute(e) { + const t = this.editor.model; + for (const i of en(e.source)) + og(t, { + src: i + }) + } + } + class lg extends Qe { + static get pluginName() { + return "ImageEditing" + } + init() { + const e = this.editor, + t = e.model.schema, + i = e.t, + n = e.conversion; + e.editing.view.addObserver(eg), + t.register("image", { + isObject: !0, + isBlock: !0, + allowWhere: "$block", + allowAttributes: ["alt", "src", "srcset"] + }), + n.for("dataDowncast").elementToElement({ + model: "image", + view: (e, { + writer: t + }) => dg(t) + }), + n.for("editingDowncast").elementToElement({ + model: "image", + view: (e, { + writer: t + }) => function (e, t, i) { + return t.setCustomProperty("image", !0, e), + Hu(e, t, { + label: function () { + const t = sg(e).getAttribute("alt"); + return t ? `${t} ${i}` : i + } + }) + } + (dg(t), t, i("image widget")) + }), + n.for("downcast").add(ag("src")).add(ag("alt")).add(function () { + return t => { + t.on("attribute:srcset:image", e) + }; + function e(e, t, i) { + if (!i.consumable.consume(t.item, e.name)) + return; + const n = i.writer, + o = sg(i.mapper.toViewElement(t.item)); + if (null === t.attributeNewValue) { + const e = t.attributeOldValue; + e.data && (n.removeAttribute("srcset", o), n.removeAttribute("sizes", o), e.width && n.removeAttribute("width", o)) + } else { + const e = t.attributeNewValue; + e.data && (n.setAttribute("srcset", e.data, o), n.setAttribute("sizes", "100vw", o), e.width && n.setAttribute("width", e.width, o)) + } + } + } + ()), + n.for("upcast").elementToElement({ + view: { + name: "img", + attributes: { + src: !0 + } + }, + model: (e, { + writer: t + }) => t.createElement("image", { + src: e.getAttribute("src") + }) + }).attributeToAttribute({ + view: { + name: "img", + key: "alt" + }, + model: "alt" + }).attributeToAttribute({ + view: { + name: "img", + key: "srcset" + }, + model: { + key: "srcset", + value: e => { + const t = { + data: e.getAttribute("srcset") + }; + return e.hasAttribute("width") && (t.width = e.getAttribute("width")), + t + } + } + }).add(function () { + return t => { + t.on("element:figure", e) + }; + function e(e, t, i) { + if (!i.consumable.test(t.viewItem, { + name: !0, + classes: "image" + })) + return; + const n = sg(t.viewItem); + if (!n || !n.hasAttribute("src") || !i.consumable.test(n, { + name: !0 + })) + return; + const o = Ns(i.convertItem(n, t.modelCursor).modelRange.getItems()); + o && (i.convertChildren(t.viewItem, o), i.updateConversionResult(o, t)) + } + } + ()); + const o = new cg(e); + e.commands.add("insertImage", o), + e.commands.add("imageInsert", o) + } + } + function dg(e) { + const t = e.createEmptyElement("img"), + i = e.createContainerElement("figure", { + class: "image" + }); + return e.insert(e.createPositionAt(i, 0), t), + i + } + class ug extends Ze { + refresh() { + const e = this.editor.model.document.selection.getSelectedElement(); + this.isEnabled = ng(e), + ng(e) && e.hasAttribute("alt") ? this.value = e.getAttribute("alt") : this.value = !1 + } + execute(e) { + const t = this.editor.model, + i = t.document.selection.getSelectedElement(); + t.change(t => { + t.setAttribute("alt", e.newValue, i) + }) + } + } + class hg extends Qe { + static get pluginName() { + return "ImageTextAlternativeEditing" + } + init() { + this.editor.commands.add("imageTextAlternative", new ug(this.editor)) + } + } + i(73), + i(7); + class fg extends jl { + constructor(e) { + super(e); + const t = this.locale.t; + this.focusTracker = new Rs, + this.keystrokes = new Os, + this.labeledInput = this._createLabeledInputView(), + this.saveButtonView = this._createButton(t("Save"), Cl, "ck-button-save"), + this.saveButtonView.type = "submit", + this.cancelButtonView = this._createButton(t("Cancel"), Al, "ck-button-cancel", "cancel"), + this._focusables = new Vl, + this._focusCycler = new dd({ + focusables: this._focusables, + focusTracker: this.focusTracker, + keystrokeHandler: this.keystrokes, + actions: { + focusPrevious: "shift + tab", + focusNext: "tab" + } + }), + this.setTemplate({ + tag: "form", + attributes: { + class: ["ck", "ck-text-alternative-form", "ck-responsive-form"], + tabindex: "-1" + }, + children: [this.labeledInput, this.saveButtonView, this.cancelButtonView] + }), + Ll(this) + } + render() { + super.render(), + this.keystrokes.listenTo(this.element), + zl({ + view: this + }), + [this.labeledInput, this.saveButtonView, this.cancelButtonView].forEach(e => { + this._focusables.add(e), + this.focusTracker.add(e.element) + }) + } + _createButton(e, t, i, n) { + const o = new cd(this.locale); + return o.set({ + label: e, + icon: t, + tooltip: !0 + }), + o.extendTemplate({ + attributes: { + class: i + } + }), + n && o.delegate("execute").to(this, n), + o + } + _createLabeledInputView() { + const e = this.locale.t, + t = new jd(this.locale, Bd); + return t.label = e("Text alternative"), + t + } + } + function gg(e) { + const t = e.editing.view, + i = qd.defaultPositions; + return { + target: t.domConverter.viewToDom(t.document.selection.getSelectedElement()), + positions: [i.northArrowSouth, i.northArrowSouthWest, i.northArrowSouthEast, i.southArrowNorth, i.southArrowNorthWest, i.southArrowNorthEast] + } + } + class mg extends Qe { + static get requires() { + return [Qd] + } + static get pluginName() { + return "ImageTextAlternativeUI" + } + init() { + this._createButton(), + this._createForm() + } + destroy() { + super.destroy(), + this._form.destroy() + } + _createButton() { + const e = this.editor, + t = e.t; + e.ui.componentFactory.add("imageTextAlternative", i => { + const n = e.commands.get("imageTextAlternative"), + o = new cd(i); + return o.set({ + label: t("Change image text alternative"), + icon: Tl, + tooltip: !0 + }), + o.bind("isEnabled").to(n, "isEnabled"), + this.listenTo(o, "execute", () => { + this._showForm() + }), + o + }) + } + _createForm() { + const e = this.editor, + t = e.editing.view.document; + this._balloon = this.editor.plugins.get("ContextualBalloon"), + this._form = new fg(e.locale), + this._form.render(), + this.listenTo(this._form, "submit", () => { + e.execute("imageTextAlternative", { + newValue: this._form.labeledInput.fieldView.element.value + }), + this._hideForm(!0) + }), + this.listenTo(this._form, "cancel", () => { + this._hideForm(!0) + }), + this._form.keystrokes.set("Esc", (e, t) => { + this._hideForm(!0), + t() + }), + this.listenTo(e.ui, "update", () => { + ig(t.selection) ? this._isVisible && function (e) { + const t = e.plugins.get("ContextualBalloon"); + if (ig(e.editing.view.document.selection)) { + const i = gg(e); + t.updatePosition(i) + } + } + (e) : this._hideForm(!0) + }), + Dl({ + emitter: this._form, + activator: () => this._isVisible, + contextElements: [this._balloon.view.element], + callback: () => this._hideForm() + }) + } + _showForm() { + if (this._isVisible) + return; + const e = this.editor, + t = e.commands.get("imageTextAlternative"), + i = this._form.labeledInput; + this._form.disableCssTransitions(), + this._isInBalloon || this._balloon.add({ + view: this._form, + position: gg(e) + }), + i.fieldView.value = i.fieldView.element.value = t.value || "", + this._form.labeledInput.fieldView.select(), + this._form.enableCssTransitions() + } + _hideForm(e) { + this._isInBalloon && (this._form.focusTracker.isFocused && this._form.saveButtonView.focus(), this._balloon.remove(this._form), e && this.editor.editing.view.focus()) + } + get _isVisible() { + return this._balloon.visibleView === this._form + } + get _isInBalloon() { + return this._balloon.hasView(this._form) + } + } + class pg extends Qe { + static get requires() { + return [hg, mg] + } + static get pluginName() { + return "ImageTextAlternative" + } + } + i(76); + function bg(e) { + for (const t of e.getChildren()) + if (t && t.is("element", "caption")) + return t; + return null + } + function wg(e) { + const t = e.parent; + return "figcaption" == e.name && t && "figure" == t.name && t.hasClass("image") ? { + name: !0 + } + : null + } + class kg extends Qe { + static get pluginName() { + return "ImageCaptionEditing" + } + init() { + const e = this.editor, + t = e.editing.view, + i = e.model.schema, + n = e.data, + o = e.editing, + r = e.t; + i.register("caption", { + allowIn: "image", + allowContentOf: "$block", + isLimit: !0 + }), + e.model.document.registerPostFixer(e => this._insertMissingModelCaptionElement(e)), + e.conversion.for("upcast").elementToElement({ + view: wg, + model: "caption" + }); + n.downcastDispatcher.on("insert:caption", _g(e => e.createContainerElement("figcaption"), !1)); + const s = function (e, t) { + return i => { + const n = i.createEditableElement("figcaption"); + return i.setCustomProperty("imageCaption", !0, n), + iu({ + view: e, + element: n, + text: t + }), + Yu(n, i) + } + } + (t, r("Enter image caption")); + o.downcastDispatcher.on("insert:caption", _g(s)), + o.downcastDispatcher.on("insert", this._fixCaptionVisibility(e => e.item), { + priority: "high" + }), + o.downcastDispatcher.on("remove", this._fixCaptionVisibility(e => e.position.parent), { + priority: "high" + }), + t.document.registerPostFixer(e => this._updateCaptionVisibility(e)) + } + _updateCaptionVisibility(e) { + const t = this.editor.editing.mapper, + i = this._lastSelectedCaption; + let n; + const o = this.editor.model.document.selection, + r = o.getSelectedElement(); + if (r && r.is("element", "image")) { + const e = bg(r); + n = t.toViewElement(e) + } + const s = vg(o.getFirstPosition().parent); + if (s && (n = t.toViewElement(s)), n && !this.editor.isReadOnly) + return i ? (i === n || (yg(i, e), this._lastSelectedCaption = n), xg(n, e)) : (this._lastSelectedCaption = n, xg(n, e)); + if (i) { + const t = yg(i, e); + return this._lastSelectedCaption = null, + t + } + return !1 + } + _fixCaptionVisibility(e) { + return (t, i, n) => { + const o = vg(e(i)), + r = this.editor.editing.mapper, + s = n.writer; + if (o) { + const e = r.toViewElement(o); + e && (o.childCount ? s.removeClass("ck-hidden", e) : s.addClass("ck-hidden", e)) + } + } + } + _insertMissingModelCaptionElement(e) { + const t = this.editor.model, + i = t.document.differ.getChanges(), + n = []; + for (const e of i) + if ("insert" == e.type && "$text" != e.name) { + const i = e.position.nodeAfter; + if (i.is("element", "image") && !bg(i) && n.push(i), !i.is("element", "image") && i.childCount) + for (const e of t.createRangeIn(i).getItems()) + e.is("element", "image") && !bg(e) && n.push(e) + } + for (const t of n) + e.appendElement("caption", t); + return !!n.length + } + } + function _g(e, t = !0) { + return (i, n, o) => { + const r = n.item; + if ((r.childCount || t) && ng(r.parent)) { + if (!o.consumable.consume(n.item, "insert")) + return; + const t = o.mapper.toViewElement(n.range.start.parent), + i = e(o.writer), + s = o.writer; + r.childCount || s.addClass("ck-hidden", i), + function (e, t, i, n) { + const o = n.writer.createPositionAt(i, "end"); + n.writer.insert(o, e), + n.mapper.bindElements(t, e) + } + (i, n.item, t, o) + } + } + } + function vg(e) { + const t = e.getAncestors({ + includeSelf: !0 + }).find(e => "caption" == e.name); + return t && t.parent && "image" == t.parent.name ? t : null + } + function yg(e, t) { + return !e.childCount && !e.hasClass("ck-hidden") && (t.addClass("ck-hidden", e), !0) + } + function xg(e, t) { + return !!e.hasClass("ck-hidden") && (t.removeClass("ck-hidden", e), !0) + } + i(78); + class Ag extends Ze { + constructor(e, t) { + super(e), + this.defaultStyle = !1, + this.styles = t.reduce((e, t) => (e[t.name] = t, t.isDefault && (this.defaultStyle = t.name), e), {}) + } + refresh() { + const e = this.editor.model.document.selection.getSelectedElement(); + if (this.isEnabled = ng(e), e) + if (e.hasAttribute("imageStyle")) { + const t = e.getAttribute("imageStyle"); + this.value = !!this.styles[t] && t + } else + this.value = this.defaultStyle; + else + this.value = !1 + } + execute(e) { + const t = e.value, + i = this.editor.model, + n = i.document.selection.getSelectedElement(); + i.change(e => { + this.styles[t].isDefault ? e.removeAttribute("imageStyle", n) : e.setAttribute("imageStyle", t, n) + }) + } + } + function Cg(e, t) { + for (const i of t) + if (i.name === e) + return i + } + const Tg = { + full: { + name: "full", + title: "Full size image", + icon: Il, + isDefault: !0 + }, + side: { + name: "side", + title: "Side image", + icon: Ml, + className: "image-style-side" + }, + alignLeft: { + name: "alignLeft", + title: "Left aligned image", + icon: Pl, + className: "image-style-align-left" + }, + alignCenter: { + name: "alignCenter", + title: "Centered image", + icon: Sl, + className: "image-style-align-center" + }, + alignRight: { + name: "alignRight", + title: "Right aligned image", + icon: Ml, + className: "image-style-align-right" + } + }, + Eg = { + full: Il, + left: Pl, + right: Ml, + center: Sl + }; + function Pg(e = []) { + return e.map(Sg) + } + function Sg(e) { + if ("string" == typeof e) { + const t = e; + Tg[t] ? e = Object.assign({}, Tg[t]) : (Object(c.b)("image-style-not-found", { + name: t + }), e = { + name: t + }) + } else if (Tg[e.name]) { + const t = Tg[e.name], + i = Object.assign({}, e); + for (const n in t) + Object.prototype.hasOwnProperty.call(e, n) || (i[n] = t[n]); + e = i + } + return "string" == typeof e.icon && Eg[e.icon] && (e.icon = Eg[e.icon]), + e + } + class Mg extends Qe { + static get pluginName() { + return "ImageStyleEditing" + } + init() { + const e = this.editor, + t = e.model.schema, + i = e.data, + n = e.editing; + e.config.define("image.styles", ["full", "side"]); + const o = Pg(e.config.get("image.styles")); + t.extend("image", { + allowAttributes: "imageStyle" + }); + const r = function (e) { + return (t, i, n) => { + if (!n.consumable.consume(i.item, t.name)) + return; + const o = Cg(i.attributeNewValue, e), + r = Cg(i.attributeOldValue, e), + s = n.mapper.toViewElement(i.item), + a = n.writer; + r && a.removeClass(r.className, s), + o && a.addClass(o.className, s) + } + } + (o); + n.downcastDispatcher.on("attribute:imageStyle:image", r), + i.downcastDispatcher.on("attribute:imageStyle:image", r), + i.upcastDispatcher.on("element:figure", function (e) { + const t = e.filter(e => !e.isDefault); + return (e, i, n) => { + if (!i.modelRange) + return; + const o = i.viewItem, + r = Ns(i.modelRange.getItems()); + if (!r || n.schema.checkAttribute(r, "imageStyle")) + for (const e of t) + n.consumable.consume(o, { + classes: e.className + }) && n.writer.setAttribute("imageStyle", e.name, r) + } + } + (o), { + priority: "low" + }), + e.commands.add("imageStyle", new Ag(e, o)) + } + } + i(80); + class Ig extends Qe { + static get pluginName() { + return "ImageStyleUI" + } + get localizedDefaultStylesTitles() { + const e = this.editor.t; + return { + "Full size image": e("Full size image"), + "Side image": e("Side image"), + "Left aligned image": e("Left aligned image"), + "Centered image": e("Centered image"), + "Right aligned image": e("Right aligned image") + } + } + init() { + const e = function (e, t) { + for (const i of e) + t[i.title] && (i.title = t[i.title]); + return e + } + (Pg(this.editor.config.get("image.styles")), this.localizedDefaultStylesTitles); + for (const t of e) + this._createButton(t) + } + _createButton(e) { + const t = this.editor, + i = "imageStyle:" + e.name; + t.ui.componentFactory.add(i, i => { + const n = t.commands.get("imageStyle"), + o = new cd(i); + return o.set({ + label: e.title, + icon: e.icon, + tooltip: !0, + isToggleable: !0 + }), + o.bind("isEnabled").to(n, "isEnabled"), + o.bind("isOn").to(n, "value", t => t === e.name), + this.listenTo(o, "execute", () => { + t.execute("imageStyle", { + value: e.name + }), + t.editing.view.focus() + }), + o + }) + } + } + function Ng(e) { + const t = e.map(e => e.replace("+", "\\+")); + return new RegExp(`^image\\/(${t.join("|")})$`) + } + function Rg(e) { + return new Promise((t, i) => { + const n = e.getAttribute("src"); + fetch(n).then(e => e.blob()).then(e => { + const i = Og(e, n), + o = i.replace("image/", ""), + r = new File([e], "image." + o, { + type: i + }); + t(r) + }).catch(e => e && "TypeError" === e.name ? function (e) { + return function (e) { + return new Promise((t, i) => { + const n = _r.document.createElement("img"); + n.addEventListener("load", () => { + const e = _r.document.createElement("canvas"); + e.width = n.width, + e.height = n.height; + e.getContext("2d").drawImage(n, 0, 0), + e.toBlob(e => e ? t(e) : i()) + }), + n.addEventListener("error", () => i()), + n.src = e + }) + } + (e).then(t => { + const i = Og(t, e), + n = i.replace("image/", ""); + return new File([t], "image." + n, { + type: i + }) + }) + } + (n).then(t).catch(i) : i(e)) + }) + } + function Og(e, t) { + return e.type ? e.type : t.match(/data:(image\/\w+);base64/) ? t.match(/data:(image\/\w+);base64/)[1].toLowerCase() : "image/jpeg" + } + class Dg extends Qe { + static get pluginName() { + return "ImageUploadUI" + } + init() { + const e = this.editor, + t = e.t, + i = i => { + const n = new mf(i), + o = e.commands.get("uploadImage"), + r = e.config.get("image.upload.types"), + s = Ng(r); + return n.set({ + acceptedType: r.map(e => "image/" + e).join(","), + allowMultipleFiles: !0 + }), + n.buttonView.set({ + label: t("Insert image"), + icon: El, + tooltip: !0 + }), + n.buttonView.bind("isEnabled").to(o), + n.on("done", (t, i) => { + const n = Array.from(i).filter(e => s.test(e.type)); + n.length && e.execute("uploadImage", { + file: n + }) + }), + n + }; + e.ui.componentFactory.add("uploadImage", i), + e.ui.componentFactory.add("imageUpload", i) + } + } + i(82), + i(84), + i(86); + class Lg extends Qe { + static get pluginName() { + return "ImageUploadProgress" + } + constructor(e) { + super(e), + this.placeholder = "data:image/svg+xml;utf8," + encodeURIComponent('') + } + init() { + this.editor.editing.downcastDispatcher.on("attribute:uploadStatus:image", (...e) => this.uploadStatusChange(...e)) + } + uploadStatusChange(e, t, i) { + const n = this.editor, + o = t.item, + r = o.getAttribute("uploadId"); + if (!i.consumable.consume(t.item, e.name)) + return; + const s = n.plugins.get(ff), + a = r ? t.attributeNewValue : null, + c = this.placeholder, + l = n.editing.mapper.toViewElement(o), + d = i.writer; + if ("reading" == a) + return zg(l, d), void Vg(c, l, d); + if ("uploading" == a) { + const e = s.loaders.get(r); + return zg(l, d), + void(e ? (jg(l, d), function (e, t, i, n) { + const o = function (e) { + const t = e.createUIElement("div", { + class: "ck-progress-bar" + }); + return e.setCustomProperty("progressBar", !0, t), + t + } + (t); + t.insert(t.createPositionAt(e, "end"), o), + i.on("change:uploadedPercent", (e, t, i) => { + n.change(e => { + e.setStyle("width", i + "%", o) + }) + }) + } + (l, d, e, n.editing.view), function (e, t, i) { + if (i.data) { + const n = sg(e); + t.setAttribute("src", i.data, n) + } + } + (l, d, e)) : Vg(c, l, d)) + } + "complete" == a && s.loaders.get(r) && function (e, t, i) { + const n = t.createUIElement("div", { + class: "ck-image-upload-complete-icon" + }); + t.insert(t.createPositionAt(e, "end"), n), + setTimeout(() => { + i.change(e => e.remove(e.createRangeOn(n))) + }, 3e3) + } + (l, d, n.editing.view), + function (e, t) { + Fg(e, t, "progressBar") + } + (l, d), + jg(l, d), + function (e, t) { + t.removeClass("ck-appear", e) + } + (l, d) + } + } + function zg(e, t) { + e.hasClass("ck-appear") || t.addClass("ck-appear", e) + } + function Vg(e, t, i) { + t.hasClass("ck-image-upload-placeholder") || i.addClass("ck-image-upload-placeholder", t); + const n = sg(t); + n.getAttribute("src") !== e && i.setAttribute("src", e, n), + Bg(t, "placeholder") || i.insert(i.createPositionAfter(n), function (e) { + const t = e.createUIElement("div", { + class: "ck-upload-placeholder-loader" + }); + return e.setCustomProperty("placeholder", !0, t), + t + } + (i)) + } + function jg(e, t) { + e.hasClass("ck-image-upload-placeholder") && t.removeClass("ck-image-upload-placeholder", e), + Fg(e, t, "placeholder") + } + function Bg(e, t) { + for (const i of e.getChildren()) + if (i.getCustomProperty(t)) + return i + } + function Fg(e, t, i) { + const n = Bg(e, i); + n && t.remove(t.createRangeOn(n)) + } + class Hg extends Ze { + refresh() { + const e = this.editor.model.document.selection.getSelectedElement(), + t = e && "image" === e.name || !1; + this.isEnabled = rg(this.editor.model) || t + } + execute(e) { + const t = this.editor, + i = t.model, + n = t.plugins.get(ff); + for (const t of en(e.file)) + Ug(i, n, t) + } + } + function Ug(e, t, i) { + const n = t.createLoader(i); + n && og(e, { + uploadId: n.id + }) + } + class Wg extends Qe { + static get requires() { + return [ff, Fd, Eu] + } + static get pluginName() { + return "ImageUploadEditing" + } + constructor(e) { + super(e), + e.config.define("image", { + upload: { + types: ["jpeg", "png", "gif", "bmp", "webp", "tiff"] + } + }) + } + init() { + const e = this.editor, + t = e.model.document, + i = e.model.schema, + n = e.conversion, + o = e.plugins.get(ff), + r = Ng(e.config.get("image.upload.types")); + i.extend("image", { + allowAttributes: ["uploadId", "uploadStatus"] + }); + const s = new Hg(e); + e.commands.add("uploadImage", s), + e.commands.add("imageUpload", s), + n.for("upcast").attributeToAttribute({ + view: { + name: "img", + key: "uploadId" + }, + model: "uploadId" + }), + this.listenTo(e.editing.view.document, "clipboardInput", (t, i) => { + if (n = i.dataTransfer, Array.from(n.types).includes("text/html") && "" !== n.getData("text/html")) + return; + var n; + const o = Array.from(i.dataTransfer.files).filter(e => !!e && r.test(e.type)); + o.length && (t.stop(), e.model.change(t => { + i.targetRanges && t.setSelection(i.targetRanges.map(t => e.editing.mapper.toModelRange(t))), + e.model.enqueueChange("default", () => { + e.execute("uploadImage", { + file: o + }) + }) + })) + }), + this.listenTo(e.plugins.get("ClipboardPipeline"), "inputTransformation", (t, i) => { + const n = Array.from(e.editing.view.createRangeIn(i.content)).filter(e => { + return !(!(t = e.item).is("element", "img") || !t.getAttribute("src")) && (t.getAttribute("src").match(/^data:image\/\w+;base64,/g) || t.getAttribute("src").match(/^blob:/g)) && !e.item.getAttribute("uploadProcessed"); + var t + }).map(e => ({ + promise: Rg(e.item), + imageElement: e.item + })); + if (!n.length) + return; + const r = new _u(e.editing.view.document); + for (const e of n) { + r.setAttribute("uploadProcessed", !0, e.imageElement); + const t = o.createLoader(e.promise); + t && (r.setAttribute("src", "", e.imageElement), r.setAttribute("uploadId", t.id, e.imageElement)) + } + }), + e.editing.view.document.on("dragover", (e, t) => { + t.preventDefault() + }), + t.on("change", () => { + const i = t.differ.getChanges({ + includeChangesInGraveyard: !0 + }); + for (const t of i) + if ("insert" == t.type && "$text" != t.name) { + const i = t.position.nodeAfter, + n = "$graveyard" == t.position.root.rootName; + for (const t of qg(e, i)) { + const e = t.getAttribute("uploadId"); + if (!e) + continue; + const i = o.loaders.get(e); + i && (n ? i.abort() : "idle" == i.status && this._readAndUpload(i, t)) + } + } + }), + this.on("uploadComplete", (e, { + imageElement: t, + data: i + }) => { + const n = i.urls ? i.urls : i; + this.editor.model.change(e => { + e.setAttribute("src", n.default, t), + this._parseAndSetSrcsetAttributeOnImage(n, t, e) + }) + }, { + priority: "low" + }) + } + _readAndUpload(e, t) { + const i = this.editor, + n = i.model, + o = i.locale.t, + r = i.plugins.get(ff), + s = i.plugins.get(Fd); + return n.enqueueChange("transparent", e => { + e.setAttribute("uploadStatus", "reading", t) + }), + e.read().then(() => { + const o = e.upload(); + if (Po.isSafari) { + const e = sg(i.editing.mapper.toViewElement(t)); + i.editing.view.once("render", () => { + if (!e.parent) + return; + const t = i.editing.view.domConverter.mapViewToDom(e.parent); + if (!t) + return; + const n = t.style.display; + t.style.display = "none", + t._ckHack = t.offsetHeight, + t.style.display = n + }) + } + return n.enqueueChange("transparent", e => { + e.setAttribute("uploadStatus", "uploading", t) + }), + o + }).then(e => { + n.enqueueChange("transparent", i => { + i.setAttribute("uploadStatus", "complete", t), + this.fire("uploadComplete", { + data: e, + imageElement: t + }) + }), + a() + }).catch(i => { + if ("error" !== e.status && "aborted" !== e.status) + throw i; + "error" == e.status && i && s.showWarning(i, { + title: o("Upload failed"), + namespace: "upload" + }), + a(), + n.enqueueChange("transparent", e => { + e.remove(t) + }) + }); + function a() { + n.enqueueChange("transparent", e => { + e.removeAttribute("uploadId", t), + e.removeAttribute("uploadStatus", t) + }), + r.destroyLoader(e) + } + } + _parseAndSetSrcsetAttributeOnImage(e, t, i) { + let n = 0; + const o = Object.keys(e).filter(e => { + const t = parseInt(e, 10); + if (!isNaN(t)) + return n = Math.max(n, t), !0 + }).map(t => `${e[t]} ${t}w`).join(", "); + "" != o && i.setAttribute("srcset", { + data: o, + width: n + }, t) + } + } + function qg(e, t) { + return Array.from(e.model.createRangeOn(t)).filter(e => e.item.is("element", "image")).map(e => e.item) + } + class $g extends Qe { + static get pluginName() { + return "IndentEditing" + } + init() { + const e = this.editor; + e.commands.add("indent", new et(e)), + e.commands.add("outdent", new et(e)) + } + } + var Yg = '', + Gg = ''; + class Kg extends Qe { + static get pluginName() { + return "IndentUI" + } + init() { + const e = this.editor, + t = e.locale, + i = e.t, + n = "ltr" == t.uiLanguageDirection ? Yg : Gg, + o = "ltr" == t.uiLanguageDirection ? Gg : Yg; + this._defineButton("indent", i("Increase indent"), n), + this._defineButton("outdent", i("Decrease indent"), o) + } + _defineButton(e, t, i) { + const n = this.editor; + n.ui.componentFactory.add(e, o => { + const r = n.commands.get(e), + s = new cd(o); + return s.set({ + label: t, + icon: i, + tooltip: !0 + }), + s.bind("isOn", "isEnabled").to(r, "value", "isEnabled"), + this.listenTo(s, "execute", () => { + n.execute(e), + n.editing.view.focus() + }), + s + }) + } + } + class Qg { + constructor() { + this._definitions = new Set + } + get length() { + return this._definitions.size + } + add(e) { + Array.isArray(e) ? e.forEach(e => this._definitions.add(e)) : this._definitions.add(e) + } + getDispatcher() { + return e => { + e.on("attribute:linkHref", (e, t, i) => { + if (!i.consumable.test(t.item, "attribute:linkHref")) + return; + const n = i.writer, + o = n.document.selection; + for (const e of this._definitions) { + const r = n.createAttributeElement("a", e.attributes, { + priority: 5 + }); + n.setCustomProperty("link", !0, r), + e.callback(t.attributeNewValue) ? t.item.is("selection") ? n.wrap(o.getFirstRange(), r) : n.wrap(i.mapper.toViewRange(t.range), r) : n.unwrap(i.mapper.toViewRange(t.range), r) + } + }, { + priority: "high" + }) + } + } + getDispatcherForLinkedImage() { + return e => { + e.on("attribute:linkHref:image", (e, t, i) => { + const n = i.mapper.toViewElement(t.item), + o = Array.from(n.getChildren()).find(e => "a" === e.name); + for (const e of this._definitions) { + const n = fn(e.attributes); + if (e.callback(t.attributeNewValue)) + for (const[e, t]of n) + "class" === e ? i.writer.addClass(t, o) : i.writer.setAttribute(e, t, o); + else + for (const[e, t]of n) + "class" === e ? i.writer.removeClass(t, o) : i.writer.removeAttribute(e, o) + } + }) + } + } + } + var Jg = function (e, t, i) { + var n = e.length; + return i = void 0 === i ? n : i, + !t && i >= n ? e : On(e, t, i) + }, + Zg = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"); + var Xg = function (e) { + return Zg.test(e) + }; + var em = function (e) { + return e.split("") + }, + tm = "[\\ud800-\\udfff]", + im = "[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", + nm = "\\ud83c[\\udffb-\\udfff]", + om = "[^\\ud800-\\udfff]", + rm = "(?:\\ud83c[\\udde6-\\uddff]){2}", + sm = "[\\ud800-\\udbff][\\udc00-\\udfff]", + am = "(?:" + im + "|" + nm + ")" + "?", + cm = "[\\ufe0e\\ufe0f]?" + am + ("(?:\\u200d(?:" + [om, rm, sm].join("|") + ")[\\ufe0e\\ufe0f]?" + am + ")*"), + lm = "(?:" + [om + im + "?", im, rm, sm, tm].join("|") + ")", + dm = RegExp(nm + "(?=" + nm + ")|" + lm + cm, "g"); + var um = function (e) { + return e.match(dm) || [] + }; + var hm = function (e) { + return Xg(e) ? um(e) : em(e) + }; + var fm = function (e) { + return function (t) { + t = Sn(t); + var i = Xg(t) ? hm(t) : void 0, + n = i ? i[0] : t.charAt(0), + o = i ? Jg(i, 1).join("") : t.slice(1); + return n[e]() + o + } + } + ("toUpperCase"); + const gm = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g, + mm = /^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i, + pm = /^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i, + bm = /^((\w+:(\/{2,})?)|(\W))/i; + function wm(e, { + writer: t + }) { + const i = t.createAttributeElement("a", { + href: e + }, { + priority: 5 + }); + return t.setCustomProperty("link", !0, i), + i + } + function km(e) { + return function (e) { + return e.replace(gm, "").match(mm) + } + (e = String(e)) ? e : "#" + } + function _m(e, t) { + return !!e && (e.is("element", "image") && t.checkAttribute("image", "linkHref")) + } + function vm(e, t) { + const i = (n = e, pm.test(n) ? "mailto:" : t); + var n; + const o = !!i && !bm.test(e); + return e && o ? i + e : e + } + class ym extends Ze { + constructor(e) { + super(e), + this.manualDecorators = new Zi, + this.automaticDecorators = new Qg + } + restoreManualDecoratorStates() { + for (const e of this.manualDecorators) + e.value = this._getDecoratorStateFromModel(e.id) + } + refresh() { + const e = this.editor.model, + t = e.document, + i = Ns(t.selection.getSelectedBlocks()); + _m(i, e.schema) ? (this.value = i.getAttribute("linkHref"), this.isEnabled = e.schema.checkAttribute(i, "linkHref")) : (this.value = t.selection.getAttribute("linkHref"), this.isEnabled = e.schema.checkAttributeInSelection(t.selection, "linkHref")); + for (const e of this.manualDecorators) + e.value = this._getDecoratorStateFromModel(e.id) + } + execute(e, t = {}) { + const i = this.editor.model, + n = i.document.selection, + o = [], + r = []; + for (const e in t) + t[e] ? o.push(e) : r.push(e); + i.change(t => { + if (n.isCollapsed) { + const s = n.getFirstPosition(); + if (n.hasAttribute("linkHref")) { + const a = Xh(s, "linkHref", n.getAttribute("linkHref"), i); + t.setAttribute("linkHref", e, a), + o.forEach(e => { + t.setAttribute(e, !0, a) + }), + r.forEach(e => { + t.removeAttribute(e, a) + }), + t.setSelection(t.createPositionAfter(a.end.nodeBefore)) + } else if ("" !== e) { + const r = fn(n.getAttributes()); + r.set("linkHref", e), + o.forEach(e => { + r.set(e, !0) + }); + const { + end: a + } = i.insertContent(t.createText(e, r), s); + t.setSelection(a) + } + ["linkHref", ...o, ...r].forEach(e => { + t.removeSelectionAttribute(e) + }) + } else { + const s = i.schema.getValidRanges(n.getRanges(), "linkHref"), + a = []; + for (const e of n.getSelectedBlocks()) + i.schema.checkAttribute(e, "linkHref") && a.push(t.createRangeOn(e)); + const c = a.slice(); + for (const e of s) + this._isRangeToUpdate(e, a) && c.push(e); + for (const i of c) + t.setAttribute("linkHref", e, i), o.forEach(e => { + t.setAttribute(e, !0, i) + }), r.forEach(e => { + t.removeAttribute(e, i) + }) + } + }) + } + _getDecoratorStateFromModel(e) { + const t = this.editor.model, + i = t.document, + n = Ns(i.selection.getSelectedBlocks()); + return _m(n, t.schema) ? n.getAttribute(e) : i.selection.getAttribute(e) + } + _isRangeToUpdate(e, t) { + for (const i of t) + if (i.containsRange(e)) + return !1; + return !0 + } + } + class xm extends Ze { + refresh() { + const e = this.editor.model, + t = e.document, + i = Ns(t.selection.getSelectedBlocks()); + _m(i, e.schema) ? this.isEnabled = e.schema.checkAttribute(i, "linkHref") : this.isEnabled = e.schema.checkAttributeInSelection(t.selection, "linkHref") + } + execute() { + const e = this.editor, + t = this.editor.model, + i = t.document.selection, + n = e.commands.get("link"); + t.change(e => { + const o = i.isCollapsed ? [Xh(i.getFirstPosition(), "linkHref", i.getAttribute("linkHref"), t)] : t.schema.getValidRanges(i.getRanges(), "linkHref"); + for (const t of o) + if (e.removeAttribute("linkHref", t), n) + for (const i of n.manualDecorators) + e.removeAttribute(i.id, t) + }) + } + } + class Am { + constructor({ + id: e, + label: t, + attributes: i, + defaultValue: n + }) { + this.id = e, + this.set("value"), + this.defaultValue = n, + this.label = t, + this.attributes = i + } + } + Ke(Am, Ue); + i(88); + const Cm = /^(https?:)?\/\//; + class Tm extends Qe { + static get pluginName() { + return "LinkEditing" + } + static get requires() { + return [Vh, Oh, Eu] + } + constructor(e) { + super(e), + e.config.define("link", { + addTargetToExternalLinks: !1 + }) + } + init() { + const e = this.editor; + e.model.schema.extend("$text", { + allowAttributes: "linkHref" + }), + e.conversion.for("dataDowncast").attributeToElement({ + model: "linkHref", + view: wm + }), + e.conversion.for("editingDowncast").attributeToElement({ + model: "linkHref", + view: (e, t) => wm(km(e), t) + }), + e.conversion.for("upcast").elementToAttribute({ + view: { + name: "a", + attributes: { + href: !0 + } + }, + model: { + key: "linkHref", + value: e => e.getAttribute("href") + } + }), + e.commands.add("link", new ym(e)), + e.commands.add("unlink", new xm(e)); + const t = function (e, t) { + const i = { + "Open in a new tab": e("Open in a new tab"), + Downloadable: e("Downloadable") + }; + return t.forEach(e => (e.label && i[e.label] && (e.label = i[e.label]), e)), + t + } + (e.t, function (e) { + const t = []; + if (e) + for (const[i, n]of Object.entries(e)) { + const e = Object.assign({}, n, { + id: "link" + fm(i) + }); + t.push(e) + } + return t + } + (e.config.get("link.decorators"))); + this._enableAutomaticDecorators(t.filter(e => "automatic" === e.mode)), + this._enableManualDecorators(t.filter(e => "manual" === e.mode)); + e.plugins.get(Vh).registerAttribute("linkHref"), + function (e, t, i, n) { + const o = e.editing.view, + r = new Set; + o.document.registerPostFixer(o => { + const s = e.model.document.selection; + let a = !1; + if (s.hasAttribute(t)) { + const c = Xh(s.getFirstPosition(), t, s.getAttribute(t), e.model), + l = e.editing.mapper.toViewRange(c); + for (const e of l.getItems()) + e.is("element", i) && !e.hasClass(n) && (o.addClass(n, e), r.add(e), a = !0) + } + return a + }), + e.conversion.for("editingDowncast").add(e => { + function t() { + o.change(e => { + for (const t of r.values()) + e.removeClass(n, t), r.delete(t) + }) + } + e.on("insert", t, { + priority: "highest" + }), + e.on("remove", t, { + priority: "highest" + }), + e.on("attribute", t, { + priority: "highest" + }), + e.on("selection", t, { + priority: "highest" + }) + }) + } + (e, "linkHref", "a", "ck-link_selected"), + this._enableInsertContentSelectionAttributesFixer(), + this._enableClickingAfterLink(), + this._enableTypingOverLink(), + this._handleDeleteContentAfterLink() + } + _enableAutomaticDecorators(e) { + const t = this.editor, + i = t.commands.get("link").automaticDecorators; + t.config.get("link.addTargetToExternalLinks") && i.add({ + id: "linkIsExternal", + mode: "automatic", + callback: e => Cm.test(e), + attributes: { + target: "_blank", + rel: "noopener noreferrer" + } + }), + i.add(e), + i.length && t.conversion.for("downcast").add(i.getDispatcher()) + } + _enableManualDecorators(e) { + if (!e.length) + return; + const t = this.editor, + i = t.commands.get("link").manualDecorators; + e.forEach(e => { + t.model.schema.extend("$text", { + allowAttributes: e.id + }), + i.add(new Am(e)), + t.conversion.for("downcast").attributeToElement({ + model: e.id, + view: (t, { + writer: n + }) => { + if (t) { + const t = i.get(e.id).attributes, + o = n.createAttributeElement("a", t, { + priority: 5 + }); + return n.setCustomProperty("link", !0, o), + o + } + } + }), + t.conversion.for("upcast").elementToAttribute({ + view: { + name: "a", + attributes: i.get(e.id).attributes + }, + model: { + key: e.id + } + }) + }) + } + _enableInsertContentSelectionAttributesFixer() { + const e = this.editor, + t = e.model, + i = t.document.selection, + n = e.commands.get("link"); + this.listenTo(t, "insertContent", () => { + const e = i.anchor.nodeBefore, + o = i.anchor.nodeAfter; + i.hasAttribute("linkHref") && e && e.hasAttribute("linkHref") && (o && o.hasAttribute("linkHref") || t.change(e => { + Em(e, n.manualDecorators) + })) + }, { + priority: "low" + }) + } + _enableClickingAfterLink() { + const e = this.editor, + t = e.commands.get("link"); + e.editing.view.addObserver(ku); + let i = !1; + this.listenTo(e.editing.view.document, "mousedown", () => { + i = !0 + }), + this.listenTo(e.editing.view.document, "selectionChange", () => { + if (!i) + return; + i = !1; + const n = e.model.document.selection; + if (!n.isCollapsed) + return; + if (!n.hasAttribute("linkHref")) + return; + const o = n.getFirstPosition(), + r = Xh(o, "linkHref", n.getAttribute("linkHref"), e.model); + (o.isTouching(r.start) || o.isTouching(r.end)) && e.model.change(e => { + Em(e, t.manualDecorators) + }) + }) + } + _enableTypingOverLink() { + const e = this.editor, + t = e.editing.view; + let i, + n; + this.listenTo(t.document, "delete", () => { + n = !0 + }, { + priority: "high" + }), + this.listenTo(e.model, "deleteContent", () => { + const t = e.model.document.selection; + t.isCollapsed || (n ? n = !1 : Pm(e) && function (e) { + const t = e.document.selection, + i = t.getFirstPosition(), + n = t.getLastPosition(), + o = i.nodeAfter; + if (!o) + return !1; + if (!o.is("$text")) + return !1; + if (!o.hasAttribute("linkHref")) + return !1; + const r = n.textNode || n.nodeBefore; + if (o === r) + return !0; + return Xh(i, "linkHref", o.getAttribute("linkHref"), e).containsRange(e.createRange(i, n), !0) + } + (e.model) && (i = t.getAttributes())) + }, { + priority: "high" + }), + this.listenTo(e.model, "insertContent", (t, [o]) => { + n = !1, + Pm(e) && i && (e.model.change(e => { + for (const[t, n]of i) + e.setAttribute(t, n, o) + }), i = null) + }, { + priority: "high" + }) + } + _handleDeleteContentAfterLink() { + const e = this.editor, + t = e.model, + i = t.document.selection, + n = e.editing.view, + o = e.commands.get("link"); + let r = !1, + s = !1; + this.listenTo(n.document, "delete", (e, t) => { + s = t.domEvent.keyCode === Io.backspace + }, { + priority: "high" + }), + this.listenTo(t, "deleteContent", () => { + r = !1; + const e = i.getFirstPosition(), + n = i.getAttribute("linkHref"); + if (!n) + return; + const o = Xh(e, "linkHref", n, t); + r = o.containsPosition(e) || o.end.isEqual(e) + }, { + priority: "high" + }), + this.listenTo(t, "deleteContent", () => { + s && (s = !1, r || e.model.enqueueChange(e => { + Em(e, o.manualDecorators) + })) + }, { + priority: "low" + }) + } + } + function Em(e, t) { + e.removeSelectionAttribute("linkHref"); + for (const i of t) + e.removeSelectionAttribute(i.id) + } + function Pm(e) { + return e.plugins.get("Input").isInput(e.model.change(e => e.batch)) + } + i(90); + class Sm extends jl { + constructor(e, t) { + super(e); + const i = e.t; + this.focusTracker = new Rs, + this.keystrokes = new Os, + this.urlInputView = this._createUrlInput(), + this.saveButtonView = this._createButton(i("Save"), Cl, "ck-button-save"), + this.saveButtonView.type = "submit", + this.cancelButtonView = this._createButton(i("Cancel"), Al, "ck-button-cancel", "cancel"), + this._manualDecoratorSwitches = this._createManualDecoratorSwitches(t), + this.children = this._createFormChildren(t.manualDecorators), + this._focusables = new Vl, + this._focusCycler = new dd({ + focusables: this._focusables, + focusTracker: this.focusTracker, + keystrokeHandler: this.keystrokes, + actions: { + focusPrevious: "shift + tab", + focusNext: "tab" + } + }); + const n = ["ck", "ck-link-form", "ck-responsive-form"]; + t.manualDecorators.length && n.push("ck-link-form_layout-vertical", "ck-vertical-form"), + this.setTemplate({ + tag: "form", + attributes: { + class: n, + tabindex: "-1" + }, + children: this.children + }), + Ll(this) + } + getDecoratorSwitchesState() { + return Array.from(this._manualDecoratorSwitches).reduce((e, t) => (e[t.name] = t.isOn, e), {}) + } + render() { + super.render(), + zl({ + view: this + }); + [this.urlInputView, ...this._manualDecoratorSwitches, this.saveButtonView, this.cancelButtonView].forEach(e => { + this._focusables.add(e), + this.focusTracker.add(e.element) + }), + this.keystrokes.listenTo(this.element) + } + focus() { + this._focusCycler.focusFirst() + } + _createUrlInput() { + const e = this.locale.t, + t = new jd(this.locale, Bd); + return t.label = e("Link URL"), + t + } + _createButton(e, t, i, n) { + const o = new cd(this.locale); + return o.set({ + label: e, + icon: t, + tooltip: !0 + }), + o.extendTemplate({ + attributes: { + class: i + } + }), + n && o.delegate("execute").to(this, n), + o + } + _createManualDecoratorSwitches(e) { + const t = this.createCollection(); + for (const i of e.manualDecorators) { + const n = new ld(this.locale); + n.set({ + name: i.id, + label: i.label, + withText: !0 + }), + n.bind("isOn").toMany([i, e], "value", (e, t) => void 0 === t && void 0 === e ? i.defaultValue : e), + n.on("execute", () => { + i.set("value", !n.isOn) + }), + t.add(n) + } + return t + } + _createFormChildren(e) { + const t = this.createCollection(); + if (t.add(this.urlInputView), e.length) { + const e = new jl; + e.setTemplate({ + tag: "ul", + children: this._manualDecoratorSwitches.map(e => ({ + tag: "li", + children: [e], + attributes: { + class: ["ck", "ck-list__item"] + } + })), + attributes: { + class: ["ck", "ck-reset", "ck-list"] + } + }), + t.add(e) + } + return t.add(this.saveButtonView), + t.add(this.cancelButtonView), + t + } + } + i(92); + class Mm extends jl { + constructor(e) { + super(e); + const t = e.t; + this.focusTracker = new Rs, + this.keystrokes = new Os, + this.previewButtonView = this._createPreviewButton(), + this.unlinkButtonView = this._createButton(t("Unlink"), '', "unlink"), + this.editButtonView = this._createButton(t("Edit link"), Nl, "edit"), + this.set("href"), + this._focusables = new Vl, + this._focusCycler = new dd({ + focusables: this._focusables, + focusTracker: this.focusTracker, + keystrokeHandler: this.keystrokes, + actions: { + focusPrevious: "shift + tab", + focusNext: "tab" + } + }), + this.setTemplate({ + tag: "div", + attributes: { + class: ["ck", "ck-link-actions", "ck-responsive-form"], + tabindex: "-1" + }, + children: [this.previewButtonView, this.editButtonView, this.unlinkButtonView] + }) + } + render() { + super.render(); + [this.previewButtonView, this.editButtonView, this.unlinkButtonView].forEach(e => { + this._focusables.add(e), + this.focusTracker.add(e.element) + }), + this.keystrokes.listenTo(this.element) + } + focus() { + this._focusCycler.focusFirst() + } + _createButton(e, t, i) { + const n = new cd(this.locale); + return n.set({ + label: e, + icon: t, + tooltip: !0 + }), + n.delegate("execute").to(this, i), + n + } + _createPreviewButton() { + const e = new cd(this.locale), + t = this.bindTemplate, + i = this.t; + return e.set({ + withText: !0, + tooltip: i("Open link in new tab") + }), + e.extendTemplate({ + attributes: { + class: ["ck", "ck-link-actions__preview"], + href: t.to("href", e => e && km(e)), + target: "_blank", + rel: "noopener noreferrer" + } + }), + e.bind("label").to(this, "href", e => e || i("This link has no URL")), + e.bind("isEnabled").to(this, "href", e => !!e), + e.template.tag = "a", + e.template.eventListeners = {}, + e + } + } + class Im extends Qe { + static get requires() { + return [Qd] + } + static get pluginName() { + return "LinkUI" + } + init() { + const e = this.editor; + e.editing.view.addObserver(wu), + this.actionsView = this._createActionsView(), + this.formView = this._createFormView(), + this._balloon = e.plugins.get(Qd), + this._createToolbarLinkButton(), + this._enableUserBalloonInteractions(), + e.conversion.for("editingDowncast").markerToHighlight({ + model: "link-ui", + view: { + classes: ["ck-fake-link-selection"] + } + }), + e.conversion.for("editingDowncast").markerToElement({ + model: "link-ui", + view: { + name: "span", + classes: ["ck-fake-link-selection", "ck-fake-link-selection_collapsed"] + } + }) + } + destroy() { + super.destroy(), + this.formView.destroy() + } + _createActionsView() { + const e = this.editor, + t = new Mm(e.locale), + i = e.commands.get("link"), + n = e.commands.get("unlink"); + return t.bind("href").to(i, "value"), + t.editButtonView.bind("isEnabled").to(i), + t.unlinkButtonView.bind("isEnabled").to(n), + this.listenTo(t, "edit", () => { + this._addFormView() + }), + this.listenTo(t, "unlink", () => { + e.execute("unlink"), + this._hideUI() + }), + t.keystrokes.set("Esc", (e, t) => { + this._hideUI(), + t() + }), + t.keystrokes.set("Ctrl+K", (e, t) => { + this._addFormView(), + t() + }), + t + } + _createFormView() { + const e = this.editor, + t = e.commands.get("link"), + i = e.config.get("link.defaultProtocol"), + n = new Sm(e.locale, t); + return n.urlInputView.fieldView.bind("value").to(t, "value"), + n.urlInputView.bind("isReadOnly").to(t, "isEnabled", e => !e), + n.saveButtonView.bind("isEnabled").to(t), + this.listenTo(n, "submit", () => { + const { + value: t + } = n.urlInputView.fieldView.element, + o = vm(t, i); + e.execute("link", o, n.getDecoratorSwitchesState()), + this._closeFormView() + }), + this.listenTo(n, "cancel", () => { + this._closeFormView() + }), + n.keystrokes.set("Esc", (e, t) => { + this._closeFormView(), + t() + }), + n + } + _createToolbarLinkButton() { + const e = this.editor, + t = e.commands.get("link"), + i = e.t; + e.keystrokes.set("Ctrl+K", (e, i) => { + i(), + t.isEnabled && this._showUI(!0) + }), + e.ui.componentFactory.add("link", e => { + const n = new cd(e); + return n.isEnabled = !0, + n.label = i("Link"), + n.icon = '', + n.keystroke = "Ctrl+K", + n.tooltip = !0, + n.isToggleable = !0, + n.bind("isEnabled").to(t, "isEnabled"), + n.bind("isOn").to(t, "value", e => !!e), + this.listenTo(n, "execute", () => this._showUI(!0)), + n + }) + } + _enableUserBalloonInteractions() { + const e = this.editor.editing.view.document; + this.listenTo(e, "click", () => { + this._getSelectedLinkElement() && this._showUI() + }), + this.editor.keystrokes.set("Tab", (e, t) => { + this._areActionsVisible && !this.actionsView.focusTracker.isFocused && (this.actionsView.focus(), t()) + }, { + priority: "high" + }), + this.editor.keystrokes.set("Esc", (e, t) => { + this._isUIVisible && (this._hideUI(), t()) + }), + Dl({ + emitter: this.formView, + activator: () => this._isUIInPanel, + contextElements: [this._balloon.view.element], + callback: () => this._hideUI() + }) + } + _addActionsView() { + this._areActionsInPanel || this._balloon.add({ + view: this.actionsView, + position: this._getBalloonPositionData() + }) + } + _addFormView() { + if (this._isFormInPanel) + return; + const e = this.editor.commands.get("link"); + this.formView.disableCssTransitions(), + this._balloon.add({ + view: this.formView, + position: this._getBalloonPositionData() + }), + this._balloon.visibleView === this.formView && this.formView.urlInputView.fieldView.select(), + this.formView.enableCssTransitions(), + this.formView.urlInputView.fieldView.element.value = e.value || "" + } + _closeFormView() { + const e = this.editor.commands.get("link"); + e.restoreManualDecoratorStates(), + void 0 !== e.value ? this._removeFormView() : this._hideUI() + } + _removeFormView() { + this._isFormInPanel && (this.formView.saveButtonView.focus(), this._balloon.remove(this.formView), this.editor.editing.view.focus(), this._hideFakeVisualSelection()) + } + _showUI(e = !1) { + this._getSelectedLinkElement() ? (this._areActionsVisible ? this._addFormView() : this._addActionsView(), e && this._balloon.showStack("main")) : (this._showFakeVisualSelection(), this._addActionsView(), e && this._balloon.showStack("main"), this._addFormView()), + this._startUpdatingUI() + } + _hideUI() { + if (!this._isUIInPanel) + return; + const e = this.editor; + this.stopListening(e.ui, "update"), + this.stopListening(this._balloon, "change:visibleView"), + e.editing.view.focus(), + this._removeFormView(), + this._balloon.remove(this.actionsView), + this._hideFakeVisualSelection() + } + _startUpdatingUI() { + const e = this.editor, + t = e.editing.view.document; + let i = this._getSelectedLinkElement(), + n = r(); + const o = () => { + const e = this._getSelectedLinkElement(), + t = r(); + i && !e || !i && t !== n ? this._hideUI() : this._isUIVisible && this._balloon.updatePosition(this._getBalloonPositionData()), + i = e, + n = t + }; + function r() { + return t.selection.focus.getAncestors().reverse().find(e => e.is("element")) + } + this.listenTo(e.ui, "update", o), + this.listenTo(this._balloon, "change:visibleView", o) + } + get _isFormInPanel() { + return this._balloon.hasView(this.formView) + } + get _areActionsInPanel() { + return this._balloon.hasView(this.actionsView) + } + get _areActionsVisible() { + return this._balloon.visibleView === this.actionsView + } + get _isUIInPanel() { + return this._isFormInPanel || this._areActionsInPanel + } + get _isUIVisible() { + return this._balloon.visibleView == this.formView || this._areActionsVisible + } + _getBalloonPositionData() { + const e = this.editor.editing.view, + t = this.editor.model, + i = e.document; + let n = null; + if (t.markers.has("link-ui")) { + const t = Array.from(this.editor.editing.mapper.markerNameToElements("link-ui")), + i = e.createRange(e.createPositionBefore(t[0]), e.createPositionAfter(t[t.length - 1])); + n = e.domConverter.viewRangeToDom(i) + } else { + const t = this._getSelectedLinkElement(), + o = i.selection.getFirstRange(); + n = t ? e.domConverter.mapViewToDom(t) : e.domConverter.viewRangeToDom(o) + } + return { + target: n + } + } + _getSelectedLinkElement() { + const e = this.editor.editing.view, + t = e.document.selection; + if (t.isCollapsed) + return Nm(t.getFirstPosition()); { + const i = t.getFirstRange().getTrimmed(), + n = Nm(i.start), + o = Nm(i.end); + return n && n == o && e.createRangeIn(n).getTrimmed().isEqual(i) ? n : null + } + } + _showFakeVisualSelection() { + const e = this.editor.model; + e.change(t => { + const i = e.document.selection.getFirstRange(); + if (e.markers.has("link-ui")) + t.updateMarker("link-ui", { + range: i + }); + else if (i.start.isAtEnd) { + const n = i.start.getLastMatchingPosition(({ + item: t + }) => !e.schema.isContent(t), { + boundaries: i + }); + t.addMarker("link-ui", { + usingOperation: !1, + affectsData: !1, + range: t.createRange(n, i.end) + }) + } else + t.addMarker("link-ui", { + usingOperation: !1, + affectsData: !1, + range: i + }) + }) + } + _hideFakeVisualSelection() { + const e = this.editor.model; + e.markers.has("link-ui") && e.change(e => { + e.removeMarker("link-ui") + }) + } + } + function Nm(e) { + return e.getAncestors().find(e => { + return (t = e).is("attributeElement") && !!t.getCustomProperty("link"); + var t + }) + } + const Rm = new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$", "i"); + class Om extends Qe { + static get pluginName() { + return "AutoLink" + } + init() { + const e = this.editor.model.document.selection; + e.on("change:range", () => { + this.isEnabled = !e.anchor.parent.is("element", "codeBlock") + }), + this._enableTypingHandling() + } + afterInit() { + this._enableEnterHandling(), + this._enableShiftEnterHandling() + } + _enableTypingHandling() { + const e = this.editor, + t = new zh(e.model, e => { + if (!function (e) { + return e.length > 4 && " " === e[e.length - 1] && " " !== e[e.length - 2] + } + (e)) + return; + const t = Dm(e.substr(0, e.length - 1)); + return t ? { + url: t + } + : void 0 + }), + i = e.plugins.get("Input"); + t.on("matched:data", (t, n) => { + const { + batch: o, + range: r, + url: s + } = n; + if (!i.isInput(o)) + return; + const a = r.end.getShiftedBy(-1), + c = a.getShiftedBy(-s.length), + l = e.model.createRange(c, a); + this._applyAutoLink(s, l) + }), + t.bind("isEnabled").to(this) + } + _enableEnterHandling() { + const e = this.editor, + t = e.model, + i = e.commands.get("enter"); + i && i.on("execute", () => { + const e = t.document.selection.getFirstPosition(); + if (!e.parent.previousSibling) + return; + const i = t.createRangeIn(e.parent.previousSibling); + this._checkAndApplyAutoLinkOnRange(i) + }) + } + _enableShiftEnterHandling() { + const e = this.editor, + t = e.model, + i = e.commands.get("shiftEnter"); + i && i.on("execute", () => { + const e = t.document.selection.getFirstPosition(), + i = t.createRange(t.createPositionAt(e.parent, 0), e.getShiftedBy(-1)); + this._checkAndApplyAutoLinkOnRange(i) + }) + } + _checkAndApplyAutoLinkOnRange(e) { + const t = this.editor.model, { + text: i, + range: n + } = Lh(e, t), + o = Dm(i); + if (o) { + const e = t.createRange(n.end.getShiftedBy(-o.length), n.end); + this._applyAutoLink(o, e) + } + } + _applyAutoLink(e, t) { + const i = this.editor.model; + this.isEnabled && function (e, t) { + return t.schema.checkAttributeInSelection(t.createSelection(e), "linkHref") + } + (t, i) && i.enqueueChange(i => { + const n = this.editor.config.get("link.defaultProtocol"), + o = vm(e, n); + i.setAttribute("linkHref", o, t) + }) + } + } + function Dm(e) { + const t = Rm.exec(e); + return t ? t[2] : null + } + class Lm extends Ze { + constructor(e, t) { + super(e), + this.type = t + } + refresh() { + this.value = this._getValue(), + this.isEnabled = this._checkEnabled() + } + execute(e = {}) { + const t = this.editor.model, + i = t.document, + n = Array.from(i.selection.getSelectedBlocks()).filter(e => Vm(e, t.schema)), + o = void 0 !== e.forceValue ? !e.forceValue : this.value; + t.change(e => { + if (o) { + let t = n[n.length - 1].nextSibling, + i = Number.POSITIVE_INFINITY, + o = []; + for (; t && "listItem" == t.name && 0 !== t.getAttribute("listIndent"); ) { + const e = t.getAttribute("listIndent"); + e < i && (i = e); + const n = e - i; + o.push({ + element: t, + listIndent: n + }), + t = t.nextSibling + } + o = o.reverse(); + for (const t of o) + e.setAttribute("listIndent", t.listIndent, t.element) + } + if (!o) { + let e = Number.POSITIVE_INFINITY; + for (const t of n) + t.is("element", "listItem") && t.getAttribute("listIndent") < e && (e = t.getAttribute("listIndent")); + e = 0 === e ? 1 : e, + zm(n, !0, e), + zm(n, !1, e) + } + for (const t of n.reverse()) + o && "listItem" == t.name ? e.rename(t, "paragraph") : o || "listItem" == t.name ? o || "listItem" != t.name || t.getAttribute("listType") == this.type || e.setAttribute("listType", this.type, t) : (e.setAttributes({ + listType: this.type, + listIndent: 0 + }, t), e.rename(t, "listItem")); + this.fire("_executeCleanup", n) + }) + } + _getValue() { + const e = Ns(this.editor.model.document.selection.getSelectedBlocks()); + return !!e && e.is("element", "listItem") && e.getAttribute("listType") == this.type + } + _checkEnabled() { + if (this.value) + return !0; + const e = this.editor.model.document.selection, + t = this.editor.model.schema, + i = Ns(e.getSelectedBlocks()); + return !!i && Vm(i, t) + } + } + function zm(e, t, i) { + const n = t ? e[0] : e[e.length - 1]; + if (n.is("element", "listItem")) { + let o = n[t ? "previousSibling" : "nextSibling"], + r = n.getAttribute("listIndent"); + for (; o && o.is("element", "listItem") && o.getAttribute("listIndent") >= i; ) + r > o.getAttribute("listIndent") && (r = o.getAttribute("listIndent")), o.getAttribute("listIndent") == r && e[t ? "unshift" : "push"](o), o = o[t ? "previousSibling" : "nextSibling"] + } + } + function Vm(e, t) { + return t.checkChild(e.parent, "listItem") && !t.isObject(e) + } + class jm extends Ze { + constructor(e, t) { + super(e), + this._indentBy = "forward" == t ? 1 : -1 + } + refresh() { + this.isEnabled = this._checkEnabled() + } + execute() { + const e = this.editor.model, + t = e.document; + let i = Array.from(t.selection.getSelectedBlocks()); + e.change(e => { + const t = i[i.length - 1]; + let n = t.nextSibling; + for (; n && "listItem" == n.name && n.getAttribute("listIndent") > t.getAttribute("listIndent"); ) + i.push(n), n = n.nextSibling; + this._indentBy < 0 && (i = i.reverse()); + for (const t of i) { + const i = t.getAttribute("listIndent") + this._indentBy; + i < 0 ? e.rename(t, "paragraph") : e.setAttribute("listIndent", i, t) + } + this.fire("_executeCleanup", i) + }) + } + _checkEnabled() { + const e = Ns(this.editor.model.document.selection.getSelectedBlocks()); + if (!e || !e.is("element", "listItem")) + return !1; + if (this._indentBy > 0) { + const t = e.getAttribute("listIndent"), + i = e.getAttribute("listType"); + let n = e.previousSibling; + for (; n && n.is("element", "listItem") && n.getAttribute("listIndent") >= t; ) { + if (n.getAttribute("listIndent") == t) + return n.getAttribute("listType") == i; + n = n.previousSibling + } + return !1 + } + return !0 + } + } + function Bm(e, t) { + const i = t.mapper, + n = t.writer, + o = "numbered" == e.getAttribute("listType") ? "ol" : "ul", + r = function (e) { + const t = e.createContainerElement("li"); + return t.getFillerOffset = $m, + t + } + (n), + s = n.createContainerElement(o, null); + return n.insert(n.createPositionAt(s, 0), r), + i.bindElements(e, r), + r + } + function Fm(e, t, i, n) { + const o = t.parent, + r = i.mapper, + s = i.writer; + let a = r.toViewPosition(n.createPositionBefore(e)); + const c = Wm(e.previousSibling, { + sameIndent: !0, + smallerIndent: !0, + listIndent: e.getAttribute("listIndent") + }), + l = e.previousSibling; + if (c && c.getAttribute("listIndent") == e.getAttribute("listIndent")) { + const e = r.toViewElement(c); + a = s.breakContainer(s.createPositionAfter(e)) + } else if (l && "listItem" == l.name) { + a = r.toViewPosition(n.createPositionAt(l, "end")); + const e = r.findMappedViewAncestor(a), + t = function (e) { + for (const t of e.getChildren()) + if ("ul" == t.name || "ol" == t.name) + return t; + return null + } + (e); + a = t ? s.createPositionBefore(t) : s.createPositionAt(e, "end") + } else + a = r.toViewPosition(n.createPositionBefore(e)); + if (a = Um(a), s.insert(a, o), l && "listItem" == l.name) { + const e = r.toViewElement(l), + i = s.createRange(s.createPositionAt(e, 0), a).getWalker({ + ignoreElementEnd: !0 + }); + for (const e of i) + if (e.item.is("element", "li")) { + const n = s.breakContainer(s.createPositionBefore(e.item)), + o = e.item.parent, + r = s.createPositionAt(t, "end"); + Hm(s, r.nodeBefore, r.nodeAfter), + s.move(s.createRangeOn(o), r), + i.position = n + } + } else { + const i = o.nextSibling; + if (i && (i.is("element", "ul") || i.is("element", "ol"))) { + let n = null; + for (const t of i.getChildren()) { + const i = r.toModelElement(t); + if (!(i && i.getAttribute("listIndent") > e.getAttribute("listIndent"))) + break; + n = t + } + n && (s.breakContainer(s.createPositionAfter(n)), s.move(s.createRangeOn(n.parent), s.createPositionAt(t, "end"))) + } + } + Hm(s, o, o.nextSibling), + Hm(s, o.previousSibling, o) + } + function Hm(e, t, i) { + return !t || !i || "ul" != t.name && "ol" != t.name || t.name != i.name || t.getAttribute("class") !== i.getAttribute("class") ? null : e.mergeContainers(e.createPositionAfter(t)) + } + function Um(e) { + return e.getLastMatchingPosition(e => e.item.is("uiElement")) + } + function Wm(e, t) { + const i = !!t.sameIndent, + n = !!t.smallerIndent, + o = t.listIndent; + let r = e; + for (; r && "listItem" == r.name; ) { + const e = r.getAttribute("listIndent"); + if (i && o == e || n && o > e) + return r; + r = "forward" === t.direction ? r.nextSibling : r.previousSibling + } + return null + } + function qm(e, t, i, n) { + e.ui.componentFactory.add(t, o => { + const r = e.commands.get(t), + s = new cd(o); + return s.set({ + label: i, + icon: n, + tooltip: !0, + isToggleable: !0 + }), + s.bind("isOn", "isEnabled").to(r, "value", "isEnabled"), + s.on("execute", () => { + e.execute(t), + e.editing.view.focus() + }), + s + }) + } + function $m() { + const e = !this.isEmpty && ("ul" == this.getChild(0).name || "ol" == this.getChild(0).name); + return this.isEmpty || e ? 0 : io.call(this) + } + function Ym(e) { + return (t, i, n) => { + const o = n.consumable; + if (!o.test(i.item, "insert") || !o.test(i.item, "attribute:listType") || !o.test(i.item, "attribute:listIndent")) + return; + o.consume(i.item, "insert"), + o.consume(i.item, "attribute:listType"), + o.consume(i.item, "attribute:listIndent"); + const r = i.item; + Fm(r, Bm(r, n), n, e) + } + } + function Gm(e, t, i) { + if (!i.consumable.consume(t.item, "attribute:listType")) + return; + const n = i.mapper.toViewElement(t.item), + o = i.writer; + o.breakContainer(o.createPositionBefore(n)), + o.breakContainer(o.createPositionAfter(n)); + const r = n.parent, + s = "numbered" == t.attributeNewValue ? "ol" : "ul"; + o.rename(s, r) + } + function Km(e, t, i) { + const n = i.mapper.toViewElement(t.item).parent, + o = i.writer; + Hm(o, n, n.nextSibling), + Hm(o, n.previousSibling, n); + for (const e of t.item.getChildren()) + i.consumable.consume(e, "insert") + } + function Qm(e, t, i) { + if ("listItem" != t.item.name) { + let e = i.mapper.toViewPosition(t.range.start); + const n = i.writer, + o = []; + for (; ("ul" == e.parent.name || "ol" == e.parent.name) && (e = n.breakContainer(e), "li" == e.parent.name); ) { + const t = e, + i = n.createPositionAt(e.parent, "end"); + if (!t.isEqual(i)) { + const e = n.remove(n.createRange(t, i)); + o.push(e) + } + e = n.createPositionAfter(e.parent) + } + if (o.length > 0) { + for (let t = 0; t < o.length; t++) { + const i = e.nodeBefore; + if (e = n.insert(e, o[t]).end, t > 0) { + const t = Hm(n, i, i.nextSibling); + t && t.parent == i && e.offset-- + } + } + Hm(n, e.nodeBefore, e.nodeAfter) + } + } + } + function Jm(e, t, i) { + const n = i.mapper.toViewPosition(t.position), + o = n.nodeBefore, + r = n.nodeAfter; + Hm(i.writer, o, r) + } + function Zm(e, t, i) { + if (i.consumable.consume(t.viewItem, { + name: !0 + })) { + const e = i.writer, + n = e.createElement("listItem"), + o = function (e) { + let t = 0, + i = e.parent; + for (; i; ) { + if (i.is("element", "li")) + t++; + else { + const e = i.previousSibling; + e && e.is("element", "li") && t++ + } + i = i.parent + } + return t + } + (t.viewItem); + e.setAttribute("listIndent", o, n); + const r = t.viewItem.parent && "ol" == t.viewItem.parent.name ? "numbered" : "bulleted"; + if (e.setAttribute("listType", r, n), !i.safeInsert(n, t.modelCursor)) + return; + const s = function (e, t, i) { + const { + writer: n, + schema: o + } = i; + let r = n.createPositionAfter(e); + for (const s of t) + if ("ul" == s.name || "ol" == s.name) + r = i.convertItem(s, r).modelCursor; + else { + const t = i.convertItem(s, n.createPositionAt(e, "end")), + a = t.modelRange.start.nodeAfter; + a && a.is("element") && !o.checkChild(e, a.name) && (e = t.modelCursor.parent.is("element", "listItem") ? t.modelCursor.parent : np(t.modelCursor), r = n.createPositionAfter(e)) + } + return r + } + (n, t.viewItem.getChildren(), i); + t.modelRange = e.createRange(t.modelCursor, s), + i.updateConversionResult(n, t) + } + } + function Xm(e, t, i) { + if (i.consumable.test(t.viewItem, { + name: !0 + })) { + const e = Array.from(t.viewItem.getChildren()); + for (const t of e) { + !(t.is("element", "li") || rp(t)) && t._remove() + } + } + } + function ep(e, t, i) { + if (i.consumable.test(t.viewItem, { + name: !0 + })) { + if (0 === t.viewItem.childCount) + return; + const e = [...t.viewItem.getChildren()]; + let i = !1, + n = !0; + for (const t of e) + i && !rp(t) && t._remove(), t.is("$text") ? (n && (t._data = t.data.trimStart()), t.nextSibling && !rp(t.nextSibling) || (t._data = t.data.trimEnd())) : rp(t) && (i = !0), n = !1 + } + } + function tp(e) { + return (t, i) => { + if (i.isPhantom) + return; + const n = i.modelPosition.nodeBefore; + if (n && n.is("element", "listItem")) { + const t = i.mapper.toViewElement(n), + o = t.getAncestors().find(rp), + r = e.createPositionAt(t, 0).getWalker(); + for (const e of r) { + if ("elementStart" == e.type && e.item.is("element", "li")) { + i.viewPosition = e.previousPosition; + break + } + if ("elementEnd" == e.type && e.item == o) { + i.viewPosition = e.nextPosition; + break + } + } + } + } + } + function ip(e, [t, i]) { + let n, + o = t.is("documentFragment") ? t.getChild(0) : t; + if (n = i ? this.createSelection(i) : this.document.selection, o && o.is("element", "listItem")) { + const e = n.getFirstPosition(); + let t = null; + if (e.parent.is("element", "listItem") ? t = e.parent : e.nodeBefore && e.nodeBefore.is("element", "listItem") && (t = e.nodeBefore), t) { + const e = t.getAttribute("listIndent"); + if (e > 0) + for (; o && o.is("element", "listItem"); ) + o._setAttribute("listIndent", o.getAttribute("listIndent") + e), o = o.nextSibling + } + } + } + function np(e) { + const t = new Zs({ + startPosition: e + }); + let i; + do { + i = t.next() + } while (!i.value.item.is("element", "listItem")); + return i.value.item + } + function op(e, t, i, n, o, r) { + const s = Wm(t.nodeBefore, { + sameIndent: !0, + smallerIndent: !0, + listIndent: e, + foo: "b" + }), + a = o.mapper, + c = o.writer, + l = s ? s.getAttribute("listIndent") : null; + let d; + if (s) + if (l == e) { + const e = a.toViewElement(s).parent; + d = c.createPositionAfter(e) + } else { + const e = r.createPositionAt(s, "end"); + d = a.toViewPosition(e) + } + else + d = i; + d = Um(d); + for (const e of[...n.getChildren()]) + rp(e) && (d = c.move(c.createRangeOn(e), d).end, Hm(c, e, e.nextSibling), Hm(c, e.previousSibling, e)) + } + function rp(e) { + return e.is("element", "ol") || e.is("element", "ul") + } + class sp extends Qe { + static get pluginName() { + return "ListEditing" + } + static get requires() { + return [Nu, Lu] + } + init() { + const e = this.editor; + e.model.schema.register("listItem", { + inheritAllFrom: "$block", + allowAttributes: ["listType", "listIndent"] + }); + const t = e.data, + i = e.editing; + var n; + e.model.document.registerPostFixer(t => function (e, t) { + const i = e.document.differ.getChanges(), + n = new Map; + let o = !1; + for (const n of i) + if ("insert" == n.type && "listItem" == n.name) + r(n.position); + else if ("insert" == n.type && "listItem" != n.name) { + if ("$text" != n.name) { + const i = n.position.nodeAfter; + i.hasAttribute("listIndent") && (t.removeAttribute("listIndent", i), o = !0), + i.hasAttribute("listType") && (t.removeAttribute("listType", i), o = !0), + i.hasAttribute("listStyle") && (t.removeAttribute("listStyle", i), o = !0); + for (const t of Array.from(e.createRangeIn(i)).filter(e => e.item.is("element", "listItem"))) + r(t.previousPosition) + } + r(n.position.getShiftedBy(n.length)) + } else + "remove" == n.type && "listItem" == n.name ? r(n.position) : ("attribute" == n.type && "listIndent" == n.attributeKey || "attribute" == n.type && "listType" == n.attributeKey) && r(n.range.start); + for (const e of n.values()) + s(e), a(e); + return o; + function r(e) { + const t = e.nodeBefore; + if (t && t.is("element", "listItem")) { + let e = t; + if (n.has(e)) + return; + for (let t = e.previousSibling; t && t.is("element", "listItem"); t = e.previousSibling) + if (e = t, n.has(e)) + return; + n.set(t, e) + } else { + const t = e.nodeAfter; + t && t.is("element", "listItem") && n.set(t, t) + } + } + function s(e) { + let i = 0, + n = null; + for (; e && e.is("element", "listItem"); ) { + const r = e.getAttribute("listIndent"); + if (r > i) { + let s; + null === n ? (n = r - i, s = i) : (n > r && (n = r), s = r - n), + t.setAttribute("listIndent", s, e), + o = !0 + } else + n = null, i = e.getAttribute("listIndent") + 1; + e = e.nextSibling + } + } + function a(e) { + let i = [], + n = null; + for (; e && e.is("element", "listItem"); ) { + const r = e.getAttribute("listIndent"); + if (n && n.getAttribute("listIndent") > r && (i = i.slice(0, r + 1)), 0 != r) + if (i[r]) { + const n = i[r]; + e.getAttribute("listType") != n && (t.setAttribute("listType", n, e), o = !0) + } else + i[r] = e.getAttribute("listType"); + n = e, + e = e.nextSibling + } + } + } + (e.model, t)), + i.mapper.registerViewToModelLength("li", ap), + t.mapper.registerViewToModelLength("li", ap), + i.mapper.on("modelToViewPosition", tp(i.view)), + i.mapper.on("viewToModelPosition", (n = e.model, (e, t) => { + const i = t.viewPosition, + o = i.parent, + r = t.mapper; + if ("ul" == o.name || "ol" == o.name) { + if (i.isAtEnd) { + const e = r.toModelElement(i.nodeBefore), + o = r.getModelLength(i.nodeBefore); + t.modelPosition = n.createPositionBefore(e).getShiftedBy(o) + } else { + const e = r.toModelElement(i.nodeAfter); + t.modelPosition = n.createPositionBefore(e) + } + e.stop() + } else if ("li" == o.name && i.nodeBefore && ("ul" == i.nodeBefore.name || "ol" == i.nodeBefore.name)) { + const s = r.toModelElement(o); + let a = 1, + c = i.nodeBefore; + for (; c && rp(c); ) + a += r.getModelLength(c), c = c.previousSibling; + t.modelPosition = n.createPositionBefore(s).getShiftedBy(a), + e.stop() + } + })), + t.mapper.on("modelToViewPosition", tp(i.view)), + e.conversion.for("editingDowncast").add(t => { + t.on("insert", Qm, { + priority: "high" + }), + t.on("insert:listItem", Ym(e.model)), + t.on("attribute:listType:listItem", Gm, { + priority: "high" + }), + t.on("attribute:listType:listItem", Km, { + priority: "low" + }), + t.on("attribute:listIndent:listItem", function (e) { + return (t, i, n) => { + if (!n.consumable.consume(i.item, "attribute:listIndent")) + return; + const o = n.mapper.toViewElement(i.item), + r = n.writer; + r.breakContainer(r.createPositionBefore(o)), + r.breakContainer(r.createPositionAfter(o)); + const s = o.parent, + a = s.previousSibling, + c = r.createRangeOn(s); + r.remove(c), + a && a.nextSibling && Hm(r, a, a.nextSibling), + op(i.attributeOldValue + 1, i.range.start, c.start, o, n, e), + Fm(i.item, o, n, e); + for (const e of i.item.getChildren()) + n.consumable.consume(e, "insert") + } + } + (e.model)), + t.on("remove:listItem", function (e) { + return (t, i, n) => { + const o = n.mapper.toViewPosition(i.position).getLastMatchingPosition(e => !e.item.is("element", "li")).nodeAfter, + r = n.writer; + r.breakContainer(r.createPositionBefore(o)), + r.breakContainer(r.createPositionAfter(o)); + const s = o.parent, + a = s.previousSibling, + c = r.createRangeOn(s), + l = r.remove(c); + a && a.nextSibling && Hm(r, a, a.nextSibling); + op(n.mapper.toModelElement(o).getAttribute("listIndent") + 1, i.position, c.start, o, n, e); + for (const e of r.createRangeIn(l).getItems()) + n.mapper.unbindViewElement(e); + t.stop() + } + } + (e.model)), + t.on("remove", Jm, { + priority: "low" + }) + }), + e.conversion.for("dataDowncast").add(t => { + t.on("insert", Qm, { + priority: "high" + }), + t.on("insert:listItem", Ym(e.model)) + }), + e.conversion.for("upcast").add(e => { + e.on("element:ul", Xm, { + priority: "high" + }), + e.on("element:ol", Xm, { + priority: "high" + }), + e.on("element:li", ep, { + priority: "high" + }), + e.on("element:li", Zm) + }), + e.model.on("insertContent", ip, { + priority: "high" + }), + e.commands.add("numberedList", new Lm(e, "numbered")), + e.commands.add("bulletedList", new Lm(e, "bulleted")), + e.commands.add("indentList", new jm(e, "forward")), + e.commands.add("outdentList", new jm(e, "backward")); + const o = i.view.document; + this.listenTo(o, "enter", (e, t) => { + const i = this.editor.model.document, + n = i.selection.getLastPosition().parent; + i.selection.isCollapsed && "listItem" == n.name && n.isEmpty && (this.editor.execute("outdentList"), t.preventDefault(), e.stop()) + }, { + context: "li" + }), + this.listenTo(o, "delete", (e, t) => { + if ("backward" !== t.direction) + return; + const i = this.editor.model.document.selection; + if (!i.isCollapsed) + return; + const n = i.getFirstPosition(); + if (!n.isAtStart) + return; + const o = n.parent; + if ("listItem" !== o.name) + return; + o.previousSibling && "listItem" === o.previousSibling.name || (this.editor.execute("outdentList"), t.preventDefault(), e.stop()) + }, { + context: "li" + }); + const r = e => (t, i) => { + this.editor.commands.get(e).isEnabled && (this.editor.execute(e), i()) + }; + e.keystrokes.set("Tab", r("indentList")), + e.keystrokes.set("Shift+Tab", r("outdentList")) + } + afterInit() { + const e = this.editor.commands, + t = e.get("indent"), + i = e.get("outdent"); + t && t.registerChildCommand(e.get("indentList")), + i && i.registerChildCommand(e.get("outdentList")) + } + } + function ap(e) { + let t = 1; + for (const i of e.getChildren()) + if ("ul" == i.name || "ol" == i.name) + for (const e of i.getChildren()) + t += ap(e); + return t + } + class cp extends Qe { + static get pluginName() { + return "ListUI" + } + init() { + const e = this.editor.t; + qm(this.editor, "numberedList", e("Numbered List"), ''), + qm(this.editor, "bulletedList", e("Bulleted List"), '') + } + } + function lp(e, t) { + return e => { + e.on("attribute:url:media", i) + }; + function i(i, n, o) { + if (!o.consumable.consume(n.item, i.name)) + return; + const r = n.attributeNewValue, + s = o.writer, + a = o.mapper.toViewElement(n.item), + c = [...a.getChildren()].find(e => e.getCustomProperty("media-content")); + s.remove(c); + const l = e.getMediaViewElement(s, r, t); + s.insert(s.createPositionAt(a, 0), l) + } + } + function dp(e, t, i, n) { + const o = e.createContainerElement("figure", { + class: "media" + }); + return e.insert(e.createPositionAt(o, 0), t.getMediaViewElement(e, i, n)), + o + } + function up(e) { + const t = e.getSelectedElement(); + return t && t.is("element", "media") ? t : null + } + function hp(e, t, i) { + e.change(n => { + const o = n.createElement("media", { + url: t + }); + e.insertContent(o, i), + n.setSelection(o, "on") + }) + } + class fp extends Ze { + refresh() { + const e = this.editor.model, + t = e.document.selection, + i = e.schema, + n = up(t); + this.value = n ? n.getAttribute("url") : null, + this.isEnabled = function (e) { + const t = e.getSelectedElement(); + return !!t && "media" === t.name + } + (t) || function (e, t) { + let i = Gu(e, t).parent; + i.isEmpty && !t.schema.isLimit(i) && (i = i.parent); + return t.schema.checkChild(i, "media") + } + (t, e) && !Ku(t, i) + } + execute(e) { + const t = this.editor.model, + i = t.document.selection, + n = up(i); + if (n) + t.change(t => { + t.setAttribute("url", e, n) + }); + else { + const n = Gu(i, t); + hp(t, e, n) + } + } + } + class gp { + constructor(e, t) { + const i = t.providers, + n = t.extraProviders || [], + o = new Set(t.removeProviders), + r = i.concat(n).filter(e => { + const t = e.name; + return t ? !o.has(t) : (Object(c.b)("media-embed-no-provider-name", { + provider: e + }), !1) + }); + this.locale = e, + this.providerDefinitions = r + } + hasMedia(e) { + return !!this._getMedia(e) + } + getMediaViewElement(e, t, i) { + return this._getMedia(t).getViewElement(e, i) + } + _getMedia(e) { + if (!e) + return new mp(this.locale); + e = e.trim(); + for (const t of this.providerDefinitions) { + const i = t.html, + n = en(t.url); + for (const t of n) { + const n = this._getUrlMatches(e, t); + if (n) + return new mp(this.locale, e, n, i) + } + } + return null + } + _getUrlMatches(e, t) { + let i = e.match(t); + if (i) + return i; + let n = e.replace(/^https?:\/\//, ""); + return i = n.match(t), + i || (n = n.replace(/^www\./, ""), i = n.match(t), i || null) + } + } + class mp { + constructor(e, t, i, n) { + this.url = this._getValidUrl(t), + this._t = e.t, + this._match = i, + this._previewRenderer = n + } + getViewElement(e, t) { + const i = {}; + let n; + if (t.renderForEditingView || t.renderMediaPreview && this.url && this._previewRenderer) { + this.url && (i["data-oembed-url"] = this.url), + t.renderForEditingView && (i.class = "ck-media__wrapper"); + const o = this._getPreviewHtml(t); + n = e.createRawElement("div", i, (function (e) { + e.innerHTML = o + })) + } else + this.url && (i.url = this.url), n = e.createEmptyElement(t.elementName, i); + return e.setCustomProperty("media-content", !0, n), + n + } + _getPreviewHtml(e) { + return this._previewRenderer ? this._previewRenderer(this._match) : this.url && e.renderForEditingView ? this._getPlaceholderHtml() : "" + } + _getPlaceholderHtml() { + const e = new ad, + t = new sd; + e.text = this._t("Open media in new tab"), + t.content = '', + t.viewBox = "0 0 64 42"; + return new Bl({ + tag: "div", + attributes: { + class: "ck ck-reset_all ck-media__placeholder" + }, + children: [{ + tag: "div", + attributes: { + class: "ck-media__placeholder__icon" + }, + children: [t] + }, { + tag: "a", + attributes: { + class: "ck-media__placeholder__url", + target: "_blank", + rel: "noopener noreferrer", + href: this.url + }, + children: [{ + tag: "span", + attributes: { + class: "ck-media__placeholder__url__text" + }, + children: [this.url] + }, e] + } + ] + }).render().outerHTML + } + _getValidUrl(e) { + return e ? e.match(/^https?/) ? e : "https://" + e : null + } + } + i(94); + class pp extends Qe { + static get pluginName() { + return "MediaEmbedEditing" + } + constructor(e) { + super(e), + e.config.define("mediaEmbed", { + elementName: "oembed", + providers: [{ + name: "dailymotion", + url: /^dailymotion\.com\/video\/(\w+)/, + html: e => `
` + }, { + name: "spotify", + url: [/^open\.spotify\.com\/(artist\/\w+)/, /^open\.spotify\.com\/(album\/\w+)/, /^open\.spotify\.com\/(track\/\w+)/], + html: e => `
` + }, { + name: "youtube", + url: [/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/, /^(?:m\.)?youtube\.com\/v\/([\w-]+)/, /^youtube\.com\/embed\/([\w-]+)/, /^youtu\.be\/([\w-]+)/], + html: e => `
` + }, { + name: "vimeo", + url: [/^vimeo\.com\/(\d+)/, /^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/, /^vimeo\.com\/album\/[^/]+\/video\/(\d+)/, /^vimeo\.com\/channels\/[^/]+\/(\d+)/, /^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/, /^vimeo\.com\/ondemand\/[^/]+\/(\d+)/, /^player\.vimeo\.com\/video\/(\d+)/], + html: e => `
` + }, { + name: "instagram", + url: /^instagram\.com\/p\/(\w+)/ + }, { + name: "twitter", + url: /^twitter\.com/ + }, { + name: "googleMaps", + url: /^google\.com\/maps/ + }, { + name: "flickr", + url: /^flickr\.com/ + }, { + name: "facebook", + url: /^facebook\.com/ + } + ] + }), + this.registry = new gp(e.locale, e.config.get("mediaEmbed")) + } + init() { + const e = this.editor, + t = e.model.schema, + i = e.t, + n = e.conversion, + o = e.config.get("mediaEmbed.previewsInData"), + r = e.config.get("mediaEmbed.elementName"), + s = this.registry; + e.commands.add("mediaEmbed", new fp(e)), + t.register("media", { + isObject: !0, + isBlock: !0, + allowWhere: "$block", + allowAttributes: ["url"] + }), + n.for("dataDowncast").elementToElement({ + model: "media", + view: (e, { + writer: t + }) => { + const i = e.getAttribute("url"); + return dp(t, s, i, { + elementName: r, + renderMediaPreview: i && o + }) + } + }), + n.for("dataDowncast").add(lp(s, { + elementName: r, + renderMediaPreview: o + })), + n.for("editingDowncast").elementToElement({ + model: "media", + view: (e, { + writer: t + }) => { + const n = e.getAttribute("url"); + return function (e, t, i) { + return t.setCustomProperty("media", !0, e), + Hu(e, t, { + label: i + }) + } + (dp(t, s, n, { + elementName: r, + renderForEditingView: !0 + }), t, i("media widget")) + } + }), + n.for("editingDowncast").add(lp(s, { + elementName: r, + renderForEditingView: !0 + })), + n.for("upcast").elementToElement({ + view: e => ["oembed", r].includes(e.name) && e.getAttribute("url") ? { + name: !0 + } + : null, + model: (e, { + writer: t + }) => { + const i = e.getAttribute("url"); + if (s.hasMedia(i)) + return t.createElement("media", { + url: i + }) + } + }).elementToElement({ + view: { + name: "div", + attributes: { + "data-oembed-url": !0 + } + }, + model: (e, { + writer: t + }) => { + const i = e.getAttribute("data-oembed-url"); + if (s.hasMedia(i)) + return t.createElement("media", { + url: i + }) + } + }) + } + } + const bp = /^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/; + class wp extends Qe { + static get requires() { + return [bh, uf] + } + static get pluginName() { + return "AutoMediaEmbed" + } + constructor(e) { + super(e), + this._timeoutId = null, + this._positionToInsert = null + } + init() { + const e = this.editor, + t = e.model.document; + this.listenTo(e.plugins.get("ClipboardPipeline"), "inputTransformation", () => { + const e = t.selection.getFirstRange(), + i = Zc.fromPosition(e.start); + i.stickiness = "toPrevious"; + const n = Zc.fromPosition(e.end); + n.stickiness = "toNext", + t.once("change:data", () => { + this._embedMediaBetweenPositions(i, n), + i.detach(), + n.detach() + }, { + priority: "high" + }) + }), + e.commands.get("undo").on("execute", () => { + this._timeoutId && (_r.window.clearTimeout(this._timeoutId), this._positionToInsert.detach(), this._timeoutId = null, this._positionToInsert = null) + }, { + priority: "high" + }) + } + _embedMediaBetweenPositions(e, t) { + const i = this.editor, + n = i.plugins.get(pp).registry, + o = new ba(e, t), + r = o.getWalker({ + ignoreElementEnd: !0 + }); + let s = ""; + for (const e of r) + e.item.is("$textProxy") && (s += e.item.data); + if (s = s.trim(), !s.match(bp)) + return void o.detach(); + if (!n.hasMedia(s)) + return void o.detach(); + i.commands.get("mediaEmbed").isEnabled ? (this._positionToInsert = Zc.fromPosition(e), this._timeoutId = _r.window.setTimeout(() => { + i.model.change(e => { + let t; + this._timeoutId = null, + e.remove(o), + o.detach(), + "$graveyard" !== this._positionToInsert.root.rootName && (t = this._positionToInsert), + hp(i.model, s, t), + this._positionToInsert.detach(), + this._positionToInsert = null + }) + }, 100)) : o.detach() + } + } + i(96); + class kp extends jl { + constructor(e, t) { + super(t); + const i = t.t; + this.focusTracker = new Rs, + this.keystrokes = new Os, + this.set("mediaURLInputValue", ""), + this.urlInputView = this._createUrlInput(), + this.saveButtonView = this._createButton(i("Save"), Cl, "ck-button-save"), + this.saveButtonView.type = "submit", + this.saveButtonView.bind("isEnabled").to(this, "mediaURLInputValue", e => !!e), + this.cancelButtonView = this._createButton(i("Cancel"), Al, "ck-button-cancel", "cancel"), + this._focusables = new Vl, + this._focusCycler = new dd({ + focusables: this._focusables, + focusTracker: this.focusTracker, + keystrokeHandler: this.keystrokes, + actions: { + focusPrevious: "shift + tab", + focusNext: "tab" + } + }), + this._validators = e, + this.setTemplate({ + tag: "form", + attributes: { + class: ["ck", "ck-media-form", "ck-responsive-form"], + tabindex: "-1" + }, + children: [this.urlInputView, this.saveButtonView, this.cancelButtonView] + }), + Ll(this) + } + render() { + super.render(), + zl({ + view: this + }); + [this.urlInputView, this.saveButtonView, this.cancelButtonView].forEach(e => { + this._focusables.add(e), + this.focusTracker.add(e.element) + }), + this.keystrokes.listenTo(this.element); + const e = e => e.stopPropagation(); + this.keystrokes.set("arrowright", e), + this.keystrokes.set("arrowleft", e), + this.keystrokes.set("arrowup", e), + this.keystrokes.set("arrowdown", e), + this.listenTo(this.urlInputView.element, "selectstart", (e, t) => { + t.stopPropagation() + }, { + priority: "high" + }) + } + focus() { + this._focusCycler.focusFirst() + } + get url() { + return this.urlInputView.fieldView.element.value.trim() + } + set url(e) { + this.urlInputView.fieldView.element.value = e.trim() + } + isValid() { + this.resetFormStatus(); + for (const e of this._validators) { + const t = e(this); + if (t) + return this.urlInputView.errorText = t, !1 + } + return !0 + } + resetFormStatus() { + this.urlInputView.errorText = null, + this.urlInputView.infoText = this._urlInputViewInfoDefault + } + _createUrlInput() { + const e = this.locale.t, + t = new jd(this.locale, Bd), + i = t.fieldView; + return this._urlInputViewInfoDefault = e("Paste the media URL in the input."), + this._urlInputViewInfoTip = e("Tip: Paste the URL into the content to embed faster."), + t.label = e("Media URL"), + t.infoText = this._urlInputViewInfoDefault, + i.on("input", () => { + t.infoText = i.element.value ? this._urlInputViewInfoTip : this._urlInputViewInfoDefault, + this.mediaURLInputValue = i.element.value.trim() + }), + t + } + _createButton(e, t, i, n) { + const o = new cd(this.locale); + return o.set({ + label: e, + icon: t, + tooltip: !0 + }), + o.extendTemplate({ + attributes: { + class: i + } + }), + n && o.delegate("execute").to(this, n), + o + } + } + class _p extends Qe { + static get requires() { + return [pp] + } + static get pluginName() { + return "MediaEmbedUI" + } + init() { + const e = this.editor, + t = e.commands.get("mediaEmbed"), + i = e.plugins.get(pp).registry; + e.ui.componentFactory.add("mediaEmbed", n => { + const o = Id(n), + r = new kp(function (e, t) { + return [t => { + if (!t.url.length) + return e("The URL must not be empty.") + }, i => { + if (!t.hasMedia(i.url)) + return e("This media URL is not supported.") + } + ] + } + (e.t, i), e.locale); + return this._setUpDropdown(o, r, t, e), + this._setUpForm(o, r, t), + o + }) + } + _setUpDropdown(e, t, i) { + const n = this.editor, + o = n.t, + r = e.buttonView; + function s() { + n.editing.view.focus(), + e.isOpen = !1 + } + e.bind("isEnabled").to(i), + e.panelView.children.add(t), + r.set({ + label: o("Insert media"), + icon: '', + tooltip: !0 + }), + r.on("open", () => { + t.disableCssTransitions(), + t.url = i.value || "", + t.urlInputView.fieldView.select(), + t.focus(), + t.enableCssTransitions() + }, { + priority: "low" + }), + e.on("submit", () => { + t.isValid() && (n.execute("mediaEmbed", t.url), s()) + }), + e.on("change:isOpen", () => t.resetFormStatus()), + e.on("cancel", () => s()) + } + _setUpForm(e, t, i) { + t.delegate("submit", "cancel").to(e), + t.urlInputView.bind("value").to(i, "value"), + t.urlInputView.bind("isReadOnly").to(i, "isEnabled", e => !e) + } + } + i(98); + function vp(e, t) { + if (!e.childCount) + return; + const i = new _u(e.document), + n = function (e, t) { + const i = t.createRangeIn(e), + n = new gn({ + name: /^p|h\d+$/, + styles: { + "mso-list": /.*/ + } + }), + o = []; + for (const e of i) + if ("elementStart" === e.type && n.match(e.item)) { + const t = Ap(e.item); + o.push({ + element: e.item, + id: t.id, + order: t.order, + indent: t.indent + }) + } + return o + } + (e, i); + if (!n.length) + return; + let o = null, + r = 1; + n.forEach((e, s) => { + const a = function (e, t) { + if (!e) + return !0; + if (e.id !== t.id) + return t.indent - e.indent != 1; + const i = t.element.previousSibling; + if (!i) + return !0; + return n = i, + !(n.is("element", "ol") || n.is("element", "ul")); + var n + } + (n[s - 1], e), + c = a ? null : n[s - 1], + l = (u = e, (d = c) ? u.indent - d.indent : u.indent - 1); + var d, + u; + if (a && (o = null, r = 1), !o || 0 !== l) { + const n = function (e, t) { + const i = new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`, "gi"), + n = /mso-level-number-format:([^;]{0,100});/gi, + o = i.exec(t); + let r = "decimal", + s = "ol"; + if (o && o[1]) { + const t = n.exec(o[1]); + if (t && t[1] && (r = t[1].trim(), s = "bullet" !== r && "image" !== r ? "ol" : "ul"), "bullet" === r) { + const t = function (e) { + const t = function (e) { + if (e.getChild(0).is("$text")) + return null; + const t = e.getChild(0).getChild(0); + if (t.is("$text")) + return t; + return t.getChild(0) + } + (e); + if (!t) + return null; + const i = t._data; + if ("o" === i) + return "circle"; + if ("·" === i) + return "disc"; + if ("§" === i) + return "square"; + return null + } + (e.element); + t && (r = t) + } + } + return { + type: s, + style: yp(r) + } + } + (e, t); + if (o) { + if (e.indent > r) { + const e = o.getChild(o.childCount - 1), + t = e.getChild(e.childCount - 1); + o = xp(n, t, i), + r += 1 + } else if (e.indent < r) { + const t = r - e.indent; + o = function (e, t) { + const i = e.getAncestors({ + parentFirst: !0 + }); + let n = null, + o = 0; + for (const e of i) + if ("ul" !== e.name && "ol" !== e.name || o++, o === t) { + n = e; + break + } + return n + } + (o, t), + r = parseInt(e.indent) + } + } else + o = xp(n, e.element, i); + e.indent <= r && (o.is("element", n.type) || (o = i.rename(n.type, o))) + } + const h = function (e, t) { + return function (e, t) { + const i = new gn({ + name: "span", + styles: { + "mso-list": "Ignore" + } + }), + n = t.createRangeIn(e); + for (const e of n) + "elementStart" === e.type && i.match(e.item) && t.remove(e.item) + } + (e, t), + t.rename("li", e) + } + (e.element, i); + i.appendChild(h, o) + }) + } + function yp(e) { + switch (e) { + case "arabic-leading-zero": + return "decimal-leading-zero"; + case "alpha-upper": + return "upper-alpha"; + case "alpha-lower": + return "lower-alpha"; + case "roman-upper": + return "upper-roman"; + case "roman-lower": + return "lower-roman"; + case "circle": + case "disc": + case "square": + return e; + default: + return null + } + } + function xp(e, t, i) { + const n = t.parent, + o = i.createElement(e.type), + r = n.getChildIndex(t) + 1; + return i.insertChild(r, o, n), + e.style && i.setStyle("list-style-type", e.style, o), + o + } + function Ap(e) { + const t = {}, + i = e.getStyle("mso-list"); + if (i) { + const e = i.match(/(^|\s{1,100})l(\d+)/i), + n = i.match(/\s{0,100}lfo(\d+)/i), + o = i.match(/\s{0,100}level(\d+)/i); + e && n && o && (t.id = e[2], t.order = n[1], t.indent = o[1]) + } + return t + } + const Cp = /id=("|')docs-internal-guid-[-0-9a-f]+("|')/i; + class Tp { + constructor(e) { + this.document = e + } + isActive(e) { + return Cp.test(e) + } + execute(e) { + const t = new _u(this.document); + !function (e, t) { + for (const i of e.getChildren()) + if (i.is("element", "b") && "normal" === i.getStyle("font-weight")) { + const n = e.getChildIndex(i); + t.remove(i), + t.insertChild(n, i.getChildren(), e) + } + } + (e.content, t), + function (e, t) { + for (const i of t.createRangeIn(e)) { + const e = i.item; + if (e.is("element", "li")) { + const i = e.getChild(0); + i && i.is("element", "p") && t.unwrapElement(i) + } + } + } + (e.content, t) + } + } + function Ep(e) { + return e.replace(/(\s+)<\/span>/g, (e, t) => 1 === t.length ? " " : Array(t.length + 1).join("  ").substr(0, t.length)) + } + function Pp(e, t) { + const i = new DOMParser, + n = function (e) { + return Ep(Ep(e)).replace(/([^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g, "$1$2").replace(/<\/span>/g, "").replace(/ <\//g, " <\/o:p>/g, " ").replace(/( |\u00A0)<\/o:p>/g, "").replace(/>([^\S\r\n]*[\r\n]\s*)<") + } + (function (e) { + const t = e.indexOf(""); + if (t < 0) + return e; + const i = e.indexOf("", t + "".length); + return e.substring(0, t + "".length) + (i >= 0 ? e.substring(i) : "") + } + (e = e.replace(/

abc

\n\t\t\t//\n\t\t\tif ( isAttribute && this._wrapAttributeElement( wrapElement, child ) ) {\n\t\t\t\twrapPositions.push( new Position( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// Wrap the child if it is not an attribute element or if it is an attribute element that should be inside\n\t\t\t// `wrapElement` (due to priority).\n\t\t\t//\n\t\t\t//

abc

-->

abc

\n\t\t\t//

abc

-->

abc

\n\t\t\telse if ( isText || isAllowedInsideAttributeElement || ( isAttribute && shouldABeOutsideB( wrapElement, child ) ) ) {\n\t\t\t\t// Clone attribute.\n\t\t\t\tconst newAttribute = wrapElement._clone();\n\n\t\t\t\t// Wrap current node with new attribute.\n\t\t\t\tchild._remove();\n\t\t\t\tnewAttribute._appendChild( child );\n\n\t\t\t\tparent._insertChild( i, newAttribute );\n\t\t\t\tthis._addToClonedElementsGroup( newAttribute );\n\n\t\t\t\twrapPositions.push( new Position( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// If other nested attribute is found and it wasn't wrapped (see above), continue wrapping inside it.\n\t\t\t//\n\t\t\t//

abc

-->

abc

\n\t\t\t//\n\t\t\telse if ( isAttribute ) {\n\t\t\t\tthis._wrapChildren( child, 0, child.childCount, wrapElement );\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each wrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of wrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn Range._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Unwraps children from provided `unwrapElement`. Only children contained in `parent` element between\n\t * `startOffset` and `endOffset` will be unwrapped.\n\t *\n\t * @private\n\t * @param {module:engine/view/element~Element} parent\n\t * @param {Number} startOffset\n\t * @param {Number} endOffset\n\t * @param {module:engine/view/element~Element} unwrapElement\n\t */\n\t_unwrapChildren( parent, startOffset, endOffset, unwrapElement ) {\n\t\tlet i = startOffset;\n\t\tconst unwrapPositions = [];\n\n\t\t// Iterate over each element between provided offsets inside parent.\n\t\t// We don't use tree walker or range iterator because we will be removing and merging potentially multiple nodes,\n\t\t// so it could get messy. It is safer to it manually in this case.\n\t\twhile ( i < endOffset ) {\n\t\t\tconst child = parent.getChild( i );\n\n\t\t\t// Skip all text nodes. There should be no container element's here either.\n\t\t\tif ( !child.is( 'attributeElement' ) ) {\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// (In all examples, assume that `unwrapElement` is `` element.)\n\t\t\t//\n\t\t\t// If the child is similar to the given attribute element, unwrap it - it will be completely removed.\n\t\t\t//\n\t\t\t//

abcxyz

-->

abcxyz

\n\t\t\t//\n\t\t\tif ( child.isSimilar( unwrapElement ) ) {\n\t\t\t\tconst unwrapped = child.getChildren();\n\t\t\t\tconst count = child.childCount;\n\n\t\t\t\t// Replace wrapper element with its children\n\t\t\t\tchild._remove();\n\t\t\t\tparent._insertChild( i, unwrapped );\n\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\n\t\t\t\t// Save start and end position of moved items.\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew Position( parent, i ),\n\t\t\t\t\tnew Position( parent, i + count )\n\t\t\t\t);\n\n\t\t\t\t// Skip elements that were unwrapped. Assuming there won't be another element to unwrap in child elements.\n\t\t\t\ti += count;\n\t\t\t\tendOffset += count - 1;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If the child is not similar but is an attribute element, try partial unwrapping - remove the same attributes/styles/classes.\n\t\t\t// Partial unwrapping will happen only if the elements have the same name.\n\t\t\t//\n\t\t\t//

abcxyz

-->

abcxyz

\n\t\t\t//

abcxyz

-->

abcxyz

\n\t\t\t//\n\t\t\tif ( this._unwrapAttributeElement( unwrapElement, child ) ) {\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew Position( parent, i ),\n\t\t\t\t\tnew Position( parent, i + 1 )\n\t\t\t\t);\n\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If other nested attribute is found, look through it's children for elements to unwrap.\n\t\t\t//\n\t\t\t//

abc

-->

abc

\n\t\t\t//\n\t\t\tthis._unwrapChildren( child, 0, child.childCount, unwrapElement );\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each unwrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of unwrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset || position.offset == endOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn Range._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Helper function for `view.writer.wrap`. Wraps range with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @private\n\t * @param {module:engine/view/range~Range} range\n\t * @param {module:engine/view/attributeelement~AttributeElement} attribute\n\t * @returns {module:engine/view/range~Range} New range after wrapping, spanning over wrapping attribute element.\n\t */\n\t_wrapRange( range, attribute ) {\n\t\t// Break attributes at range start and end.\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange( range, true );\n\t\tconst parentContainer = breakStart.parent;\n\n\t\t// Wrap all children with attribute.\n\t\tconst newRange = this._wrapChildren( parentContainer, breakStart.offset, breakEnd.offset, attribute );\n\n\t\t// Merge attributes at the both ends and return a new range.\n\t\tconst start = this.mergeAttributes( newRange.start );\n\n\t\t// If start position was merged - move end position back.\n\t\tif ( !start.isEqual( newRange.start ) ) {\n\t\t\tnewRange.end.offset--;\n\t\t}\n\t\tconst end = this.mergeAttributes( newRange.end );\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Helper function for {@link #wrap}. Wraps position with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @private\n\t * @param {module:engine/view/position~Position} position\n\t * @param {module:engine/view/attributeelement~AttributeElement} attribute\n\t * @returns {module:engine/view/position~Position} New position after wrapping.\n\t */\n\t_wrapPosition( position, attribute ) {\n\t\t// Return same position when trying to wrap with attribute similar to position parent.\n\t\tif ( attribute.isSimilar( position.parent ) ) {\n\t\t\treturn movePositionToTextNode( position.clone() );\n\t\t}\n\n\t\t// When position is inside text node - break it and place new position between two text nodes.\n\t\tif ( position.parent.is( '$text' ) ) {\n\t\t\tposition = breakTextNode( position );\n\t\t}\n\n\t\t// Create fake element that will represent position, and will not be merged with other attributes.\n\t\tconst fakePosition = this.createAttributeElement();\n\t\tfakePosition._priority = Number.POSITIVE_INFINITY;\n\t\tfakePosition.isSimilar = () => false;\n\n\t\t// Insert fake element in position location.\n\t\tposition.parent._insertChild( position.offset, fakePosition );\n\n\t\t// Range around inserted fake attribute element.\n\t\tconst wrapRange = new Range( position, position.getShiftedBy( 1 ) );\n\n\t\t// Wrap fake element with attribute (it will also merge if possible).\n\t\tthis.wrap( wrapRange, attribute );\n\n\t\t// Remove fake element and place new position there.\n\t\tconst newPosition = new Position( fakePosition.parent, fakePosition.index );\n\t\tfakePosition._remove();\n\n\t\t// If position is placed between text nodes - merge them and return position inside.\n\t\tconst nodeBefore = newPosition.nodeBefore;\n\t\tconst nodeAfter = newPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof Text && nodeAfter instanceof Text ) {\n\t\t\treturn mergeTextNodes( nodeBefore, nodeAfter );\n\t\t}\n\n\t\t// If position is next to text node - move position inside.\n\t\treturn movePositionToTextNode( newPosition );\n\t}\n\n\t/**\n\t * \tWraps one {@link module:engine/view/attributeelement~AttributeElement AttributeElement} into another by\n\t * \tmerging them if possible. When merging is possible - all attributes, styles and classes are moved from wrapper\n\t * \telement to element being wrapped.\n\t *\n\t * \t@private\n\t * \t@param {module:engine/view/attributeelement~AttributeElement} wrapper Wrapper AttributeElement.\n\t * \t@param {module:engine/view/attributeelement~AttributeElement} toWrap AttributeElement to wrap using wrapper element.\n\t * \t@returns {Boolean} Returns `true` if elements are merged.\n\t */\n\t_wrapAttributeElement( wrapper, toWrap ) {\n\t\tif ( !canBeJoined( wrapper, toWrap ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can't merge if name or priority differs.\n\t\tif ( wrapper.name !== toWrap.name || wrapper.priority !== toWrap.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if attributes can be merged.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If some attributes are different we cannot wrap.\n\t\t\tif ( toWrap.hasAttribute( key ) && toWrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if styles can be merged.\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\tif ( toWrap.hasStyle( key ) && toWrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Move all attributes/classes/styles from wrapper to wrapped AttributeElement.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Move only these attributes that are not present - other are similar.\n\t\t\tif ( !toWrap.hasAttribute( key ) ) {\n\t\t\t\tthis.setAttribute( key, wrapper.getAttribute( key ), toWrap );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\tif ( !toWrap.hasStyle( key ) ) {\n\t\t\t\tthis.setStyle( key, wrapper.getStyle( key ), toWrap );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of wrapper.getClassNames() ) {\n\t\t\tif ( !toWrap.hasClass( key ) ) {\n\t\t\t\tthis.addClass( key, toWrap );\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Unwraps {@link module:engine/view/attributeelement~AttributeElement AttributeElement} from another by removing\n\t * corresponding attributes, classes and styles. All attributes, classes and styles from wrapper should be present\n\t * inside element being unwrapped.\n\t *\n\t * @private\n\t * @param {module:engine/view/attributeelement~AttributeElement} wrapper Wrapper AttributeElement.\n\t * @param {module:engine/view/attributeelement~AttributeElement} toUnwrap AttributeElement to unwrap using wrapper element.\n\t * @returns {Boolean} Returns `true` if elements are unwrapped.\n\t **/\n\t_unwrapAttributeElement( wrapper, toUnwrap ) {\n\t\tif ( !canBeJoined( wrapper, toUnwrap ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can't unwrap if name or priority differs.\n\t\tif ( wrapper.name !== toUnwrap.name || wrapper.priority !== toUnwrap.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper attributes.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If some attributes are missing or different we cannot unwrap.\n\t\t\tif ( !toUnwrap.hasAttribute( key ) || toUnwrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper classes.\n\t\tif ( !toUnwrap.hasClass( ...wrapper.getClassNames() ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper styles.\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\t// If some styles are missing or different we cannot unwrap.\n\t\t\tif ( !toUnwrap.hasStyle( key ) || toUnwrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Remove all wrapper's attributes from unwrapped element.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthis.removeAttribute( key, toUnwrap );\n\t\t}\n\n\t\t// Remove all wrapper's classes from unwrapped element.\n\t\tthis.removeClass( Array.from( wrapper.getClassNames() ), toUnwrap );\n\n\t\t// Remove all wrapper's styles from unwrapped element.\n\t\tthis.removeStyle( Array.from( wrapper.getStyleNames() ), toUnwrap );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at the boundaries of given range.\n\t *\n\t * @private\n\t * @param {module:engine/view/range~Range} range Range which `start` and `end` positions will be used to break attributes.\n\t * @param {Boolean} [forceSplitText=false] If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns {module:engine/view/range~Range} New range with located at break positions.\n\t */\n\t_breakAttributesRange( range, forceSplitText = false ) {\n\t\tconst rangeStart = range.start;\n\t\tconst rangeEnd = range.end;\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// Break at the collapsed position. Return new collapsed range.\n\t\tif ( range.isCollapsed ) {\n\t\t\tconst position = this._breakAttributes( range.start, forceSplitText );\n\n\t\t\treturn new Range( position, position );\n\t\t}\n\n\t\tconst breakEnd = this._breakAttributes( rangeEnd, forceSplitText );\n\t\tconst count = breakEnd.parent.childCount;\n\t\tconst breakStart = this._breakAttributes( rangeStart, forceSplitText );\n\n\t\t// Calculate new break end offset.\n\t\tbreakEnd.offset += breakEnd.parent.childCount - count;\n\n\t\treturn new Range( breakStart, breakEnd );\n\t}\n\n\t/**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at given position.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-empty-element` when break position\n\t * is placed inside {@link module:engine/view/emptyelement~EmptyElement EmptyElement}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-ui-element` when break position\n\t * is placed inside {@link module:engine/view/uielement~UIElement UIElement}.\n\t *\n\t * @private\n\t * @param {module:engine/view/position~Position} position Position where to break attributes.\n\t * @param {Boolean} [forceSplitText=false] If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns {module:engine/view/position~Position} New position after breaking the attributes.\n\t */\n\t_breakAttributes( position, forceSplitText = false ) {\n\t\tconst positionOffset = position.offset;\n\t\tconst positionParent = position.parent;\n\n\t\t// If position is placed inside EmptyElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'emptyElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break an `EmptyElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-empty-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-empty-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside UIElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'uiElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `UIElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-ui-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-ui-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside RawElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'rawElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `RawElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-raw-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-raw-element', this.document );\n\t\t}\n\n\t\t// There are no attributes to break and text nodes breaking is not forced.\n\t\tif ( !forceSplitText && positionParent.is( '$text' ) && isContainerOrFragment( positionParent.parent ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Position's parent is container, so no attributes to break.\n\t\tif ( isContainerOrFragment( positionParent ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Break text and start again in new position.\n\t\tif ( positionParent.is( '$text' ) ) {\n\t\t\treturn this._breakAttributes( breakTextNode( position ), forceSplitText );\n\t\t}\n\n\t\tconst length = positionParent.childCount;\n\n\t\t//

foobar{}

\n\t\t//

foobar[]

\n\t\t//

foobar[]

\n\t\tif ( positionOffset == length ) {\n\t\t\tconst newPosition = new Position( positionParent.parent, positionParent.index + 1 );\n\n\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t} else {\n\t\t\t//

foo{}bar

\n\t\t\t//

foo[]bar

\n\t\t\t//

foo{}bar

\n\t\t\tif ( positionOffset === 0 ) {\n\t\t\t\tconst newPosition = new Position( positionParent.parent, positionParent.index );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t\t//

foob{}ar

\n\t\t\t//

foob[]ar

\n\t\t\t//

foob[]ar

\n\t\t\t//

foob[]ar

\n\t\t\telse {\n\t\t\t\tconst offsetAfter = positionParent.index + 1;\n\n\t\t\t\t// Break element.\n\t\t\t\tconst clonedNode = positionParent._clone();\n\n\t\t\t\t// Insert cloned node to position's parent node.\n\t\t\t\tpositionParent.parent._insertChild( offsetAfter, clonedNode );\n\t\t\t\tthis._addToClonedElementsGroup( clonedNode );\n\n\t\t\t\t// Get nodes to move.\n\t\t\t\tconst count = positionParent.childCount - positionOffset;\n\t\t\t\tconst nodesToMove = positionParent._removeChildren( positionOffset, count );\n\n\t\t\t\t// Move nodes to cloned node.\n\t\t\t\tclonedNode._appendChild( nodesToMove );\n\n\t\t\t\t// Create new position to work on.\n\t\t\t\tconst newPosition = new Position( positionParent.parent, offsetAfter );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Stores the information that an {@link module:engine/view/attributeelement~AttributeElement attribute element} was\n\t * added to the tree. Saves the reference to the group in the given element and updates the group, so other elements\n\t * from the group now keep a reference to the given attribute element.\n\t *\n\t * The clones group can be obtained using {@link module:engine/view/attributeelement~AttributeElement#getElementsWithSameId}.\n\t *\n\t * Does nothing if added element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @private\n\t * @param {module:engine/view/attributeelement~AttributeElement} element Attribute element to save.\n\t */\n\t_addToClonedElementsGroup( element ) {\n\t\t// Add only if the element is in document tree.\n\t\tif ( !element.root.is( 'rootElement' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Traverse the element's children recursively to find other attribute elements that also might got inserted.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._addToClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = element.id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\tgroup = new Set();\n\t\t\tthis._cloneGroups.set( id, group );\n\t\t}\n\n\t\tgroup.add( element );\n\t\telement._clonesGroup = group;\n\t}\n\n\t/**\n\t * Removes all the information about the given {@link module:engine/view/attributeelement~AttributeElement attribute element}\n\t * from its clones group.\n\t *\n\t * Keep in mind, that the element will still keep a reference to the group (but the group will not keep a reference to it).\n\t * This allows to reference the whole group even if the element was already removed from the tree.\n\t *\n\t * Does nothing if the element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @private\n\t * @param {module:engine/view/attributeelement~AttributeElement} element Attribute element to remove.\n\t */\n\t_removeFromClonedElementsGroup( element ) {\n\t\t// Traverse the element's children recursively to find other attribute elements that also got removed.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = element.id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\treturn;\n\t\t}\n\n\t\tgroup.delete( element );\n\t\t// Not removing group from element on purpose!\n\t\t// If other parts of code have reference to this element, they will be able to get references to other elements from the group.\n\t}\n}\n\n// Helper function for `view.writer.wrap`. Checks if given element has any children that are not ui elements.\nfunction _hasNonUiChildren( parent ) {\n\treturn Array.from( parent.getChildren() ).some( child => !child.is( 'uiElement' ) );\n}\n\n/**\n * The `attribute` passed to {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`}\n * must be an instance of {@link module:engine/view/attributeelement~AttributeElement `AttributeElement`}.\n *\n * @error view-writer-wrap-invalid-attribute\n */\n\n// Returns first parent container of specified {@link module:engine/view/position~Position Position}.\n// Position's parent node is checked as first, then next parents are checked.\n// Note that {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment} is treated like a container.\n//\n// @param {module:engine/view/position~Position} position Position used as a start point to locate parent container.\n// @returns {module:engine/view/containerelement~ContainerElement|module:engine/view/documentfragment~DocumentFragment|undefined}\n// Parent container element or `undefined` if container is not found.\nfunction getParentContainer( position ) {\n\tlet parent = position.parent;\n\n\twhile ( !isContainerOrFragment( parent ) ) {\n\t\tif ( !parent ) {\n\t\t\treturn undefined;\n\t\t}\n\t\tparent = parent.parent;\n\t}\n\n\treturn parent;\n}\n\n// Checks if first {@link module:engine/view/attributeelement~AttributeElement AttributeElement} provided to the function\n// can be wrapped outside second element. It is done by comparing elements'\n// {@link module:engine/view/attributeelement~AttributeElement#priority priorities}, if both have same priority\n// {@link module:engine/view/element~Element#getIdentity identities} are compared.\n//\n// @param {module:engine/view/attributeelement~AttributeElement} a\n// @param {module:engine/view/attributeelement~AttributeElement} b\n// @returns {Boolean}\nfunction shouldABeOutsideB( a, b ) {\n\tif ( a.priority < b.priority ) {\n\t\treturn true;\n\t} else if ( a.priority > b.priority ) {\n\t\treturn false;\n\t}\n\n\t// When priorities are equal and names are different - use identities.\n\treturn a.getIdentity() < b.getIdentity();\n}\n\n// Returns new position that is moved to near text node. Returns same position if there is no text node before of after\n// specified position.\n//\n//\t\t

foo[]

->

foo{}

\n//\t\t

[]foo

->

{}foo

\n//\n// @param {module:engine/view/position~Position} position\n// @returns {module:engine/view/position~Position} Position located inside text node or same position if there is no text nodes\n// before or after position location.\nfunction movePositionToTextNode( position ) {\n\tconst nodeBefore = position.nodeBefore;\n\n\tif ( nodeBefore && nodeBefore.is( '$text' ) ) {\n\t\treturn new Position( nodeBefore, nodeBefore.data.length );\n\t}\n\n\tconst nodeAfter = position.nodeAfter;\n\n\tif ( nodeAfter && nodeAfter.is( '$text' ) ) {\n\t\treturn new Position( nodeAfter, 0 );\n\t}\n\n\treturn position;\n}\n\n// Breaks text node into two text nodes when possible.\n//\n//\t\t

foo{}bar

->

foo[]bar

\n//\t\t

{}foobar

->

[]foobar

\n//\t\t

foobar{}

->

foobar[]

\n//\n// @param {module:engine/view/position~Position} position Position that need to be placed inside text node.\n// @returns {module:engine/view/position~Position} New position after breaking text node.\nfunction breakTextNode( position ) {\n\tif ( position.offset == position.parent.data.length ) {\n\t\treturn new Position( position.parent.parent, position.parent.index + 1 );\n\t}\n\n\tif ( position.offset === 0 ) {\n\t\treturn new Position( position.parent.parent, position.parent.index );\n\t}\n\n\t// Get part of the text that need to be moved.\n\tconst textToMove = position.parent.data.slice( position.offset );\n\n\t// Leave rest of the text in position's parent.\n\tposition.parent._data = position.parent.data.slice( 0, position.offset );\n\n\t// Insert new text node after position's parent text node.\n\tposition.parent.parent._insertChild( position.parent.index + 1, new Text( position.root.document, textToMove ) );\n\n\t// Return new position between two newly created text nodes.\n\treturn new Position( position.parent.parent, position.parent.index + 1 );\n}\n\n// Merges two text nodes into first node. Removes second node and returns merge position.\n//\n// @param {module:engine/view/text~Text} t1 First text node to merge. Data from second text node will be moved at the end of\n// this text node.\n// @param {module:engine/view/text~Text} t2 Second text node to merge. This node will be removed after merging.\n// @returns {module:engine/view/position~Position} Position after merging text nodes.\nfunction mergeTextNodes( t1, t2 ) {\n\t// Merge text data into first text node and remove second one.\n\tconst nodeBeforeLength = t1.data.length;\n\tt1._data += t2.data;\n\tt2._remove();\n\n\treturn new Position( t1, nodeBeforeLength );\n}\n\n// Checks if provided nodes are valid to insert.\n//\n// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n// contains instances that are not supported ones (see error description for valid ones.\n//\n// @param Iterable. nodes\n// @param {Object} errorContext\nfunction validateNodesToInsert( nodes, errorContext ) {\n\tfor ( const node of nodes ) {\n\t\tif ( !validNodesToInsert.some( ( validNode => node instanceof validNode ) ) ) { // eslint-disable-line no-use-before-define\n\t\t\t/**\n\t\t\t * One of the nodes to be inserted is of an invalid type.\n\t\t\t *\n\t\t\t * Nodes to be inserted with {@link module:engine/view/downcastwriter~DowncastWriter#insert `DowncastWriter#insert()`} should be\n\t\t\t * of the following types:\n\t\t\t *\n\t\t\t * * {@link module:engine/view/attributeelement~AttributeElement AttributeElement},\n\t\t\t * * {@link module:engine/view/containerelement~ContainerElement ContainerElement},\n\t\t\t * * {@link module:engine/view/emptyelement~EmptyElement EmptyElement},\n\t\t\t * * {@link module:engine/view/uielement~UIElement UIElement},\n\t\t\t * * {@link module:engine/view/rawelement~RawElement RawElement},\n\t\t\t * * {@link module:engine/view/text~Text Text}.\n\t\t\t *\n\t\t\t * @error view-writer-insert-invalid-node-type\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-insert-invalid-node-type', errorContext );\n\t\t}\n\n\t\tif ( !node.is( '$text' ) ) {\n\t\t\tvalidateNodesToInsert( node.getChildren(), errorContext );\n\t\t}\n\t}\n}\n\nconst validNodesToInsert = [ Text, AttributeElement, ContainerElement, EmptyElement, RawElement, UIElement ];\n\n// Checks if node is ContainerElement or DocumentFragment, because in most cases they should be treated the same way.\n//\n// @param {module:engine/view/node~Node} node\n// @returns {Boolean} Returns `true` if node is instance of ContainerElement or DocumentFragment.\nfunction isContainerOrFragment( node ) {\n\treturn node && ( node.is( 'containerElement' ) || node.is( 'documentFragment' ) );\n}\n\n// Checks if {@link module:engine/view/range~Range#start range start} and {@link module:engine/view/range~Range#end range end} are placed\n// inside same {@link module:engine/view/containerelement~ContainerElement container element}.\n// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.\n//\n// @param {module:engine/view/range~Range} range\n// @param {Object} errorContext\nfunction validateRangeContainer( range, errorContext ) {\n\tconst startContainer = getParentContainer( range.start );\n\tconst endContainer = getParentContainer( range.end );\n\n\tif ( !startContainer || !endContainer || startContainer !== endContainer ) {\n\t\t/**\n\t\t * The container of the given range is invalid.\n\t\t *\n\t\t * This may happen if {@link module:engine/view/range~Range#start range start} and\n\t\t * {@link module:engine/view/range~Range#end range end} positions are not placed inside the same container element or\n\t\t * a parent container for these positions cannot be found.\n\t\t *\n\t\t * Methods like {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#remove()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#clean()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#unwrap()`} need to be called\n\t\t * on a range that has its start and end positions located in the same container element. Both positions can be\n\t\t * nested within other elements (e.g. an attribute element) but the closest container ancestor must be the same.\n\t\t *\n\t\t * @error view-writer-invalid-range-container\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-invalid-range-container', errorContext );\n\t}\n}\n\n// Checks if two attribute elements can be joined together. Elements can be joined together if, and only if\n// they do not have ids specified.\n//\n// @private\n// @param {module:engine/view/element~Element} a\n// @param {module:engine/view/element~Element} b\n// @returns {Boolean}\nfunction canBeJoined( a, b ) {\n\treturn a.id === null && b.id === null;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/istext\n */\n\n/**\n * Checks if the object is a native DOM Text node.\n *\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isText( obj ) {\n\treturn Object.prototype.toString.call( obj ) == '[object Text]';\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\nimport { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';\nimport isText from '@ckeditor/ckeditor5-utils/src/dom/istext';\n\n/**\n * Set of utils related to block and inline fillers handling.\n *\n * Browsers do not allow to put caret in elements which does not have height. Because of it, we need to fill all\n * empty elements which should be selectable with elements or characters called \"fillers\". Unfortunately there is no one\n * universal filler, this is why two types are uses:\n *\n * * Block filler is an element which fill block elements, like `

`. CKEditor uses `
` as a block filler during the editing,\n * as browsers do natively. So instead of an empty `

` there will be `


`. The advantage of block filler is that\n * it is transparent for the selection, so when the caret is before the `
` and user presses right arrow he will be\n * moved to the next paragraph, not after the `
`. The disadvantage is that it breaks a block, so it can not be used\n * in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `
` filler} can be replaced with any other\n * character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or\n * {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.\n *\n * * Inline filler is a filler which does not break a line of text, so it can be used inside the text, for instance in the empty\n * `` surrendered by text: `foobar`, if we want to put the caret there. CKEditor uses a sequence of the zero-width\n * spaces as an {@link module:engine/view/filler~INLINE_FILLER inline filler} having the predetermined\n * {@link module:engine/view/filler~INLINE_FILLER_LENGTH length}. A sequence is used, instead of a single character to\n * avoid treating random zero-width spaces as the inline filler. Disadvantage of the inline filler is that it is not\n * transparent for the selection. The arrow key moves the caret between zero-width spaces characters, so the additional\n * code is needed to handle the caret.\n *\n * Both inline and block fillers are handled by the {@link module:engine/view/renderer~Renderer renderer} and are not present in the\n * view.\n *\n * @module engine/view/filler\n */\n\n/**\n * Non-breaking space filler creator. This is a function which creates ` ` text node.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n * @function\n */\nexport const NBSP_FILLER = domDocument => domDocument.createTextNode( '\\u00A0' );\n\n/**\n * Marked non-breaking space filler creator. This is a function which creates ` ` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n * @function\n */\nexport const MARKED_NBSP_FILLER = domDocument => {\n\tconst span = domDocument.createElement( 'span' );\n\tspan.dataset.ckeFiller = true;\n\tspan.innerHTML = '\\u00A0';\n\n\treturn span;\n};\n\n/**\n * `
` filler creator. This is a function which creates `
` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n * @function\n */\nexport const BR_FILLER = domDocument => {\n\tconst fillerBr = domDocument.createElement( 'br' );\n\tfillerBr.dataset.ckeFiller = true;\n\n\treturn fillerBr;\n};\n\n/**\n * Length of the {@link module:engine/view/filler~INLINE_FILLER INLINE_FILLER}.\n */\nexport const INLINE_FILLER_LENGTH = 7;\n\n/**\n * Inline filler which is a sequence of the word joiners.\n *\n * @type {String}\n */\nexport const INLINE_FILLER = '\\u2060'.repeat( INLINE_FILLER_LENGTH );\n\n/**\n * Checks if the node is a text node which starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n *\t\tstartsWithFiller( document.createTextNode( INLINE_FILLER ) ); // true\n *\t\tstartsWithFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // true\n *\t\tstartsWithFiller( document.createTextNode( 'foo' ) ); // false\n *\t\tstartsWithFiller( document.createElement( 'p' ) ); // false\n *\n * @param {Node} domNode DOM node.\n * @returns {Boolean} True if the text node starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */\nexport function startsWithFiller( domNode ) {\n\treturn isText( domNode ) && ( domNode.data.substr( 0, INLINE_FILLER_LENGTH ) === INLINE_FILLER );\n}\n\n/**\n * Checks if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n *\t\tisInlineFiller( document.createTextNode( INLINE_FILLER ) ); // true\n *\t\tisInlineFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // false\n *\n * @param {Text} domText DOM text node.\n * @returns {Boolean} True if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */\nexport function isInlineFiller( domText ) {\n\treturn domText.data.length == INLINE_FILLER_LENGTH && startsWithFiller( domText );\n}\n\n/**\n * Get string data from the text node, removing an {@link module:engine/view/filler~INLINE_FILLER inline filler} from it,\n * if text node contains it.\n *\n *\t\tgetDataWithoutFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ) == 'foo' // true\n *\t\tgetDataWithoutFiller( document.createTextNode( 'foo' ) ) == 'foo' // true\n *\n * @param {Text} domText DOM text node, possible with inline filler.\n * @returns {String} Data without filler.\n */\nexport function getDataWithoutFiller( domText ) {\n\tif ( startsWithFiller( domText ) ) {\n\t\treturn domText.data.slice( INLINE_FILLER_LENGTH );\n\t} else {\n\t\treturn domText.data;\n\t}\n}\n\n/**\n * Assign key observer which move cursor from the end of the inline filler to the beginning of it when\n * the left arrow is pressed, so the filler does not break navigation.\n *\n * @param {module:engine/view/view~View} view View controller instance we should inject quirks handling on.\n */\nexport function injectQuirksHandling( view ) {\n\tview.document.on( 'arrowKey', jumpOverInlineFiller, { priority: 'low' } );\n}\n\n// Move cursor from the end of the inline filler to the beginning of it when, so the filler does not break navigation.\nfunction jumpOverInlineFiller( evt, data ) {\n\tif ( data.keyCode == keyCodes.arrowleft ) {\n\t\tconst domSelection = data.domTarget.ownerDocument.defaultView.getSelection();\n\n\t\tif ( domSelection.rangeCount == 1 && domSelection.getRangeAt( 0 ).collapsed ) {\n\t\t\tconst domParent = domSelection.getRangeAt( 0 ).startContainer;\n\t\t\tconst domOffset = domSelection.getRangeAt( 0 ).startOffset;\n\n\t\t\tif ( startsWithFiller( domParent ) && domOffset <= INLINE_FILLER_LENGTH ) {\n\t\t\t\tdomSelection.collapse( domParent, 0 );\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/fastdiff\n */\n\n/**\n * Finds positions of the first and last change in the given string/array and generates a set of changes:\n *\n *\t\tfastDiff( '12a', '12xyza' );\n *\t\t// [ { index: 2, type: 'insert', values: [ 'x', 'y', 'z' ] } ]\n *\n *\t\tfastDiff( '12a', '12aa' );\n *\t\t// [ { index: 3, type: 'insert', values: [ 'a' ] } ]\n *\n *\t\tfastDiff( '12xyza', '12a' );\n *\t\t// [ { index: 2, type: 'delete', howMany: 3 } ]\n *\n *\t\tfastDiff( [ '1', '2', 'a', 'a' ], [ '1', '2', 'a' ] );\n *\t\t// [ { index: 3, type: 'delete', howMany: 1 } ]\n *\n *\t\tfastDiff( [ '1', '2', 'a', 'b', 'c', '3' ], [ '2', 'a', 'b' ] );\n *\t\t// [ { index: 0, type: 'insert', values: [ '2', 'a', 'b' ] }, { index: 3, type: 'delete', howMany: 6 } ]\n *\n * Passed arrays can contain any type of data, however to compare them correctly custom comparator function\n * should be passed as a third parameter:\n *\n *\t\tfastDiff( [ { value: 1 }, { value: 2 } ], [ { value: 1 }, { value: 3 } ], ( a, b ) => {\n *\t\t\treturn a.value === b.value;\n *\t\t} );\n *\t\t// [ { index: 1, type: 'insert', values: [ { value: 3 } ] }, { index: 2, type: 'delete', howMany: 1 } ]\n *\n * The resulted set of changes can be applied to the input in order to transform it into the output, for example:\n *\n *\t\tlet input = '12abc3';\n *\t\tconst output = '2ab';\n *\t\tconst changes = fastDiff( input, output );\n *\n *\t\tchanges.forEach( change => {\n *\t\t\tif ( change.type == 'insert' ) {\n *\t\t\t\tinput = input.substring( 0, change.index ) + change.values.join( '' ) + input.substring( change.index );\n *\t\t\t} else if ( change.type == 'delete' ) {\n *\t\t\t\tinput = input.substring( 0, change.index ) + input.substring( change.index + change.howMany );\n *\t\t\t}\n *\t\t} );\n *\n *\t\t// input equals output now\n *\n * or in case of arrays:\n *\n *\t\tlet input = [ '1', '2', 'a', 'b', 'c', '3' ];\n *\t\tconst output = [ '2', 'a', 'b' ];\n *\t\tconst changes = fastDiff( input, output );\n *\n *\t\tchanges.forEach( change => {\n *\t\t\tif ( change.type == 'insert' ) {\n *\t\t\t\tinput = input.slice( 0, change.index ).concat( change.values, input.slice( change.index ) );\n *\t\t\t} else if ( change.type == 'delete' ) {\n *\t\t\t\tinput = input.slice( 0, change.index ).concat( input.slice( change.index + change.howMany ) );\n *\t\t\t}\n *\t\t} );\n *\n *\t\t// input equals output now\n *\n * By passing `true` as the fourth parameter (`atomicChanges`) the output of this function will become compatible with\n * the {@link module:utils/diff~diff `diff()`} function:\n *\n *\t\tfastDiff( '12a', '12xyza' );\n *\t\t// [ 'equal', 'equal', 'insert', 'insert', 'insert', 'equal' ]\n *\n * The default output format of this function is compatible with the output format of\n * {@link module:utils/difftochanges~diffToChanges `diffToChanges()`}. The `diffToChanges()` input format is, in turn,\n * compatible with the output of {@link module:utils/diff~diff `diff()`}:\n *\n *\t\tconst a = '1234';\n *\t\tconst b = '12xyz34';\n *\n *\t\t// Both calls will return the same results (grouped changes format).\n *\t\tfastDiff( a, b );\n *\t\tdiffToChanges( diff( a, b ) );\n *\n *\t\t// Again, both calls will return the same results (atomic changes format).\n *\t\tfastDiff( a, b, null, true );\n *\t\tdiff( a, b );\n *\n *\n * @param {Array|String} a Input array or string.\n * @param {Array|String} b Input array or string.\n * @param {Function} [cmp] Optional function used to compare array values, by default `===` (strict equal operator) is used.\n * @param {Boolean} [atomicChanges=false] Whether an array of `inset|delete|equal` operations should\n * be returned instead of changes set. This makes this function compatible with {@link module:utils/diff~diff `diff()`}.\n * @returns {Array} Array of changes.\n */\nexport default function fastDiff( a, b, cmp, atomicChanges = false ) {\n\t// Set the comparator function.\n\tcmp = cmp || function( a, b ) {\n\t\treturn a === b;\n\t};\n\n\t// Convert the string (or any array-like object - eg. NodeList) to an array by using the slice() method because,\n\t// unlike Array.from(), it returns array of UTF-16 code units instead of the code points of a string.\n\t// One code point might be a surrogate pair of two code units. All text offsets are expected to be in code units.\n\t// See ckeditor/ckeditor5#3147.\n\t//\n\t// We need to make sure here that fastDiff() works identical to diff().\n\tif ( !Array.isArray( a ) ) {\n\t\ta = Array.prototype.slice.call( a );\n\t}\n\n\tif ( !Array.isArray( b ) ) {\n\t\tb = Array.prototype.slice.call( b );\n\t}\n\n\t// Find first and last change.\n\tconst changeIndexes = findChangeBoundaryIndexes( a, b, cmp );\n\n\t// Transform into changes array.\n\treturn atomicChanges ? changeIndexesToAtomicChanges( changeIndexes, b.length ) : changeIndexesToChanges( b, changeIndexes );\n}\n\n// Finds position of the first and last change in the given arrays. For example:\n//\n//\t\tconst indexes = findChangeBoundaryIndexes( [ '1', '2', '3', '4' ], [ '1', '3', '4', '2', '4' ] );\n//\t\tconsole.log( indexes ); // { firstIndex: 1, lastIndexOld: 3, lastIndexNew: 4 }\n//\n// The above indexes means that in the first array the modified part is `1[23]4` and in the second array it is `1[342]4`.\n// Based on such indexes, array with `insert`/`delete` operations which allows transforming first value into the second one\n// can be generated.\n//\n// @param {Array} arr1\n// @param {Array} arr2\n// @param {Function} cmp Comparator function.\n// @returns {Object}\n// @returns {Number} return.firstIndex Index of the first change in both values (always the same for both).\n// @returns {Number} result.lastIndexOld Index of the last common value in `arr1`.\n// @returns {Number} result.lastIndexNew Index of the last common value in `arr2`.\nfunction findChangeBoundaryIndexes( arr1, arr2, cmp ) {\n\t// Find the first difference between passed values.\n\tconst firstIndex = findFirstDifferenceIndex( arr1, arr2, cmp );\n\n\t// If arrays are equal return -1 indexes object.\n\tif ( firstIndex === -1 ) {\n\t\treturn { firstIndex: -1, lastIndexOld: -1, lastIndexNew: -1 };\n\t}\n\n\t// Remove the common part of each value and reverse them to make it simpler to find the last difference between them.\n\tconst oldArrayReversed = cutAndReverse( arr1, firstIndex );\n\tconst newArrayReversed = cutAndReverse( arr2, firstIndex );\n\n\t// Find the first difference between reversed values.\n\t// It should be treated as \"how many elements from the end the last difference occurred\".\n\t//\n\t// For example:\n\t//\n\t// \t\t\t\tinitial\t->\tafter cut\t-> reversed:\n\t// oldValue:\t'321ba'\t->\t'21ba'\t\t-> 'ab12'\n\t// newValue:\t'31xba'\t->\t'1xba'\t\t-> 'abx1'\n\t// lastIndex:\t\t\t\t\t\t\t-> 2\n\t//\n\t// So the last change occurred two characters from the end of the arrays.\n\tconst lastIndex = findFirstDifferenceIndex( oldArrayReversed, newArrayReversed, cmp );\n\n\t// Use `lastIndex` to calculate proper offset, starting from the beginning (`lastIndex` kind of starts from the end).\n\tconst lastIndexOld = arr1.length - lastIndex;\n\tconst lastIndexNew = arr2.length - lastIndex;\n\n\treturn { firstIndex, lastIndexOld, lastIndexNew };\n}\n\n// Returns a first index on which given arrays differ. If both arrays are the same, -1 is returned.\n//\n// @param {Array} arr1\n// @param {Array} arr2\n// @param {Function} cmp Comparator function.\n// @returns {Number}\nfunction findFirstDifferenceIndex( arr1, arr2, cmp ) {\n\tfor ( let i = 0; i < Math.max( arr1.length, arr2.length ); i++ ) {\n\t\tif ( arr1[ i ] === undefined || arr2[ i ] === undefined || !cmp( arr1[ i ], arr2[ i ] ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1; // Return -1 if arrays are equal.\n}\n\n// Returns a copy of the given array with `howMany` elements removed starting from the beginning and in reversed order.\n//\n// @param {Array} arr Array to be processed.\n// @param {Number} howMany How many elements from array beginning to remove.\n// @returns {Array} Shortened and reversed array.\nfunction cutAndReverse( arr, howMany ) {\n\treturn arr.slice( howMany ).reverse();\n}\n\n// Generates changes array based on change indexes from `findChangeBoundaryIndexes` function. This function will\n// generate array with 0 (no changes), 1 (deletion or insertion) or 2 records (insertion and deletion).\n//\n// @param {Array} newArray New array for which change indexes were calculated.\n// @param {Object} changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n// @returns {Array.} Array of changes compatible with {@link module:utils/difftochanges~diffToChanges} format.\nfunction changeIndexesToChanges( newArray, changeIndexes ) {\n\tconst result = [];\n\tconst { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n\n\t// Order operations as 'insert', 'delete' array to keep compatibility with {@link module:utils/difftochanges~diffToChanges}\n\t// in most cases. However, 'diffToChanges' does not stick to any order so in some cases\n\t// (for example replacing '12345' with 'abcd') it will generate 'delete', 'insert' order.\n\tif ( lastIndexNew - firstIndex > 0 ) {\n\t\tresult.push( {\n\t\t\tindex: firstIndex,\n\t\t\ttype: 'insert',\n\t\t\tvalues: newArray.slice( firstIndex, lastIndexNew )\n\t\t} );\n\t}\n\n\tif ( lastIndexOld - firstIndex > 0 ) {\n\t\tresult.push( {\n\t\t\tindex: firstIndex + ( lastIndexNew - firstIndex ), // Increase index of what was inserted.\n\t\t\ttype: 'delete',\n\t\t\thowMany: lastIndexOld - firstIndex\n\t\t} );\n\t}\n\n\treturn result;\n}\n\n// Generates array with set `equal|insert|delete` operations based on change indexes from `findChangeBoundaryIndexes` function.\n//\n// @param {Object} changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n// @param {Number} newLength Length of the new array on which `findChangeBoundaryIndexes` calculated change indexes.\n// @returns {Array.} Array of changes compatible with {@link module:utils/diff~diff} format.\nfunction changeIndexesToAtomicChanges( changeIndexes, newLength ) {\n\tconst { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n\n\t// No changes.\n\tif ( firstIndex === -1 ) {\n\t\treturn Array( newLength ).fill( 'equal' );\n\t}\n\n\tlet result = [];\n\tif ( firstIndex > 0 ) {\n\t\tresult = result.concat( Array( firstIndex ).fill( 'equal' ) );\n\t}\n\n\tif ( lastIndexNew - firstIndex > 0 ) {\n\t\tresult = result.concat( Array( lastIndexNew - firstIndex ).fill( 'insert' ) );\n\t}\n\n\tif ( lastIndexOld - firstIndex > 0 ) {\n\t\tresult = result.concat( Array( lastIndexOld - firstIndex ).fill( 'delete' ) );\n\t}\n\n\tif ( lastIndexNew < newLength ) {\n\t\tresult = result.concat( Array( newLength - lastIndexNew ).fill( 'equal' ) );\n\t}\n\n\treturn result;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/diff\n */\n\nimport fastDiff from '../src/fastdiff';\n\n// The following code is based on the \"O(NP) Sequence Comparison Algorithm\"\n// by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n\n/**\n * Calculates the difference between two arrays or strings producing an array containing a list of changes\n * necessary to transform input into output.\n *\n *\t\tdiff( 'aba', 'acca' ); // [ 'equal', 'insert', 'insert', 'delete', 'equal' ]\n *\n * This function is based on the \"O(NP) Sequence Comparison Algorithm\" by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n * Unfortunately, while it gives the most precise results, its to complex for longer strings/arrow (above 200 items).\n * Therefore, `diff()` automatically switches to {@link module:utils/fastdiff~fastDiff `fastDiff()`} when detecting\n * such a scenario. The return formats of both functions are identical.\n *\n * @param {Array|String} a Input array or string.\n * @param {Array|String} b Output array or string.\n * @param {Function} [cmp] Optional function used to compare array values, by default === is used.\n * @returns {Array} Array of changes.\n */\nexport default function diff( a, b, cmp ) {\n\t// Set the comparator function.\n\tcmp = cmp || function( a, b ) {\n\t\treturn a === b;\n\t};\n\n\tconst aLength = a.length;\n\tconst bLength = b.length;\n\n\t// Perform `fastDiff` for longer strings/arrays (see #269).\n\tif ( aLength > 200 || bLength > 200 || aLength + bLength > 300 ) {\n\t\treturn diff.fastDiff( a, b, cmp, true );\n\t}\n\n\t// Temporary action type statics.\n\tlet _insert, _delete;\n\n\t// Swapped the arrays to use the shorter one as the first one.\n\tif ( bLength < aLength ) {\n\t\tconst tmp = a;\n\n\t\ta = b;\n\t\tb = tmp;\n\n\t\t// We swap the action types as well.\n\t\t_insert = 'delete';\n\t\t_delete = 'insert';\n\t} else {\n\t\t_insert = 'insert';\n\t\t_delete = 'delete';\n\t}\n\n\tconst m = a.length;\n\tconst n = b.length;\n\tconst delta = n - m;\n\n\t// Edit scripts, for each diagonal.\n\tconst es = {};\n\t// Furthest points, the furthest y we can get on each diagonal.\n\tconst fp = {};\n\n\tfunction snake( k ) {\n\t\t// We use -1 as an alternative below to handle initial values ( instead of filling the fp with -1 first ).\n\t\t// Furthest points (y) on the diagonal below k.\n\t\tconst y1 = ( fp[ k - 1 ] !== undefined ? fp[ k - 1 ] : -1 ) + 1;\n\t\t// Furthest points (y) on the diagonal above k.\n\t\tconst y2 = fp[ k + 1 ] !== undefined ? fp[ k + 1 ] : -1;\n\t\t// The way we should go to get further.\n\t\tconst dir = y1 > y2 ? -1 : 1;\n\n\t\t// Clone previous changes array (if any).\n\t\tif ( es[ k + dir ] ) {\n\t\t\tes[ k ] = es[ k + dir ].slice( 0 );\n\t\t}\n\n\t\t// Create changes array.\n\t\tif ( !es[ k ] ) {\n\t\t\tes[ k ] = [];\n\t\t}\n\n\t\t// Push the action.\n\t\tes[ k ].push( y1 > y2 ? _insert : _delete );\n\n\t\t// Set the beginning coordinates.\n\t\tlet y = Math.max( y1, y2 );\n\t\tlet x = y - k;\n\n\t\t// Traverse the diagonal as long as the values match.\n\t\twhile ( x < m && y < n && cmp( a[ x ], b[ y ] ) ) {\n\t\t\tx++;\n\t\t\ty++;\n\t\t\t// Push no change action.\n\t\t\tes[ k ].push( 'equal' );\n\t\t}\n\n\t\treturn y;\n\t}\n\n\tlet p = 0;\n\tlet k;\n\n\t// Traverse the graph until we reach the end of the longer string.\n\tdo {\n\t\t// Updates furthest points and edit scripts for diagonals below delta.\n\t\tfor ( k = -p; k < delta; k++ ) {\n\t\t\tfp[ k ] = snake( k );\n\t\t}\n\n\t\t// Updates furthest points and edit scripts for diagonals above delta.\n\t\tfor ( k = delta + p; k > delta; k-- ) {\n\t\t\tfp[ k ] = snake( k );\n\t\t}\n\n\t\t// Updates furthest point and edit script for the delta diagonal.\n\t\t// note that the delta diagonal is the one which goes through the sink (m, n).\n\t\tfp[ delta ] = snake( delta );\n\n\t\tp++;\n\t} while ( fp[ delta ] !== n );\n\n\t// Return the final list of edit changes.\n\t// We remove the first item that represents the action for the injected nulls.\n\treturn es[ delta ].slice( 1 );\n}\n\n// Store the API in static property to easily overwrite it in tests.\n// Too bad dependency injection does not work in Webpack + ES 6 (const) + Babel.\ndiff.fastDiff = fastDiff;\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/insertat\n */\n\n/**\n * Inserts node to the parent at given index.\n *\n * @param {Element} parentElement Parent element.\n * @param {Number} index Insertions index.\n * @param {Node} nodeToInsert Node to insert.\n */\nexport default function insertAt( parentElement, index, nodeToInsert ) {\n\tparentElement.insertBefore( nodeToInsert, parentElement.childNodes[ index ] || null );\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/remove\n */\n\n/**\n * Removes given node from parent.\n *\n * @param {Node} node Node to remove.\n */\nexport default function remove( node ) {\n\tconst parent = node.parentNode;\n\n\tif ( parent ) {\n\t\tparent.removeChild( node );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/isnode\n */\n\n/**\n * Checks if the object is a native DOM Node.\n *\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isNode( obj ) {\n\tif ( obj ) {\n\t\tif ( obj.defaultView ) {\n\t\t\treturn obj instanceof obj.defaultView.Document;\n\t\t} else if ( obj.ownerDocument && obj.ownerDocument.defaultView ) {\n\t\t\treturn obj instanceof obj.ownerDocument.defaultView.Node;\n\t\t}\n\t}\n\n\treturn false;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals Node */\n\n/**\n * @module engine/view/renderer\n */\n\nimport ViewText from './text';\nimport ViewPosition from './position';\nimport { INLINE_FILLER, INLINE_FILLER_LENGTH, startsWithFiller, isInlineFiller } from './filler';\n\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport diff from '@ckeditor/ckeditor5-utils/src/diff';\nimport insertAt from '@ckeditor/ckeditor5-utils/src/dom/insertat';\nimport remove from '@ckeditor/ckeditor5-utils/src/dom/remove';\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport isText from '@ckeditor/ckeditor5-utils/src/dom/istext';\nimport isNode from '@ckeditor/ckeditor5-utils/src/dom/isnode';\nimport fastDiff from '@ckeditor/ckeditor5-utils/src/fastdiff';\nimport env from '@ckeditor/ckeditor5-utils/src/env';\n\n/**\n * Renderer is responsible for updating the DOM structure and the DOM selection based on\n * the {@link module:engine/view/renderer~Renderer#markToSync information about updated view nodes}.\n * In other words, it renders the view to the DOM.\n *\n * Its main responsibility is to make only the necessary, minimal changes to the DOM. However, unlike in many\n * virtual DOM implementations, the primary reason for doing minimal changes is not the performance but ensuring\n * that native editing features such as text composition, autocompletion, spell checking, selection's x-index are\n * affected as little as possible.\n *\n * Renderer uses {@link module:engine/view/domconverter~DomConverter} to transform view nodes and positions\n * to and from the DOM.\n */\nexport default class Renderer {\n\t/**\n\t * Creates a renderer instance.\n\t *\n\t * @param {module:engine/view/domconverter~DomConverter} domConverter Converter instance.\n\t * @param {module:engine/view/documentselection~DocumentSelection} selection View selection.\n\t */\n\tconstructor( domConverter, selection ) {\n\t\t/**\n\t\t * Set of DOM Documents instances.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Set.}\n\t\t */\n\t\tthis.domDocuments = new Set();\n\n\t\t/**\n\t\t * Converter instance.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/domconverter~DomConverter}\n\t\t */\n\t\tthis.domConverter = domConverter;\n\n\t\t/**\n\t\t * Set of nodes which attributes changed and may need to be rendered.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Set.}\n\t\t */\n\t\tthis.markedAttributes = new Set();\n\n\t\t/**\n\t\t * Set of elements which child lists changed and may need to be rendered.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Set.}\n\t\t */\n\t\tthis.markedChildren = new Set();\n\n\t\t/**\n\t\t * Set of text nodes which text data changed and may need to be rendered.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Set.}\n\t\t */\n\t\tthis.markedTexts = new Set();\n\n\t\t/**\n\t\t * View selection. Renderer updates DOM selection based on the view selection.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/documentselection~DocumentSelection}\n\t\t */\n\t\tthis.selection = selection;\n\n\t\t/**\n\t\t * Indicates if the view document is focused and selection can be rendered. Selection will not be rendered if\n\t\t * this is set to `false`.\n\t\t *\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis.isFocused = false;\n\n\t\t/**\n\t\t * The text node in which the inline filler was rendered.\n\t\t *\n\t\t * @private\n\t\t * @member {Text}\n\t\t */\n\t\tthis._inlineFiller = null;\n\n\t\t/**\n\t\t * DOM element containing fake selection.\n\t\t *\n\t\t * @private\n\t\t * @type {null|HTMLElement}\n\t\t */\n\t\tthis._fakeSelectionContainer = null;\n\t}\n\n\t/**\n\t * Marks a view node to be updated in the DOM by {@link #render `render()`}.\n\t *\n\t * Note that only view nodes whose parents have corresponding DOM elements need to be marked to be synchronized.\n\t *\n\t * @see #markedAttributes\n\t * @see #markedChildren\n\t * @see #markedTexts\n\t *\n\t * @param {module:engine/view/document~ChangeType} type Type of the change.\n\t * @param {module:engine/view/node~Node} node Node to be marked.\n\t */\n\tmarkToSync( type, node ) {\n\t\tif ( type === 'text' ) {\n\t\t\tif ( this.domConverter.mapViewToDom( node.parent ) ) {\n\t\t\t\tthis.markedTexts.add( node );\n\t\t\t}\n\t\t} else {\n\t\t\t// If the node has no DOM element it is not rendered yet,\n\t\t\t// its children/attributes do not need to be marked to be sync.\n\t\t\tif ( !this.domConverter.mapViewToDom( node ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( type === 'attributes' ) {\n\t\t\t\tthis.markedAttributes.add( node );\n\t\t\t} else if ( type === 'children' ) {\n\t\t\t\tthis.markedChildren.add( node );\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * Unknown type passed to Renderer.markToSync.\n\t\t\t\t *\n\t\t\t\t * @error view-renderer-unknown-type\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'view-renderer-unknown-type', this );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Renders all buffered changes ({@link #markedAttributes}, {@link #markedChildren} and {@link #markedTexts}) and\n\t * the current view selection (if needed) to the DOM by applying a minimal set of changes to it.\n\t *\n\t * Renderer tries not to break the text composition (e.g. IME) and x-index of the selection,\n\t * so it does as little as it is needed to update the DOM.\n\t *\n\t * Renderer also handles {@link module:engine/view/filler fillers}. Especially, it checks if the inline filler is needed\n\t * at the selection position and adds or removes it. To prevent breaking text composition inline filler will not be\n\t * removed as long as the selection is in the text node which needed it at first.\n\t */\n\trender() {\n\t\tlet inlineFillerPosition;\n\n\t\t// Refresh mappings.\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildrenMappings( element );\n\t\t}\n\n\t\t// There was inline filler rendered in the DOM but it's not\n\t\t// at the selection position any more, so we can remove it\n\t\t// (cause even if it's needed, it must be placed in another location).\n\t\tif ( this._inlineFiller && !this._isSelectionInInlineFiller() ) {\n\t\t\tthis._removeInlineFiller();\n\t\t}\n\n\t\t// If we've got the filler, let's try to guess its position in the view.\n\t\tif ( this._inlineFiller ) {\n\t\t\tinlineFillerPosition = this._getInlineFillerPosition();\n\t\t}\n\t\t// Otherwise, if it's needed, create it at the selection position.\n\t\telse if ( this._needsInlineFillerAtSelection() ) {\n\t\t\tinlineFillerPosition = this.selection.getFirstPosition();\n\n\t\t\t// Do not use `markToSync` so it will be added even if the parent is already added.\n\t\t\tthis.markedChildren.add( inlineFillerPosition.parent );\n\t\t}\n\n\t\tfor ( const element of this.markedAttributes ) {\n\t\t\tthis._updateAttrs( element );\n\t\t}\n\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildren( element, { inlineFillerPosition } );\n\t\t}\n\n\t\tfor ( const node of this.markedTexts ) {\n\t\t\tif ( !this.markedChildren.has( node.parent ) && this.domConverter.mapViewToDom( node.parent ) ) {\n\t\t\t\tthis._updateText( node, { inlineFillerPosition } );\n\t\t\t}\n\t\t}\n\n\t\t// Check whether the inline filler is required and where it really is in the DOM.\n\t\t// At this point in most cases it will be in the DOM, but there are exceptions.\n\t\t// For example, if the inline filler was deep in the created DOM structure, it will not be created.\n\t\t// Similarly, if it was removed at the beginning of this function and then neither text nor children were updated,\n\t\t// it will not be present.\n\t\t// Fix those and similar scenarios.\n\t\tif ( inlineFillerPosition ) {\n\t\t\tconst fillerDomPosition = this.domConverter.viewPositionToDom( inlineFillerPosition );\n\t\t\tconst domDocument = fillerDomPosition.parent.ownerDocument;\n\n\t\t\tif ( !startsWithFiller( fillerDomPosition.parent ) ) {\n\t\t\t\t// Filler has not been created at filler position. Create it now.\n\t\t\t\tthis._inlineFiller = addInlineFiller( domDocument, fillerDomPosition.parent, fillerDomPosition.offset );\n\t\t\t} else {\n\t\t\t\t// Filler has been found, save it.\n\t\t\t\tthis._inlineFiller = fillerDomPosition.parent;\n\t\t\t}\n\t\t} else {\n\t\t\t// There is no filler needed.\n\t\t\tthis._inlineFiller = null;\n\t\t}\n\n\t\t// First focus the new editing host, then update the selection.\n\t\t// Otherwise, FF may throw an error (https://github.com/ckeditor/ckeditor5/issues/721).\n\t\tthis._updateFocus();\n\t\tthis._updateSelection();\n\n\t\tthis.markedTexts.clear();\n\t\tthis.markedAttributes.clear();\n\t\tthis.markedChildren.clear();\n\t}\n\n\t/**\n\t * Updates mappings of view element's children.\n\t *\n\t * Children that were replaced in the view structure by similar elements (same tag name) are treated as 'replaced'.\n\t * This means that their mappings can be updated so the new view elements are mapped to the existing DOM elements.\n\t * Thanks to that these elements do not need to be re-rendered completely.\n\t *\n\t * @private\n\t * @param {module:engine/view/node~Node} viewElement The view element whose children mappings will be updated.\n\t */\n\t_updateChildrenMappings( viewElement ) {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM and there is no need to process it.\n\t\t\treturn;\n\t\t}\n\n\t\tconst actualDomChildren = this.domConverter.mapViewToDom( viewElement ).childNodes;\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, domElement.ownerDocument, { withChildren: false } )\n\t\t);\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\t\tconst actions = this._findReplaceActions( diff, actualDomChildren, expectedDomChildren );\n\n\t\tif ( actions.indexOf( 'replace' ) !== -1 ) {\n\t\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\t\tfor ( const action of actions ) {\n\t\t\t\tif ( action === 'replace' ) {\n\t\t\t\t\tconst insertIndex = counter.equal + counter.insert;\n\t\t\t\t\tconst deleteIndex = counter.equal + counter.delete;\n\t\t\t\t\tconst viewChild = viewElement.getChild( insertIndex );\n\n\t\t\t\t\t// UIElement and RawElement are special cases. Their children are not stored in a view (#799)\n\t\t\t\t\t// so we cannot use them with replacing flow (since they use view children during rendering\n\t\t\t\t\t// which will always result in rendering empty elements).\n\t\t\t\t\tif ( viewChild && !( viewChild.is( 'uiElement' ) || viewChild.is( 'rawElement' ) ) ) {\n\t\t\t\t\t\tthis._updateElementMappings( viewChild, actualDomChildren[ deleteIndex ] );\n\t\t\t\t\t}\n\n\t\t\t\t\tremove( expectedDomChildren[ insertIndex ] );\n\t\t\t\t\tcounter.equal++;\n\t\t\t\t} else {\n\t\t\t\t\tcounter[ action ]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Updates mappings of a given view element.\n\t *\n\t * @private\n\t * @param {module:engine/view/node~Node} viewElement The view element whose mappings will be updated.\n\t * @param {Node} domElement The DOM element representing the given view element.\n\t */\n\t_updateElementMappings( viewElement, domElement ) {\n\t\t// Remap 'DomConverter' bindings.\n\t\tthis.domConverter.unbindDomElement( domElement );\n\t\tthis.domConverter.bindElements( domElement, viewElement );\n\n\t\t// View element may have children which needs to be updated, but are not marked, mark them to update.\n\t\tthis.markedChildren.add( viewElement );\n\n\t\t// Because we replace new view element mapping with the existing one, the corresponding DOM element\n\t\t// will not be rerendered. The new view element may have different attributes than the previous one.\n\t\t// Since its corresponding DOM element will not be rerendered, new attributes will not be added\n\t\t// to the DOM, so we need to mark it here to make sure its attributes gets updated. See #1427 for more\n\t\t// detailed case study.\n\t\t// Also there are cases where replaced element is removed from the view structure and then has\n\t\t// its attributes changed or removed. In such cases the element will not be present in `markedAttributes`\n\t\t// and also may be the same (`element.isSimilar()`) as the reused element not having its attributes updated.\n\t\t// To prevent such situations we always mark reused element to have its attributes rerenderd (#1560).\n\t\tthis.markedAttributes.add( viewElement );\n\t}\n\n\t/**\n\t * Gets the position of the inline filler based on the current selection.\n\t * Here, we assume that we know that the filler is needed and\n\t * {@link #_isSelectionInInlineFiller is at the selection position}, and, since it is needed,\n\t * it is somewhere at the selection position.\n\t *\n\t * Note: The filler position cannot be restored based on the filler's DOM text node, because\n\t * when this method is called (before rendering), the bindings will often be broken. View-to-DOM\n\t * bindings are only dependable after rendering.\n\t *\n\t * @private\n\t * @returns {module:engine/view/position~Position}\n\t */\n\t_getInlineFillerPosition() {\n\t\tconst firstPos = this.selection.getFirstPosition();\n\n\t\tif ( firstPos.parent.is( '$text' ) ) {\n\t\t\treturn ViewPosition._createBefore( this.selection.getFirstPosition().parent );\n\t\t} else {\n\t\t\treturn firstPos;\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if the selection has not left the inline filler's text node.\n\t * If it is `true`, it means that the filler had been added for a reason and the selection did not\n\t * leave the filler's text node. For example, the user can be in the middle of a composition so it should not be touched.\n\t *\n\t * @private\n\t * @returns {Boolean} `true` if the inline filler and selection are in the same place.\n\t */\n\t_isSelectionInInlineFiller() {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Note, we can't check if selection's position equals position of the\n\t\t// this._inlineFiller node, because of #663. We may not be able to calculate\n\t\t// the filler's position in the view at this stage.\n\t\t// Instead, we check it the other way – whether selection is anchored in\n\t\t// that text node or next to it.\n\n\t\t// Possible options are:\n\t\t// \"FILLER{}\"\n\t\t// \"FILLERadded-text{}\"\n\t\tconst selectionPosition = this.selection.getFirstPosition();\n\t\tconst position = this.domConverter.viewPositionToDom( selectionPosition );\n\n\t\tif ( position && isText( position.parent ) && startsWithFiller( position.parent ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Removes the inline filler.\n\t *\n\t * @private\n\t */\n\t_removeInlineFiller() {\n\t\tconst domFillerNode = this._inlineFiller;\n\n\t\t// Something weird happened and the stored node doesn't contain the filler's text.\n\t\tif ( !startsWithFiller( domFillerNode ) ) {\n\t\t\t/**\n\t\t\t * The inline filler node was lost. Most likely, something overwrote the filler text node\n\t\t\t * in the DOM.\n\t\t\t *\n\t\t\t * @error view-renderer-filler-was-lost\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-renderer-filler-was-lost', this );\n\t\t}\n\n\t\tif ( isInlineFiller( domFillerNode ) ) {\n\t\t\tdomFillerNode.parentNode.removeChild( domFillerNode );\n\t\t} else {\n\t\t\tdomFillerNode.data = domFillerNode.data.substr( INLINE_FILLER_LENGTH );\n\t\t}\n\n\t\tthis._inlineFiller = null;\n\t}\n\n\t/**\n\t * Checks if the inline {@link module:engine/view/filler filler} should be added.\n\t *\n\t * @private\n\t * @returns {Boolean} `true` if the inline filler should be added.\n\t */\n\t_needsInlineFillerAtSelection() {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst selectionPosition = this.selection.getFirstPosition();\n\t\tconst selectionParent = selectionPosition.parent;\n\t\tconst selectionOffset = selectionPosition.offset;\n\n\t\t// If there is no DOM root we do not care about fillers.\n\t\tif ( !this.domConverter.mapViewToDom( selectionParent.root ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !( selectionParent.is( 'element' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Prevent adding inline filler inside elements with contenteditable=false.\n\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/1170\n\t\tif ( !isEditable( selectionParent ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// We have block filler, we do not need inline one.\n\t\tif ( selectionOffset === selectionParent.getFillerOffset() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst nodeBefore = selectionPosition.nodeBefore;\n\t\tconst nodeAfter = selectionPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof ViewText || nodeAfter instanceof ViewText ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if text needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t * @param {module:engine/view/text~Text} viewText View text to update.\n\t * @param {Object} options\n\t * @param {module:engine/view/position~Position} options.inlineFillerPosition The position where the inline\n\t * filler should be rendered.\n\t */\n\t_updateText( viewText, options ) {\n\t\tconst domText = this.domConverter.findCorrespondingDomText( viewText );\n\t\tconst newDomText = this.domConverter.viewToDom( viewText, domText.ownerDocument );\n\n\t\tconst actualText = domText.data;\n\t\tlet expectedText = newDomText.data;\n\n\t\tconst filler = options.inlineFillerPosition;\n\n\t\tif ( filler && filler.parent == viewText.parent && filler.offset == viewText.index ) {\n\t\t\texpectedText = INLINE_FILLER + expectedText;\n\t\t}\n\n\t\tif ( actualText != expectedText ) {\n\t\t\tconst actions = fastDiff( actualText, expectedText );\n\n\t\t\tfor ( const action of actions ) {\n\t\t\t\tif ( action.type === 'insert' ) {\n\t\t\t\t\tdomText.insertData( action.index, action.values.join( '' ) );\n\t\t\t\t} else { // 'delete'\n\t\t\t\t\tdomText.deleteData( action.index, action.howMany );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if attribute list needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t * @param {module:engine/view/element~Element} viewElement The view element to update.\n\t */\n\t_updateAttrs( viewElement ) {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that 'viewElement' is outdated as its mapping was updated\n\t\t\t// in 'this._updateChildrenMappings()'. There is no need to process it as new view element which\n\t\t\t// replaced old 'viewElement' mapping was also added to 'this.markedAttributes'\n\t\t\t// in 'this._updateChildrenMappings()' so it will be processed separately.\n\t\t\treturn;\n\t\t}\n\n\t\tconst domAttrKeys = Array.from( domElement.attributes ).map( attr => attr.name );\n\t\tconst viewAttrKeys = viewElement.getAttributeKeys();\n\n\t\t// Add or overwrite attributes.\n\t\tfor ( const key of viewAttrKeys ) {\n\t\t\tdomElement.setAttribute( key, viewElement.getAttribute( key ) );\n\t\t}\n\n\t\t// Remove from DOM attributes which do not exists in the view.\n\t\tfor ( const key of domAttrKeys ) {\n\t\t\tif ( !viewElement.hasAttribute( key ) ) {\n\t\t\t\tdomElement.removeAttribute( key );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if elements child list needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t * @param {module:engine/view/element~Element} viewElement View element to update.\n\t * @param {Object} options\n\t * @param {module:engine/view/position~Position} options.inlineFillerPosition The position where the inline\n\t * filler should be rendered.\n\t */\n\t_updateChildren( viewElement, options ) {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM.\n\t\t\t// There is no need to process it. It will be processed when re-inserted.\n\t\t\treturn;\n\t\t}\n\n\t\tconst inlineFillerPosition = options.inlineFillerPosition;\n\t\tconst actualDomChildren = this.domConverter.mapViewToDom( viewElement ).childNodes;\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, domElement.ownerDocument, { bind: true, inlineFillerPosition } )\n\t\t);\n\n\t\t// Inline filler element has to be created as it is present in the DOM, but not in the view. It is required\n\t\t// during diffing so text nodes could be compared correctly and also during rendering to maintain\n\t\t// proper order and indexes while updating the DOM.\n\t\tif ( inlineFillerPosition && inlineFillerPosition.parent === viewElement ) {\n\t\t\taddInlineFiller( domElement.ownerDocument, expectedDomChildren, inlineFillerPosition.offset );\n\t\t}\n\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\n\t\tlet i = 0;\n\t\tconst nodesToUnbind = new Set();\n\n\t\t// Handle deletions first.\n\t\t// This is to prevent a situation where an element that already exists in `actualDomChildren` is inserted at a different\n\t\t// index in `actualDomChildren`. Since `actualDomChildren` is a `NodeList`, this works like move, not like an insert,\n\t\t// and it disrupts the whole algorithm. See https://github.com/ckeditor/ckeditor5/issues/6367.\n\t\t//\n\t\t// It doesn't matter in what order we remove or add nodes, as long as we remove and add correct nodes at correct indexes.\n\t\tfor ( const action of diff ) {\n\t\t\tif ( action === 'delete' ) {\n\t\t\t\tnodesToUnbind.add( actualDomChildren[ i ] );\n\t\t\t\tremove( actualDomChildren[ i ] );\n\t\t\t} else if ( action === 'equal' ) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\ti = 0;\n\n\t\tfor ( const action of diff ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\tinsertAt( domElement, i, expectedDomChildren[ i ] );\n\t\t\t\ti++;\n\t\t\t} else if ( action === 'equal' ) {\n\t\t\t\t// Force updating text nodes inside elements which did not change and do not need to be re-rendered (#1125).\n\t\t\t\t// Do it here (not in the loop above) because only after insertions the `i` index is correct.\n\t\t\t\tthis._markDescendantTextToSync( this.domConverter.domToView( expectedDomChildren[ i ] ) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\t// Unbind removed nodes. When node does not have a parent it means that it was removed from DOM tree during\n\t\t// comparison with the expected DOM. We don't need to check child nodes, because if child node was reinserted,\n\t\t// it was moved to DOM tree out of the removed node.\n\t\tfor ( const node of nodesToUnbind ) {\n\t\t\tif ( !node.parentNode ) {\n\t\t\t\tthis.domConverter.unbindDomElement( node );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Shorthand for diffing two arrays or node lists of DOM nodes.\n\t *\n\t * @private\n\t * @param {Array.|NodeList} actualDomChildren Actual DOM children\n\t * @param {Array.|NodeList} expectedDomChildren Expected DOM children.\n\t * @returns {Array.} The list of actions based on the {@link module:utils/diff~diff} function.\n\t */\n\t_diffNodeLists( actualDomChildren, expectedDomChildren ) {\n\t\tactualDomChildren = filterOutFakeSelectionContainer( actualDomChildren, this._fakeSelectionContainer );\n\n\t\treturn diff( actualDomChildren, expectedDomChildren, sameNodes.bind( null, this.domConverter ) );\n\t}\n\n\t/**\n\t * Finds DOM nodes that were replaced with the similar nodes (same tag name) in the view. All nodes are compared\n\t * within one `insert`/`delete` action group, for example:\n\t *\n\t * \t\tActual DOM:\t\t

FooBarBazBax

\n\t * \t\tExpected DOM:\t

Bar123Baz456

\n\t * \t\tInput actions:\t[ insert, insert, delete, delete, equal, insert, delete ]\n\t * \t\tOutput actions:\t[ insert, replace, delete, equal, replace ]\n\t *\n\t * @private\n\t * @param {Array.} actions Actions array which is a result of the {@link module:utils/diff~diff} function.\n\t * @param {Array.|NodeList} actualDom Actual DOM children\n\t * @param {Array.} expectedDom Expected DOM children.\n\t * @returns {Array.} Actions array modified with the `replace` actions.\n\t */\n\t_findReplaceActions( actions, actualDom, expectedDom ) {\n\t\t// If there is no both 'insert' and 'delete' actions, no need to check for replaced elements.\n\t\tif ( actions.indexOf( 'insert' ) === -1 || actions.indexOf( 'delete' ) === -1 ) {\n\t\t\treturn actions;\n\t\t}\n\n\t\tlet newActions = [];\n\t\tlet actualSlice = [];\n\t\tlet expectedSlice = [];\n\n\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\texpectedSlice.push( expectedDom[ counter.equal + counter.insert ] );\n\t\t\t} else if ( action === 'delete' ) {\n\t\t\t\tactualSlice.push( actualDom[ counter.equal + counter.delete ] );\n\t\t\t} else { // equal\n\t\t\t\tnewActions = newActions.concat( diff( actualSlice, expectedSlice, areSimilar ).map( x => x === 'equal' ? 'replace' : x ) );\n\t\t\t\tnewActions.push( 'equal' );\n\t\t\t\t// Reset stored elements on 'equal'.\n\t\t\t\tactualSlice = [];\n\t\t\t\texpectedSlice = [];\n\t\t\t}\n\t\t\tcounter[ action ]++;\n\t\t}\n\n\t\treturn newActions.concat( diff( actualSlice, expectedSlice, areSimilar ).map( x => x === 'equal' ? 'replace' : x ) );\n\t}\n\n\t/**\n\t * Marks text nodes to be synchronized.\n\t *\n\t * If a text node is passed, it will be marked. If an element is passed, all descendant text nodes inside it will be marked.\n\t *\n\t * @private\n\t * @param {module:engine/view/node~Node} viewNode View node to sync.\n\t */\n\t_markDescendantTextToSync( viewNode ) {\n\t\tif ( !viewNode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( viewNode.is( '$text' ) ) {\n\t\t\tthis.markedTexts.add( viewNode );\n\t\t} else if ( viewNode.is( 'element' ) ) {\n\t\t\tfor ( const child of viewNode.getChildren() ) {\n\t\t\t\tthis._markDescendantTextToSync( child );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the selection needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t */\n\t_updateSelection() {\n\t\t// If there is no selection - remove DOM and fake selections.\n\t\tif ( this.selection.rangeCount === 0 ) {\n\t\t\tthis._removeDomSelection();\n\t\t\tthis._removeFakeSelection();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst domRoot = this.domConverter.mapViewToDom( this.selection.editableElement );\n\n\t\t// Do nothing if there is no focus, or there is no DOM element corresponding to selection's editable element.\n\t\tif ( !this.isFocused || !domRoot ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Render selection.\n\t\tif ( this.selection.isFake ) {\n\t\t\tthis._updateFakeSelection( domRoot );\n\t\t} else {\n\t\t\tthis._removeFakeSelection();\n\t\t\tthis._updateDomSelection( domRoot );\n\t\t}\n\t}\n\n\t/**\n\t * Updates the fake selection.\n\t *\n\t * @private\n\t * @param {HTMLElement} domRoot A valid DOM root where the fake selection container should be added.\n\t */\n\t_updateFakeSelection( domRoot ) {\n\t\tconst domDocument = domRoot.ownerDocument;\n\n\t\tif ( !this._fakeSelectionContainer ) {\n\t\t\tthis._fakeSelectionContainer = createFakeSelectionContainer( domDocument );\n\t\t}\n\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\t// Bind fake selection container with the current selection *position*.\n\t\tthis.domConverter.bindFakeSelection( container, this.selection );\n\n\t\tif ( !this._fakeSelectionNeedsUpdate( domRoot ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !container.parentElement || container.parentElement != domRoot ) {\n\t\t\tdomRoot.appendChild( container );\n\t\t}\n\n\t\tcontainer.textContent = this.selection.fakeSelectionLabel || '\\u00A0';\n\n\t\tconst domSelection = domDocument.getSelection();\n\t\tconst domRange = domDocument.createRange();\n\n\t\tdomSelection.removeAllRanges();\n\t\tdomRange.selectNodeContents( container );\n\t\tdomSelection.addRange( domRange );\n\t}\n\n\t/**\n\t * Updates the DOM selection.\n\t *\n\t * @private\n\t * @param {HTMLElement} domRoot A valid DOM root where the DOM selection should be rendered.\n\t */\n\t_updateDomSelection( domRoot ) {\n\t\tconst domSelection = domRoot.ownerDocument.defaultView.getSelection();\n\n\t\t// Let's check whether DOM selection needs updating at all.\n\t\tif ( !this._domSelectionNeedsUpdate( domSelection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Multi-range selection is not available in most browsers, and, at least in Chrome, trying to\n\t\t// set such selection, that is not continuous, throws an error. Because of that, we will just use anchor\n\t\t// and focus of view selection.\n\t\t// Since we are not supporting multi-range selection, we also do not need to check if proper editable is\n\t\t// selected. If there is any editable selected, it is okay (editable is taken from selection anchor).\n\t\tconst anchor = this.domConverter.viewPositionToDom( this.selection.anchor );\n\t\tconst focus = this.domConverter.viewPositionToDom( this.selection.focus );\n\n\t\tdomSelection.collapse( anchor.parent, anchor.offset );\n\t\tdomSelection.extend( focus.parent, focus.offset );\n\n\t\t// Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n\t\tif ( env.isGecko ) {\n\t\t\tfixGeckoSelectionAfterBr( focus, domSelection );\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether a given DOM selection needs to be updated.\n\t *\n\t * @private\n\t * @param {Selection} domSelection The DOM selection to check.\n\t * @returns {Boolean}\n\t */\n\t_domSelectionNeedsUpdate( domSelection ) {\n\t\tif ( !this.domConverter.isDomSelectionCorrect( domSelection ) ) {\n\t\t\t// Current DOM selection is in incorrect position. We need to update it.\n\t\t\treturn true;\n\t\t}\n\n\t\tconst oldViewSelection = domSelection && this.domConverter.domSelectionToView( domSelection );\n\n\t\tif ( oldViewSelection && this.selection.isEqual( oldViewSelection ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If selection is not collapsed, it does not need to be updated if it is similar.\n\t\tif ( !this.selection.isCollapsed && this.selection.isSimilar( oldViewSelection ) ) {\n\t\t\t// Selection did not changed and is correct, do not update.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Selections are not similar.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether the fake selection needs to be updated.\n\t *\n\t * @private\n\t * @param {HTMLElement} domRoot A valid DOM root where a new fake selection container should be added.\n\t * @returns {Boolean}\n\t */\n\t_fakeSelectionNeedsUpdate( domRoot ) {\n\t\tconst container = this._fakeSelectionContainer;\n\t\tconst domSelection = domRoot.ownerDocument.getSelection();\n\n\t\t// Fake selection needs to be updated if there's no fake selection container, or the container currently sits\n\t\t// in a different root.\n\t\tif ( !container || container.parentElement !== domRoot ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Make sure that the selection actually is within the fake selection.\n\t\tif ( domSelection.anchorNode !== container && !container.contains( domSelection.anchorNode ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn container.textContent !== this.selection.fakeSelectionLabel;\n\t}\n\n\t/**\n\t * Removes the DOM selection.\n\t *\n\t * @private\n\t */\n\t_removeDomSelection() {\n\t\tfor ( const doc of this.domDocuments ) {\n\t\t\tconst domSelection = doc.getSelection();\n\n\t\t\tif ( domSelection.rangeCount ) {\n\t\t\t\tconst activeDomElement = doc.activeElement;\n\t\t\t\tconst viewElement = this.domConverter.mapDomToView( activeDomElement );\n\n\t\t\t\tif ( activeDomElement && viewElement ) {\n\t\t\t\t\tdoc.getSelection().removeAllRanges();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes the fake selection.\n\t *\n\t * @private\n\t */\n\t_removeFakeSelection() {\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\tif ( container ) {\n\t\t\tcontainer.remove();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if focus needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t */\n\t_updateFocus() {\n\t\tif ( this.isFocused ) {\n\t\t\tconst editable = this.selection.editableElement;\n\n\t\t\tif ( editable ) {\n\t\t\t\tthis.domConverter.focus( editable );\n\t\t\t}\n\t\t}\n\t}\n}\n\nmix( Renderer, ObservableMixin );\n\n// Checks if provided element is editable.\n//\n// @private\n// @param {module:engine/view/element~Element} element\n// @returns {Boolean}\nfunction isEditable( element ) {\n\tif ( element.getAttribute( 'contenteditable' ) == 'false' ) {\n\t\treturn false;\n\t}\n\n\tconst parent = element.findAncestor( element => element.hasAttribute( 'contenteditable' ) );\n\n\treturn !parent || parent.getAttribute( 'contenteditable' ) == 'true';\n}\n\n// Adds inline filler at a given position.\n//\n// The position can be given as an array of DOM nodes and an offset in that array,\n// or a DOM parent element and an offset in that element.\n//\n// @private\n// @param {Document} domDocument\n// @param {Element|Array.} domParentOrArray\n// @param {Number} offset\n// @returns {Text} The DOM text node that contains an inline filler.\nfunction addInlineFiller( domDocument, domParentOrArray, offset ) {\n\tconst childNodes = domParentOrArray instanceof Array ? domParentOrArray : domParentOrArray.childNodes;\n\tconst nodeAfterFiller = childNodes[ offset ];\n\n\tif ( isText( nodeAfterFiller ) ) {\n\t\tnodeAfterFiller.data = INLINE_FILLER + nodeAfterFiller.data;\n\n\t\treturn nodeAfterFiller;\n\t} else {\n\t\tconst fillerNode = domDocument.createTextNode( INLINE_FILLER );\n\n\t\tif ( Array.isArray( domParentOrArray ) ) {\n\t\t\tchildNodes.splice( offset, 0, fillerNode );\n\t\t} else {\n\t\t\tinsertAt( domParentOrArray, offset, fillerNode );\n\t\t}\n\n\t\treturn fillerNode;\n\t}\n}\n\n// Whether two DOM nodes should be considered as similar.\n// Nodes are considered similar if they have the same tag name.\n//\n// @private\n// @param {Node} node1\n// @param {Node} node2\n// @returns {Boolean}\nfunction areSimilar( node1, node2 ) {\n\treturn isNode( node1 ) && isNode( node2 ) &&\n\t\t!isText( node1 ) && !isText( node2 ) &&\n\t\tnode1.nodeType !== Node.COMMENT_NODE && node2.nodeType !== Node.COMMENT_NODE &&\n\t\tnode1.tagName.toLowerCase() === node2.tagName.toLowerCase();\n}\n\n// Whether two dom nodes should be considered as the same.\n// Two nodes which are considered the same are:\n//\n//\t\t* Text nodes with the same text.\n//\t\t* Element nodes represented by the same object.\n//\t\t* Two block filler elements.\n//\n// @private\n// @param {String} blockFillerMode Block filler mode, see {@link module:engine/view/domconverter~DomConverter#blockFillerMode}.\n// @param {Node} node1\n// @param {Node} node2\n// @returns {Boolean}\nfunction sameNodes( domConverter, actualDomChild, expectedDomChild ) {\n\t// Elements.\n\tif ( actualDomChild === expectedDomChild ) {\n\t\treturn true;\n\t}\n\t// Texts.\n\telse if ( isText( actualDomChild ) && isText( expectedDomChild ) ) {\n\t\treturn actualDomChild.data === expectedDomChild.data;\n\t}\n\t// Block fillers.\n\telse if ( domConverter.isBlockFiller( actualDomChild ) &&\n\t\tdomConverter.isBlockFiller( expectedDomChild ) ) {\n\t\treturn true;\n\t}\n\n\t// Not matching types.\n\treturn false;\n}\n\n// The following is a Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n// When the native DOM selection is at the end of the block and preceded by
e.g.\n//\n//\t\t

foo
[]

\n//\n// which happens a lot when using the soft line break, the browser fails to (visually) move the\n// caret to the new line. A quick fix is as simple as force–refreshing the selection with the same range.\nfunction fixGeckoSelectionAfterBr( focus, domSelection ) {\n\tconst parent = focus.parent;\n\n\t// This fix works only when the focus point is at the very end of an element.\n\t// There is no point in running it in cases unrelated to the browser bug.\n\tif ( parent.nodeType != Node.ELEMENT_NODE || focus.offset != parent.childNodes.length - 1 ) {\n\t\treturn;\n\t}\n\n\tconst childAtOffset = parent.childNodes[ focus.offset ];\n\n\t// To stay on the safe side, the fix being as specific as possible, it targets only the\n\t// selection which is at the very end of the element and preceded by
.\n\tif ( childAtOffset && childAtOffset.tagName == 'BR' ) {\n\t\tdomSelection.addRange( domSelection.getRangeAt( 0 ) );\n\t}\n}\n\nfunction filterOutFakeSelectionContainer( domChildList, fakeSelectionContainer ) {\n\tconst childList = Array.from( domChildList );\n\n\tif ( childList.length == 0 || !fakeSelectionContainer ) {\n\t\treturn childList;\n\t}\n\n\tconst last = childList[ childList.length - 1 ];\n\n\tif ( last == fakeSelectionContainer ) {\n\t\tchildList.pop();\n\t}\n\n\treturn childList;\n}\n\n// Creates a fake selection container for a given document.\n//\n// @private\n// @param {Document} domDocument\n// @returns {HTMLElement}\nfunction createFakeSelectionContainer( domDocument ) {\n\tconst container = domDocument.createElement( 'div' );\n\n\tcontainer.className = 'ck-fake-selection-container';\n\n\tObject.assign( container.style, {\n\t\tposition: 'fixed',\n\t\ttop: 0,\n\t\tleft: '-9999px',\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/752.\n\t\twidth: '42px'\n\t} );\n\n\t// Fill it with a text node so we can update it later.\n\tcontainer.textContent = '\\u00A0';\n\n\treturn container;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals window, document */\n\n/**\n * @module utils/dom/global\n */\n\n/**\n * A helper (module) giving an access to the global DOM objects such as `window` and\n * `document`. Accessing these objects using this helper allows easy and bulletproof\n * testing, i.e. stubbing native properties:\n *\n *\t\timport global from 'ckeditor5/utils/dom/global.js';\n *\n *\t\t// This stub will work for any code using global module.\n *\t\ttestUtils.sinon.stub( global, 'window', {\n *\t\t\tinnerWidth: 10000\n *\t\t} );\n *\n *\t\tconsole.log( global.window.innerWidth );\n */\nexport default { window, document };\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/indexof\n */\n\n/**\n * Returns index of the node in the parent element.\n *\n * @param {Node} node Node which index is tested.\n * @returns {Number} Index of the node in the parent element. Returns 0 if node has no parent.\n */\nexport default function indexOf( node ) {\n\tlet index = 0;\n\n\twhile ( node.previousSibling ) {\n\t\tnode = node.previousSibling;\n\t\tindex++;\n\t}\n\n\treturn index;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals Node */\n\n/**\n * @module utils/dom/getancestors\n */\n\n/**\n * Returns all ancestors of given DOM node, starting from the top-most (root). Includes the given node itself. If the\n * node is a part of `DocumentFragment` that `DocumentFragment` will be returned. In contrary, if the node is\n * appended to a `Document`, that `Document` will not be returned (algorithms operating on DOM tree care for `Document#documentElement`\n * at most, which will be returned).\n *\n * @param {Node} node DOM node.\n * @returns {Array.} Array of given `node` parents.\n */\nexport default function getAncestors( node ) {\n\tconst nodes = [];\n\n\t// We are interested in `Node`s `DocumentFragment`s only.\n\twhile ( node && node.nodeType != Node.DOCUMENT_NODE ) {\n\t\tnodes.unshift( node );\n\t\tnode = node.parentNode;\n\t}\n\n\treturn nodes;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/domconverter\n */\n\n/* globals document, Node, NodeFilter, Text */\n\nimport ViewText from './text';\nimport ViewElement from './element';\nimport ViewPosition from './position';\nimport ViewRange from './range';\nimport ViewSelection from './selection';\nimport ViewDocumentFragment from './documentfragment';\nimport ViewTreeWalker from './treewalker';\nimport Matcher from './matcher';\nimport {\n\tBR_FILLER, INLINE_FILLER_LENGTH, NBSP_FILLER, MARKED_NBSP_FILLER,\n\tgetDataWithoutFiller, isInlineFiller, startsWithFiller\n} from './filler';\n\nimport global from '@ckeditor/ckeditor5-utils/src/dom/global';\nimport indexOf from '@ckeditor/ckeditor5-utils/src/dom/indexof';\nimport getAncestors from '@ckeditor/ckeditor5-utils/src/dom/getancestors';\nimport getCommonAncestor from '@ckeditor/ckeditor5-utils/src/dom/getcommonancestor';\nimport isText from '@ckeditor/ckeditor5-utils/src/dom/istext';\nimport { isElement } from 'lodash-es';\n\nconst BR_FILLER_REF = BR_FILLER( document ); // eslint-disable-line new-cap\nconst NBSP_FILLER_REF = NBSP_FILLER( document ); // eslint-disable-line new-cap\nconst MARKED_NBSP_FILLER_REF = MARKED_NBSP_FILLER( document ); // eslint-disable-line new-cap\n\n/**\n * `DomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles\n * {@link module:engine/view/domconverter~DomConverter#bindElements bindings} between these nodes.\n *\n * An instance of the DOM converter is available under\n * {@link module:engine/view/view~View#domConverter `editor.editing.view.domConverter`}.\n *\n * The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~Renderer}), does not keep the\n * state of a tree nor keeps the synchronization between the tree view and the DOM tree (use {@link module:engine/view/document~Document}).\n *\n * The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost.\n * Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.\n */\nexport default class DomConverter {\n\t/**\n\t * Creates a DOM converter.\n\t *\n\t * @param {module:engine/view/document~Document} document The view document instance.\n\t * @param {Object} options An object with configuration options.\n\t * @param {module:engine/view/filler~BlockFillerMode} [options.blockFillerMode='br'] The type of the block filler to use.\n\t */\n\tconstructor( document, options = {} ) {\n\t\t/**\n\t\t * @readonly\n\t\t * @type {module:engine/view/document~Document}\n\t\t */\n\t\tthis.document = document;\n\n\t\t/**\n\t\t * The mode of a block filler used by the DOM converter.\n\t\t *\n\t\t * @member {'br'|'nbsp'|'markedNbsp'} module:engine/view/domconverter~DomConverter#blockFillerMode\n\t\t */\n\t\tthis.blockFillerMode = options.blockFillerMode || 'br';\n\n\t\t/**\n\t\t * Elements which are considered pre-formatted elements.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Array.} module:engine/view/domconverter~DomConverter#preElements\n\t\t */\n\t\tthis.preElements = [ 'pre' ];\n\n\t\t/**\n\t\t * Elements which are considered block elements (and hence should be filled with a\n\t\t * {@link #isBlockFiller block filler}).\n\t\t *\n\t\t * Whether an element is considered a block element also affects handling of trailing whitespaces.\n\t\t *\n\t\t * You can extend this array if you introduce support for block elements which are not yet recognized here.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Array.} module:engine/view/domconverter~DomConverter#blockElements\n\t\t */\n\t\tthis.blockElements = [ 'p', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'li', 'dd', 'dt', 'figcaption', 'td', 'th' ];\n\n\t\t/**\n\t\t * The DOM-to-view mapping.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap} module:engine/view/domconverter~DomConverter#_domToViewMapping\n\t\t */\n\t\tthis._domToViewMapping = new WeakMap();\n\n\t\t/**\n\t\t * The view-to-DOM mapping.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap} module:engine/view/domconverter~DomConverter#_viewToDomMapping\n\t\t */\n\t\tthis._viewToDomMapping = new WeakMap();\n\n\t\t/**\n\t\t * Holds the mapping between fake selection containers and corresponding view selections.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap} module:engine/view/domconverter~DomConverter#_fakeSelectionMapping\n\t\t */\n\t\tthis._fakeSelectionMapping = new WeakMap();\n\n\t\t/**\n\t\t * Matcher for view elements whose content should be treated as raw data\n\t\t * and not processed during the conversion from DOM nodes to view elements.\n\t\t *\n\t\t * @private\n\t\t * @type {module:engine/view/matcher~Matcher}\n\t\t */\n\t\tthis._rawContentElementMatcher = new Matcher();\n\n\t\t/**\n\t\t * A set of encountered raw content DOM nodes. It is used for preventing left trimming of the following text node.\n\t\t *\n\t\t * @private\n\t\t * @type {WeakSet.}\n\t\t */\n\t\tthis._encounteredRawContentDomNodes = new WeakSet();\n\t}\n\n\t/**\n\t * Binds a given DOM element that represents fake selection to a **position** of a\n\t * {@link module:engine/view/documentselection~DocumentSelection document selection}.\n\t * Document selection copy is stored and can be retrieved by the\n\t * {@link module:engine/view/domconverter~DomConverter#fakeSelectionToView} method.\n\t *\n\t * @param {HTMLElement} domElement\n\t * @param {module:engine/view/documentselection~DocumentSelection} viewDocumentSelection\n\t */\n\tbindFakeSelection( domElement, viewDocumentSelection ) {\n\t\tthis._fakeSelectionMapping.set( domElement, new ViewSelection( viewDocumentSelection ) );\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/selection~Selection view selection} instance corresponding to a given\n\t * DOM element that represents fake selection. Returns `undefined` if binding to the given DOM element does not exist.\n\t *\n\t * @param {HTMLElement} domElement\n\t * @returns {module:engine/view/selection~Selection|undefined}\n\t */\n\tfakeSelectionToView( domElement ) {\n\t\treturn this._fakeSelectionMapping.get( domElement );\n\t}\n\n\t/**\n\t * Binds DOM and view elements, so it will be possible to get corresponding elements using\n\t * {@link module:engine/view/domconverter~DomConverter#mapDomToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.\n\t *\n\t * @param {HTMLElement} domElement The DOM element to bind.\n\t * @param {module:engine/view/element~Element} viewElement The view element to bind.\n\t */\n\tbindElements( domElement, viewElement ) {\n\t\tthis._domToViewMapping.set( domElement, viewElement );\n\t\tthis._viewToDomMapping.set( viewElement, domElement );\n\t}\n\n\t/**\n\t * Unbinds a given DOM element from the view element it was bound to. Unbinding is deep, meaning that all children of\n\t * the DOM element will be unbound too.\n\t *\n\t * @param {HTMLElement} domElement The DOM element to unbind.\n\t */\n\tunbindDomElement( domElement ) {\n\t\tconst viewElement = this._domToViewMapping.get( domElement );\n\n\t\tif ( viewElement ) {\n\t\t\tthis._domToViewMapping.delete( domElement );\n\t\t\tthis._viewToDomMapping.delete( viewElement );\n\n\t\t\tfor ( const child of domElement.childNodes ) {\n\t\t\t\tthis.unbindDomElement( child );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Binds DOM and view document fragments, so it will be possible to get corresponding document fragments using\n\t * {@link module:engine/view/domconverter~DomConverter#mapDomToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.\n\t *\n\t * @param {DocumentFragment} domFragment The DOM document fragment to bind.\n\t * @param {module:engine/view/documentfragment~DocumentFragment} viewFragment The view document fragment to bind.\n\t */\n\tbindDocumentFragments( domFragment, viewFragment ) {\n\t\tthis._domToViewMapping.set( domFragment, viewFragment );\n\t\tthis._viewToDomMapping.set( viewFragment, domFragment );\n\t}\n\n\t/**\n\t * Converts the view to the DOM. For all text nodes, not bound elements and document fragments new items will\n\t * be created. For bound elements and document fragments the method will return corresponding items.\n\t *\n\t * @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} viewNode\n\t * View node or document fragment to transform.\n\t * @param {Document} domDocument Document which will be used to create DOM nodes.\n\t * @param {Object} [options] Conversion options.\n\t * @param {Boolean} [options.bind=false] Determines whether new elements will be bound.\n\t * @param {Boolean} [options.withChildren=true] If `true`, node's and document fragment's children will be converted too.\n\t * @returns {Node|DocumentFragment} Converted node or DocumentFragment.\n\t */\n\tviewToDom( viewNode, domDocument, options = {} ) {\n\t\tif ( viewNode.is( '$text' ) ) {\n\t\t\tconst textData = this._processDataFromViewText( viewNode );\n\n\t\t\treturn domDocument.createTextNode( textData );\n\t\t} else {\n\t\t\tif ( this.mapViewToDom( viewNode ) ) {\n\t\t\t\treturn this.mapViewToDom( viewNode );\n\t\t\t}\n\n\t\t\tlet domElement;\n\n\t\t\tif ( viewNode.is( 'documentFragment' ) ) {\n\t\t\t\t// Create DOM document fragment.\n\t\t\t\tdomElement = domDocument.createDocumentFragment();\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindDocumentFragments( domElement, viewNode );\n\t\t\t\t}\n\t\t\t} else if ( viewNode.is( 'uiElement' ) ) {\n\t\t\t\t// UIElement has its own render() method (see #799).\n\t\t\t\tdomElement = viewNode.render( domDocument );\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindElements( domElement, viewNode );\n\t\t\t\t}\n\n\t\t\t\treturn domElement;\n\t\t\t} else {\n\t\t\t\t// Create DOM element.\n\t\t\t\tif ( viewNode.hasAttribute( 'xmlns' ) ) {\n\t\t\t\t\tdomElement = domDocument.createElementNS( viewNode.getAttribute( 'xmlns' ), viewNode.name );\n\t\t\t\t} else {\n\t\t\t\t\tdomElement = domDocument.createElement( viewNode.name );\n\t\t\t\t}\n\n\t\t\t\t// RawElement take care of their children in RawElement#render() method which can be customized\n\t\t\t\t// (see https://github.com/ckeditor/ckeditor5/issues/4469).\n\t\t\t\tif ( viewNode.is( 'rawElement' ) ) {\n\t\t\t\t\tviewNode.render( domElement );\n\t\t\t\t}\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindElements( domElement, viewNode );\n\t\t\t\t}\n\n\t\t\t\t// Copy element's attributes.\n\t\t\t\tfor ( const key of viewNode.getAttributeKeys() ) {\n\t\t\t\t\tdomElement.setAttribute( key, viewNode.getAttribute( key ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( options.withChildren !== false ) {\n\t\t\t\tfor ( const child of this.viewChildrenToDom( viewNode, domDocument, options ) ) {\n\t\t\t\t\tdomElement.appendChild( child );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn domElement;\n\t\t}\n\t}\n\n\t/**\n\t * Converts children of the view element to DOM using the\n\t * {@link module:engine/view/domconverter~DomConverter#viewToDom} method.\n\t * Additionally, this method adds block {@link module:engine/view/filler filler} to the list of children, if needed.\n\t *\n\t * @param {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment} viewElement Parent view element.\n\t * @param {Document} domDocument Document which will be used to create DOM nodes.\n\t * @param {Object} options See {@link module:engine/view/domconverter~DomConverter#viewToDom} options parameter.\n\t * @returns {Iterable.} DOM nodes.\n\t */\n\t* viewChildrenToDom( viewElement, domDocument, options = {} ) {\n\t\tconst fillerPositionOffset = viewElement.getFillerOffset && viewElement.getFillerOffset();\n\t\tlet offset = 0;\n\n\t\tfor ( const childView of viewElement.getChildren() ) {\n\t\t\tif ( fillerPositionOffset === offset ) {\n\t\t\t\tyield this._getBlockFiller( domDocument );\n\t\t\t}\n\n\t\t\tyield this.viewToDom( childView, domDocument, options );\n\n\t\t\toffset++;\n\t\t}\n\n\t\tif ( fillerPositionOffset === offset ) {\n\t\t\tyield this._getBlockFiller( domDocument );\n\t\t}\n\t}\n\n\t/**\n\t * Converts view {@link module:engine/view/range~Range} to DOM range.\n\t * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t *\n\t * @param {module:engine/view/range~Range} viewRange View range.\n\t * @returns {Range} DOM range.\n\t */\n\tviewRangeToDom( viewRange ) {\n\t\tconst domStart = this.viewPositionToDom( viewRange.start );\n\t\tconst domEnd = this.viewPositionToDom( viewRange.end );\n\n\t\tconst domRange = document.createRange();\n\t\tdomRange.setStart( domStart.parent, domStart.offset );\n\t\tdomRange.setEnd( domEnd.parent, domEnd.offset );\n\n\t\treturn domRange;\n\t}\n\n\t/**\n\t * Converts view {@link module:engine/view/position~Position} to DOM parent and offset.\n\t *\n\t * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t * If the converted position is directly before inline filler it is moved inside the filler.\n\t *\n\t * @param {module:engine/view/position~Position} viewPosition View position.\n\t * @returns {Object|null} position DOM position or `null` if view position could not be converted to DOM.\n\t * @returns {Node} position.parent DOM position parent.\n\t * @returns {Number} position.offset DOM position offset.\n\t */\n\tviewPositionToDom( viewPosition ) {\n\t\tconst viewParent = viewPosition.parent;\n\n\t\tif ( viewParent.is( '$text' ) ) {\n\t\t\tconst domParent = this.findCorrespondingDomText( viewParent );\n\n\t\t\tif ( !domParent ) {\n\t\t\t\t// Position is in a view text node that has not been rendered to DOM yet.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tlet offset = viewPosition.offset;\n\n\t\t\tif ( startsWithFiller( domParent ) ) {\n\t\t\t\toffset += INLINE_FILLER_LENGTH;\n\t\t\t}\n\n\t\t\treturn { parent: domParent, offset };\n\t\t} else {\n\t\t\t// viewParent is instance of ViewElement.\n\t\t\tlet domParent, domBefore, domAfter;\n\n\t\t\tif ( viewPosition.offset === 0 ) {\n\t\t\t\tdomParent = this.mapViewToDom( viewParent );\n\n\t\t\t\tif ( !domParent ) {\n\t\t\t\t\t// Position is in a view element that has not been rendered to DOM yet.\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tdomAfter = domParent.childNodes[ 0 ];\n\t\t\t} else {\n\t\t\t\tconst nodeBefore = viewPosition.nodeBefore;\n\n\t\t\t\tdomBefore = nodeBefore.is( '$text' ) ?\n\t\t\t\t\tthis.findCorrespondingDomText( nodeBefore ) :\n\t\t\t\t\tthis.mapViewToDom( viewPosition.nodeBefore );\n\n\t\t\t\tif ( !domBefore ) {\n\t\t\t\t\t// Position is after a view element that has not been rendered to DOM yet.\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tdomParent = domBefore.parentNode;\n\t\t\t\tdomAfter = domBefore.nextSibling;\n\t\t\t}\n\n\t\t\t// If there is an inline filler at position return position inside the filler. We should never return\n\t\t\t// the position before the inline filler.\n\t\t\tif ( isText( domAfter ) && startsWithFiller( domAfter ) ) {\n\t\t\t\treturn { parent: domAfter, offset: INLINE_FILLER_LENGTH };\n\t\t\t}\n\n\t\t\tconst offset = domBefore ? indexOf( domBefore ) + 1 : 0;\n\n\t\t\treturn { parent: domParent, offset };\n\t\t}\n\t}\n\n\t/**\n\t * Converts DOM to view. For all text nodes, not bound elements and document fragments new items will\n\t * be created. For bound elements and document fragments function will return corresponding items. For\n\t * {@link module:engine/view/filler fillers} `null` will be returned.\n\t * For all DOM elements rendered by {@link module:engine/view/uielement~UIElement} that UIElement will be returned.\n\t *\n\t * @param {Node|DocumentFragment} domNode DOM node or document fragment to transform.\n\t * @param {Object} [options] Conversion options.\n\t * @param {Boolean} [options.bind=false] Determines whether new elements will be bound.\n\t * @param {Boolean} [options.withChildren=true] If `true`, node's and document fragment's children will be converted too.\n\t * @param {Boolean} [options.keepOriginalCase=false] If `false`, node's tag name will be converter to lower case.\n\t * @returns {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment|null} Converted node or document fragment\n\t * or `null` if DOM node is a {@link module:engine/view/filler filler} or the given node is an empty text node.\n\t */\n\tdomToView( domNode, options = {} ) {\n\t\tif ( this.isBlockFiller( domNode ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// When node is inside a UIElement or a RawElement return that parent as it's view representation.\n\t\tconst hostElement = this.getHostViewElement( domNode );\n\n\t\tif ( hostElement ) {\n\t\t\treturn hostElement;\n\t\t}\n\n\t\tif ( isText( domNode ) ) {\n\t\t\tif ( isInlineFiller( domNode ) ) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tconst textData = this._processDataFromDomText( domNode );\n\n\t\t\t\treturn textData === '' ? null : new ViewText( this.document, textData );\n\t\t\t}\n\t\t} else if ( this.isComment( domNode ) ) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tif ( this.mapDomToView( domNode ) ) {\n\t\t\t\treturn this.mapDomToView( domNode );\n\t\t\t}\n\n\t\t\tlet viewElement;\n\n\t\t\tif ( this.isDocumentFragment( domNode ) ) {\n\t\t\t\t// Create view document fragment.\n\t\t\t\tviewElement = new ViewDocumentFragment( this.document );\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindDocumentFragments( domNode, viewElement );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Create view element.\n\t\t\t\tconst viewName = options.keepOriginalCase ? domNode.tagName : domNode.tagName.toLowerCase();\n\t\t\t\tviewElement = new ViewElement( this.document, viewName );\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindElements( domNode, viewElement );\n\t\t\t\t}\n\n\t\t\t\t// Copy element's attributes.\n\t\t\t\tconst attrs = domNode.attributes;\n\n\t\t\t\tfor ( let i = attrs.length - 1; i >= 0; i-- ) {\n\t\t\t\t\tviewElement._setAttribute( attrs[ i ].name, attrs[ i ].value );\n\t\t\t\t}\n\n\t\t\t\t// Treat this element's content as a raw data if it was registered as such.\n\t\t\t\tif ( options.withChildren !== false && this._rawContentElementMatcher.match( viewElement ) ) {\n\t\t\t\t\tviewElement._setCustomProperty( '$rawContent', domNode.innerHTML );\n\n\t\t\t\t\t// Store a DOM node to prevent left trimming of the following text node.\n\t\t\t\t\tthis._encounteredRawContentDomNodes.add( domNode );\n\n\t\t\t\t\treturn viewElement;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( options.withChildren !== false ) {\n\t\t\t\tfor ( const child of this.domChildrenToView( domNode, options ) ) {\n\t\t\t\t\tviewElement._appendChild( child );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn viewElement;\n\t\t}\n\t}\n\n\t/**\n\t * Converts children of the DOM element to view nodes using\n\t * the {@link module:engine/view/domconverter~DomConverter#domToView} method.\n\t * Additionally this method omits block {@link module:engine/view/filler filler}, if it exists in the DOM parent.\n\t *\n\t * @param {HTMLElement} domElement Parent DOM element.\n\t * @param {Object} options See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.\n\t * @returns {Iterable.} View nodes.\n\t */\n\t* domChildrenToView( domElement, options = {} ) {\n\t\tfor ( let i = 0; i < domElement.childNodes.length; i++ ) {\n\t\t\tconst domChild = domElement.childNodes[ i ];\n\t\t\tconst viewChild = this.domToView( domChild, options );\n\n\t\t\tif ( viewChild !== null ) {\n\t\t\t\tyield viewChild;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Converts DOM selection to view {@link module:engine/view/selection~Selection}.\n\t * Ranges which cannot be converted will be omitted.\n\t *\n\t * @param {Selection} domSelection DOM selection.\n\t * @returns {module:engine/view/selection~Selection} View selection.\n\t */\n\tdomSelectionToView( domSelection ) {\n\t\t// DOM selection might be placed in fake selection container.\n\t\t// If container contains fake selection - return corresponding view selection.\n\t\tif ( domSelection.rangeCount === 1 ) {\n\t\t\tlet container = domSelection.getRangeAt( 0 ).startContainer;\n\n\t\t\t// The DOM selection might be moved to the text node inside the fake selection container.\n\t\t\tif ( isText( container ) ) {\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t}\n\n\t\t\tconst viewSelection = this.fakeSelectionToView( container );\n\n\t\t\tif ( viewSelection ) {\n\t\t\t\treturn viewSelection;\n\t\t\t}\n\t\t}\n\n\t\tconst isBackward = this.isDomSelectionBackward( domSelection );\n\n\t\tconst viewRanges = [];\n\n\t\tfor ( let i = 0; i < domSelection.rangeCount; i++ ) {\n\t\t\t// DOM Range have correct start and end, no matter what is the DOM Selection direction. So we don't have to fix anything.\n\t\t\tconst domRange = domSelection.getRangeAt( i );\n\t\t\tconst viewRange = this.domRangeToView( domRange );\n\n\t\t\tif ( viewRange ) {\n\t\t\t\tviewRanges.push( viewRange );\n\t\t\t}\n\t\t}\n\n\t\treturn new ViewSelection( viewRanges, { backward: isBackward } );\n\t}\n\n\t/**\n\t * Converts DOM Range to view {@link module:engine/view/range~Range}.\n\t * If the start or end position can not be converted `null` is returned.\n\t *\n\t * @param {Range} domRange DOM range.\n\t * @returns {module:engine/view/range~Range|null} View range.\n\t */\n\tdomRangeToView( domRange ) {\n\t\tconst viewStart = this.domPositionToView( domRange.startContainer, domRange.startOffset );\n\t\tconst viewEnd = this.domPositionToView( domRange.endContainer, domRange.endOffset );\n\n\t\tif ( viewStart && viewEnd ) {\n\t\t\treturn new ViewRange( viewStart, viewEnd );\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Converts DOM parent and offset to view {@link module:engine/view/position~Position}.\n\t *\n\t * If the position is inside a {@link module:engine/view/filler filler} which has no corresponding view node,\n\t * position of the filler will be converted and returned.\n\t *\n\t * If the position is inside DOM element rendered by {@link module:engine/view/uielement~UIElement}\n\t * that position will be converted to view position before that UIElement.\n\t *\n\t * If structures are too different and it is not possible to find corresponding position then `null` will be returned.\n\t *\n\t * @param {Node} domParent DOM position parent.\n\t * @param {Number} domOffset DOM position offset.\n\t * @returns {module:engine/view/position~Position} viewPosition View position.\n\t */\n\tdomPositionToView( domParent, domOffset ) {\n\t\tif ( this.isBlockFiller( domParent ) ) {\n\t\t\treturn this.domPositionToView( domParent.parentNode, indexOf( domParent ) );\n\t\t}\n\n\t\t// If position is somewhere inside UIElement or a RawElement - return position before that element.\n\t\tconst viewElement = this.mapDomToView( domParent );\n\n\t\tif ( viewElement && ( viewElement.is( 'uiElement' ) || viewElement.is( 'rawElement' ) ) ) {\n\t\t\treturn ViewPosition._createBefore( viewElement );\n\t\t}\n\n\t\tif ( isText( domParent ) ) {\n\t\t\tif ( isInlineFiller( domParent ) ) {\n\t\t\t\treturn this.domPositionToView( domParent.parentNode, indexOf( domParent ) );\n\t\t\t}\n\n\t\t\tconst viewParent = this.findCorrespondingViewText( domParent );\n\t\t\tlet offset = domOffset;\n\n\t\t\tif ( !viewParent ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( startsWithFiller( domParent ) ) {\n\t\t\t\toffset -= INLINE_FILLER_LENGTH;\n\t\t\t\toffset = offset < 0 ? 0 : offset;\n\t\t\t}\n\n\t\t\treturn new ViewPosition( viewParent, offset );\n\t\t}\n\t\t// domParent instanceof HTMLElement.\n\t\telse {\n\t\t\tif ( domOffset === 0 ) {\n\t\t\t\tconst viewParent = this.mapDomToView( domParent );\n\n\t\t\t\tif ( viewParent ) {\n\t\t\t\t\treturn new ViewPosition( viewParent, 0 );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst domBefore = domParent.childNodes[ domOffset - 1 ];\n\t\t\t\tconst viewBefore = isText( domBefore ) ?\n\t\t\t\t\tthis.findCorrespondingViewText( domBefore ) :\n\t\t\t\t\tthis.mapDomToView( domBefore );\n\n\t\t\t\t// TODO #663\n\t\t\t\tif ( viewBefore && viewBefore.parent ) {\n\t\t\t\t\treturn new ViewPosition( viewBefore.parent, viewBefore.index + 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Returns corresponding view {@link module:engine/view/element~Element Element} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment} for provided DOM element or\n\t * document fragment. If there is no view item {@link module:engine/view/domconverter~DomConverter#bindElements bound}\n\t * to the given DOM - `undefined` is returned.\n\t *\n\t * For all DOM elements rendered by a {@link module:engine/view/uielement~UIElement} or\n\t * a {@link module:engine/view/rawelement~RawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t *\n\t * @param {DocumentFragment|Element} domElementOrDocumentFragment DOM element or document fragment.\n\t * @returns {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment|undefined}\n\t * Corresponding view element, document fragment or `undefined` if no element was bound.\n\t */\n\tmapDomToView( domElementOrDocumentFragment ) {\n\t\tconst hostElement = this.getHostViewElement( domElementOrDocumentFragment );\n\n\t\treturn hostElement || this._domToViewMapping.get( domElementOrDocumentFragment );\n\t}\n\n\t/**\n\t * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~DomConverter#bindElements bound},\n\t * corresponding text node is returned based on the sibling or parent.\n\t *\n\t * If the directly previous sibling is a {@link module:engine/view/domconverter~DomConverter#bindElements bound} element, it is used\n\t * to find the corresponding text node.\n\t *\n\t * If this is a first child in the parent and the parent is a {@link module:engine/view/domconverter~DomConverter#bindElements bound}\n\t * element, it is used to find the corresponding text node.\n\t *\n\t * For all text nodes rendered by a {@link module:engine/view/uielement~UIElement} or\n\t * a {@link module:engine/view/rawelement~RawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t *\n\t * Otherwise `null` is returned.\n\t *\n\t * Note that for the block or inline {@link module:engine/view/filler filler} this method returns `null`.\n\t *\n\t * @param {Text} domText DOM text node.\n\t * @returns {module:engine/view/text~Text|null} Corresponding view text node or `null`, if it was not possible to find a\n\t * corresponding node.\n\t */\n\tfindCorrespondingViewText( domText ) {\n\t\tif ( isInlineFiller( domText ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// If DOM text was rendered by a UIElement or a RawElement - return this parent element.\n\t\tconst hostElement = this.getHostViewElement( domText );\n\n\t\tif ( hostElement ) {\n\t\t\treturn hostElement;\n\t\t}\n\n\t\tconst previousSibling = domText.previousSibling;\n\n\t\t// Try to use previous sibling to find the corresponding text node.\n\t\tif ( previousSibling ) {\n\t\t\tif ( !( this.isElement( previousSibling ) ) ) {\n\t\t\t\t// The previous is text or comment.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst viewElement = this.mapDomToView( previousSibling );\n\n\t\t\tif ( viewElement ) {\n\t\t\t\tconst nextSibling = viewElement.nextSibling;\n\n\t\t\t\t// It might be filler which has no corresponding view node.\n\t\t\t\tif ( nextSibling instanceof ViewText ) {\n\t\t\t\t\treturn viewElement.nextSibling;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Try to use parent to find the corresponding text node.\n\t\telse {\n\t\t\tconst viewElement = this.mapDomToView( domText.parentNode );\n\n\t\t\tif ( viewElement ) {\n\t\t\t\tconst firstChild = viewElement.getChild( 0 );\n\n\t\t\t\t// It might be filler which has no corresponding view node.\n\t\t\t\tif ( firstChild instanceof ViewText ) {\n\t\t\t\t\treturn firstChild;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns corresponding DOM item for provided {@link module:engine/view/element~Element Element} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment}.\n\t * To find a corresponding text for {@link module:engine/view/text~Text view Text instance}\n\t * use {@link #findCorrespondingDomText}.\n\t *\n\t * @param {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment} viewNode\n\t * View element or document fragment.\n\t * @returns {Node|DocumentFragment|undefined} Corresponding DOM node or document fragment.\n\t */\n\tmapViewToDom( documentFragmentOrElement ) {\n\t\treturn this._viewToDomMapping.get( documentFragmentOrElement );\n\t}\n\n\t/**\n\t * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~DomConverter#bindElements bound},\n\t * corresponding text node is returned based on the sibling or parent.\n\t *\n\t * If the directly previous sibling is a {@link module:engine/view/domconverter~DomConverter#bindElements bound} element, it is used\n\t * to find the corresponding text node.\n\t *\n\t * If this is a first child in the parent and the parent is a {@link module:engine/view/domconverter~DomConverter#bindElements bound}\n\t * element, it is used to find the corresponding text node.\n\t *\n\t * Otherwise `null` is returned.\n\t *\n\t * @param {module:engine/view/text~Text} viewText View text node.\n\t * @returns {Text|null} Corresponding DOM text node or `null`, if it was not possible to find a corresponding node.\n\t */\n\tfindCorrespondingDomText( viewText ) {\n\t\tconst previousSibling = viewText.previousSibling;\n\n\t\t// Try to use previous sibling to find the corresponding text node.\n\t\tif ( previousSibling && this.mapViewToDom( previousSibling ) ) {\n\t\t\treturn this.mapViewToDom( previousSibling ).nextSibling;\n\t\t}\n\n\t\t// If this is a first node, try to use parent to find the corresponding text node.\n\t\tif ( !previousSibling && viewText.parent && this.mapViewToDom( viewText.parent ) ) {\n\t\t\treturn this.mapViewToDom( viewText.parent ).childNodes[ 0 ];\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Focuses DOM editable that is corresponding to provided {@link module:engine/view/editableelement~EditableElement}.\n\t *\n\t * @param {module:engine/view/editableelement~EditableElement} viewEditable\n\t */\n\tfocus( viewEditable ) {\n\t\tconst domEditable = this.mapViewToDom( viewEditable );\n\n\t\tif ( domEditable && domEditable.ownerDocument.activeElement !== domEditable ) {\n\t\t\t// Save the scrollX and scrollY positions before the focus.\n\t\t\tconst { scrollX, scrollY } = global.window;\n\t\t\tconst scrollPositions = [];\n\n\t\t\t// Save all scrollLeft and scrollTop values starting from domEditable up to\n\t\t\t// document#documentElement.\n\t\t\tforEachDomNodeAncestor( domEditable, node => {\n\t\t\t\tconst { scrollLeft, scrollTop } = node;\n\n\t\t\t\tscrollPositions.push( [ scrollLeft, scrollTop ] );\n\t\t\t} );\n\n\t\t\tdomEditable.focus();\n\n\t\t\t// Restore scrollLeft and scrollTop values starting from domEditable up to\n\t\t\t// document#documentElement.\n\t\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/951\n\t\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/957\n\t\t\tforEachDomNodeAncestor( domEditable, node => {\n\t\t\t\tconst [ scrollLeft, scrollTop ] = scrollPositions.shift();\n\n\t\t\t\tnode.scrollLeft = scrollLeft;\n\t\t\t\tnode.scrollTop = scrollTop;\n\t\t\t} );\n\n\t\t\t// Restore the scrollX and scrollY positions after the focus.\n\t\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/951\n\t\t\tglobal.window.scrollTo( scrollX, scrollY );\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when `node.nodeType` equals `Node.ELEMENT_NODE`.\n\t *\n\t * @param {Node} node Node to check.\n\t * @returns {Boolean}\n\t */\n\tisElement( node ) {\n\t\treturn node && node.nodeType == Node.ELEMENT_NODE;\n\t}\n\n\t/**\n\t * Returns `true` when `node.nodeType` equals `Node.DOCUMENT_FRAGMENT_NODE`.\n\t *\n\t * @param {Node} node Node to check.\n\t * @returns {Boolean}\n\t */\n\tisDocumentFragment( node ) {\n\t\treturn node && node.nodeType == Node.DOCUMENT_FRAGMENT_NODE;\n\t}\n\n\t/**\n\t * Returns `true` when `node.nodeType` equals `Node.COMMENT_NODE`.\n\t *\n\t * @param {Node} node Node to check.\n\t * @returns {Boolean}\n\t */\n\tisComment( node ) {\n\t\treturn node && node.nodeType == Node.COMMENT_NODE;\n\t}\n\n\t/**\n\t * Checks if the node is an instance of the block filler for this DOM converter.\n\t *\n\t *\t\tconst converter = new DomConverter( viewDocument, { blockFillerMode: 'br' } );\n\t *\n\t *\t\tconverter.isBlockFiller( BR_FILLER( document ) ); // true\n\t *\t\tconverter.isBlockFiller( NBSP_FILLER( document ) ); // false\n\t *\n\t * **Note:**: For the `'nbsp'` mode the method also checks context of a node so it cannot be a detached node.\n\t *\n\t * **Note:** A special case in the `'nbsp'` mode exists where the `
` in `


` is treated as a block filler.\n\t *\n\t * @param {Node} domNode DOM node to check.\n\t * @returns {Boolean} True if a node is considered a block filler for given mode.\n\t */\n\tisBlockFiller( domNode ) {\n\t\tif ( this.blockFillerMode == 'br' ) {\n\t\t\treturn domNode.isEqualNode( BR_FILLER_REF );\n\t\t}\n\n\t\t// Special case for


in which
should be treated as filler even when we are not in the 'br' mode. See ckeditor5#5564.\n\t\tif ( domNode.tagName === 'BR' && hasBlockParent( domNode, this.blockElements ) && domNode.parentNode.childNodes.length === 1 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If not in 'br' mode, try recognizing both marked and regular nbsp block fillers.\n\t\treturn domNode.isEqualNode( MARKED_NBSP_FILLER_REF ) || isNbspBlockFiller( domNode, this.blockElements );\n\t}\n\n\t/**\n\t * Returns `true` if given selection is a backward selection, that is, if it's `focus` is before `anchor`.\n\t *\n\t * @param {Selection} DOM Selection instance to check.\n\t * @returns {Boolean}\n\t */\n\tisDomSelectionBackward( selection ) {\n\t\tif ( selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Since it takes multiple lines of code to check whether a \"DOM Position\" is before/after another \"DOM Position\",\n\t\t// we will use the fact that range will collapse if it's end is before it's start.\n\t\tconst range = document.createRange();\n\n\t\trange.setStart( selection.anchorNode, selection.anchorOffset );\n\t\trange.setEnd( selection.focusNode, selection.focusOffset );\n\n\t\tconst backward = range.collapsed;\n\n\t\trange.detach();\n\n\t\treturn backward;\n\t}\n\n\t/**\n\t * Returns a parent {@link module:engine/view/uielement~UIElement} or {@link module:engine/view/rawelement~RawElement}\n\t * that hosts the provided DOM node. Returns `null` if there is no such parent.\n\t *\n\t * @param {Node} domNode\n\t * @returns {module:engine/view/uielement~UIElement|module:engine/view/rawelement~RawElement|null}\n\t */\n\tgetHostViewElement( domNode ) {\n\t\tconst ancestors = getAncestors( domNode );\n\n\t\t// Remove domNode from the list.\n\t\tancestors.pop();\n\n\t\twhile ( ancestors.length ) {\n\t\t\tconst domNode = ancestors.pop();\n\t\t\tconst viewNode = this._domToViewMapping.get( domNode );\n\n\t\t\tif ( viewNode && ( viewNode.is( 'uiElement' ) || viewNode.is( 'rawElement' ) ) ) {\n\t\t\t\treturn viewNode;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Checks if the given selection's boundaries are at correct places.\n\t *\n\t * The following places are considered as incorrect for selection boundaries:\n\t *\n\t * * before or in the middle of an inline filler sequence,\n\t * * inside a DOM element which represents {@link module:engine/view/uielement~UIElement a view UI element},\n\t * * inside a DOM element which represents {@link module:engine/view/rawelement~RawElement a view raw element}.\n\t *\n\t * @param {Selection} domSelection The DOM selection object to be checked.\n\t * @returns {Boolean} `true` if the given selection is at a correct place, `false` otherwise.\n\t */\n\tisDomSelectionCorrect( domSelection ) {\n\t\treturn this._isDomSelectionPositionCorrect( domSelection.anchorNode, domSelection.anchorOffset ) &&\n\t\t\tthis._isDomSelectionPositionCorrect( domSelection.focusNode, domSelection.focusOffset );\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from DOM nodes to view elements.\n\t *\n\t * This is affecting how {@link module:engine/view/domconverter~DomConverter#domToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#domChildrenToView} process DOM nodes.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching a view element whose content should\n\t * be treated as raw data.\n\t */\n\tregisterRawContentMatcher( pattern ) {\n\t\tthis._rawContentElementMatcher.add( pattern );\n\t}\n\n\t/**\n\t * Returns block {@link module:engine/view/filler filler} node based on current {@link #blockFillerMode} setting.\n\t *\n\t * @private\n\t * @params {Document} domDocument\n\t * @returns {Node} filler\n\t */\n\t_getBlockFiller( domDocument ) {\n\t\tswitch ( this.blockFillerMode ) {\n\t\t\tcase 'nbsp':\n\t\t\t\treturn NBSP_FILLER( domDocument ); // eslint-disable-line new-cap\n\t\t\tcase 'markedNbsp':\n\t\t\t\treturn MARKED_NBSP_FILLER( domDocument ); // eslint-disable-line new-cap\n\t\t\tcase 'br':\n\t\t\t\treturn BR_FILLER( domDocument ); // eslint-disable-line new-cap\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given DOM position is a correct place for selection boundary. See {@link #isDomSelectionCorrect}.\n\t *\n\t * @private\n\t * @param {Element} domParent Position parent.\n\t * @param {Number} offset Position offset.\n\t * @returns {Boolean} `true` if given position is at a correct place for selection boundary, `false` otherwise.\n\t */\n\t_isDomSelectionPositionCorrect( domParent, offset ) {\n\t\t// If selection is before or in the middle of inline filler string, it is incorrect.\n\t\tif ( isText( domParent ) && startsWithFiller( domParent ) && offset < INLINE_FILLER_LENGTH ) {\n\t\t\t// Selection in a text node, at wrong position (before or in the middle of filler).\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.isElement( domParent ) && startsWithFiller( domParent.childNodes[ offset ] ) ) {\n\t\t\t// Selection in an element node, before filler text node.\n\t\t\treturn false;\n\t\t}\n\n\t\tconst viewParent = this.mapDomToView( domParent );\n\n\t\t// The position is incorrect when anchored inside a UIElement or a RawElement.\n\t\t// Note: In case of UIElement and RawElement, mapDomToView() returns a parent element for any DOM child\n\t\t// so there's no need to perform any additional checks.\n\t\tif ( viewParent && ( viewParent.is( 'uiElement' ) || viewParent.is( 'rawElement' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Takes text data from a given {@link module:engine/view/text~Text#data} and processes it so\n\t * it is correctly displayed in the DOM.\n\t *\n\t * Following changes are done:\n\t *\n\t * * a space at the beginning is changed to ` ` if this is the first text node in its container\n\t * element or if a previous text node ends with a space character,\n\t * * space at the end of the text node is changed to ` ` if there are two spaces at the end of a node or if next node\n\t * starts with a space or if it is the last text node in its container,\n\t * * remaining spaces are replaced to a chain of spaces and ` ` (e.g. `'x x'` becomes `'x   x'`).\n\t *\n\t * Content of {@link #preElements} is not processed.\n\t *\n\t * @private\n\t * @param {module:engine/view/text~Text} node View text node to process.\n\t * @returns {String} Processed text data.\n\t */\n\t_processDataFromViewText( node ) {\n\t\tlet data = node.data;\n\n\t\t// If any of node ancestors has a name which is in `preElements` array, then currently processed\n\t\t// view text node is (will be) in preformatted element. We should not change whitespaces then.\n\t\tif ( node.getAncestors().some( parent => this.preElements.includes( parent.name ) ) ) {\n\t\t\treturn data;\n\t\t}\n\n\t\t// 1. Replace the first space with a nbsp if the previous node ends with a space or there is no previous node\n\t\t// (container element boundary).\n\t\tif ( data.charAt( 0 ) == ' ' ) {\n\t\t\tconst prevNode = this._getTouchingViewTextNode( node, false );\n\t\t\tconst prevEndsWithSpace = prevNode && this._nodeEndsWithSpace( prevNode );\n\n\t\t\tif ( prevEndsWithSpace || !prevNode ) {\n\t\t\t\tdata = '\\u00A0' + data.substr( 1 );\n\t\t\t}\n\t\t}\n\n\t\t// 2. Replace the last space with nbsp if there are two spaces at the end or if the next node starts with space or there is no\n\t\t// next node (container element boundary).\n\t\t//\n\t\t// Keep in mind that Firefox prefers $nbsp; before tag, not inside it:\n\t\t//\n\t\t// Foo  bar <-- bad.\n\t\t// Foo  bar <-- good.\n\t\t//\n\t\t// More here: https://github.com/ckeditor/ckeditor5-engine/issues/1747.\n\t\tif ( data.charAt( data.length - 1 ) == ' ' ) {\n\t\t\tconst nextNode = this._getTouchingViewTextNode( node, true );\n\n\t\t\tif ( data.charAt( data.length - 2 ) == ' ' || !nextNode || nextNode.data.charAt( 0 ) == ' ' ) {\n\t\t\t\tdata = data.substr( 0, data.length - 1 ) + '\\u00A0';\n\t\t\t}\n\t\t}\n\n\t\t// 3. Create space+nbsp pairs.\n\t\treturn data.replace( / {2}/g, ' \\u00A0' );\n\t}\n\n\t/**\n\t * Checks whether given node ends with a space character after changing appropriate space characters to ` `s.\n\t *\n\t * @private\n\t * @param {module:engine/view/text~Text} node Node to check.\n\t * @returns {Boolean} `true` if given `node` ends with space, `false` otherwise.\n\t */\n\t_nodeEndsWithSpace( node ) {\n\t\tif ( node.getAncestors().some( parent => this.preElements.includes( parent.name ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst data = this._processDataFromViewText( node );\n\n\t\treturn data.charAt( data.length - 1 ) == ' ';\n\t}\n\n\t/**\n\t * Takes text data from native `Text` node and processes it to a correct {@link module:engine/view/text~Text view text node} data.\n\t *\n\t * Following changes are done:\n\t *\n\t * * multiple whitespaces are replaced to a single space,\n\t * * space at the beginning of a text node is removed if it is the first text node in its container\n\t * element or if the previous text node ends with a space character,\n\t * * space at the end of the text node is removed if there are two spaces at the end of a node or if next node\n\t * starts with a space or if it is the last text node in its container\n\t * * nbsps are converted to spaces.\n\t *\n\t * @param {Node} node DOM text node to process.\n\t * @returns {String} Processed data.\n\t * @private\n\t */\n\t_processDataFromDomText( node ) {\n\t\tlet data = node.data;\n\n\t\tif ( _hasDomParentOfType( node, this.preElements ) ) {\n\t\t\treturn getDataWithoutFiller( node );\n\t\t}\n\n\t\t// Change all consecutive whitespace characters (from the [ \\n\\t\\r] set –\n\t\t// see https://github.com/ckeditor/ckeditor5-engine/issues/822#issuecomment-311670249) to a single space character.\n\t\t// That's how multiple whitespaces are treated when rendered, so we normalize those whitespaces.\n\t\t// We're replacing 1+ (and not 2+) to also normalize singular \\n\\t\\r characters (#822).\n\t\tdata = data.replace( /[ \\n\\t\\r]{1,}/g, ' ' );\n\n\t\tconst prevNode = this._getTouchingInlineDomNode( node, false );\n\t\tconst nextNode = this._getTouchingInlineDomNode( node, true );\n\n\t\tconst shouldLeftTrim = this._checkShouldLeftTrimDomText( node, prevNode );\n\t\tconst shouldRightTrim = this._checkShouldRightTrimDomText( node, nextNode );\n\n\t\t// If the previous dom text node does not exist or it ends by whitespace character, remove space character from the beginning\n\t\t// of this text node. Such space character is treated as a whitespace.\n\t\tif ( shouldLeftTrim ) {\n\t\t\tdata = data.replace( /^ /, '' );\n\t\t}\n\n\t\t// If the next text node does not exist remove space character from the end of this text node.\n\t\tif ( shouldRightTrim ) {\n\t\t\tdata = data.replace( / $/, '' );\n\t\t}\n\n\t\t// At the beginning and end of a block element, Firefox inserts normal space +
instead of non-breaking space.\n\t\t// This means that the text node starts/end with normal space instead of non-breaking space.\n\t\t// This causes a problem because the normal space would be removed in `.replace` calls above. To prevent that,\n\t\t// the inline filler is removed only after the data is initially processed (by the `.replace` above). See ckeditor5#692.\n\t\tdata = getDataWithoutFiller( new Text( data ) );\n\n\t\t// At this point we should have removed all whitespaces from DOM text data.\n\t\t//\n\t\t// Now, We will reverse the process that happens in `_processDataFromViewText`.\n\t\t//\n\t\t// We have to change   chars, that were in DOM text data because of rendering reasons, to spaces.\n\t\t// First, change all ` \\u00A0` pairs (space +  ) to two spaces. DOM converter changes two spaces from model/view to\n\t\t// ` \\u00A0` to ensure proper rendering. Since here we convert back, we recognize those pairs and change them back to ` `.\n\t\tdata = data.replace( / \\u00A0/g, ' ' );\n\n\t\t// Then, let's change the last nbsp to a space.\n\t\tif ( /( |\\u00A0)\\u00A0$/.test( data ) || !nextNode || ( nextNode.data && nextNode.data.charAt( 0 ) == ' ' ) ) {\n\t\t\tdata = data.replace( /\\u00A0$/, ' ' );\n\t\t}\n\n\t\t// Then, change   character that is at the beginning of the text node to space character.\n\t\t// We do that replacement only if this is the first node or the previous node ends on whitespace character.\n\t\tif ( shouldLeftTrim ) {\n\t\t\tdata = data.replace( /^\\u00A0/, ' ' );\n\t\t}\n\n\t\t// At this point, all whitespaces should be removed and all   created for rendering reasons should be\n\t\t// changed to normal space. All left   are   inserted intentionally.\n\t\treturn data;\n\t}\n\n\t/**\n\t * Helper function which checks if a DOM text node, preceded by the given `prevNode` should\n\t * be trimmed from the left side.\n\t *\n\t * @private\n\t * @param {Node} node\n\t * @param {Node} prevNode\n\t */\n\t_checkShouldLeftTrimDomText( node, prevNode ) {\n\t\tif ( !prevNode ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( isElement( prevNode ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Shouldn't left trim if previous node is a node that was encountered as a raw content node.\n\t\tif ( this._encounteredRawContentDomNodes.has( node.previousSibling ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn /[^\\S\\u00A0]/.test( prevNode.data.charAt( prevNode.data.length - 1 ) );\n\t}\n\n\t/**\n\t * Helper function which checks if a DOM text node, succeeded by the given `nextNode` should\n\t * be trimmed from the right side.\n\t *\n\t * @private\n\t * @param {Node} node\n\t * @param {Node} nextNode\n\t */\n\t_checkShouldRightTrimDomText( node, nextNode ) {\n\t\tif ( nextNode ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !startsWithFiller( node );\n\t}\n\n\t/**\n\t * Helper function. For given {@link module:engine/view/text~Text view text node}, it finds previous or next sibling\n\t * that is contained in the same container element. If there is no such sibling, `null` is returned.\n\t *\n\t * @private\n\t * @param {module:engine/view/text~Text} node Reference node.\n\t * @param {Boolean} getNext\n\t * @returns {module:engine/view/text~Text|null} Touching text node or `null` if there is no next or previous touching text node.\n\t */\n\t_getTouchingViewTextNode( node, getNext ) {\n\t\tconst treeWalker = new ViewTreeWalker( {\n\t\t\tstartPosition: getNext ? ViewPosition._createAfter( node ) : ViewPosition._createBefore( node ),\n\t\t\tdirection: getNext ? 'forward' : 'backward'\n\t\t} );\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\t// ViewContainerElement is found on a way to next ViewText node, so given `node` was first/last\n\t\t\t// text node in its container element.\n\t\t\tif ( value.item.is( 'containerElement' ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t//
found – it works like a block boundary, so do not scan further.\n\t\t\telse if ( value.item.is( 'element', 'br' ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Found a text node in the same container element.\n\t\t\telse if ( value.item.is( '$textProxy' ) ) {\n\t\t\t\treturn value.item;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Helper function. For the given text node, it finds the closest touching node which is either\n\t * a text node or a `
`. The search is terminated at block element boundaries and if a matching node\n\t * wasn't found so far, `null` is returned.\n\t *\n\t * In the following DOM structure:\n\t *\n\t *\t\t

foobar
bom

\n\t *\n\t * * `foo` doesn't have its previous touching inline node (`null` is returned),\n\t * * `foo`'s next touching inline node is `bar`\n\t * * `bar`'s next touching inline node is `
`\n\t *\n\t * This method returns text nodes and `
` elements because these types of nodes affect how\n\t * spaces in the given text node need to be converted.\n\t *\n\t * @private\n\t * @param {Text} node\n\t * @param {Boolean} getNext\n\t * @returns {Text|Element|null}\n\t */\n\t_getTouchingInlineDomNode( node, getNext ) {\n\t\tif ( !node.parentNode ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst direction = getNext ? 'nextNode' : 'previousNode';\n\t\tconst document = node.ownerDocument;\n\t\tconst topmostParent = getAncestors( node )[ 0 ];\n\n\t\tconst treeWalker = document.createTreeWalker( topmostParent, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {\n\t\t\tacceptNode( node ) {\n\t\t\t\tif ( isText( node ) ) {\n\t\t\t\t\treturn NodeFilter.FILTER_ACCEPT;\n\t\t\t\t}\n\n\t\t\t\tif ( node.tagName == 'BR' ) {\n\t\t\t\t\treturn NodeFilter.FILTER_ACCEPT;\n\t\t\t\t}\n\n\t\t\t\treturn NodeFilter.FILTER_SKIP;\n\t\t\t}\n\t\t} );\n\n\t\ttreeWalker.currentNode = node;\n\n\t\tconst touchingNode = treeWalker[ direction ]();\n\n\t\tif ( touchingNode !== null ) {\n\t\t\tconst lca = getCommonAncestor( node, touchingNode );\n\n\t\t\t// If there is common ancestor between the text node and next/prev text node,\n\t\t\t// and there are no block elements on a way from the text node to that ancestor,\n\t\t\t// and there are no block elements on a way from next/prev text node to that ancestor...\n\t\t\tif (\n\t\t\t\tlca &&\n\t\t\t\t!_hasDomParentOfType( node, this.blockElements, lca ) &&\n\t\t\t\t!_hasDomParentOfType( touchingNode, this.blockElements, lca )\n\t\t\t) {\n\t\t\t\t// Then they are in the same container element.\n\t\t\t\treturn touchingNode;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\n// Helper function.\n// Used to check if given native `Element` or `Text` node has parent with tag name from `types` array.\n//\n// @param {Node} node\n// @param {Array.} types\n// @param {Boolean} [boundaryParent] Can be given if parents should be checked up to a given element (excluding that element).\n// @returns {Boolean} `true` if such parent exists or `false` if it does not.\nfunction _hasDomParentOfType( node, types, boundaryParent ) {\n\tlet parents = getAncestors( node );\n\n\tif ( boundaryParent ) {\n\t\tparents = parents.slice( parents.indexOf( boundaryParent ) + 1 );\n\t}\n\n\treturn parents.some( parent => parent.tagName && types.includes( parent.tagName.toLowerCase() ) );\n}\n\n// A helper that executes given callback for each DOM node's ancestor, starting from the given node\n// and ending in document#documentElement.\n//\n// @param {Node} node\n// @param {Function} callback A callback to be executed for each ancestor.\nfunction forEachDomNodeAncestor( node, callback ) {\n\twhile ( node && node != global.document ) {\n\t\tcallback( node );\n\t\tnode = node.parentNode;\n\t}\n}\n\n// Checks if given node is a nbsp block filler.\n//\n// A   is a block filler only if it is a single child of a block element.\n//\n// @param {Node} domNode DOM node.\n// @returns {Boolean}\nfunction isNbspBlockFiller( domNode, blockElements ) {\n\tconst isNBSP = domNode.isEqualNode( NBSP_FILLER_REF );\n\n\treturn isNBSP && hasBlockParent( domNode, blockElements ) && domNode.parentNode.childNodes.length === 1;\n}\n\n// Checks if domNode has block parent.\n//\n// @param {Node} domNode DOM node.\n// @returns {Boolean}\nfunction hasBlockParent( domNode, blockElements ) {\n\tconst parent = domNode.parentNode;\n\n\treturn parent && parent.tagName && blockElements.includes( parent.tagName.toLowerCase() );\n}\n\n/**\n * Enum representing type of the block filler.\n *\n * Possible values:\n *\n * * `br` - for `
` block filler used in the editing view,\n * * `nbsp` - for ` ` block fillers used in the data,\n * * `markedNbsp` - for nbsp block fillers wrapped in a span: ` ` used in the data.\n *\n * @typedef {String} module:engine/view/filler~BlockFillerMode\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/getcommonancestor\n */\n\nimport getAncestors from './getancestors';\n\n/**\n * Searches and returns the lowest common ancestor of two given nodes.\n *\n * @param {Node} nodeA First node.\n * @param {Node} nodeB Second node.\n * @returns {Node|DocumentFragment|Document|null} Lowest common ancestor of both nodes or `null` if nodes do not have a common ancestor.\n */\nexport default function getCommonAncestor( nodeA, nodeB ) {\n\tconst ancestorsA = getAncestors( nodeA );\n\tconst ancestorsB = getAncestors( nodeB );\n\n\tlet i = 0;\n\n\t// It does not matter which array is shorter.\n\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\ti++;\n\t}\n\n\treturn i === 0 ? null : ancestorsA[ i - 1 ];\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/iswindow\n */\n\n/**\n * Checks if the object is a native DOM Window.\n *\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isWindow( obj ) {\n\tconst stringifiedObject = Object.prototype.toString.apply( obj );\n\n\t// Returns `true` for the `window` object in browser environments.\n\tif ( stringifiedObject == '[object Window]' ) {\n\t\treturn true;\n\t}\n\n\t// Returns `true` for the `window` object in the Electron environment.\n\tif ( stringifiedObject == '[object global]' ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/emittermixin\n */\n\nimport { default as EmitterMixin, _getEmitterListenedTo, _setEmitterId } from '../emittermixin';\nimport uid from '../uid';\nimport isNode from './isnode';\nimport isWindow from './iswindow';\nimport { extend } from 'lodash-es';\n\n/**\n * Mixin that injects the DOM events API into its host. It provides the API\n * compatible with {@link module:utils/emittermixin~EmitterMixin}.\n *\n * DOM emitter mixin is by default available in the {@link module:ui/view~View} class,\n * but it can also be mixed into any other class:\n *\n *\t\timport mix from '../utils/mix.js';\n *\t\timport DomEmitterMixin from '../utils/dom/emittermixin.js';\n *\n *\t\tclass SomeView {}\n *\t\tmix( SomeView, DomEmitterMixin );\n *\n *\t\tconst view = new SomeView();\n *\t\tview.listenTo( domElement, ( evt, domEvt ) => {\n *\t\t\tconsole.log( evt, domEvt );\n *\t\t} );\n *\n * @mixin EmitterMixin\n * @mixes module:utils/emittermixin~EmitterMixin\n * @implements module:utils/dom/emittermixin~Emitter\n */\nconst DomEmitterMixin = extend( {}, EmitterMixin, {\n\t/**\n\t * Registers a callback function to be executed when an event is fired in a specific Emitter or DOM Node.\n\t * It is backwards compatible with {@link module:utils/emittermixin~EmitterMixin#listenTo}.\n\t *\n\t * @param {module:utils/emittermixin~Emitter|Node} emitter The object that fires the event.\n\t * @param {String} event The name of the event.\n\t * @param {Function} callback The function to be called on event.\n\t * @param {Object} [options={}] Additional options.\n\t * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n\t * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n\t * order they were added.\n\t * @param {Boolean} [options.useCapture=false] Indicates that events of this type will be dispatched to the registered\n\t * listener before being dispatched to any EventTarget beneath it in the DOM tree.\n\t * @param {Boolean} [options.usePassive=false] Indicates that the function specified by listener will never call preventDefault()\n\t * and prevents blocking browser's main thread by this event handler.\n\t */\n\tlistenTo( emitter, ...rest ) {\n\t\t// Check if emitter is an instance of DOM Node. If so, replace the argument with\n\t\t// corresponding ProxyEmitter (or create one if not existing).\n\t\tif ( isNode( emitter ) || isWindow( emitter ) ) {\n\t\t\tconst proxy = this._getProxyEmitter( emitter ) || new ProxyEmitter( emitter );\n\n\t\t\tproxy.attach( ...rest );\n\n\t\t\temitter = proxy;\n\t\t}\n\n\t\t// Execute parent class method with Emitter (or ProxyEmitter) instance.\n\t\tEmitterMixin.listenTo.call( this, emitter, ...rest );\n\t},\n\n\t/**\n\t * Stops listening for events. It can be used at different levels:\n\t * It is backwards compatible with {@link module:utils/emittermixin~EmitterMixin#listenTo}.\n\t *\n\t * * To stop listening to a specific callback.\n\t * * To stop listening to a specific event.\n\t * * To stop listening to all events fired by a specific object.\n\t * * To stop listening to all events fired by all object.\n\t *\n\t * @param {module:utils/emittermixin~Emitter|Node} [emitter] The object to stop listening to. If omitted, stops it for all objects.\n\t * @param {String} [event] (Requires the `emitter`) The name of the event to stop listening to. If omitted, stops it\n\t * for all events from `emitter`.\n\t * @param {Function} [callback] (Requires the `event`) The function to be removed from the call list for the given\n\t * `event`.\n\t */\n\tstopListening( emitter, event, callback ) {\n\t\t// Check if emitter is an instance of DOM Node. If so, replace the argument with corresponding ProxyEmitter.\n\t\tif ( isNode( emitter ) || isWindow( emitter ) ) {\n\t\t\tconst proxy = this._getProxyEmitter( emitter );\n\n\t\t\t// Element has no listeners.\n\t\t\tif ( !proxy ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\temitter = proxy;\n\t\t}\n\n\t\t// Execute parent class method with Emitter (or ProxyEmitter) instance.\n\t\tEmitterMixin.stopListening.call( this, emitter, event, callback );\n\n\t\tif ( emitter instanceof ProxyEmitter ) {\n\t\t\temitter.detach( event );\n\t\t}\n\t},\n\n\t/**\n\t * Retrieves ProxyEmitter instance for given DOM Node residing in this Host.\n\t *\n\t * @private\n\t * @param {Node} node DOM Node of the ProxyEmitter.\n\t * @returns {module:utils/dom/emittermixin~ProxyEmitter} ProxyEmitter instance or null.\n\t */\n\t_getProxyEmitter( node ) {\n\t\treturn _getEmitterListenedTo( this, getNodeUID( node ) );\n\t}\n} );\n\nexport default DomEmitterMixin;\n\n/**\n * Creates a ProxyEmitter instance. Such an instance is a bridge between a DOM Node firing events\n * and any Host listening to them. It is backwards compatible with {@link module:utils/emittermixin~EmitterMixin#on}.\n *\n * listenTo( click, ... )\n * +-----------------------------------------+\n * | stopListening( ... ) |\n * +----------------------------+ | addEventListener( click, ... )\n * | Host | | +---------------------------------------------+\n * +----------------------------+ | | removeEventListener( click, ... ) |\n * | _listeningTo: { | +----------v-------------+ |\n * | UID: { | | ProxyEmitter | |\n * | emitter: ProxyEmitter, | +------------------------+ +------------v----------+\n * | callbacks: { | | events: { | | Node (HTMLElement) |\n * | click: [ callbacks ] | | click: [ callbacks ] | +-----------------------+\n * | } | | }, | | data-ck-expando: UID |\n * | } | | _domNode: Node, | +-----------------------+\n * | } | | _domListeners: {}, | |\n * | +------------------------+ | | _emitterId: UID | |\n * | | DomEmitterMixin | | +--------------^---------+ |\n * | +------------------------+ | | | |\n * +--------------^-------------+ | +---------------------------------------------+\n * | | click (DOM Event)\n * +-----------------------------------------+\n * fire( click, DOM Event )\n *\n * @mixes module:utils/emittermixin~EmitterMixin\n * @implements module:utils/dom/emittermixin~Emitter\n * @private\n */\nclass ProxyEmitter {\n\t/**\n\t * @param {Node} node DOM Node that fires events.\n\t * @returns {Object} ProxyEmitter instance bound to the DOM Node.\n\t */\n\tconstructor( node ) {\n\t\t// Set emitter ID to match DOM Node \"expando\" property.\n\t\t_setEmitterId( this, getNodeUID( node ) );\n\n\t\t// Remember the DOM Node this ProxyEmitter is bound to.\n\t\tthis._domNode = node;\n\t}\n}\n\nextend( ProxyEmitter.prototype, EmitterMixin, {\n\t/**\n\t * Collection of native DOM listeners.\n\t *\n\t * @private\n\t * @member {Object} module:utils/dom/emittermixin~ProxyEmitter#_domListeners\n\t */\n\n\t/**\n\t * Registers a callback function to be executed when an event is fired.\n\t *\n\t * It attaches a native DOM listener to the DOM Node. When fired,\n\t * a corresponding Emitter event will also fire with DOM Event object as an argument.\n\t *\n\t * @method module:utils/dom/emittermixin~ProxyEmitter#attach\n\t * @param {String} event The name of the event.\n\t * @param {Function} callback The function to be called on event.\n\t * @param {Object} [options={}] Additional options.\n\t * @param {Boolean} [options.useCapture=false] Indicates that events of this type will be dispatched to the registered\n\t * listener before being dispatched to any EventTarget beneath it in the DOM tree.\n\t * @param {Boolean} [options.usePassive=false] Indicates that the function specified by listener will never call preventDefault()\n\t * and prevents blocking browser's main thread by this event handler.\n\t */\n\tattach( event, callback, options = {} ) {\n\t\t// If the DOM Listener for given event already exist it is pointless\n\t\t// to attach another one.\n\t\tif ( this._domListeners && this._domListeners[ event ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst listenerOptions = {\n\t\t\tcapture: !!options.useCapture,\n\t\t\tpassive: !!options.usePassive\n\t\t};\n\n\t\tconst domListener = this._createDomListener( event, listenerOptions );\n\n\t\t// Attach the native DOM listener to DOM Node.\n\t\tthis._domNode.addEventListener( event, domListener, listenerOptions );\n\n\t\tif ( !this._domListeners ) {\n\t\t\tthis._domListeners = {};\n\t\t}\n\n\t\t// Store the native DOM listener in this ProxyEmitter. It will be helpful\n\t\t// when stopping listening to the event.\n\t\tthis._domListeners[ event ] = domListener;\n\t},\n\n\t/**\n\t * Stops executing the callback on the given event.\n\t *\n\t * @method module:utils/dom/emittermixin~ProxyEmitter#detach\n\t * @param {String} event The name of the event.\n\t */\n\tdetach( event ) {\n\t\tlet events;\n\n\t\t// Remove native DOM listeners which are orphans. If no callbacks\n\t\t// are awaiting given event, detach native DOM listener from DOM Node.\n\t\t// See: {@link attach}.\n\n\t\tif ( this._domListeners[ event ] && ( !( events = this._events[ event ] ) || !events.callbacks.length ) ) {\n\t\t\tthis._domListeners[ event ].removeListener();\n\t\t}\n\t},\n\n\t/**\n\t * Creates a native DOM listener callback. When the native DOM event\n\t * is fired it will fire corresponding event on this ProxyEmitter.\n\t * Note: A native DOM Event is passed as an argument.\n\t *\n\t * @private\n\t * @method module:utils/dom/emittermixin~ProxyEmitter#_createDomListener\n\t * @param {String} event The name of the event.\n\t * @param {Object} [options] Additional options.\n\t * @param {Boolean} [options.capture=false] Indicates whether the listener was created for capturing event.\n\t * @param {Boolean} [options.passive=false] Indicates that the function specified by listener will never call preventDefault()\n\t * and prevents blocking browser's main thread by this event handler.\n\t * @returns {Function} The DOM listener callback.\n\t */\n\t_createDomListener( event, options ) {\n\t\tconst domListener = domEvt => {\n\t\t\tthis.fire( event, domEvt );\n\t\t};\n\n\t\t// Supply the DOM listener callback with a function that will help\n\t\t// detach it from the DOM Node, when it is no longer necessary.\n\t\t// See: {@link detach}.\n\t\tdomListener.removeListener = () => {\n\t\t\tthis._domNode.removeEventListener( event, domListener, options );\n\t\t\tdelete this._domListeners[ event ];\n\t\t};\n\n\t\treturn domListener;\n\t}\n} );\n\n// Gets an unique DOM Node identifier. The identifier will be set if not defined.\n//\n// @private\n// @param {Node} node\n// @returns {String} UID for given DOM Node.\nfunction getNodeUID( node ) {\n\treturn node[ 'data-ck-expando' ] || ( node[ 'data-ck-expando' ] = uid() );\n}\n\n/**\n * Interface representing classes which mix in {@link module:utils/dom/emittermixin~EmitterMixin}.\n *\n * @interface Emitter\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/observer\n */\n\nimport DomEmitterMixin from '@ckeditor/ckeditor5-utils/src/dom/emittermixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * Abstract base observer class. Observers are classes which listen to DOM events, do the preliminary\n * processing and fire events on the {@link module:engine/view/document~Document} objects.\n * Observers can also add features to the view, for instance by updating its status or marking elements\n * which need a refresh on DOM events.\n *\n * @abstract\n */\nexport default class Observer {\n\t/**\n\t * Creates an instance of the observer.\n\t *\n\t * @param {module:engine/view/view~View} view\n\t */\n\tconstructor( view ) {\n\t\t/**\n\t\t * An instance of the view controller.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/view~View}\n\t\t */\n\t\tthis.view = view;\n\n\t\t/**\n\t\t * A reference to the {@link module:engine/view/document~Document} object.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/document~Document}\n\t\t */\n\t\tthis.document = view.document;\n\n\t\t/**\n\t\t * The state of the observer. If it is disabled, no events will be fired.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis.isEnabled = false;\n\t}\n\n\t/**\n\t * Enables the observer. This method is called when the observer is registered to the\n\t * {@link module:engine/view/view~View} and after {@link module:engine/view/view~View#forceRender rendering}\n\t * (all observers are {@link #disable disabled} before rendering).\n\t *\n\t * A typical use case for disabling observers is that mutation observers need to be disabled for the rendering.\n\t * However, a child class may not need to be disabled, so it can implement an empty method.\n\t *\n\t * @see module:engine/view/observer/observer~Observer#disable\n\t */\n\tenable() {\n\t\tthis.isEnabled = true;\n\t}\n\n\t/**\n\t * Disables the observer. This method is called before\n\t * {@link module:engine/view/view~View#forceRender rendering} to prevent firing events during rendering.\n\t *\n\t * @see module:engine/view/observer/observer~Observer#enable\n\t */\n\tdisable() {\n\t\tthis.isEnabled = false;\n\t}\n\n\t/**\n\t * Disables and destroys the observer, among others removes event listeners created by the observer.\n\t */\n\tdestroy() {\n\t\tthis.disable();\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Checks whether a given DOM event should be ignored (should not be turned into a synthetic view document event).\n\t *\n\t * Currently, an event will be ignored only if its target or any of its ancestors has the `data-cke-ignore-events` attribute.\n\t * This attribute can be used inside the structures generated by\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement `DowncastWriter#createUIElement()`} to ignore events\n\t * fired within a UI that should be excluded from CKEditor 5's realms.\n\t *\n\t * @param {Node} domTarget The DOM event target to check (usually an element, sometimes a text node and\n\t * potentially sometimes a document, too).\n\t * @returns {Boolean} Whether this event should be ignored by the observer.\n\t */\n\tcheckShouldIgnoreEventFromTarget( domTarget ) {\n\t\tif ( domTarget && domTarget.nodeType === 3 ) {\n\t\t\tdomTarget = domTarget.parentNode;\n\t\t}\n\n\t\tif ( !domTarget || domTarget.nodeType !== 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn domTarget.matches( '[data-cke-ignore-events], [data-cke-ignore-events] *' );\n\t}\n\n\t/**\n\t * Starts observing the given root element.\n\t *\n\t * @method #observe\n\t * @param {HTMLElement} domElement\n\t * @param {String} name The name of the root element.\n\t */\n}\n\nmix( Observer, DomEmitterMixin );\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\nfunction isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n}\n\nexport default isEqualWith;\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/mutationobserver\n */\n\n/* globals window */\n\nimport Observer from './observer';\nimport ViewSelection from '../selection';\nimport { startsWithFiller, getDataWithoutFiller } from '../filler';\nimport { isEqualWith } from 'lodash-es';\n\n/**\n * Mutation observer class observes changes in the DOM, fires {@link module:engine/view/document~Document#event:mutations} event, mark view\n * elements as changed and call {@link module:engine/view/renderer~Renderer#render}.\n * Because all mutated nodes are marked as \"to be rendered\" and the\n * {@link module:engine/view/renderer~Renderer#render} is called, all changes will be reverted, unless the mutation will be handled by the\n * {@link module:engine/view/document~Document#event:mutations} event listener. It means user will see only handled changes, and the editor\n * will block all changes which are not handled.\n *\n * Mutation Observer also take care of reducing number of mutations which are fired. It removes duplicates and\n * mutations on elements which do not have corresponding view elements. Also\n * {@link module:engine/view/observer/mutationobserver~MutatedText text mutation} is fired only if parent element do not change child list.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class MutationObserver extends Observer {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\t/**\n\t\t * Native mutation observer config.\n\t\t *\n\t\t * @private\n\t\t * @member {Object}\n\t\t */\n\t\tthis._config = {\n\t\t\tchildList: true,\n\t\t\tcharacterData: true,\n\t\t\tcharacterDataOldValue: true,\n\t\t\tsubtree: true\n\t\t};\n\n\t\t/**\n\t\t * Reference to the {@link module:engine/view/view~View#domConverter}.\n\t\t *\n\t\t * @member {module:engine/view/domconverter~DomConverter}\n\t\t */\n\t\tthis.domConverter = view.domConverter;\n\n\t\t/**\n\t\t * Reference to the {@link module:engine/view/view~View#_renderer}.\n\t\t *\n\t\t * @member {module:engine/view/renderer~Renderer}\n\t\t */\n\t\tthis.renderer = view._renderer;\n\n\t\t/**\n\t\t * Observed DOM elements.\n\t\t *\n\t\t * @private\n\t\t * @member {Array.}\n\t\t */\n\t\tthis._domElements = [];\n\n\t\t/**\n\t\t * Native mutation observer.\n\t\t *\n\t\t * @private\n\t\t * @member {MutationObserver}\n\t\t */\n\t\tthis._mutationObserver = new window.MutationObserver( this._onMutations.bind( this ) );\n\t}\n\n\t/**\n\t * Synchronously fires {@link module:engine/view/document~Document#event:mutations} event with all mutations in record queue.\n\t * At the same time empties the queue so mutations will not be fired twice.\n\t */\n\tflush() {\n\t\tthis._onMutations( this._mutationObserver.takeRecords() );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve( domElement ) {\n\t\tthis._domElements.push( domElement );\n\n\t\tif ( this.isEnabled ) {\n\t\t\tthis._mutationObserver.observe( domElement, this._config );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tenable() {\n\t\tsuper.enable();\n\n\t\tfor ( const domElement of this._domElements ) {\n\t\t\tthis._mutationObserver.observe( domElement, this._config );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdisable() {\n\t\tsuper.disable();\n\n\t\tthis._mutationObserver.disconnect();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tsuper.destroy();\n\n\t\tthis._mutationObserver.disconnect();\n\t}\n\n\t/**\n\t * Handles mutations. Deduplicates, mark view elements to sync, fire event and call render.\n\t *\n\t * @private\n\t * @param {Array.} domMutations Array of native mutations.\n\t */\n\t_onMutations( domMutations ) {\n\t\t// As a result of this.flush() we can have an empty collection.\n\t\tif ( domMutations.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domConverter = this.domConverter;\n\n\t\t// Use map and set for deduplication.\n\t\tconst mutatedTexts = new Map();\n\t\tconst mutatedElements = new Set();\n\n\t\t// Handle `childList` mutations first, so we will be able to check if the `characterData` mutation is in the\n\t\t// element with changed structure anyway.\n\t\tfor ( const mutation of domMutations ) {\n\t\t\tif ( mutation.type === 'childList' ) {\n\t\t\t\tconst element = domConverter.mapDomToView( mutation.target );\n\n\t\t\t\t// Do not collect mutations from UIElements and RawElements.\n\t\t\t\tif ( element && ( element.is( 'uiElement' ) || element.is( 'rawElement' ) ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( element && !this._isBogusBrMutation( mutation ) ) {\n\t\t\t\t\tmutatedElements.add( element );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle `characterData` mutations later, when we have the full list of nodes which changed structure.\n\t\tfor ( const mutation of domMutations ) {\n\t\t\tconst element = domConverter.mapDomToView( mutation.target );\n\n\t\t\t// Do not collect mutations from UIElements and RawElements.\n\t\t\tif ( element && ( element.is( 'uiElement' ) || element.is( 'rawElement' ) ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( mutation.type === 'characterData' ) {\n\t\t\t\tconst text = domConverter.findCorrespondingViewText( mutation.target );\n\n\t\t\t\tif ( text && !mutatedElements.has( text.parent ) ) {\n\t\t\t\t\t// Use text as a key, for deduplication. If there will be another mutation on the same text element\n\t\t\t\t\t// we will have only one in the map.\n\t\t\t\t\tmutatedTexts.set( text, {\n\t\t\t\t\t\ttype: 'text',\n\t\t\t\t\t\toldText: text.data,\n\t\t\t\t\t\tnewText: getDataWithoutFiller( mutation.target ),\n\t\t\t\t\t\tnode: text\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\t// When we added first letter to the text node which had only inline filler, for the DOM it is mutation\n\t\t\t\t// on text, but for the view, where filler text node did not existed, new text node was created, so we\n\t\t\t\t// need to fire 'children' mutation instead of 'text'.\n\t\t\t\telse if ( !text && startsWithFiller( mutation.target ) ) {\n\t\t\t\t\tmutatedElements.add( domConverter.mapDomToView( mutation.target.parentNode ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now we build the list of mutations to fire and mark elements. We did not do it earlier to avoid marking the\n\t\t// same node multiple times in case of duplication.\n\n\t\t// List of mutations we will fire.\n\t\tconst viewMutations = [];\n\n\t\tfor ( const mutatedText of mutatedTexts.values() ) {\n\t\t\tthis.renderer.markToSync( 'text', mutatedText.node );\n\t\t\tviewMutations.push( mutatedText );\n\t\t}\n\n\t\tfor ( const viewElement of mutatedElements ) {\n\t\t\tconst domElement = domConverter.mapViewToDom( viewElement );\n\t\t\tconst viewChildren = Array.from( viewElement.getChildren() );\n\t\t\tconst newViewChildren = Array.from( domConverter.domChildrenToView( domElement, { withChildren: false } ) );\n\n\t\t\t// It may happen that as a result of many changes (sth was inserted and then removed),\n\t\t\t// both elements haven't really changed. #1031\n\t\t\tif ( !isEqualWith( viewChildren, newViewChildren, sameNodes ) ) {\n\t\t\t\tthis.renderer.markToSync( 'children', viewElement );\n\n\t\t\t\tviewMutations.push( {\n\t\t\t\t\ttype: 'children',\n\t\t\t\t\toldChildren: viewChildren,\n\t\t\t\t\tnewChildren: newViewChildren,\n\t\t\t\t\tnode: viewElement\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\t// Retrieve `domSelection` using `ownerDocument` of one of mutated nodes.\n\t\t// There should not be simultaneous mutation in multiple documents, so it's fine.\n\t\tconst domSelection = domMutations[ 0 ].target.ownerDocument.getSelection();\n\n\t\tlet viewSelection = null;\n\n\t\tif ( domSelection && domSelection.anchorNode ) {\n\t\t\t// If `domSelection` is inside a dom node that is already bound to a view node from view tree, get\n\t\t\t// corresponding selection in the view and pass it together with `viewMutations`. The `viewSelection` may\n\t\t\t// be used by features handling mutations.\n\t\t\t// Only one range is supported.\n\n\t\t\tconst viewSelectionAnchor = domConverter.domPositionToView( domSelection.anchorNode, domSelection.anchorOffset );\n\t\t\tconst viewSelectionFocus = domConverter.domPositionToView( domSelection.focusNode, domSelection.focusOffset );\n\n\t\t\t// Anchor and focus has to be properly mapped to view.\n\t\t\tif ( viewSelectionAnchor && viewSelectionFocus ) {\n\t\t\t\tviewSelection = new ViewSelection( viewSelectionAnchor );\n\t\t\t\tviewSelection.setFocus( viewSelectionFocus );\n\t\t\t}\n\t\t}\n\n\t\t// In case only non-relevant mutations were recorded it skips the event and force render (#5600).\n\t\tif ( viewMutations.length ) {\n\t\t\tthis.document.fire( 'mutations', viewMutations, viewSelection );\n\n\t\t\t// If nothing changes on `mutations` event, at this point we have \"dirty DOM\" (changed) and de-synched\n\t\t\t// view (which has not been changed). In order to \"reset DOM\" we render the view again.\n\t\t\tthis.view.forceRender();\n\t\t}\n\n\t\tfunction sameNodes( child1, child2 ) {\n\t\t\t// First level of comparison (array of children vs array of children) – use the Lodash's default behavior.\n\t\t\tif ( Array.isArray( child1 ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Elements.\n\t\t\tif ( child1 === child2 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// Texts.\n\t\t\telse if ( child1.is( '$text' ) && child2.is( '$text' ) ) {\n\t\t\t\treturn child1.data === child2.data;\n\t\t\t}\n\n\t\t\t// Not matching types.\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if mutation was generated by the browser inserting bogus br on the end of the block element.\n\t * Such mutations are generated while pressing space or performing native spellchecker correction\n\t * on the end of the block element in Firefox browser.\n\t *\n\t * @private\n\t * @param {Object} mutation Native mutation object.\n\t * @returns {Boolean}\n\t */\n\t_isBogusBrMutation( mutation ) {\n\t\tlet addedNode = null;\n\n\t\t// Check if mutation added only one node on the end of its parent.\n\t\tif ( mutation.nextSibling === null && mutation.removedNodes.length === 0 && mutation.addedNodes.length == 1 ) {\n\t\t\taddedNode = this.domConverter.domToView( mutation.addedNodes[ 0 ], {\n\t\t\t\twithChildren: false\n\t\t\t} );\n\t\t}\n\n\t\treturn addedNode && addedNode.is( 'element', 'br' );\n\t}\n}\n\n/**\n * Fired when mutation occurred. If tree view is not changed on this event, DOM will be reverted to the state before\n * mutation, so all changes which should be applied, should be handled on this event.\n *\n * Introduced by {@link module:engine/view/observer/mutationobserver~MutationObserver}.\n *\n * Note that because {@link module:engine/view/observer/mutationobserver~MutationObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/mutationobserver~MutationObserver\n * @event module:engine/view/document~Document#event:mutations\n * @param {Array.}\n * viewMutations Array of mutations.\n * For mutated texts it will be {@link module:engine/view/observer/mutationobserver~MutatedText} and for mutated elements it will be\n * {@link module:engine/view/observer/mutationobserver~MutatedChildren}. You can recognize the type based on the `type` property.\n * @param {module:engine/view/selection~Selection|null} viewSelection View selection that is a result of converting DOM selection to view.\n * Keep in\n * mind that the DOM selection is already \"updated\", meaning that it already acknowledges changes done in mutation.\n */\n\n/**\n * Mutation item for text.\n *\n * @see module:engine/view/document~Document#event:mutations\n * @see module:engine/view/observer/mutationobserver~MutatedChildren\n *\n * @typedef {Object} module:engine/view/observer/mutationobserver~MutatedText\n *\n * @property {String} type For text mutations it is always 'text'.\n * @property {module:engine/view/text~Text} node Mutated text node.\n * @property {String} oldText Old text.\n * @property {String} newText New text.\n */\n\n/**\n * Mutation item for child nodes.\n *\n * @see module:engine/view/document~Document#event:mutations\n * @see module:engine/view/observer/mutationobserver~MutatedText\n *\n * @typedef {Object} module:engine/view/observer/mutationobserver~MutatedChildren\n *\n * @property {String} type For child nodes mutations it is always 'children'.\n * @property {module:engine/view/element~Element} node Parent of the mutated children.\n * @property {Array.} oldChildren Old child nodes.\n * @property {Array.} newChildren New child nodes.\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/domeventdata\n */\n\nimport { extend } from 'lodash-es';\n\n/**\n * Information about a DOM event in context of the {@link module:engine/view/document~Document}.\n * It wraps the native event, which usually should not be used as the wrapper contains\n * additional data (like key code for keyboard events).\n */\nexport default class DomEventData {\n\t/**\n\t * @param {module:engine/view/view~View} view The instance of the view controller.\n\t * @param {Event} domEvent The DOM event.\n\t * @param {Object} [additionalData] Additional properties that the instance should contain.\n\t */\n\tconstructor( view, domEvent, additionalData ) {\n\t\t/**\n\t\t * Instance of the view controller.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/view~View} module:engine/view/observer/observer~Observer.DomEvent#view\n\t\t */\n\t\tthis.view = view;\n\n\t\t/**\n\t\t * The instance of the document.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/document~Document} module:engine/view/observer/observer~Observer.DomEvent#document\n\t\t */\n\t\tthis.document = view.document;\n\n\t\t/**\n\t\t * The DOM event.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Event} module:engine/view/observer/observer~Observer.DomEvent#domEvent\n\t\t */\n\t\tthis.domEvent = domEvent;\n\n\t\t/**\n\t\t * The DOM target.\n\t\t *\n\t\t * @readonly\n\t\t * @member {HTMLElement} module:engine/view/observer/observer~Observer.DomEvent#target\n\t\t */\n\t\tthis.domTarget = domEvent.target;\n\n\t\textend( this, additionalData );\n\t}\n\n\t/**\n\t * The tree view element representing the target.\n\t *\n\t * @readonly\n\t * @type module:engine/view/element~Element\n\t */\n\tget target() {\n\t\treturn this.view.domConverter.mapDomToView( this.domTarget );\n\t}\n\n\t/**\n\t * Prevents the native's event default action.\n\t */\n\tpreventDefault() {\n\t\tthis.domEvent.preventDefault();\n\t}\n\n\t/**\n\t * Stops native event propagation.\n\t */\n\tstopPropagation() {\n\t\tthis.domEvent.stopPropagation();\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/domeventobserver\n */\n\nimport Observer from './observer';\nimport DomEventData from './domeventdata';\n\n/**\n * Base class for DOM event observers. This class handles\n * {@link module:engine/view/observer/observer~Observer#observe adding} listeners to DOM elements,\n * {@link module:engine/view/observer/observer~Observer#disable disabling} and\n * {@link module:engine/view/observer/observer~Observer#enable re-enabling} events.\n * Child class needs to define\n * {@link module:engine/view/observer/domeventobserver~DomEventObserver#domEventType DOM event type} and\n * {@link module:engine/view/observer/domeventobserver~DomEventObserver#onDomEvent callback}.\n *\n * For instance:\n *\n *\t\tclass ClickObserver extends DomEventObserver {\n *\t\t\t// It can also be defined as a normal property in the constructor.\n *\t\t\tget domEventType() {\n *\t\t\t\treturn 'click';\n *\t\t\t}\n *\n *\t\t\tonDomEvent( domEvent ) {\n *\t\t\t\tthis.fire( 'click', domEvent );\n *\t\t\t}\n *\t\t}\n *\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class DomEventObserver extends Observer {\n\t/**\n\t * Type of the DOM event the observer should listen to. Array of types can be defined\n\t * if the observer should listen to multiple DOM events.\n\t *\n\t * @readonly\n\t * @member {String|Array.} #domEventType\n\t */\n\n\t/**\n\t * Callback which should be called when the DOM event occurred. Note that the callback will not be called if\n\t * observer {@link #isEnabled is not enabled}.\n\t *\n\t * @see #domEventType\n\t * @abstract\n\t * @method #onDomEvent\n\t */\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\t/**\n\t\t * If set to `true` DOM events will be listened on the capturing phase.\n\t\t * Default value is `false`.\n\t\t *\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis.useCapture = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve( domElement ) {\n\t\tconst types = typeof this.domEventType == 'string' ? [ this.domEventType ] : this.domEventType;\n\n\t\ttypes.forEach( type => {\n\t\t\tthis.listenTo( domElement, type, ( eventInfo, domEvent ) => {\n\t\t\t\tif ( this.isEnabled && !this.checkShouldIgnoreEventFromTarget( domEvent.target ) ) {\n\t\t\t\t\tthis.onDomEvent( domEvent );\n\t\t\t\t}\n\t\t\t}, { useCapture: this.useCapture } );\n\t\t} );\n\t}\n\n\t/**\n\t * Calls `Document#fire()` if observer {@link #isEnabled is enabled}.\n\t *\n\t * @see module:utils/emittermixin~EmitterMixin#fire\n\t * @param {String} eventType The event type (name).\n\t * @param {Event} domEvent The DOM event.\n\t * @param {Object} [additionalData] The additional data which should extend the\n\t * {@link module:engine/view/observer/domeventdata~DomEventData event data} object.\n\t */\n\tfire( eventType, domEvent, additionalData ) {\n\t\tif ( this.isEnabled ) {\n\t\t\tthis.document.fire( eventType, new DomEventData( this.view, domEvent, additionalData ) );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/keyobserver\n */\n\nimport DomEventObserver from './domeventobserver';\nimport { getCode } from '@ckeditor/ckeditor5-utils/src/keyboard';\n\n/**\n * Observer for events connected with pressing keyboard keys.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/domeventobserver~DomEventObserver\n */\nexport default class KeyObserver extends DomEventObserver {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.domEventType = [ 'keydown', 'keyup' ];\n\t}\n\n\tonDomEvent( domEvt ) {\n\t\tthis.fire( domEvt.type, domEvt, {\n\t\t\tkeyCode: domEvt.keyCode,\n\n\t\t\taltKey: domEvt.altKey,\n\t\t\tctrlKey: domEvt.ctrlKey,\n\t\t\tshiftKey: domEvt.shiftKey,\n\t\t\tmetaKey: domEvt.metaKey,\n\n\t\t\tget keystroke() {\n\t\t\t\treturn getCode( this );\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Fired when a key has been pressed.\n *\n * Introduced by {@link module:engine/view/observer/keyobserver~KeyObserver}.\n *\n * Note that because {@link module:engine/view/observer/keyobserver~KeyObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/keyobserver~KeyObserver\n * @event module:engine/view/document~Document#event:keydown\n * @param {module:engine/view/observer/keyobserver~KeyEventData} keyEventData\n */\n\n/**\n * Fired when a key has been released.\n *\n * Introduced by {@link module:engine/view/observer/keyobserver~KeyObserver}.\n *\n * Note that because {@link module:engine/view/observer/keyobserver~KeyObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/keyobserver~KeyObserver\n * @event module:engine/view/document~Document#event:keyup\n * @param {module:engine/view/observer/keyobserver~KeyEventData} keyEventData\n */\n\n/**\n * The value of both events - {@link module:engine/view/document~Document#event:keydown} and\n * {@link module:engine/view/document~Document#event:keyup}.\n *\n * @class module:engine/view/observer/keyobserver~KeyEventData\n * @extends module:engine/view/observer/domeventdata~DomEventData\n * @implements module:utils/keyboard~KeystrokeInfo\n */\n\n/**\n * Code of the whole keystroke. See {@link module:utils/keyboard~getCode}.\n *\n * @readonly\n * @member {Number} module:engine/view/observer/keyobserver~KeyEventData#keystroke\n */\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/fakeselectionobserver\n */\n\nimport Observer from './observer';\nimport ViewSelection from '../selection';\nimport { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';\nimport { debounce } from 'lodash-es';\n\n/**\n * Fake selection observer class. If view selection is fake it is placed in dummy DOM container. This observer listens\n * on {@link module:engine/view/document~Document#event:keydown keydown} events and handles moving fake view selection to the correct place\n * if arrow keys are pressed.\n * Fires {@link module:engine/view/document~Document#event:selectionChange selectionChange event} simulating natural behaviour of\n * {@link module:engine/view/observer/selectionobserver~SelectionObserver SelectionObserver}.\n *\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class FakeSelectionObserver extends Observer {\n\t/**\n\t * Creates new FakeSelectionObserver instance.\n\t *\n\t * @param {module:engine/view/view~View} view\n\t */\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\t/**\n\t\t * Fires debounced event `selectionChangeDone`. It uses `lodash#debounce` method to delay function call.\n\t\t *\n\t\t * @private\n\t\t * @param {Object} data Selection change data.\n\t\t * @method #_fireSelectionChangeDoneDebounced\n\t\t */\n\t\tthis._fireSelectionChangeDoneDebounced = debounce( data => this.document.fire( 'selectionChangeDone', data ), 200 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve() {\n\t\tconst document = this.document;\n\n\t\tdocument.on( 'arrowKey', ( eventInfo, data ) => {\n\t\t\tconst selection = document.selection;\n\n\t\t\tif ( selection.isFake && this.isEnabled ) {\n\t\t\t\t// Prevents default key down handling - no selection change will occur.\n\t\t\t\tdata.preventDefault();\n\t\t\t}\n\t\t}, { context: '$capture' } );\n\n\t\tdocument.on( 'arrowKey', ( eventInfo, data ) => {\n\t\t\tconst selection = document.selection;\n\n\t\t\tif ( selection.isFake && this.isEnabled ) {\n\t\t\t\tthis._handleSelectionMove( data.keyCode );\n\t\t\t}\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tsuper.destroy();\n\n\t\tthis._fireSelectionChangeDoneDebounced.cancel();\n\t}\n\n\t/**\n\t * Handles collapsing view selection according to given key code. If left or up key is provided - new selection will be\n\t * collapsed to left. If right or down key is pressed - new selection will be collapsed to right.\n\t *\n\t * This method fires {@link module:engine/view/document~Document#event:selectionChange} and\n\t * {@link module:engine/view/document~Document#event:selectionChangeDone} events imitating behaviour of\n\t * {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n\t *\n\t * @private\n\t * @param {Number} keyCode\n\t * @fires module:engine/view/document~Document#event:selectionChange\n\t * @fires module:engine/view/document~Document#event:selectionChangeDone\n\t */\n\t_handleSelectionMove( keyCode ) {\n\t\tconst selection = this.document.selection;\n\t\tconst newSelection = new ViewSelection( selection.getRanges(), { backward: selection.isBackward, fake: false } );\n\n\t\t// Left or up arrow pressed - move selection to start.\n\t\tif ( keyCode == keyCodes.arrowleft || keyCode == keyCodes.arrowup ) {\n\t\t\tnewSelection.setTo( newSelection.getFirstPosition() );\n\t\t}\n\n\t\t// Right or down arrow pressed - move selection to end.\n\t\tif ( keyCode == keyCodes.arrowright || keyCode == keyCodes.arrowdown ) {\n\t\t\tnewSelection.setTo( newSelection.getLastPosition() );\n\t\t}\n\n\t\tconst data = {\n\t\t\toldSelection: selection,\n\t\t\tnewSelection,\n\t\t\tdomSelection: null\n\t\t};\n\n\t\t// Fire dummy selection change event.\n\t\tthis.document.fire( 'selectionChange', data );\n\n\t\t// Call` #_fireSelectionChangeDoneDebounced` every time when `selectionChange` event is fired.\n\t\t// This function is debounced what means that `selectionChangeDone` event will be fired only when\n\t\t// defined int the function time will elapse since the last time the function was called.\n\t\t// So `selectionChangeDone` will be fired when selection will stop changing.\n\t\tthis._fireSelectionChangeDoneDebounced( data );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/selectionobserver\n */\n\n/* global setInterval, clearInterval */\n\nimport Observer from './observer';\nimport MutationObserver from './mutationobserver';\nimport { debounce } from 'lodash-es';\n\n/**\n * Selection observer class observes selection changes in the document. If a selection changes on the document this\n * observer checks if there are any mutations and if the DOM selection is different from the\n * {@link module:engine/view/document~Document#selection view selection}. The selection observer fires\n * {@link module:engine/view/document~Document#event:selectionChange} event only if a selection change was the only change in the document\n * and the DOM selection is different then the view selection.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @see module:engine/view/observer/mutationobserver~MutationObserver\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class SelectionObserver extends Observer {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\t/**\n\t\t * Instance of the mutation observer. Selection observer calls\n\t\t * {@link module:engine/view/observer/mutationobserver~MutationObserver#flush} to ensure that the mutations will be handled\n\t\t * before the {@link module:engine/view/document~Document#event:selectionChange} event is fired.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/observer/mutationobserver~MutationObserver}\n\t\t * module:engine/view/observer/selectionobserver~SelectionObserver#mutationObserver\n\t\t */\n\t\tthis.mutationObserver = view.getObserver( MutationObserver );\n\n\t\t/**\n\t\t * Reference to the view {@link module:engine/view/documentselection~DocumentSelection} object used to compare\n\t\t * new selection with it.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/documentselection~DocumentSelection}\n\t\t * module:engine/view/observer/selectionobserver~SelectionObserver#selection\n\t\t */\n\t\tthis.selection = this.document.selection;\n\n\t\t/* eslint-disable max-len */\n\t\t/**\n\t\t * Reference to the {@link module:engine/view/view~View#domConverter}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/domconverter~DomConverter} module:engine/view/observer/selectionobserver~SelectionObserver#domConverter\n\t\t */\n\t\t/* eslint-enable max-len */\n\t\tthis.domConverter = view.domConverter;\n\n\t\t/**\n\t\t * A set of documents which have added `selectionchange` listener to avoid adding a listener twice to the same\n\t\t * document.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakSet.} module:engine/view/observer/selectionobserver~SelectionObserver#_documents\n\t\t */\n\t\tthis._documents = new WeakSet();\n\n\t\t/**\n\t\t * Fires debounced event `selectionChangeDone`. It uses `lodash#debounce` method to delay function call.\n\t\t *\n\t\t * @private\n\t\t * @param {Object} data Selection change data.\n\t\t * @method #_fireSelectionChangeDoneDebounced\n\t\t */\n\t\tthis._fireSelectionChangeDoneDebounced = debounce( data => this.document.fire( 'selectionChangeDone', data ), 200 );\n\n\t\tthis._clearInfiniteLoopInterval = setInterval( () => this._clearInfiniteLoop(), 1000 );\n\n\t\t/**\n\t\t * Private property to check if the code does not enter infinite loop.\n\t\t *\n\t\t * @private\n\t\t * @member {Number} module:engine/view/observer/selectionobserver~SelectionObserver#_loopbackCounter\n\t\t */\n\t\tthis._loopbackCounter = 0;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve( domElement ) {\n\t\tconst domDocument = domElement.ownerDocument;\n\n\t\t// Add listener once per each document.\n\t\tif ( this._documents.has( domDocument ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.listenTo( domDocument, 'selectionchange', ( evt, domEvent ) => {\n\t\t\tthis._handleSelectionChange( domEvent, domDocument );\n\t\t} );\n\n\t\tthis._documents.add( domDocument );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tsuper.destroy();\n\n\t\tclearInterval( this._clearInfiniteLoopInterval );\n\t\tthis._fireSelectionChangeDoneDebounced.cancel();\n\t}\n\n\t/**\n\t * Selection change listener. {@link module:engine/view/observer/mutationobserver~MutationObserver#flush Flush} mutations, check if\n\t * a selection changes and fires {@link module:engine/view/document~Document#event:selectionChange} event on every change\n\t * and {@link module:engine/view/document~Document#event:selectionChangeDone} when a selection stop changing.\n\t *\n\t * @private\n\t * @param {Event} domEvent DOM event.\n\t * @param {Document} domDocument DOM document.\n\t */\n\t_handleSelectionChange( domEvent, domDocument ) {\n\t\tif ( !this.isEnabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domSelection = domDocument.defaultView.getSelection();\n\n\t\tif ( this.checkShouldIgnoreEventFromTarget( domSelection.anchorNode ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ensure the mutation event will be before selection event on all browsers.\n\t\tthis.mutationObserver.flush();\n\n\t\t// If there were mutations then the view will be re-rendered by the mutation observer and the selection\n\t\t// will be updated, so the selections will equal and the event will not be fired, as expected.\n\t\tconst newViewSelection = this.domConverter.domSelectionToView( domSelection );\n\n\t\t// Do not convert selection change if the new view selection has no ranges in it.\n\t\t//\n\t\t// It means that the DOM selection is in some way incorrect. Ranges that were in the DOM selection could not be\n\t\t// converted to the view. This happens when the DOM selection was moved outside of the editable element.\n\t\tif ( newViewSelection.rangeCount == 0 ) {\n\t\t\tthis.view.hasDomSelection = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.view.hasDomSelection = true;\n\n\t\tif ( this.selection.isEqual( newViewSelection ) && this.domConverter.isDomSelectionCorrect( domSelection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ensure we are not in the infinite loop (#400).\n\t\t// This counter is reset each second. 60 selection changes in 1 second is enough high number\n\t\t// to be very difficult (impossible) to achieve using just keyboard keys (during normal editor use).\n\t\tif ( ++this._loopbackCounter > 60 ) {\n\t\t\t// Selection change observer detected an infinite rendering loop.\n\t\t\t// Most probably you try to put the selection in the position which is not allowed\n\t\t\t// by the browser and browser fixes it automatically what causes `selectionchange` event on\n\t\t\t// which a loopback through a model tries to re-render the wrong selection and again.\n\t\t\t//\n\t\t\t// @if CK_DEBUG // console.warn( 'Selection change observer detected an infinite rendering loop.' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.selection.isSimilar( newViewSelection ) ) {\n\t\t\t// If selection was equal and we are at this point of algorithm, it means that it was incorrect.\n\t\t\t// Just re-render it, no need to fire any events, etc.\n\t\t\tthis.view.forceRender();\n\t\t} else {\n\t\t\tconst data = {\n\t\t\t\toldSelection: this.selection,\n\t\t\t\tnewSelection: newViewSelection,\n\t\t\t\tdomSelection\n\t\t\t};\n\n\t\t\t// Prepare data for new selection and fire appropriate events.\n\t\t\tthis.document.fire( 'selectionChange', data );\n\n\t\t\t// Call `#_fireSelectionChangeDoneDebounced` every time when `selectionChange` event is fired.\n\t\t\t// This function is debounced what means that `selectionChangeDone` event will be fired only when\n\t\t\t// defined int the function time will elapse since the last time the function was called.\n\t\t\t// So `selectionChangeDone` will be fired when selection will stop changing.\n\t\t\tthis._fireSelectionChangeDoneDebounced( data );\n\t\t}\n\t}\n\n\t/**\n\t * Clears `SelectionObserver` internal properties connected with preventing infinite loop.\n\t *\n\t * @protected\n\t */\n\t_clearInfiniteLoop() {\n\t\tthis._loopbackCounter = 0;\n\t}\n}\n\n/**\n * Fired when a selection has changed. This event is fired only when the selection change was the only change that happened\n * in the document, and the old selection is different then the new selection.\n *\n * Introduced by {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n *\n * Note that because {@link module:engine/view/observer/selectionobserver~SelectionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/selectionobserver~SelectionObserver\n * @event module:engine/view/document~Document#event:selectionChange\n * @param {Object} data\n * @param {module:engine/view/documentselection~DocumentSelection} data.oldSelection Old View selection which is\n * {@link module:engine/view/document~Document#selection}.\n * @param {module:engine/view/selection~Selection} data.newSelection New View selection which is converted DOM selection.\n * @param {Selection} data.domSelection Native DOM selection.\n */\n\n/**\n * Fired when selection stops changing.\n *\n * Introduced by {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n *\n * Note that because {@link module:engine/view/observer/selectionobserver~SelectionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/selectionobserver~SelectionObserver\n * @event module:engine/view/document~Document#event:selectionChangeDone\n * @param {Object} data\n * @param {module:engine/view/documentselection~DocumentSelection} data.oldSelection Old View selection which is\n * {@link module:engine/view/document~Document#selection}.\n * @param {module:engine/view/selection~Selection} data.newSelection New View selection which is converted DOM selection.\n * @param {Selection} data.domSelection Native DOM selection.\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/focusobserver\n */\n\n/* globals setTimeout, clearTimeout */\n\nimport DomEventObserver from './domeventobserver';\n\n/**\n * {@link module:engine/view/document~Document#event:focus Focus}\n * and {@link module:engine/view/document~Document#event:blur blur} events observer.\n * Focus observer handle also {@link module:engine/view/rooteditableelement~RootEditableElement#isFocused isFocused} property of the\n * {@link module:engine/view/rooteditableelement~RootEditableElement root elements}.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/domeventobserver~DomEventObserver\n */\nexport default class FocusObserver extends DomEventObserver {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.domEventType = [ 'focus', 'blur' ];\n\t\tthis.useCapture = true;\n\t\tconst document = this.document;\n\n\t\tdocument.on( 'focus', () => {\n\t\t\tdocument.isFocused = true;\n\n\t\t\t// Unfortunately native `selectionchange` event is fired asynchronously.\n\t\t\t// We need to wait until `SelectionObserver` handle the event and then render. Otherwise rendering will\n\t\t\t// overwrite new DOM selection with selection from the view.\n\t\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/795 for more details.\n\t\t\t// Long timeout is needed to solve #676 and https://github.com/ckeditor/ckeditor5-engine/issues/1157 issues.\n\t\t\tthis._renderTimeoutId = setTimeout( () => view.forceRender(), 50 );\n\t\t} );\n\n\t\tdocument.on( 'blur', ( evt, data ) => {\n\t\t\tconst selectedEditable = document.selection.editableElement;\n\n\t\t\tif ( selectedEditable === null || selectedEditable === data.target ) {\n\t\t\t\tdocument.isFocused = false;\n\n\t\t\t\t// Re-render the document to update view elements.\n\t\t\t\tview.forceRender();\n\t\t\t}\n\t\t} );\n\n\t\t/**\n\t\t * Identifier of the timeout currently used by focus listener to delay rendering execution.\n\t\t *\n\t\t * @private\n\t\t * @member {Number} #_renderTimeoutId\n\t\t */\n\t}\n\n\tonDomEvent( domEvent ) {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tif ( this._renderTimeoutId ) {\n\t\t\tclearTimeout( this._renderTimeoutId );\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n}\n\n/**\n * Fired when one of the editables gets focus.\n *\n * Introduced by {@link module:engine/view/observer/focusobserver~FocusObserver}.\n *\n * Note that because {@link module:engine/view/observer/focusobserver~FocusObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/focusobserver~FocusObserver\n * @event module:engine/view/document~Document#event:focus\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n\n/**\n * Fired when one of the editables loses focus.\n *\n * Introduced by {@link module:engine/view/observer/focusobserver~FocusObserver}.\n *\n * Note that because {@link module:engine/view/observer/focusobserver~FocusObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/focusobserver~FocusObserver\n * @event module:engine/view/document~Document#event:blur\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/compositionobserver\n */\n\nimport DomEventObserver from './domeventobserver';\n\n/**\n * {@link module:engine/view/document~Document#event:compositionstart Compositionstart},\n * {@link module:engine/view/document~Document#event:compositionupdate compositionupdate} and\n * {@link module:engine/view/document~Document#event:compositionend compositionend} events observer.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/domeventobserver~DomEventObserver\n */\nexport default class CompositionObserver extends DomEventObserver {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.domEventType = [ 'compositionstart', 'compositionupdate', 'compositionend' ];\n\t\tconst document = this.document;\n\n\t\tdocument.on( 'compositionstart', () => {\n\t\t\tdocument.isComposing = true;\n\t\t} );\n\n\t\tdocument.on( 'compositionend', () => {\n\t\t\tdocument.isComposing = false;\n\t\t} );\n\t}\n\n\tonDomEvent( domEvent ) {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n}\n\n/**\n * Fired when composition starts inside one of the editables.\n *\n * Introduced by {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * Note that because {@link module:engine/view/observer/compositionobserver~CompositionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/compositionobserver~CompositionObserver\n * @event module:engine/view/document~Document#event:compositionstart\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n\n/**\n * Fired when composition is updated inside one of the editables.\n *\n * Introduced by {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * Note that because {@link module:engine/view/observer/compositionobserver~CompositionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/compositionobserver~CompositionObserver\n * @event module:engine/view/document~Document#event:compositionupdate\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n\n/**\n * Fired when composition ends inside one of the editables.\n *\n * Introduced by {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * Note that because {@link module:engine/view/observer/compositionobserver~CompositionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/compositionobserver~CompositionObserver\n * @event module:engine/view/document~Document#event:compositionend\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/view/observer/inputobserver\n */\n\nimport DomEventObserver from './domeventobserver';\n\n/**\n * Observer for events connected with data input.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/domeventobserver~DomEventObserver\n */\nexport default class InputObserver extends DomEventObserver {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.domEventType = [ 'beforeinput' ];\n\t}\n\n\tonDomEvent( domEvent ) {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n}\n\n/**\n * Fired before browser inputs (or deletes) some data.\n *\n * This event is available only on browsers which support DOM `beforeinput` event.\n *\n * Introduced by {@link module:engine/view/observer/inputobserver~InputObserver}.\n *\n * Note that because {@link module:engine/view/observer/inputobserver~InputObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/inputobserver~InputObserver\n * @event module:engine/view/document~Document#event:beforeinput\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/elementreplacer\n */\n\n/**\n * Utility class allowing to hide existing HTML elements or replace them with given ones in a way that doesn't remove\n * the original elements from the DOM.\n */\nexport default class ElementReplacer {\n\tconstructor() {\n\t\t/**\n\t\t * The elements replaced by {@link #replace} and their replacements.\n\t\t *\n\t\t * @private\n\t\t * @member {Array.}\n\t\t */\n\t\tthis._replacedElements = [];\n\t}\n\n\t/**\n\t * Hides the `element` and, if specified, inserts the the given element next to it.\n\t *\n\t * The effect of this method can be reverted by {@link #restore}.\n\t *\n\t * @param {HTMLElement} element The element to replace.\n\t * @param {HTMLElement} [newElement] The replacement element. If not passed, then the `element` will just be hidden.\n\t */\n\treplace( element, newElement ) {\n\t\tthis._replacedElements.push( { element, newElement } );\n\n\t\telement.style.display = 'none';\n\n\t\tif ( newElement ) {\n\t\t\telement.parentNode.insertBefore( newElement, element.nextSibling );\n\t\t}\n\t}\n\n\t/**\n\t * Restores what {@link #replace} did.\n\t */\n\trestore() {\n\t\tthis._replacedElements.forEach( ( { element, newElement } ) => {\n\t\t\telement.style.display = '';\n\n\t\t\tif ( newElement ) {\n\t\t\t\tnewElement.remove();\n\t\t\t}\n\t\t} );\n\n\t\tthis._replacedElements = [];\n\t}\n}\n","import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/isrange\n */\n\n/**\n * Checks if the object is a native DOM Range.\n *\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isRange( obj ) {\n\treturn Object.prototype.toString.apply( obj ) == '[object Range]';\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/getborderwidths\n */\n\n/**\n * Returns an object containing CSS border widths of a specified HTML element.\n *\n * @param {HTMLElement} element An element which has CSS borders.\n * @returns {Object} An object containing `top`, `left`, `right` and `bottom` properties\n * with numerical values of the `border-[top,left,right,bottom]-width` CSS styles.\n */\nexport default function getBorderWidths( element ) {\n\t// Call getComputedStyle on the window the element document belongs to.\n\tconst style = element.ownerDocument.defaultView.getComputedStyle( element );\n\n\treturn {\n\t\ttop: parseInt( style.borderTopWidth, 10 ),\n\t\tright: parseInt( style.borderRightWidth, 10 ),\n\t\tbottom: parseInt( style.borderBottomWidth, 10 ),\n\t\tleft: parseInt( style.borderLeftWidth, 10 )\n\t};\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/rect\n */\n\nimport isRange from './isrange';\nimport isWindow from './iswindow';\nimport getBorderWidths from './getborderwidths';\nimport isText from './istext';\nimport { isElement } from 'lodash-es';\n\nconst rectProperties = [ 'top', 'right', 'bottom', 'left', 'width', 'height' ];\n\n/**\n * A helper class representing a `ClientRect` object, e.g. value returned by\n * the native `object.getBoundingClientRect()` method. Provides a set of methods\n * to manipulate the rect and compare it against other rect instances.\n */\nexport default class Rect {\n\t/**\n\t * Creates an instance of rect.\n\t *\n\t *\t\t// Rect of an HTMLElement.\n\t *\t\tconst rectA = new Rect( document.body );\n\t *\n\t *\t\t// Rect of a DOM Range.\n\t *\t\tconst rectB = new Rect( document.getSelection().getRangeAt( 0 ) );\n\t *\n\t *\t\t// Rect of a window (web browser viewport).\n\t *\t\tconst rectC = new Rect( window );\n\t *\n\t *\t\t// Rect out of an object.\n\t *\t\tconst rectD = new Rect( { top: 0, right: 10, bottom: 10, left: 0, width: 10, height: 10 } );\n\t *\n\t *\t\t// Rect out of another Rect instance.\n\t *\t\tconst rectE = new Rect( rectD );\n\t *\n\t *\t\t// Rect out of a ClientRect.\n\t *\t\tconst rectF = new Rect( document.body.getClientRects().item( 0 ) );\n\t *\n\t * **Note**: By default a rect of an HTML element includes its CSS borders and scrollbars (if any)\n\t * ant the rect of a `window` includes scrollbars too. Use {@link #excludeScrollbarsAndBorders}\n\t * to get the inner part of the rect.\n\t *\n\t * @param {HTMLElement|Range|Window|ClientRect|module:utils/dom/rect~Rect|Object} source A source object to create the rect.\n\t */\n\tconstructor( source ) {\n\t\tconst isSourceRange = isRange( source );\n\n\t\t/**\n\t\t * The object this rect is for.\n\t\t *\n\t\t * @protected\n\t\t * @readonly\n\t\t * @member {HTMLElement|Range|ClientRect|module:utils/dom/rect~Rect|Object} #_source\n\t\t */\n\t\tObject.defineProperty( this, '_source', {\n\t\t\t// If the source is a Rect instance, copy it's #_source.\n\t\t\tvalue: source._source || source,\n\t\t\twritable: true,\n\t\t\tenumerable: false\n\t\t} );\n\n\t\tif ( isElement( source ) || isSourceRange ) {\n\t\t\t// The `Rect` class depends on `getBoundingClientRect` and `getClientRects` DOM methods. If the source\n\t\t\t// of a rect in an HTML element or a DOM range but it does not belong to any rendered DOM tree, these methods\n\t\t\t// will fail to obtain the geometry and the rect instance makes little sense to the features using it.\n\t\t\t// To get rid of this warning make sure the source passed to the constructor is a descendant of `window.document.body`.\n\t\t\t// @if CK_DEBUG // const sourceNode = isSourceRange ? source.startContainer : source;\n\t\t\t// @if CK_DEBUG // if ( !sourceNode.ownerDocument || !sourceNode.ownerDocument.body.contains( sourceNode ) ) {\n\t\t\t// @if CK_DEBUG // \tconsole.warn(\n\t\t\t// @if CK_DEBUG // \t\t'rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',\n\t\t\t// @if CK_DEBUG // \t\t{ source } );\n\t\t\t// @if CK_DEBUG // }\n\n\t\t\tif ( isSourceRange ) {\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects( source );\n\t\t\t\tcopyRectProperties( this, Rect.getBoundingRect( rangeRects ) );\n\t\t\t} else {\n\t\t\t\tcopyRectProperties( this, source.getBoundingClientRect() );\n\t\t\t}\n\t\t} else if ( isWindow( source ) ) {\n\t\t\tconst { innerWidth, innerHeight } = source;\n\n\t\t\tcopyRectProperties( this, {\n\t\t\t\ttop: 0,\n\t\t\t\tright: innerWidth,\n\t\t\t\tbottom: innerHeight,\n\t\t\t\tleft: 0,\n\t\t\t\twidth: innerWidth,\n\t\t\t\theight: innerHeight\n\t\t\t} );\n\t\t} else {\n\t\t\tcopyRectProperties( this, source );\n\t\t}\n\n\t\t/**\n\t\t * The \"top\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #top\n\t\t */\n\n\t\t/**\n\t\t * The \"right\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #right\n\t\t */\n\n\t\t/**\n\t\t * The \"bottom\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #bottom\n\t\t */\n\n\t\t/**\n\t\t * The \"left\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #left\n\t\t */\n\n\t\t/**\n\t\t * The \"width\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #width\n\t\t */\n\n\t\t/**\n\t\t * The \"height\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #height\n\t\t */\n\t}\n\n\t/**\n\t * Returns a clone of the rect.\n\t *\n\t * @returns {module:utils/dom/rect~Rect} A cloned rect.\n\t */\n\tclone() {\n\t\treturn new Rect( this );\n\t}\n\n\t/**\n\t * Moves the rect so that its upper–left corner lands in desired `[ x, y ]` location.\n\t *\n\t * @param {Number} x Desired horizontal location.\n\t * @param {Number} y Desired vertical location.\n\t * @returns {module:utils/dom/rect~Rect} A rect which has been moved.\n\t */\n\tmoveTo( x, y ) {\n\t\tthis.top = y;\n\t\tthis.right = x + this.width;\n\t\tthis.bottom = y + this.height;\n\t\tthis.left = x;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Moves the rect in–place by a dedicated offset.\n\t *\n\t * @param {Number} x A horizontal offset.\n\t * @param {Number} y A vertical offset\n\t * @returns {module:utils/dom/rect~Rect} A rect which has been moved.\n\t */\n\tmoveBy( x, y ) {\n\t\tthis.top += y;\n\t\tthis.right += x;\n\t\tthis.left += x;\n\t\tthis.bottom += y;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns a new rect a a result of intersection with another rect.\n\t *\n\t * @param {module:utils/dom/rect~Rect} anotherRect\n\t * @returns {module:utils/dom/rect~Rect}\n\t */\n\tgetIntersection( anotherRect ) {\n\t\tconst rect = {\n\t\t\ttop: Math.max( this.top, anotherRect.top ),\n\t\t\tright: Math.min( this.right, anotherRect.right ),\n\t\t\tbottom: Math.min( this.bottom, anotherRect.bottom ),\n\t\t\tleft: Math.max( this.left, anotherRect.left )\n\t\t};\n\n\t\trect.width = rect.right - rect.left;\n\t\trect.height = rect.bottom - rect.top;\n\n\t\tif ( rect.width < 0 || rect.height < 0 ) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn new Rect( rect );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the area of intersection with another rect.\n\t *\n\t * @param {module:utils/dom/rect~Rect} anotherRect [description]\n\t * @returns {Number} Area of intersection.\n\t */\n\tgetIntersectionArea( anotherRect ) {\n\t\tconst rect = this.getIntersection( anotherRect );\n\n\t\tif ( rect ) {\n\t\t\treturn rect.getArea();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the area of the rect.\n\t *\n\t * @returns {Number}\n\t */\n\tgetArea() {\n\t\treturn this.width * this.height;\n\t}\n\n\t/**\n\t * Returns a new rect, a part of the original rect, which is actually visible to the user,\n\t * e.g. an original rect cropped by parent element rects which have `overflow` set in CSS\n\t * other than `\"visible\"`.\n\t *\n\t * If there's no such visible rect, which is when the rect is limited by one or many of\n\t * the ancestors, `null` is returned.\n\t *\n\t * @returns {module:utils/dom/rect~Rect|null} A visible rect instance or `null`, if there's none.\n\t */\n\tgetVisible() {\n\t\tconst source = this._source;\n\t\tlet visibleRect = this.clone();\n\n\t\t// There's no ancestor to crop with the overflow.\n\t\tif ( !isBody( source ) ) {\n\t\t\tlet parent = source.parentNode || source.commonAncestorContainer;\n\n\t\t\t// Check the ancestors all the way up to the .\n\t\t\twhile ( parent && !isBody( parent ) ) {\n\t\t\t\tconst parentRect = new Rect( parent );\n\t\t\t\tconst intersectionRect = visibleRect.getIntersection( parentRect );\n\n\t\t\t\tif ( intersectionRect ) {\n\t\t\t\t\tif ( intersectionRect.getArea() < visibleRect.getArea() ) {\n\t\t\t\t\t\t// Reduce the visible rect to the intersection.\n\t\t\t\t\t\tvisibleRect = intersectionRect;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// There's no intersection, the rect is completely invisible.\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tparent = parent.parentNode;\n\t\t\t}\n\t\t}\n\n\t\treturn visibleRect;\n\t}\n\n\t/**\n\t * Checks if all property values ({@link #top}, {@link #left}, {@link #right},\n\t * {@link #bottom}, {@link #width} and {@link #height}) are the equal in both rect\n\t * instances.\n\t *\n\t * @param {module:utils/dom/rect~Rect} rect A rect instance to compare with.\n\t * @returns {Boolean} `true` when Rects are equal. `false` otherwise.\n\t */\n\tisEqual( anotherRect ) {\n\t\tfor ( const prop of rectProperties ) {\n\t\t\tif ( this[ prop ] !== anotherRect[ prop ] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether a rect fully contains another rect instance.\n\t *\n\t * @param {module:utils/dom/rect~Rect} anotherRect\n\t * @returns {Boolean} `true` if contains, `false` otherwise.\n\t */\n\tcontains( anotherRect ) {\n\t\tconst intersectRect = this.getIntersection( anotherRect );\n\n\t\treturn !!( intersectRect && intersectRect.isEqual( anotherRect ) );\n\t}\n\n\t/**\n\t * Excludes scrollbars and CSS borders from the rect.\n\t *\n\t * * Borders are removed when {@link #_source} is an HTML element.\n\t * * Scrollbars are excluded from HTML elements and the `window`.\n\t *\n\t * @returns {module:utils/dom/rect~Rect} A rect which has been updated.\n\t */\n\texcludeScrollbarsAndBorders() {\n\t\tconst source = this._source;\n\t\tlet scrollBarWidth, scrollBarHeight, direction;\n\n\t\tif ( isWindow( source ) ) {\n\t\t\tscrollBarWidth = source.innerWidth - source.document.documentElement.clientWidth;\n\t\t\tscrollBarHeight = source.innerHeight - source.document.documentElement.clientHeight;\n\t\t\tdirection = source.getComputedStyle( source.document.documentElement ).direction;\n\t\t} else {\n\t\t\tconst borderWidths = getBorderWidths( this._source );\n\n\t\t\tscrollBarWidth = source.offsetWidth - source.clientWidth - borderWidths.left - borderWidths.right;\n\t\t\tscrollBarHeight = source.offsetHeight - source.clientHeight - borderWidths.top - borderWidths.bottom;\n\t\t\tdirection = source.ownerDocument.defaultView.getComputedStyle( source ).direction;\n\n\t\t\tthis.left += borderWidths.left;\n\t\t\tthis.top += borderWidths.top;\n\t\t\tthis.right -= borderWidths.right;\n\t\t\tthis.bottom -= borderWidths.bottom;\n\t\t\tthis.width = this.right - this.left;\n\t\t\tthis.height = this.bottom - this.top;\n\t\t}\n\n\t\tthis.width -= scrollBarWidth;\n\n\t\tif ( direction === 'ltr' ) {\n\t\t\tthis.right -= scrollBarWidth;\n\t\t} else {\n\t\t\tthis.left += scrollBarWidth;\n\t\t}\n\n\t\tthis.height -= scrollBarHeight;\n\t\tthis.bottom -= scrollBarHeight;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns an array of rects of the given native DOM Range.\n\t *\n\t * @param {Range} range A native DOM range.\n\t * @returns {Array.} DOM Range rects.\n\t */\n\tstatic getDomRangeRects( range ) {\n\t\tconst rects = [];\n\t\t// Safari does not iterate over ClientRectList using for...of loop.\n\t\tconst clientRects = Array.from( range.getClientRects() );\n\n\t\tif ( clientRects.length ) {\n\t\t\tfor ( const rect of clientRects ) {\n\t\t\t\trects.push( new Rect( rect ) );\n\t\t\t}\n\t\t}\n\t\t// If there's no client rects for the Range, use parent container's bounding rect\n\t\t// instead and adjust rect's width to simulate the actual geometry of such range.\n\t\t// https://github.com/ckeditor/ckeditor5-utils/issues/153\n\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/317\n\t\telse {\n\t\t\tlet startContainer = range.startContainer;\n\n\t\t\tif ( isText( startContainer ) ) {\n\t\t\t\tstartContainer = startContainer.parentNode;\n\t\t\t}\n\n\t\t\tconst rect = new Rect( startContainer.getBoundingClientRect() );\n\t\t\trect.right = rect.left;\n\t\t\trect.width = 0;\n\n\t\t\trects.push( rect );\n\t\t}\n\n\t\treturn rects;\n\t}\n\n\t/**\n\t * Returns a bounding rectangle that contains all the given `rects`.\n\t *\n\t * @param {Iterable.} rects A list of rectangles that should be contained in the result rectangle.\n\t * @returns {module:utils/dom/rect~Rect|null} Bounding rectangle or `null` if no `rects` were given.\n\t */\n\tstatic getBoundingRect( rects ) {\n\t\tconst boundingRectData = {\n\t\t\tleft: Number.POSITIVE_INFINITY,\n\t\t\ttop: Number.POSITIVE_INFINITY,\n\t\t\tright: Number.NEGATIVE_INFINITY,\n\t\t\tbottom: Number.NEGATIVE_INFINITY\n\t\t};\n\t\tlet rectangleCount = 0;\n\n\t\tfor ( const rect of rects ) {\n\t\t\trectangleCount++;\n\n\t\t\tboundingRectData.left = Math.min( boundingRectData.left, rect.left );\n\t\t\tboundingRectData.top = Math.min( boundingRectData.top, rect.top );\n\t\t\tboundingRectData.right = Math.max( boundingRectData.right, rect.right );\n\t\t\tboundingRectData.bottom = Math.max( boundingRectData.bottom, rect.bottom );\n\t\t}\n\n\t\tif ( rectangleCount == 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tboundingRectData.width = boundingRectData.right - boundingRectData.left;\n\t\tboundingRectData.height = boundingRectData.bottom - boundingRectData.top;\n\n\t\treturn new Rect( boundingRectData );\n\t}\n}\n\n// Acquires all the rect properties from the passed source.\n//\n// @private\n// @param {module:utils/dom/rect~Rect} rect\n// @param {ClientRect|module:utils/dom/rect~Rect|Object} source\nfunction copyRectProperties( rect, source ) {\n\tfor ( const p of rectProperties ) {\n\t\trect[ p ] = source[ p ];\n\t}\n}\n\n// Checks if provided object is a HTML element.\n//\n// @private\n// @param {HTMLElement|Range} elementOrRange\n// @returns {Boolean}\nfunction isBody( elementOrRange ) {\n\tif ( !isElement( elementOrRange ) ) {\n\t\treturn false;\n\t}\n\n\treturn elementOrRange === elementOrRange.ownerDocument.body;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/resizeobserver\n */\n\n/* globals setTimeout, clearTimeout */\n\nimport mix from '../mix';\nimport global from './global';\nimport Rect from './rect';\nimport DomEmitterMixin from './emittermixin';\n\nconst RESIZE_CHECK_INTERVAL = 100;\n\n/**\n * A helper class which instances allow performing custom actions when native DOM elements are resized.\n *\n *\t\tconst editableElement = editor.editing.view.getDomRoot();\n *\n *\t\tconst observer = new ResizeObserver( editableElement, entry => {\n *\t\t\tconsole.log( 'The editable element has been resized in DOM.' );\n *\t\t\tconsole.log( entry.target ); // -> editableElement\n *\t\t\tconsole.log( entry.contentRect.width ); // -> e.g. '423px'\n *\t\t} );\n *\n * By default, it uses the [native DOM resize observer](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)\n * under the hood and in browsers that do not support the native API yet, a polyfilled observer is\n * used instead.\n */\nexport default class ResizeObserver {\n\t/**\n\t * Creates an instance of the `ResizeObserver` class.\n\t *\n\t * @param {HTMLElement} element A DOM element that is to be observed for resizing. Note that\n\t * the element must be visible (i.e. not detached from DOM) for the observer to work.\n\t * @param {Function} callback A function called when the observed element was resized. It passes\n\t * the [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)\n\t * object with information about the resize event.\n\t */\n\tconstructor( element, callback ) {\n\t\t// **Note**: For the maximum performance, this class ensures only a single instance of the native\n\t\t// (or polyfilled) observer is used no matter how many instances of this class were created.\n\t\tif ( !ResizeObserver._observerInstance ) {\n\t\t\tResizeObserver._createObserver();\n\t\t}\n\n\t\t/**\n\t\t * The element observer by this observer.\n\t\t *\n\t\t * @readonly\n\t\t * @private\n\t\t * @member {HTMLElement}\n\t\t */\n\t\tthis._element = element;\n\n\t\t/**\n\t\t * The callback executed each time {@link #_element} is resized.\n\t\t *\n\t\t * @readonly\n\t\t * @private\n\t\t * @member {Function}\n\t\t */\n\t\tthis._callback = callback;\n\n\t\tResizeObserver._addElementCallback( element, callback );\n\t\tResizeObserver._observerInstance.observe( element );\n\t}\n\n\t/**\n\t * Destroys the observer which disables the `callback` passed to the {@link #constructor}.\n\t */\n\tdestroy() {\n\t\tResizeObserver._deleteElementCallback( this._element, this._callback );\n\t}\n\n\t/**\n\t * Registers a new resize callback for the DOM element.\n\t *\n\t * @private\n\t * @static\n\t * @param {HTMLElement} element\n\t * @param {Function} callback\n\t */\n\tstatic _addElementCallback( element, callback ) {\n\t\tif ( !ResizeObserver._elementCallbacks ) {\n\t\t\tResizeObserver._elementCallbacks = new Map();\n\t\t}\n\n\t\tlet callbacks = ResizeObserver._elementCallbacks.get( element );\n\n\t\tif ( !callbacks ) {\n\t\t\tcallbacks = new Set();\n\t\t\tResizeObserver._elementCallbacks.set( element, callbacks );\n\t\t}\n\n\t\tcallbacks.add( callback );\n\t}\n\n\t/**\n\t * Removes a resize callback from the DOM element. If no callbacks are left\n\t * for the element, it removes the element from the native observer.\n\t *\n\t * @private\n\t * @static\n\t * @param {HTMLElement} element\n\t * @param {Function} callback\n\t */\n\tstatic _deleteElementCallback( element, callback ) {\n\t\tconst callbacks = ResizeObserver._getElementCallbacks( element );\n\n\t\t// Remove the element callback. Check if exist first in case someone\n\t\t// called destroy() twice.\n\t\tif ( callbacks ) {\n\t\t\tcallbacks.delete( callback );\n\n\t\t\t// If no callbacks left for the element, also remove the element.\n\t\t\tif ( !callbacks.size ) {\n\t\t\t\tResizeObserver._elementCallbacks.delete( element );\n\t\t\t\tResizeObserver._observerInstance.unobserve( element );\n\t\t\t}\n\t\t}\n\n\t\tif ( ResizeObserver._elementCallbacks && !ResizeObserver._elementCallbacks.size ) {\n\t\t\tResizeObserver._observerInstance = null;\n\t\t\tResizeObserver._elementCallbacks = null;\n\t\t}\n\t}\n\n\t/**\n\t * Returns are registered resize callbacks for the DOM element.\n\t *\n\t * @private\n\t * @static\n\t * @param {HTMLElement} element\n\t * @returns {Set.|null}\n\t */\n\tstatic _getElementCallbacks( element ) {\n\t\tif ( !ResizeObserver._elementCallbacks ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn ResizeObserver._elementCallbacks.get( element );\n\t}\n\n\t/**\n\t * Creates the single native observer shared across all `ResizeObserver` instances.\n\t * If the browser does not support the native API, it creates a polyfill.\n\t *\n\t * @private\n\t * @static\n\t */\n\tstatic _createObserver() {\n\t\tlet ObserverConstructor;\n\n\t\t// TODO: One day, the `ResizeObserver` API will be supported in all modern web browsers.\n\t\t// When it happens, this module will no longer make sense and should be removed and\n\t\t// the native implementation should be used across the project to save bytes.\n\t\t// Check out https://caniuse.com/#feat=resizeobserver.\n\t\tif ( typeof global.window.ResizeObserver === 'function' ) {\n\t\t\tObserverConstructor = global.window.ResizeObserver;\n\t\t} else {\n\t\t\tObserverConstructor = ResizeObserverPolyfill;\n\t\t}\n\n\t\tResizeObserver._observerInstance = new ObserverConstructor( entries => {\n\t\t\tfor ( const entry of entries ) {\n\t\t\t\tconst callbacks = ResizeObserver._getElementCallbacks( entry.target );\n\n\t\t\t\tif ( callbacks ) {\n\t\t\t\t\tfor ( const callback of callbacks ) {\n\t\t\t\t\t\tcallback( entry );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * The single native observer instance (or polyfill in browsers that do not support the API)\n * shared across all {@link module:utils/dom/resizeobserver~ResizeObserver} instances.\n *\n * @static\n * @protected\n * @readonly\n * @property {Object|null} module:utils/dom/resizeobserver~ResizeObserver#_observerInstance\n */\nResizeObserver._observerInstance = null;\n\n/**\n * A mapping of native DOM elements and their callbacks shared across all\n * {@link module:utils/dom/resizeobserver~ResizeObserver} instances.\n *\n * @static\n * @private\n * @readonly\n * @property {Map.|null} module:utils/dom/resizeobserver~ResizeObserver#_elementCallbacks\n */\nResizeObserver._elementCallbacks = null;\n\n/**\n * A polyfill class for the native [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver).\n *\n * @private\n * @mixes module:utils/domemittermixin~DomEmitterMixin\n */\nclass ResizeObserverPolyfill {\n\t/**\n\t * Creates an instance of the {@link module:utils/dom/resizeobserver~ResizeObserverPolyfill} class.\n\t *\n\t * It synchronously reacts to resize of the window to check if observed elements' geometry changed.\n\t *\n\t * Additionally, the polyfilled observer uses a timeout to check if observed elements' geometry has changed\n\t * in some other way (dynamic layouts, scrollbars showing up, etc.), so its response can also be asynchronous.\n\t *\n\t * @param {Function} callback A function called when any observed element was resized. Refer to the\n\t * native [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver) API to\n\t * learn more.\n\t */\n\tconstructor( callback ) {\n\t\t/**\n\t\t * A function called when any observed {@link #_elements element} was resized.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Function}\n\t\t */\n\t\tthis._callback = callback;\n\n\t\t/**\n\t\t * DOM elements currently observed by the observer instance.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Set}\n\t\t */\n\t\tthis._elements = new Set();\n\n\t\t/**\n\t\t * Cached DOM {@link #_elements elements} bounding rects to compare to upon the next check.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Map.}\n\t\t */\n\t\tthis._previousRects = new Map();\n\n\t\t/**\n\t\t * An UID of the current timeout upon which the observed elements rects\n\t\t * will be compared to the {@link #_previousRects previous rects} from the past.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Map.}\n\t\t */\n\t\tthis._periodicCheckTimeout = null;\n\t}\n\n\t/**\n\t * Starts observing a DOM element.\n\t *\n\t * Learn more in the\n\t * [native method documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe).\n\t *\n\t * @param {HTMLElement} element\n\t */\n\tobserve( element ) {\n\t\tthis._elements.add( element );\n\n\t\tthis._checkElementRectsAndExecuteCallback();\n\n\t\tif ( this._elements.size === 1 ) {\n\t\t\tthis._startPeriodicCheck();\n\t\t}\n\t}\n\n\t/**\n\t * Stops observing a DOM element.\n\t *\n\t * Learn more in the\n\t * [native method documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/unobserve).\n\t *\n\t * @param {HTMLElement} element\n\t */\n\tunobserve( element ) {\n\t\tthis._elements.delete( element );\n\t\tthis._previousRects.delete( element );\n\n\t\tif ( !this._elements.size ) {\n\t\t\tthis._stopPeriodicCheck();\n\t\t}\n\t}\n\n\t/**\n\t * When called, the observer calls the {@link #_callback resize callback} for all observed\n\t * {@link #_elements elements} but also starts checking periodically for changes in the elements' geometry.\n\t * If some are detected, {@link #_callback resize callback} is called for relevant elements that were resized.\n\t *\n\t * @protected\n\t */\n\t_startPeriodicCheck() {\n\t\tconst periodicCheck = () => {\n\t\t\tthis._checkElementRectsAndExecuteCallback();\n\t\t\tthis._periodicCheckTimeout = setTimeout( periodicCheck, RESIZE_CHECK_INTERVAL );\n\t\t};\n\n\t\tthis.listenTo( global.window, 'resize', () => {\n\t\t\tthis._checkElementRectsAndExecuteCallback();\n\t\t} );\n\n\t\tthis._periodicCheckTimeout = setTimeout( periodicCheck, RESIZE_CHECK_INTERVAL );\n\t}\n\n\t/**\n\t * Stops checking for changes in all observed {@link #_elements elements} geometry.\n\t *\n\t * @protected\n\t */\n\t_stopPeriodicCheck() {\n\t\tclearTimeout( this._periodicCheckTimeout );\n\t\tthis.stopListening();\n\t\tthis._previousRects.clear();\n\t}\n\n\t/**\n\t * Checks if the geometry of any of the {@link #_elements element} has changed. If so, executes\n\t * the {@link #_callback resize callback} with element geometry data.\n\t *\n\t * @protected\n\t */\n\t_checkElementRectsAndExecuteCallback() {\n\t\tconst entries = [];\n\n\t\tfor ( const element of this._elements ) {\n\t\t\tif ( this._hasRectChanged( element ) ) {\n\t\t\t\tentries.push( {\n\t\t\t\t\ttarget: element,\n\t\t\t\t\tcontentRect: this._previousRects.get( element )\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tif ( entries.length ) {\n\t\t\tthis._callback( entries );\n\t\t}\n\t}\n\n\t/**\n\t * Compares the DOM element geometry to the {@link #_previousRects cached geometry} from the past.\n\t * Returns `true` if geometry has changed or the element is checked for the first time.\n\t *\n\t * @protected\n\t * @param {HTMLElement} element\n\t * @returns {Boolean}\n\t */\n\t_hasRectChanged( element ) {\n\t\tif ( !element.ownerDocument.body.contains( element ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst currentRect = new Rect( element );\n\t\tconst previousRect = this._previousRects.get( element );\n\n\t\t// The first check should always yield true despite no Previous rect to compare to.\n\t\t// The native ResizeObserver does that and... that makes sense. Sort of.\n\t\tconst hasChanged = !previousRect || !previousRect.isEqual( currentRect );\n\n\t\tthis._previousRects.set( element, currentRect );\n\n\t\treturn hasChanged;\n\t}\n}\n\nmix( ResizeObserverPolyfill, DomEmitterMixin );\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/tounit\n */\n\n/**\n * Returns a helper function, which adds a desired trailing\n * `unit` to the passed value.\n *\n * @param {String} unit An unit like \"px\" or \"em\".\n * @returns {module:utils/dom/tounit~helper}\n */\nexport default function toUnit( unit ) {\n\t/**\n\t * A function, which adds a pre–defined trailing `unit`\n\t * to the passed `value`.\n\t *\n\t * @function helper\n \t * @param {*} value A value to be given the unit.\n \t * @returns {String} A value with the trailing unit.\n\t */\n\treturn value => value + unit;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/first\n */\n\n/**\n * Returns first item of the given `iterable`.\n *\n * @param {Iterable.<*>} iterable\n * @returns {*}\n */\nexport default function first( iterable ) {\n\tconst iteratorItem = iterable.next();\n\n\tif ( iteratorItem.done ) {\n\t\treturn null;\n\t}\n\n\treturn iteratorItem.value;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* global setTimeout, clearTimeout */\n\n/**\n * @module utils/focustracker\n */\n\nimport DomEmitterMixin from './dom/emittermixin';\nimport ObservableMixin from './observablemixin';\nimport CKEditorError from './ckeditorerror';\nimport mix from './mix';\n\n/**\n * Allows observing a group of `HTMLElement`s whether at least one of them is focused.\n *\n * Used by the {@link module:core/editor/editor~Editor} in order to track whether the focus is still within the application,\n * or were used outside of its UI.\n *\n * **Note** `focus` and `blur` listeners use event capturing, so it is only needed to register wrapper `HTMLElement`\n * which contain other `focusable` elements. But note that this wrapper element has to be focusable too\n * (have e.g. `tabindex=\"-1\"`).\n *\n * Check out the {@glink framework/guides/deep-dive/ui/focus-tracking \"Deep dive into focus tracking\" guide} to learn more.\n *\n * @mixes module:utils/dom/emittermixin~EmitterMixin\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class FocusTracker {\n\tconstructor() {\n\t\t/**\n\t\t * True when one of the registered elements is focused.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {Boolean} #isFocused\n\t\t */\n\t\tthis.set( 'isFocused', false );\n\n\t\t/**\n\t\t * The currently focused element.\n\t\t *\n\t\t * While {@link #isFocused `isFocused`} remains `true`, the focus can\n\t\t * move between different UI elements. This property tracks those\n\t\t * elements and tells which one is currently focused.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {HTMLElement|null} #focusedElement\n\t\t */\n\t\tthis.set( 'focusedElement', null );\n\n\t\t/**\n\t\t * List of registered elements.\n\t\t *\n\t\t * @private\n\t\t * @member {Set.}\n\t\t */\n\t\tthis._elements = new Set();\n\n\t\t/**\n\t\t * Event loop timeout.\n\t\t *\n\t\t * @private\n\t\t * @member {Number}\n\t\t */\n\t\tthis._nextEventLoopTimeout = null;\n\t}\n\n\t/**\n\t * Starts tracking the specified element.\n\t *\n\t * @param {HTMLElement} element\n\t */\n\tadd( element ) {\n\t\tif ( this._elements.has( element ) ) {\n\t\t\t/**\n\t\t\t * This element is already tracked by {@link module:utils/focustracker~FocusTracker}.\n\t\t\t *\n\t\t\t * @error focustracker-add-element-already-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'focustracker-add-element-already-exist', this );\n\t\t}\n\n\t\tthis.listenTo( element, 'focus', () => this._focus( element ), { useCapture: true } );\n\t\tthis.listenTo( element, 'blur', () => this._blur(), { useCapture: true } );\n\t\tthis._elements.add( element );\n\t}\n\n\t/**\n\t * Stops tracking the specified element and stops listening on this element.\n\t *\n\t * @param {HTMLElement} element\n\t */\n\tremove( element ) {\n\t\tif ( element === this.focusedElement ) {\n\t\t\tthis._blur( element );\n\t\t}\n\n\t\tif ( this._elements.has( element ) ) {\n\t\t\tthis.stopListening( element );\n\t\t\tthis._elements.delete( element );\n\t\t}\n\t}\n\n\t/**\n\t * Destroys the focus tracker by:\n\t * - Disabling all event listeners attached to tracked elements.\n\t * - Removing all tracked elements that were previously added.\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Stores currently focused element and set {#isFocused} as `true`.\n\t *\n\t * @private\n\t * @param {HTMLElement} element Element which has been focused.\n\t */\n\t_focus( element ) {\n\t\tclearTimeout( this._nextEventLoopTimeout );\n\n\t\tthis.focusedElement = element;\n\t\tthis.isFocused = true;\n\t}\n\n\t/**\n\t * Clears currently focused element and set {@link #isFocused} as `false`.\n\t * This method uses `setTimeout` to change order of fires `blur` and `focus` events.\n\t *\n\t * @private\n\t * @fires blur\n\t */\n\t_blur() {\n\t\tclearTimeout( this._nextEventLoopTimeout );\n\n\t\tthis._nextEventLoopTimeout = setTimeout( () => {\n\t\t\tthis.focusedElement = null;\n\t\t\tthis.isFocused = false;\n\t\t}, 0 );\n\t}\n\n\t/**\n\t * @event focus\n\t */\n\n\t/**\n\t * @event blur\n\t */\n}\n\nmix( FocusTracker, DomEmitterMixin );\nmix( FocusTracker, ObservableMixin );\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/keystrokehandler\n */\n\nimport DomEmitterMixin from './dom/emittermixin';\nimport { getCode, parseKeystroke } from './keyboard';\n\n/**\n * Keystroke handler allows registering callbacks for given keystrokes.\n *\n * The most frequent use of this class is through the {@link module:core/editor/editor~Editor#keystrokes `editor.keystrokes`}\n * property. It allows listening to keystrokes executed in the editing view:\n *\n *\t\teditor.keystrokes.set( 'Ctrl+A', ( keyEvtData, cancel ) => {\n *\t\t\tconsole.log( 'Ctrl+A has been pressed' );\n *\t\t\tcancel();\n *\t\t} );\n *\n * However, this utility class can be used in various part of the UI. For instance, a certain {@link module:ui/view~View}\n * can use it like this:\n *\n *\t\tclass MyView extends View {\n *\t\t\tconstructor() {\n *\t\t\t\tthis.keystrokes = new KeystrokeHandler();\n *\n * \t\t\t\tthis.keystrokes.set( 'tab', handleTabKey );\n *\t\t\t}\n *\n *\t\t\trender() {\n *\t\t\t\tsuper.render();\n *\n *\t\t\t\tthis.keystrokes.listenTo( this.element );\n *\t\t\t}\n *\t\t}\n *\n * That keystroke handler will listen to `keydown` events fired in this view's main element.\n *\n */\nexport default class KeystrokeHandler {\n\t/**\n\t * Creates an instance of the keystroke handler.\n\t */\n\tconstructor() {\n\t\t/**\n\t\t * Listener used to listen to events for easier keystroke handler destruction.\n\t\t *\n\t\t * @protected\n\t\t * @member {module:utils/dom/emittermixin~Emitter}\n\t\t */\n\t\tthis._listener = Object.create( DomEmitterMixin );\n\t}\n\n\t/**\n\t * Starts listening for `keydown` events from a given emitter.\n\t *\n\t * @param {module:utils/emittermixin~Emitter} emitter\n\t */\n\tlistenTo( emitter ) {\n\t\t// The #_listener works here as a kind of dispatcher. It groups the events coming from the same\n\t\t// keystroke so the listeners can be attached to them with different priorities.\n\t\t//\n\t\t// E.g. all the keystrokes with the `keyCode` of 42 coming from the `emitter` are propagated\n\t\t// as a `_keydown:42` event by the `_listener`. If there's a callback created by the `set`\n\t\t// method for this 42 keystroke, it listens to the `_listener#_keydown:42` event only and interacts\n\t\t// only with other listeners of this particular event, thus making it possible to prioritize\n\t\t// the listeners and safely cancel execution, when needed. Instead of duplicating the Emitter logic,\n\t\t// the KeystrokeHandler re–uses it to do its job.\n\t\tthis._listener.listenTo( emitter, 'keydown', ( evt, keyEvtData ) => {\n\t\t\tthis._listener.fire( '_keydown:' + getCode( keyEvtData ), keyEvtData );\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a handler for the specified keystroke.\n\t *\n\t * @param {String|Array.} keystroke Keystroke defined in a format accepted by\n\t * the {@link module:utils/keyboard~parseKeystroke} function.\n\t * @param {Function} callback A function called with the\n\t * {@link module:engine/view/observer/keyobserver~KeyEventData key event data} object and\n\t * a helper funcion to call both `preventDefault()` and `stopPropagation()` on the underlying event.\n\t * @param {Object} [options={}] Additional options.\n\t * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of the keystroke\n\t * callback. The higher the priority value the sooner the callback will be executed. Keystrokes having the same priority\n\t * are called in the order they were added.\n\t */\n\tset( keystroke, callback, options = {} ) {\n\t\tconst keyCode = parseKeystroke( keystroke );\n\t\tconst priority = options.priority;\n\n\t\t// Execute the passed callback on KeystrokeHandler#_keydown.\n\t\t// TODO: https://github.com/ckeditor/ckeditor5-utils/issues/144\n\t\tthis._listener.listenTo( this._listener, '_keydown:' + keyCode, ( evt, keyEvtData ) => {\n\t\t\tcallback( keyEvtData, () => {\n\t\t\t\t// Stop the event in the DOM: no listener in the web page\n\t\t\t\t// will be triggered by this event.\n\t\t\t\tkeyEvtData.preventDefault();\n\t\t\t\tkeyEvtData.stopPropagation();\n\n\t\t\t\t// Stop the event in the KeystrokeHandler: no more callbacks\n\t\t\t\t// will be executed for this keystroke.\n\t\t\t\tevt.stop();\n\t\t\t} );\n\n\t\t\t// Mark this keystroke as handled by the callback. See: #press.\n\t\t\tevt.return = true;\n\t\t}, { priority } );\n\t}\n\n\t/**\n\t * Triggers a keystroke handler for a specified key combination, if such a keystroke was {@link #set defined}.\n\t *\n\t * @param {module:engine/view/observer/keyobserver~KeyEventData} keyEvtData Key event data.\n\t * @returns {Boolean} Whether the keystroke was handled.\n\t */\n\tpress( keyEvtData ) {\n\t\treturn !!this._listener.fire( '_keydown:' + getCode( keyEvtData ), keyEvtData );\n\t}\n\n\t/**\n\t * Destroys the keystroke handler.\n\t */\n\tdestroy() {\n\t\tthis._listener.stopListening();\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/arrowkeysobserver\n */\n\nimport Observer from './observer';\nimport BubblingEventInfo from './bubblingeventinfo';\n\nimport { isArrowKeyCode } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Arrow keys observer introduces the {@link module:engine/view/document~Document#event:arrowKey `Document#arrowKey`} event.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class ArrowKeysObserver extends Observer {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.document.on( 'keydown', ( event, data ) => {\n\t\t\tif ( this.isEnabled && isArrowKeyCode( data.keyCode ) ) {\n\t\t\t\tconst eventInfo = new BubblingEventInfo( this.document, 'arrowKey', this.document.selection.getFirstRange() );\n\n\t\t\t\tthis.document.fire( eventInfo, data );\n\n\t\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\t\tevent.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve() {}\n}\n\n/**\n * Event fired when the user presses an arrow keys.\n *\n * Introduced by {@link module:engine/view/observer/arrowkeysobserver~ArrowKeysObserver}.\n *\n * Note that because {@link module:engine/view/observer/arrowkeysobserver~ArrowKeysObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @event module:engine/view/document~Document#event:arrowKey\n * @param {module:engine/view/observer/domeventdata~DomEventData} data\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/scroll\n */\n\nimport isRange from './isrange';\nimport Rect from './rect';\nimport isText from './istext';\n\nconst utils = {};\n\n/**\n * Makes any page `HTMLElement` or `Range` (`target`) visible inside the browser viewport.\n * This helper will scroll all `target` ancestors and the web browser viewport to reveal the target to\n * the user. If the `target` is already visible, nothing will happen.\n *\n * @param {HTMLElement|Range} options.target A target, which supposed to become visible to the user.\n * @param {Number} [options.viewportOffset] An offset from the edge of the viewport (in pixels)\n * the `target` will be moved by when the viewport is scrolled. It enhances the user experience\n * by keeping the `target` some distance from the edge of the viewport and thus making it easier to\n * read or edit by the user.\n */\nexport function scrollViewportToShowTarget( { target, viewportOffset = 0 } ) {\n\tconst targetWindow = getWindow( target );\n\tlet currentWindow = targetWindow;\n\tlet currentFrame = null;\n\n\t// Iterate over all windows, starting from target's parent window up to window#top.\n\twhile ( currentWindow ) {\n\t\tlet firstAncestorToScroll;\n\n\t\t// Let's scroll target's ancestors first to reveal it. Then, once the ancestor scrolls\n\t\t// settled down, the algorithm can eventually scroll the viewport of the current window.\n\t\t//\n\t\t// Note: If the current window is target's **original** window (e.g. the first one),\n\t\t// start scrolling the closest parent of the target. If not, scroll the closest parent\n\t\t// of an iframe that resides in the current window.\n\t\tif ( currentWindow == targetWindow ) {\n\t\t\tfirstAncestorToScroll = getParentElement( target );\n\t\t} else {\n\t\t\tfirstAncestorToScroll = getParentElement( currentFrame );\n\t\t}\n\n\t\t// Scroll the target's ancestors first. Once done, scrolling the viewport is easy.\n\t\tscrollAncestorsToShowRect( firstAncestorToScroll, () => {\n\t\t\t// Note: If the target does not belong to the current window **directly**,\n\t\t\t// i.e. it resides in an iframe belonging to the window, obtain the target's rect\n\t\t\t// in the coordinates of the current window. By default, a Rect returns geometry\n\t\t\t// relative to the current window's viewport. To make it work in a parent window,\n\t\t\t// it must be shifted.\n\t\t\treturn getRectRelativeToWindow( target, currentWindow );\n\t\t} );\n\n\t\t// Obtain the rect of the target after it has been scrolled within its ancestors.\n\t\t// It's time to scroll the viewport.\n\t\tconst targetRect = getRectRelativeToWindow( target, currentWindow );\n\n\t\tscrollWindowToShowRect( currentWindow, targetRect, viewportOffset );\n\n\t\tif ( currentWindow.parent != currentWindow ) {\n\t\t\t// Keep the reference to the ' +\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'spotify',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(artist\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(album\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(track\\/\\w+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t`' +\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'youtube',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/watch\\?v=([\\w-]+)/,\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/v\\/([\\w-]+)/,\n\t\t\t\t\t\t/^youtube\\.com\\/embed\\/([\\w-]+)/,\n\t\t\t\t\t\t/^youtu\\.be\\/([\\w-]+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t`' +\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'vimeo',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^vimeo\\.com\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/[^/]+\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/album\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/channels\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/groups\\/[^/]+\\/videos\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/ondemand\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^player\\.vimeo\\.com\\/video\\/(\\d+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t`' +\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'instagram',\n\t\t\t\t\turl: /^instagram\\.com\\/p\\/(\\w+)/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'twitter',\n\t\t\t\t\turl: /^twitter\\.com/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'googleMaps',\n\t\t\t\t\turl: /^google\\.com\\/maps/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'flickr',\n\t\t\t\t\turl: /^flickr\\.com/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'facebook',\n\t\t\t\t\turl: /^facebook\\.com/\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\t/**\n\t\t * The media registry managing the media providers in the editor.\n\t\t *\n\t\t * @member {module:media-embed/mediaregistry~MediaRegistry} #registry\n\t\t */\n\t\tthis.registry = new MediaRegistry( editor.locale, editor.config.get( 'mediaEmbed' ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst renderMediaPreview = editor.config.get( 'mediaEmbed.previewsInData' );\n\t\tconst elementName = editor.config.get( 'mediaEmbed.elementName' );\n\n\t\tconst registry = this.registry;\n\n\t\teditor.commands.add( 'mediaEmbed', new MediaEmbedCommand( editor ) );\n\n\t\t// Configure the schema.\n\t\tschema.register( 'media', {\n\t\t\tisObject: true,\n\t\t\tisBlock: true,\n\t\t\tallowWhere: '$block',\n\t\t\tallowAttributes: [ 'url' ]\n\t\t} );\n\n\t\t// Model -> Data\n\t\tconversion.for( 'dataDowncast' ).elementToElement( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' );\n\n\t\t\t\treturn createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderMediaPreview: url && renderMediaPreview\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> Data (url -> data-oembed-url)\n\t\tconversion.for( 'dataDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderMediaPreview\n\t\t\t} ) );\n\n\t\t// Model -> View (element)\n\t\tconversion.for( 'editingDowncast' ).elementToElement( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' );\n\t\t\t\tconst figure = createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderForEditingView: true\n\t\t\t\t} );\n\n\t\t\t\treturn toMediaWidget( figure, writer, t( 'media widget' ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> View (url -> data-oembed-url)\n\t\tconversion.for( 'editingDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderForEditingView: true\n\t\t\t} ) );\n\n\t\t// View -> Model (data-oembed-url -> url)\n\t\tconversion.for( 'upcast' )\n\t\t\t// Upcast semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: element => [ 'oembed', elementName ].includes( element.name ) && element.getAttribute( 'url' ) ?\n\t\t\t\t\t{ name: true } :\n\t\t\t\t\tnull,\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'url' );\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// Upcast non-semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t'data-oembed-url': true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'data-oembed-url' );\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module media-embed/automediaembed\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { LiveRange, LivePosition } from 'ckeditor5/src/engine';\nimport { Clipboard } from 'ckeditor5/src/clipboard';\nimport { Undo } from 'ckeditor5/src/undo';\nimport { global } from 'ckeditor5/src/utils';\n\nimport MediaEmbedEditing from './mediaembedediting';\nimport { insertMedia } from './utils';\n\nconst URL_REGEXP = /^(?:http(s)?:\\/\\/)?[\\w-]+\\.[\\w-.~:/?#[\\]@!$&'()*+,;=%]+$/;\n\n/**\n * The auto-media embed plugin. It recognizes media links in the pasted content and embeds\n * them shortly after they are injected into the document.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class AutoMediaEmbed extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ Clipboard, Undo ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'AutoMediaEmbed';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\t/**\n\t\t * The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t\t * cleaning of the timeout.\n\t\t *\n\t\t * @private\n\t\t * @member {Number} #_timeoutId\n\t\t */\n\t\tthis._timeoutId = null;\n\n\t\t/**\n\t\t * The position where the `` element will be inserted after the timeout,\n\t\t * determined each time the new content is pasted into the document.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/liveposition~LivePosition} #_positionToInsert\n\t\t */\n\t\tthis._positionToInsert = null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\n\t\t// We need to listen on `Clipboard#inputTransformation` because we need to save positions of selection.\n\t\t// After pasting, the content between those positions will be checked for a URL that could be transformed\n\t\t// into media.\n\t\tthis.listenTo( editor.plugins.get( 'ClipboardPipeline' ), 'inputTransformation', () => {\n\t\t\tconst firstRange = modelDocument.selection.getFirstRange();\n\n\t\t\tconst leftLivePosition = LivePosition.fromPosition( firstRange.start );\n\t\t\tleftLivePosition.stickiness = 'toPrevious';\n\n\t\t\tconst rightLivePosition = LivePosition.fromPosition( firstRange.end );\n\t\t\trightLivePosition.stickiness = 'toNext';\n\n\t\t\tmodelDocument.once( 'change:data', () => {\n\t\t\t\tthis._embedMediaBetweenPositions( leftLivePosition, rightLivePosition );\n\n\t\t\t\tleftLivePosition.detach();\n\t\t\t\trightLivePosition.detach();\n\t\t\t}, { priority: 'high' } );\n\t\t} );\n\n\t\teditor.commands.get( 'undo' ).on( 'execute', () => {\n\t\t\tif ( this._timeoutId ) {\n\t\t\t\tglobal.window.clearTimeout( this._timeoutId );\n\t\t\t\tthis._positionToInsert.detach();\n\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Analyzes the part of the document between provided positions in search for a URL representing media.\n\t * When the URL is found, it is automatically converted into media.\n\t *\n\t * @protected\n\t * @param {module:engine/model/liveposition~LivePosition} leftPosition Left position of the selection.\n\t * @param {module:engine/model/liveposition~LivePosition} rightPosition Right position of the selection.\n\t */\n\t_embedMediaBetweenPositions( leftPosition, rightPosition ) {\n\t\tconst editor = this.editor;\n\t\tconst mediaRegistry = editor.plugins.get( MediaEmbedEditing ).registry;\n\t\t// TODO: Use marker instead of LiveRange & LivePositions.\n\t\tconst urlRange = new LiveRange( leftPosition, rightPosition );\n\t\tconst walker = urlRange.getWalker( { ignoreElementEnd: true } );\n\n\t\tlet url = '';\n\n\t\tfor ( const node of walker ) {\n\t\t\tif ( node.item.is( '$textProxy' ) ) {\n\t\t\t\turl += node.item.data;\n\t\t\t}\n\t\t}\n\n\t\turl = url.trim();\n\n\t\t// If the URL does not match to universal URL regexp, let's skip that.\n\t\tif ( !url.match( URL_REGEXP ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If the URL represents a media, let's use it.\n\t\tif ( !mediaRegistry.hasMedia( url ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst mediaEmbedCommand = editor.commands.get( 'mediaEmbed' );\n\n\t\t// Do not anything if media element cannot be inserted at the current position (#47).\n\t\tif ( !mediaEmbedCommand.isEnabled ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Position won't be available in the `setTimeout` function so let's clone it.\n\t\tthis._positionToInsert = LivePosition.fromPosition( leftPosition );\n\n\t\t// This action mustn't be executed if undo was called between pasting and auto-embedding.\n\t\tthis._timeoutId = global.window.setTimeout( () => {\n\t\t\teditor.model.change( writer => {\n\t\t\t\tthis._timeoutId = null;\n\n\t\t\t\twriter.remove( urlRange );\n\t\t\t\turlRange.detach();\n\n\t\t\t\tlet insertionPosition;\n\n\t\t\t\t// Check if position where the media element should be inserted is still valid.\n\t\t\t\t// Otherwise leave it as undefined to use document.selection - default behavior of model.insertContent().\n\t\t\t\tif ( this._positionToInsert.root.rootName !== '$graveyard' ) {\n\t\t\t\t\tinsertionPosition = this._positionToInsert;\n\t\t\t\t}\n\n\t\t\t\tinsertMedia( editor.model, url, insertionPosition );\n\n\t\t\t\tthis._positionToInsert.detach();\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t} );\n\t\t}, 100 );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module media-embed/ui/mediaformview\n */\n\nimport {\n\tButtonView,\n\tFocusCycler,\n\tLabeledFieldView,\n\tView,\n\tViewCollection,\n\tcreateLabeledInputText,\n\tinjectCssTransitionDisabler,\n\tsubmitHandler\n} from 'ckeditor5/src/ui';\nimport { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils';\nimport { icons } from 'ckeditor5/src/core';\n\n// See: #8833.\n// eslint-disable-next-line ckeditor5-rules/ckeditor-imports\nimport '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';\nimport '../../theme/mediaform.css';\n\n/**\n * The media form view controller class.\n *\n * See {@link module:media-embed/ui/mediaformview~MediaFormView}.\n *\n * @extends module:ui/view~View\n */\nexport default class MediaFormView extends View {\n\t/**\n\t * @param {Array.} validators Form validators used by {@link #isValid}.\n\t * @param {module:utils/locale~Locale} [locale] The localization services instance.\n\t */\n\tconstructor( validators, locale ) {\n\t\tsuper( locale );\n\n\t\tconst t = locale.t;\n\n\t\t/**\n\t\t * Tracks information about the DOM focus in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/focustracker~FocusTracker}\n\t\t */\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\t/**\n\t\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/keystrokehandler~KeystrokeHandler}\n\t\t */\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\t/**\n\t\t * The value of the URL input.\n\t\t *\n\t\t * @member {String} #mediaURLInputValue\n\t\t * @observable\n\t\t */\n\t\tthis.set( 'mediaURLInputValue', '' );\n\n\t\t/**\n\t\t * The URL input view.\n\t\t *\n\t\t * @member {module:ui/labeledfield/labeledfieldview~LabeledFieldView}\n\t\t */\n\t\tthis.urlInputView = this._createUrlInput();\n\n\t\t/**\n\t\t * The Save button view.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView}\n\t\t */\n\t\tthis.saveButtonView = this._createButton( t( 'Save' ), icons.check, 'ck-button-save' );\n\t\tthis.saveButtonView.type = 'submit';\n\t\tthis.saveButtonView.bind( 'isEnabled' ).to( this, 'mediaURLInputValue', value => !!value );\n\n\t\t/**\n\t\t * The Cancel button view.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView}\n\t\t */\n\t\tthis.cancelButtonView = this._createButton( t( 'Cancel' ), icons.cancel, 'ck-button-cancel', 'cancel' );\n\n\t\t/**\n\t\t * A collection of views that can be focused in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis._focusables = new ViewCollection();\n\n\t\t/**\n\t\t * Helps cycling over {@link #_focusables} in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/focuscycler~FocusCycler}\n\t\t */\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\t/**\n\t\t * An array of form validators used by {@link #isValid}.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Array.}\n\t\t */\n\t\tthis._validators = validators;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-media-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.urlInputView,\n\t\t\t\tthis.saveButtonView,\n\t\t\t\tthis.cancelButtonView\n\t\t\t]\n\t\t} );\n\n\t\tinjectCssTransitionDisabler( this );\n\n\t\t/**\n\t\t * The default info text for the {@link #urlInputView}.\n\t\t *\n\t\t * @private\n\t\t * @member {String} #_urlInputViewInfoDefault\n\t\t */\n\n\t\t/**\n\t\t * The info text with an additional tip for the {@link #urlInputView},\n\t\t * displayed when the input has some value.\n\t\t *\n\t\t * @private\n\t\t * @member {String} #_urlInputViewInfoTip\n\t\t */\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trender() {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tconst childViews = [\n\t\t\tthis.urlInputView,\n\t\t\tthis.saveButtonView,\n\t\t\tthis.cancelButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element );\n\n\t\tconst stopPropagation = data => data.stopPropagation();\n\n\t\t// Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n\t\t// keystroke handler would take over the key management in the URL input. We need to prevent\n\t\t// this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\n\t\t// Intercept the `selectstart` event, which is blocked by default because of the default behavior\n\t\t// of the DropdownView#panelView.\n\t\t// TODO: blocking `selectstart` in the #panelView should be configurable per–drop–down instance.\n\t\tthis.listenTo( this.urlInputView.element, 'selectstart', ( evt, domEvt ) => {\n\t\t\tdomEvt.stopPropagation();\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Focuses the fist {@link #_focusables} in the form.\n\t */\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * The native DOM `value` of the {@link #urlInputView} element.\n\t *\n\t * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}\n\t * which works one way only and may not represent the actual state of the component in the DOM.\n\t *\n\t * @type {String}\n\t */\n\tget url() {\n\t\treturn this.urlInputView.fieldView.element.value.trim();\n\t}\n\n\tset url( url ) {\n\t\tthis.urlInputView.fieldView.element.value = url.trim();\n\t}\n\n\t/**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t *\n\t * @returns {Boolean}\n\t */\n\tisValid() {\n\t\tthis.resetFormStatus();\n\n\t\tfor ( const validator of this._validators ) {\n\t\t\tconst errorText = validator( this );\n\n\t\t\t// One error per field is enough.\n\t\t\tif ( errorText ) {\n\t\t\t\t// Apply updated error.\n\t\t\t\tthis.urlInputView.errorText = errorText;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Cleans up the supplementary error and information text of the {@link #urlInputView}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */\n\tresetFormStatus() {\n\t\tthis.urlInputView.errorText = null;\n\t\tthis.urlInputView.infoText = this._urlInputViewInfoDefault;\n\t}\n\n\t/**\n\t * Creates a labeled input view.\n\t *\n\t * @private\n\t * @returns {module:ui/labeledfield/labeledfieldview~LabeledFieldView} Labeled input view instance.\n\t */\n\t_createUrlInput() {\n\t\tconst t = this.locale.t;\n\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\t\tconst inputField = labeledInput.fieldView;\n\n\t\tthis._urlInputViewInfoDefault = t( 'Paste the media URL in the input.' );\n\t\tthis._urlInputViewInfoTip = t( 'Tip: Paste the URL into the content to embed faster.' );\n\n\t\tlabeledInput.label = t( 'Media URL' );\n\t\tlabeledInput.infoText = this._urlInputViewInfoDefault;\n\n\t\tinputField.on( 'input', () => {\n\t\t\t// Display the tip text only when there is some value. Otherwise fall back to the default info text.\n\t\t\tlabeledInput.infoText = inputField.element.value ? this._urlInputViewInfoTip : this._urlInputViewInfoDefault;\n\t\t\tthis.mediaURLInputValue = inputField.element.value.trim();\n\t\t} );\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Creates a button view.\n\t *\n\t * @private\n\t * @param {String} label The button label.\n\t * @param {String} icon The button icon.\n\t * @param {String} className The additional button CSS class name.\n\t * @param {String} [eventName] An event name that the `ButtonView#execute` event will be delegated to.\n\t * @returns {module:ui/button/buttonview~ButtonView} The button view instance.\n\t */\n\t_createButton( label, icon, className, eventName ) {\n\t\tconst button = new ButtonView( this.locale );\n\n\t\tbutton.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbutton.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: className\n\t\t\t}\n\t\t} );\n\n\t\tif ( eventName ) {\n\t\t\tbutton.delegate( 'execute' ).to( this, eventName );\n\t\t}\n\n\t\treturn button;\n\t}\n}\n\n/**\n * Fired when the form view is submitted (when one of the children triggered the submit event),\n * e.g. click on {@link #saveButtonView}.\n *\n * @event submit\n */\n\n/**\n * Fired when the form view is canceled, e.g. by a click on {@link #cancelButtonView}.\n *\n * @event cancel\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module media-embed/mediaembedui\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { createDropdown } from 'ckeditor5/src/ui';\n\nimport MediaFormView from './ui/mediaformview';\nimport MediaEmbedEditing from './mediaembedediting';\nimport mediaIcon from '../theme/icons/media.svg';\n\n/**\n * The media embed UI plugin.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class MediaEmbedUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ MediaEmbedEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'MediaEmbedUI';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst command = editor.commands.get( 'mediaEmbed' );\n\t\tconst registry = editor.plugins.get( MediaEmbedEditing ).registry;\n\n\t\teditor.ui.componentFactory.add( 'mediaEmbed', locale => {\n\t\t\tconst dropdown = createDropdown( locale );\n\n\t\t\tconst mediaForm = new MediaFormView( getFormValidators( editor.t, registry ), editor.locale );\n\n\t\t\tthis._setUpDropdown( dropdown, mediaForm, command, editor );\n\t\t\tthis._setUpForm( dropdown, mediaForm, command );\n\n\t\t\treturn dropdown;\n\t\t} );\n\t}\n\n\t/**\n\t * @private\n\t * @param {module:ui/dropdown/dropdownview~DropdownView} dropdown\n\t * @param {module:ui/view~View} form\n\t * @param {module:media-embed/mediaembedcommand~MediaEmbedCommand} command\n\t */\n\t_setUpDropdown( dropdown, form, command ) {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst button = dropdown.buttonView;\n\n\t\tdropdown.bind( 'isEnabled' ).to( command );\n\t\tdropdown.panelView.children.add( form );\n\n\t\tbutton.set( {\n\t\t\tlabel: t( 'Insert media' ),\n\t\t\ticon: mediaIcon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\t// Note: Use the low priority to make sure the following listener starts working after the\n\t\t// default action of the drop-down is executed (i.e. the panel showed up). Otherwise, the\n\t\t// invisible form/input cannot be focused/selected.\n\t\tbutton.on( 'open', () => {\n\t\t\tform.disableCssTransitions();\n\n\t\t\t// Make sure that each time the panel shows up, the URL field remains in sync with the value of\n\t\t\t// the command. If the user typed in the input, then canceled (`urlInputView#fieldView#value` stays\n\t\t\t// unaltered) and re-opened it without changing the value of the media command (e.g. because they\n\t\t\t// didn't change the selection), they would see the old value instead of the actual value of the\n\t\t\t// command.\n\t\t\tform.url = command.value || '';\n\t\t\tform.urlInputView.fieldView.select();\n\t\t\tform.focus();\n\t\t\tform.enableCssTransitions();\n\t\t}, { priority: 'low' } );\n\n\t\tdropdown.on( 'submit', () => {\n\t\t\tif ( form.isValid() ) {\n\t\t\t\teditor.execute( 'mediaEmbed', form.url );\n\t\t\t\tcloseUI();\n\t\t\t}\n\t\t} );\n\n\t\tdropdown.on( 'change:isOpen', () => form.resetFormStatus() );\n\t\tdropdown.on( 'cancel', () => closeUI() );\n\n\t\tfunction closeUI() {\n\t\t\teditor.editing.view.focus();\n\t\t\tdropdown.isOpen = false;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t * @param {module:ui/dropdown/dropdownview~DropdownView} dropdown\n\t * @param {module:ui/view~View} form\n\t * @param {module:media-embed/mediaembedcommand~MediaEmbedCommand} command\n\t */\n\t_setUpForm( dropdown, form, command ) {\n\t\tform.delegate( 'submit', 'cancel' ).to( dropdown );\n\t\tform.urlInputView.bind( 'value' ).to( command, 'value' );\n\n\t\t// Form elements should be read-only when corresponding commands are disabled.\n\t\tform.urlInputView.bind( 'isReadOnly' ).to( command, 'isEnabled', value => !value );\n\t}\n}\n\nfunction getFormValidators( t, registry ) {\n\treturn [\n\t\tform => {\n\t\t\tif ( !form.url.length ) {\n\t\t\t\treturn t( 'The URL must not be empty.' );\n\t\t\t}\n\t\t},\n\t\tform => {\n\t\t\tif ( !registry.hasMedia( form.url ) ) {\n\t\t\t\treturn t( 'This media URL is not supported.' );\n\t\t\t}\n\t\t}\n\t];\n}\n","export default \"\";","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module paste-from-office/filters/list\n */\n\nimport { Matcher, UpcastWriter } from 'ckeditor5/src/engine';\n\n/**\n * Transforms Word specific list-like elements to the semantic HTML lists.\n *\n * Lists in Word are represented by block elements with special attributes like:\n *\n *\t\t

...

// Paragraph based list.\n *\t\t

...

// Heading 1 based list.\n *\n * @param {module:engine/view/documentfragment~DocumentFragment} documentFragment The view structure to be transformed.\n * @param {String} stylesString Styles from which list-like elements styling will be extracted.\n */\nexport function transformListItemLikeElementsIntoLists( documentFragment, stylesString ) {\n\tif ( !documentFragment.childCount ) {\n\t\treturn;\n\t}\n\n\tconst writer = new UpcastWriter( documentFragment.document );\n\tconst itemLikeElements = findAllItemLikeElements( documentFragment, writer );\n\n\tif ( !itemLikeElements.length ) {\n\t\treturn;\n\t}\n\n\tlet currentList = null;\n\tlet currentIndentation = 1;\n\n\titemLikeElements.forEach( ( itemLikeElement, i ) => {\n\t\tconst isDifferentList = isNewListNeeded( itemLikeElements[ i - 1 ], itemLikeElement );\n\t\tconst previousItemLikeElement = isDifferentList ? null : itemLikeElements[ i - 1 ];\n\t\tconst indentationDifference = getIndentationDifference( previousItemLikeElement, itemLikeElement );\n\n\t\tif ( isDifferentList ) {\n\t\t\tcurrentList = null;\n\t\t\tcurrentIndentation = 1;\n\t\t}\n\n\t\tif ( !currentList || indentationDifference !== 0 ) {\n\t\t\tconst listStyle = detectListStyle( itemLikeElement, stylesString );\n\n\t\t\tif ( !currentList ) {\n\t\t\t\tcurrentList = insertNewEmptyList( listStyle, itemLikeElement.element, writer );\n\t\t\t} else if ( itemLikeElement.indent > currentIndentation ) {\n\t\t\t\tconst lastListItem = currentList.getChild( currentList.childCount - 1 );\n\t\t\t\tconst lastListItemChild = lastListItem.getChild( lastListItem.childCount - 1 );\n\n\t\t\t\tcurrentList = insertNewEmptyList( listStyle, lastListItemChild, writer );\n\t\t\t\tcurrentIndentation += 1;\n\t\t\t} else if ( itemLikeElement.indent < currentIndentation ) {\n\t\t\t\tconst differentIndentation = currentIndentation - itemLikeElement.indent;\n\n\t\t\t\tcurrentList = findParentListAtLevel( currentList, differentIndentation );\n\t\t\t\tcurrentIndentation = parseInt( itemLikeElement.indent );\n\t\t\t}\n\n\t\t\tif ( itemLikeElement.indent <= currentIndentation ) {\n\t\t\t\tif ( !currentList.is( 'element', listStyle.type ) ) {\n\t\t\t\t\tcurrentList = writer.rename( listStyle.type, currentList );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst listItem = transformElementIntoListItem( itemLikeElement.element, writer );\n\n\t\twriter.appendChild( listItem, currentList );\n\t} );\n}\n\n/**\n * Removes paragraph wrapping content inside a list item.\n *\n * @param {module:engine/view/documentfragment~DocumentFragment} documentFragment\n * @param {module:engine/view/upcastwriter~UpcastWriter} writer\n */\nexport function unwrapParagraphInListItem( documentFragment, writer ) {\n\tfor ( const value of writer.createRangeIn( documentFragment ) ) {\n\t\tconst element = value.item;\n\n\t\tif ( element.is( 'element', 'li' ) ) {\n\t\t\t// Google Docs allows on single paragraph inside LI.\n\t\t\tconst firstChild = element.getChild( 0 );\n\n\t\t\tif ( firstChild && firstChild.is( 'element', 'p' ) ) {\n\t\t\t\twriter.unwrapElement( firstChild );\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Finds all list-like elements in a given document fragment.\n//\n// @param {module:engine/view/documentfragment~DocumentFragment} documentFragment Document fragment\n// in which to look for list-like nodes.\n// @param {module:engine/view/upcastwriter~UpcastWriter} writer\n// @returns {Array.} Array of found list-like items. Each item is an object containing:\n//\n//\t\t* {module:engine/src/view/element~Element} element List-like element.\n//\t\t* {Number} id List item id parsed from `mso-list` style (see `getListItemData()` function).\n//\t\t* {Number} order List item creation order parsed from `mso-list` style (see `getListItemData()` function).\n//\t\t* {Number} indent List item indentation level parsed from `mso-list` style (see `getListItemData()` function).\nfunction findAllItemLikeElements( documentFragment, writer ) {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\t// Matcher for finding list-like elements.\n\tconst itemLikeElementsMatcher = new Matcher( {\n\t\tname: /^p|h\\d+$/,\n\t\tstyles: {\n\t\t\t'mso-list': /.*/\n\t\t}\n\t} );\n\n\tconst itemLikeElements = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type === 'elementStart' && itemLikeElementsMatcher.match( value.item ) ) {\n\t\t\tconst itemData = getListItemData( value.item );\n\n\t\t\titemLikeElements.push( {\n\t\t\t\telement: value.item,\n\t\t\t\tid: itemData.id,\n\t\t\t\torder: itemData.order,\n\t\t\t\tindent: itemData.indent\n\t\t\t} );\n\t\t}\n\t}\n\n\treturn itemLikeElements;\n}\n\n// Extracts list item style from the provided CSS.\n//\n// List item style is extracted from the CSS stylesheet. Each list with its specific style attribute\n// value (`mso-list:l1 level1 lfo1`) has its dedicated properties in a CSS stylesheet defined with a selector like:\n//\n// \t\t@list l1:level1 { ... }\n//\n// It contains `mso-level-number-format` property which defines list numbering/bullet style. If this property\n// is not defined it means default `decimal` numbering.\n//\n// Here CSS string representation is used as `mso-level-number-format` property is an invalid CSS property\n// and will be removed during CSS parsing.\n//\n// @param {Object} listLikeItem List-like item for which list style will be searched for. Usually\n// a result of `findAllItemLikeElements()` function.\n// @param {String} stylesString CSS stylesheet.\n// @returns {Object} result\n// @returns {String} result.type List type, could be `ul` or `ol`.\n// @returns {String|null} result.style List style, for example: `decimal`, `lower-roman`, etc. It is extracted\n// directly from Word stylesheet and adjusted to represent proper values for the CSS `list-style-type` property.\n// If it cannot be adjusted, the `null` value is returned.\nfunction detectListStyle( listLikeItem, stylesString ) {\n\tconst listStyleRegexp = new RegExp( `@list l${ listLikeItem.id }:level${ listLikeItem.indent }\\\\s*({[^}]*)`, 'gi' );\n\tconst listStyleTypeRegex = /mso-level-number-format:([^;]{0,100});/gi;\n\n\tconst listStyleMatch = listStyleRegexp.exec( stylesString );\n\n\tlet listStyleType = 'decimal'; // Decimal is default one.\n\tlet type = 'ol'; //
    is default list.\n\n\tif ( listStyleMatch && listStyleMatch[ 1 ] ) {\n\t\tconst listStyleTypeMatch = listStyleTypeRegex.exec( listStyleMatch[ 1 ] );\n\n\t\tif ( listStyleTypeMatch && listStyleTypeMatch[ 1 ] ) {\n\t\t\tlistStyleType = listStyleTypeMatch[ 1 ].trim();\n\t\t\ttype = listStyleType !== 'bullet' && listStyleType !== 'image' ? 'ol' : 'ul';\n\t\t}\n\n\t\t// Styles for the numbered lists are always defined in the Word CSS stylesheet.\n\t\t// Unordered lists MAY contain a value for the Word CSS definition `mso-level-text` but sometimes\n\t\t// this tag is missing. And because of that, we cannot depend on that. We need to predict the list style value\n\t\t// based on the list style marker element.\n\t\tif ( listStyleType === 'bullet' ) {\n\t\t\tconst bulletedStyle = findBulletedListStyle( listLikeItem.element );\n\n\t\t\tif ( bulletedStyle ) {\n\t\t\t\tlistStyleType = bulletedStyle;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\ttype,\n\t\tstyle: mapListStyleDefinition( listStyleType )\n\t};\n}\n\n// Tries to extract the `list-style-type` value based on the marker element for bulleted list.\n//\n// @param {module:engine/view/element~Element} element\n// @returns {module:engine/view/element~Element|null}\nfunction findBulletedListStyle( element ) {\n\tconst listMarkerElement = findListMarkerNode( element );\n\n\tif ( !listMarkerElement ) {\n\t\treturn null;\n\t}\n\n\tconst listMarker = listMarkerElement._data;\n\n\tif ( listMarker === 'o' ) {\n\t\treturn 'circle';\n\t} else if ( listMarker === '·' ) {\n\t\treturn 'disc';\n\t}\n\t// Word returns '§' instead of '■' for the square list style.\n\telse if ( listMarker === '§' ) {\n\t\treturn 'square';\n\t}\n\n\treturn null;\n}\n\n// Tries to find a text node that represents the marker element (list-style-type).\n//\n// @param {module:engine/view/element~Element} element\n// @returns {module:engine/view/text~Text|null}\nfunction findListMarkerNode( element ) {\n\t// If the first child is a text node, it is a value for the element.\n\tif ( element.getChild( 0 ).is( '$text' ) ) {\n\t\treturn null;\n\t}\n\n\tconst textNodeOrElement = element.getChild( 0 ).getChild( 0 );\n\n\tif ( textNodeOrElement.is( '$text' ) ) {\n\t\treturn textNodeOrElement;\n\t}\n\n\treturn textNodeOrElement.getChild( 0 );\n}\n\n// Parses the `list-style-type` value extracted directly from the Word CSS stylesheet and returns proper CSS definition.\n//\n// @param {String|null} value\n// @returns {String|null}\nfunction mapListStyleDefinition( value ) {\n\tswitch ( value ) {\n\t\tcase 'arabic-leading-zero':\n\t\t\treturn 'decimal-leading-zero';\n\t\tcase 'alpha-upper':\n\t\t\treturn 'upper-alpha';\n\t\tcase 'alpha-lower':\n\t\t\treturn 'lower-alpha';\n\t\tcase 'roman-upper':\n\t\t\treturn 'upper-roman';\n\t\tcase 'roman-lower':\n\t\t\treturn 'lower-roman';\n\t\tcase 'circle':\n\t\tcase 'disc':\n\t\tcase 'square':\n\t\t\treturn value;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\n// Creates empty list of a given type and inserts it after a specified element.\n//\n// @param {Object} listStyle List style object which determines the type of newly created list.\n// Usually a result of `detectListStyle()` function.\n// @param {module:engine/view/element~Element} element Element after which list is inserted.\n// @param {module:engine/view/upcastwriter~UpcastWriter} writer\n// @returns {module:engine/view/element~Element} Newly created list element.\n\nfunction insertNewEmptyList( listStyle, element, writer ) {\n\tconst parent = element.parent;\n\tconst list = writer.createElement( listStyle.type );\n\tconst position = parent.getChildIndex( element ) + 1;\n\n\twriter.insertChild( position, list, parent );\n\n\t// We do not support modifying the marker for a particular list item.\n\t// Set the value for the `list-style-type` property directly to the list container.\n\tif ( listStyle.style ) {\n\t\twriter.setStyle( 'list-style-type', listStyle.style, list );\n\t}\n\n\treturn list;\n}\n\n// Transforms a given element into a semantic list item. As the function operates on a provided\n// {module:engine/src/view/element~Element element} it will modify the view structure to which this element belongs.\n//\n// @param {module:engine/view/element~Element} element Element which will be transformed into a list item.\n// @param {module:engine/view/upcastwriter~UpcastWriter} writer\n// @returns {module:engine/view/element~Element} New element to which the given one was transformed. It is\n// inserted in place of the old element (the reference to the old element is lost due to renaming).\nfunction transformElementIntoListItem( element, writer ) {\n\tremoveBulletElement( element, writer );\n\n\treturn writer.rename( 'li', element );\n}\n\n// Extracts list item information from Word specific list-like element style:\n//\n//\t\t`style=\"mso-list:l1 level1 lfo1\"`\n//\n// where:\n//\n//\t\t* `l1` is a list id (however it does not mean this is a continuous list - see #43),\n//\t\t* `level1` is a list item indentation level,\n//\t\t* `lfo1` is a list insertion order in a document.\n//\n// @param {module:engine/view/element~Element} element Element from which style data is extracted.\n// @returns {Object} result\n// @returns {Number} result.id Parent list id.\n// @returns {Number} result.order List item creation order.\n// @returns {Number} result.indent List item indentation level.\nfunction getListItemData( element ) {\n\tconst data = {};\n\tconst listStyle = element.getStyle( 'mso-list' );\n\n\tif ( listStyle ) {\n\t\tconst idMatch = listStyle.match( /(^|\\s{1,100})l(\\d+)/i );\n\t\tconst orderMatch = listStyle.match( /\\s{0,100}lfo(\\d+)/i );\n\t\tconst indentMatch = listStyle.match( /\\s{0,100}level(\\d+)/i );\n\n\t\tif ( idMatch && orderMatch && indentMatch ) {\n\t\t\tdata.id = idMatch[ 2 ];\n\t\t\tdata.order = orderMatch[ 1 ];\n\t\t\tdata.indent = indentMatch[ 1 ];\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// Removes span with a numbering/bullet from a given element.\n//\n// @param {module:engine/view/element~Element} element\n// @param {module:engine/view/upcastwriter~UpcastWriter} writer\nfunction removeBulletElement( element, writer ) {\n\t// Matcher for finding `span` elements holding lists numbering/bullets.\n\tconst bulletMatcher = new Matcher( {\n\t\tname: 'span',\n\t\tstyles: {\n\t\t\t'mso-list': 'Ignore'\n\t\t}\n\t} );\n\n\tconst range = writer.createRangeIn( element );\n\n\tfor ( const value of range ) {\n\t\tif ( value.type === 'elementStart' && bulletMatcher.match( value.item ) ) {\n\t\t\twriter.remove( value.item );\n\t\t}\n\t}\n}\n\n// Whether the previous and current items belong to the same list. It is determined based on `item.id`\n// (extracted from `mso-list` style, see #getListItemData) and a previous sibling of the current item.\n//\n// However, it's quite easy to change the `id` attribute for nested lists in Word. It will break the list feature while pasting.\n// Let's check also the `indent` attribute. If the difference between those two elements is equal to 1, we can assume that\n// the `currentItem` is a beginning of the nested list because lists in CKEditor 5 always start with the `indent=0` attribute.\n// See: https://github.com/ckeditor/ckeditor5/issues/7805.\n//\n// @param {Object} previousItem\n// @param {Object} currentItem\n// @returns {Boolean}\nfunction isNewListNeeded( previousItem, currentItem ) {\n\tif ( !previousItem ) {\n\t\treturn true;\n\t}\n\n\tif ( previousItem.id !== currentItem.id ) {\n\t\t// See: https://github.com/ckeditor/ckeditor5/issues/7805.\n\t\t//\n\t\t// * List item 1.\n\t\t// - Nested list item 1.\n\t\tif ( currentItem.indent - previousItem.indent === 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tconst previousSibling = currentItem.element.previousSibling;\n\n\tif ( !previousSibling ) {\n\t\treturn true;\n\t}\n\n\t// Even with the same id the list does not have to be continuous (#43).\n\treturn !isList( previousSibling );\n}\n\nfunction isList( element ) {\n\treturn element.is( 'element', 'ol' ) || element.is( 'element', 'ul' );\n}\n\n// Calculates the indentation difference between two given list items (based on the indent attribute\n// extracted from the `mso-list` style, see #getListItemData).\n//\n// @param {Object} previousItem\n// @param {Object} currentItem\n// @returns {Number}\nfunction getIndentationDifference( previousItem, currentItem ) {\n\treturn previousItem ? currentItem.indent - previousItem.indent : currentItem.indent - 1;\n}\n\n// Finds the parent list element (ul/ol) of a given list element with indentation level lower by a given value.\n//\n// @param {module:engine/view/element~Element} listElement List element from which to start looking for a parent list.\n// @param {Number} indentationDifference Indentation difference between lists.\n// @returns {module:engine/view/element~Element} Found list element with indentation level lower by a given value.\nfunction findParentListAtLevel( listElement, indentationDifference ) {\n\tconst ancestors = listElement.getAncestors( { parentFirst: true } );\n\n\tlet parentList = null;\n\tlet levelChange = 0;\n\n\tfor ( const ancestor of ancestors ) {\n\t\tif ( ancestor.name === 'ul' || ancestor.name === 'ol' ) {\n\t\t\tlevelChange++;\n\t\t}\n\n\t\tif ( levelChange === indentationDifference ) {\n\t\t\tparentList = ancestor;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn parentList;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module paste-from-office/normalizers/googledocsnormalizer\n */\n\nimport { UpcastWriter } from 'ckeditor5/src/engine';\n\nimport removeBoldWrapper from '../filters/removeboldwrapper';\nimport { unwrapParagraphInListItem } from '../filters/list';\n\nconst googleDocsMatch = /id=(\"|')docs-internal-guid-[-0-9a-f]+(\"|')/i;\n\n/**\n * Normalizer for the content pasted from Google Docs.\n *\n * @implements module:paste-from-office/normalizer~Normalizer\n */\nexport default class GoogleDocsNormalizer {\n\t/**\n\t * Creates a new `GoogleDocsNormalizer` instance.\n\t *\n\t * @param {module:engine/view/document~Document} document View document.\n\t */\n\tconstructor( document ) {\n\t\t/**\n\t\t * @readonly\n\t\t * @type {module:engine/view/document~Document}\n\t\t */\n\t\tthis.document = document;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tisActive( htmlString ) {\n\t\treturn googleDocsMatch.test( htmlString );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\texecute( data ) {\n\t\tconst writer = new UpcastWriter( this.document );\n\n\t\tremoveBoldWrapper( data.content, writer );\n\t\tunwrapParagraphInListItem( data.content, writer );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module paste-from-office/filters/removeboldwrapper\n */\n\n/**\n * Removes `` tag wrapper added by Google Docs to a copied content.\n *\n * @param {module:engine/view/documentfragment~DocumentFragment} documentFragment element `data.content` obtained from clipboard\n * @param {module:engine/view/upcastwriter~UpcastWriter} writer\n */\nexport default function removeBoldWrapper( documentFragment, writer ) {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'b' ) && child.getStyle( 'font-weight' ) === 'normal' ) {\n\t\t\tconst childIndex = documentFragment.getChildIndex( child );\n\n\t\t\twriter.remove( child );\n\t\t\twriter.insertChild( childIndex, child.getChildren(), documentFragment );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module paste-from-office/filters/space\n */\n\n/**\n * Replaces last space preceding elements closing tag with ` `. Such operation prevents spaces from being removed\n * during further DOM/View processing (see especially {@link module:engine/view/domconverter~DomConverter#_processDataFromDomText}).\n * This method also takes into account Word specific `` empty tags.\n * Additionally multiline sequences of spaces and new lines between tags are removed (see #39 and #40).\n *\n * @param {String} htmlString HTML string in which spacing should be normalized.\n * @returns {String} Input HTML with spaces normalized.\n */\nexport function normalizeSpacing( htmlString ) {\n\t// Run normalizeSafariSpaceSpans() two times to cover nested spans.\n\treturn normalizeSafariSpaceSpans( normalizeSafariSpaceSpans( htmlString ) )\n\t\t// Remove all \\r\\n from \"spacerun spans\" so the last replace line doesn't strip all whitespaces.\n\t\t.replace( /([^\\S\\r\\n]*?)[\\r\\n]+([^\\S\\r\\n]*<\\/span>)/g, '$1$2' )\n\t\t.replace( /<\\/span>/g, '' )\n\t\t.replace( / <\\//g, '\\u00A0<\\/o:p>/g, '\\u00A0' )\n\t\t// Remove block filler from empty paragraph. Safari uses \\u00A0 instead of  .\n\t\t.replace( /( |\\u00A0)<\\/o:p>/g, '' )\n\t\t// Remove all whitespaces when they contain any \\r or \\n.\n\t\t.replace( />([^\\S\\r\\n]*[\\r\\n]\\s*)<' );\n}\n\n/**\n * Normalizes spacing in special Word `spacerun spans` (`\\s+`) by replacing\n * all spaces with `  ` pairs. This prevents spaces from being removed during further DOM/View processing\n * (see especially {@link module:engine/view/domconverter~DomConverter#_processDataFromDomText}).\n *\n * @param {Document} htmlDocument Native `Document` object in which spacing should be normalized.\n */\nexport function normalizeSpacerunSpans( htmlDocument ) {\n\thtmlDocument.querySelectorAll( 'span[style*=spacerun]' ).forEach( el => {\n\t\tconst innerTextLength = el.innerText.length || 0;\n\n\t\tel.innerHTML = Array( innerTextLength + 1 ).join( '\\u00A0 ' ).substr( 0, innerTextLength );\n\t} );\n}\n\n// Normalizes specific spacing generated by Safari when content pasted from Word (` `)\n// by replacing all spaces sequences longer than 1 space with `  ` pairs. This prevents spaces from being removed during\n// further DOM/View processing (see especially {@link module:engine/view/domconverter~DomConverter#_processDataFromDomText}).\n//\n// This function is similar to {@link module:clipboard/utils/normalizeclipboarddata normalizeClipboardData util} but uses\n// regular spaces /   sequence for replacement.\n//\n// @param {String} htmlString HTML string in which spacing should be normalized\n// @returns {String} Input HTML with spaces normalized.\nfunction normalizeSafariSpaceSpans( htmlString ) {\n\treturn htmlString.replace( /(\\s+)<\\/span>/g, ( fullMatch, spaces ) => {\n\t\treturn spaces.length === 1 ? ' ' : Array( spaces.length + 1 ).join( '\\u00A0 ' ).substr( 0, spaces.length );\n\t} );\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module paste-from-office/filters/parse\n */\n\n/* globals DOMParser */\n\nimport { DomConverter, ViewDocument } from 'ckeditor5/src/engine';\n\nimport { normalizeSpacing, normalizeSpacerunSpans } from './space';\n\n/**\n * Parses provided HTML extracting contents of `` and `